extensions/UIConfig_spropctrlr.mk                      |    1 
 extensions/source/propctrlr/MasterDetailLinkDialog.cxx |    7 
 extensions/source/propctrlr/formcomponenthandler.cxx   |    6 
 extensions/source/propctrlr/formlinkdialog.cxx         |  182 +++++-------
 extensions/source/propctrlr/formlinkdialog.hxx         |   40 +-
 extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui      |   50 ---
 extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui   |  244 +++++++++++++++--
 7 files changed, 323 insertions(+), 207 deletions(-)

New commits:
commit f46ece5419e4981793189c00b27a6065fcbfaa60
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun May 26 21:28:34 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon May 27 10:03:43 2019 +0200

    weld FormLinkDialog
    
    Change-Id: I440089f650aea87eab21c148e713a8716e55f2bb
    Reviewed-on: https://gerrit.libreoffice.org/73002
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/extensions/UIConfig_spropctrlr.mk 
b/extensions/UIConfig_spropctrlr.mk
index eda1044abff9..a0a078e1ebd7 100644
--- a/extensions/UIConfig_spropctrlr.mk
+++ b/extensions/UIConfig_spropctrlr.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_UIConfig_UIConfig,modules/spropctrlr))
 $(eval $(call gb_UIConfig_add_uifiles,modules/spropctrlr,\
        extensions/uiconfig/spropctrlr/ui/controlfontdialog \
        extensions/uiconfig/spropctrlr/ui/datatypedialog \
-       extensions/uiconfig/spropctrlr/ui/fieldlinkrow \
        extensions/uiconfig/spropctrlr/ui/formlinksdialog \
        extensions/uiconfig/spropctrlr/ui/labelselectiondialog \
        extensions/uiconfig/spropctrlr/ui/listselectdialog \
diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx 
b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
index 00814017184b..4df51cddcd39 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
@@ -17,10 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <toolkit/helper/vclunohelper.hxx>
 #include <sal/log.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <vcl/svapp.hxx>
 #include "MasterDetailLinkDialog.hxx"
 #include "formlinkdialog.hxx"
 #include "pcrservices.hxx"
@@ -102,8 +102,9 @@ namespace pcr
 
     svt::OGenericUnoDialog::Dialog MasterDetailLinkDialog::createDialog(const 
css::uno::Reference<css::awt::XWindow>& rParent)
     {
-        return 
svt::OGenericUnoDialog::Dialog(VclPtr<FormLinkDialog>::Create(VCLUnoHelper::GetWindow(rParent),m_xDetail,m_xMaster,
 m_aContext
-            ,m_sExplanation,m_sDetailLabel,m_sMasterLabel));
+        return 
svt::OGenericUnoDialog::Dialog(std::make_unique<FormLinkDialog>(Application::GetFrameWeld(rParent),
 m_xDetail,
+                                                                               
m_xMaster, m_aContext, m_sExplanation,
+                                                                               
m_sDetailLabel, m_sMasterLabel));
     }
 
     void MasterDetailLinkDialog::implInitialize(const Any& _rValue)
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index c30f404bc037..edfb90cfa5f3 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2673,13 +2673,11 @@ namespace pcr
         if ( !xDetailForm.is() || !xMasterForm.is() )
             return false;
 
-
-        ScopedVclPtrInstance< FormLinkDialog > aDialog( 
impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_xContext );
+        FormLinkDialog aDialog(impl_getDefaultDialogFrame_nothrow(), 
m_xComponent, xMasterProp, m_xContext);
         _rClearBeforeDialog.clear();
-        return ( RET_OK == aDialog->Execute() );
+        return ( RET_OK == aDialog.run() );
     }
 
-
     bool FormComponentPropertyHandler::impl_dialogFormatting_nothrow( Any& 
_out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
     {
         bool bChanged = false;
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx 
b/extensions/source/propctrlr/formlinkdialog.cxx
index e52ab453d168..3a400f0c8e0d 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -60,18 +60,18 @@ namespace pcr
 
     //= FieldLinkRow
 
-    class FieldLinkRow : public TabPage
+    class FieldLinkRow
     {
     private:
-        VclPtr<ComboBox>   m_pDetailColumn;
-        VclPtr<ComboBox>   m_pMasterColumn;
+        std::unique_ptr<weld::ComboBox> m_xDetailColumn;
+        std::unique_ptr<weld::ComboBox> m_xMasterColumn;
 
         Link<FieldLinkRow&,void> m_aLinkChangeHandler;
 
     public:
-        explicit FieldLinkRow( vcl::Window* _pParent );
-        virtual ~FieldLinkRow() override;
-        virtual void dispose() override;
+        FieldLinkRow(std::unique_ptr<weld::ComboBox> xDetailColumn,
+                     std::unique_ptr<weld::ComboBox> xMasterColumn);
+
 
         void         SetLinkChangeHandler( const Link<FieldLinkRow&,void>& 
_rHdl ) { m_aLinkChangeHandler = _rHdl; }
 
@@ -88,132 +88,103 @@ namespace pcr
 
         void    fillList( LinkParticipant _eWhich, const Sequence< OUString >& 
_rFieldNames );
 
+        void    Show()
+        {
+            m_xDetailColumn->show();
+            m_xMasterColumn->show();
+        }
+
     private:
-        DECL_LINK( OnFieldNameChanged, Edit&, void );
+        DECL_LINK( OnFieldNameChanged, weld::ComboBox&, void );
     };
 
 
-    FieldLinkRow::FieldLinkRow( vcl::Window* _pParent )
-        :TabPage( _pParent, "FieldLinkRow", 
"modules/spropctrlr/ui/fieldlinkrow.ui" )
+    FieldLinkRow::FieldLinkRow(std::unique_ptr<weld::ComboBox> xDetailColumn,
+                               std::unique_ptr<weld::ComboBox> xMasterColumn)
+        : m_xDetailColumn(std::move(xDetailColumn))
+        , m_xMasterColumn(std::move(xMasterColumn))
     {
-        get(m_pDetailColumn, "detailCombobox");
-        get(m_pMasterColumn, "masterCombobox");
-
-        m_pDetailColumn->SetDropDownLineCount( 10 );
-        m_pMasterColumn->SetDropDownLineCount( 10 );
-
-        m_pDetailColumn->SetModifyHdl( LINK( this, FieldLinkRow, 
OnFieldNameChanged ) );
-        m_pMasterColumn->SetModifyHdl( LINK( this, FieldLinkRow, 
OnFieldNameChanged ) );
-    }
-
-    FieldLinkRow::~FieldLinkRow()
-    {
-        disposeOnce();
-    }
-
-    void FieldLinkRow::dispose()
-    {
-        m_pDetailColumn.clear();
-        m_pMasterColumn.clear();
-        TabPage::dispose();
+        m_xDetailColumn->connect_changed( LINK( this, FieldLinkRow, 
OnFieldNameChanged ) );
+        m_xMasterColumn->connect_changed( LINK( this, FieldLinkRow, 
OnFieldNameChanged ) );
     }
 
     void FieldLinkRow::fillList( LinkParticipant _eWhich, const Sequence< 
OUString >& _rFieldNames )
     {
-        ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn.get() : 
m_pMasterColumn.get();
+        weld::ComboBox* pBox = ( _eWhich == eDetailField ) ? 
m_xDetailColumn.get() : m_xMasterColumn.get();
 
         const OUString* pFieldName    = _rFieldNames.getConstArray();
         const OUString* pFieldNameEnd = pFieldName + _rFieldNames.getLength();
         for ( ; pFieldName != pFieldNameEnd; ++pFieldName )
-            pBox->InsertEntry( *pFieldName );
+            pBox->append_text( *pFieldName );
     }
 
-
     bool FieldLinkRow::GetFieldName( LinkParticipant _eWhich, OUString& /* 
[out] */ _rName ) const
     {
-        const ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn : 
m_pMasterColumn;
-        _rName = pBox->GetText();
+        const weld::ComboBox* pBox = ( _eWhich == eDetailField ) ? 
m_xDetailColumn.get() : m_xMasterColumn.get();
+        _rName = pBox->get_active_text();
         return !_rName.isEmpty();
     }
 
-
     void FieldLinkRow::SetFieldName( LinkParticipant _eWhich, const OUString& 
_rName )
     {
-        ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn.get() : 
m_pMasterColumn.get();
-        pBox->SetText( _rName );
+        weld::ComboBox* pBox = ( _eWhich == eDetailField ) ? 
m_xDetailColumn.get() : m_xMasterColumn.get();
+        pBox->set_entry_text( _rName );
     }
 
-
-    IMPL_LINK_NOARG( FieldLinkRow, OnFieldNameChanged, Edit&, void )
+    IMPL_LINK_NOARG( FieldLinkRow, OnFieldNameChanged, weld::ComboBox&, void )
     {
         m_aLinkChangeHandler.Call( *this );
     }
 
-    VCL_BUILDER_FACTORY(FieldLinkRow)
-
     //= FormLinkDialog
 
-    FormLinkDialog::FormLinkDialog( vcl::Window* _pParent, const Reference< 
XPropertySet >& _rxDetailForm,
+    FormLinkDialog::FormLinkDialog(weld::Window* _pParent, const Reference< 
XPropertySet >& _rxDetailForm,
             const Reference< XPropertySet >& _rxMasterForm, const Reference< 
XComponentContext >& _rxContext,
             const OUString& _sExplanation,
             const OUString& _sDetailLabel,
             const OUString& _sMasterLabel)
-        :ModalDialog( _pParent, "FormLinks", 
"modules/spropctrlr/ui/formlinksdialog.ui" )
-        ,m_aRow1       ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
-        ,m_aRow2       ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
-        ,m_aRow3       ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
-        ,m_aRow4       ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
-        ,m_xContext    ( _rxContext )
-        ,m_xDetailForm( _rxDetailForm )
-        ,m_xMasterForm( _rxMasterForm )
-        ,m_sDetailLabel(_sDetailLabel)
-        ,m_sMasterLabel(_sMasterLabel)
+        : GenericDialogController(_pParent, 
"modules/spropctrlr/ui/formlinksdialog.ui", "FormLinks")
+        , m_xContext    ( _rxContext )
+        , m_xDetailForm( _rxDetailForm )
+        , m_xMasterForm( _rxMasterForm )
+        , m_sDetailLabel(_sDetailLabel)
+        , m_sMasterLabel(_sMasterLabel)
+        , m_xExplanation(m_xBuilder->weld_label("explanationLabel"))
+        , m_xDetailLabel(m_xBuilder->weld_label("detailLabel"))
+        , m_xMasterLabel(m_xBuilder->weld_label("masterLabel"))
+        , 
m_xRow1(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox1"),
+                                                 
m_xBuilder->weld_combo_box("masterCombobox1")))
+        , 
m_xRow2(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox2"),
+                                                 
m_xBuilder->weld_combo_box("masterCombobox2")))
+        , 
m_xRow3(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox3"),
+                                                 
m_xBuilder->weld_combo_box("masterCombobox3")))
+        , 
m_xRow4(std::make_unique<FieldLinkRow>(m_xBuilder->weld_combo_box("detailCombobox4"),
+                                                 
m_xBuilder->weld_combo_box("masterCombobox4")))
+        , m_xOK(m_xBuilder->weld_button("ok"))
+        , m_xSuggest(m_xBuilder->weld_button("suggestButton"))
     {
-        get(m_pExplanation, "explanationLabel");
-        get(m_pDetailLabel, "detailLabel");
-        get(m_pMasterLabel, "masterLabel");
-        get(m_pOK, "ok");
-        get(m_pSuggest, "suggestButton");
-        m_aRow1->Show();
-        m_aRow2->Show();
-        m_aRow3->Show();
-        m_aRow4->Show();
-        set_width_request(600);
+        m_xRow1->Show();
+        m_xRow2->Show();
+        m_xRow3->Show();
+        m_xRow4->Show();
+        m_xDialog->set_size_request(600, -1);
 
         if ( !_sExplanation.isEmpty() )
-            m_pExplanation->SetText(_sExplanation);
+            m_xExplanation->set_label(_sExplanation);
 
-        m_pSuggest->SetClickHdl       ( LINK( this, FormLinkDialog, OnSuggest  
    ) );
-        m_aRow1->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
-        m_aRow2->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
-        m_aRow3->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
-        m_aRow4->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
+        m_xSuggest->connect_clicked(LINK(this, FormLinkDialog, OnSuggest));
+        m_xRow1->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
+        m_xRow2->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
+        m_xRow3->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
+        m_xRow4->SetLinkChangeHandler( LINK( this, FormLinkDialog, 
OnFieldChanged ) );
 
-        PostUserEvent( LINK( this, FormLinkDialog, OnInitialize ), nullptr, 
true );
+        Application::PostUserEvent(LINK(this, FormLinkDialog, OnInitialize));
 
         updateOkButton();
     }
 
-
-    FormLinkDialog::~FormLinkDialog( )
+    FormLinkDialog::~FormLinkDialog()
     {
-        disposeOnce();
-    }
-
-    void FormLinkDialog::dispose( )
-    {
-        m_pExplanation.clear();
-        m_pDetailLabel.clear();
-        m_pMasterLabel.clear();
-        m_pOK.clear();
-        m_pSuggest.clear();
-
-        m_aRow1.disposeAndClear();
-        m_aRow2.disposeAndClear();
-        m_aRow3.disposeAndClear();
-        m_aRow4.disposeAndClear();
-
-        ModalDialog::dispose();
     }
 
     void FormLinkDialog::commitLinkPairs()
@@ -223,7 +194,7 @@ namespace pcr
         std::vector< OUString > aMasterFields; aMasterFields.reserve( 4 );
 
         const FieldLinkRow* aRows[] = {
-            m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get()
+            m_xRow1.get(), m_xRow2.get(), m_xRow3.get(), m_xRow4.get()
         };
 
         for (const FieldLinkRow* aRow : aRows)
@@ -254,10 +225,9 @@ namespace pcr
         }
     }
 
-
-    short FormLinkDialog::Execute()
+    short FormLinkDialog::run()
     {
-        short nResult = ModalDialog::Execute();
+        short nResult = GenericDialogController::run();
 
         if ( RET_OK == nResult )
             commitLinkPairs();
@@ -265,7 +235,6 @@ namespace pcr
         return nResult;
     }
 
-
     void FormLinkDialog::initializeFieldLists()
     {
         Sequence< OUString > sDetailFields;
@@ -275,7 +244,7 @@ namespace pcr
         getFormFields( m_xMasterForm, sMasterFields );
 
         FieldLinkRow* aRows[] = {
-            m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get()
+            m_xRow1.get(), m_xRow2.get(), m_xRow3.get(), m_xRow4.get()
         };
         for (FieldLinkRow* aRow : aRows)
         {
@@ -298,7 +267,7 @@ namespace pcr
             }
             sDetailType = m_sDetailLabel;
         }
-        m_pDetailLabel->SetText( sDetailType );
+        m_xDetailLabel->set_label( sDetailType );
 
         // label for the master form
         OUString sMasterType = getFormDataSourceType( m_xMasterForm );
@@ -310,10 +279,9 @@ namespace pcr
             }
             sMasterType = m_sMasterLabel;
         }
-        m_pMasterLabel->SetText( sMasterType );
+        m_xMasterLabel->set_label( sMasterType );
     }
 
-
     void FormLinkDialog::initializeFieldRowsFrom( std::vector< OUString >& 
_rDetailFields, std::vector< OUString >& _rMasterFields )
     {
         // our UI does allow 4 fields max
@@ -321,7 +289,7 @@ namespace pcr
         _rMasterFields.resize( 4 );
 
         FieldLinkRow* aRows[] = {
-            m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get()
+            m_xRow1.get(), m_xRow2.get(), m_xRow3.get(), m_xRow4.get()
         };
         for ( sal_Int32 i = 0; i < 4; ++i )
         {
@@ -366,7 +334,7 @@ namespace pcr
         bool bEnable = true;
 
         const FieldLinkRow* aRows[] = {
-            m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get()
+            m_xRow1.get(), m_xRow2.get(), m_xRow3.get(), m_xRow4.get()
         };
 
         for ( sal_Int32 i = 0; ( i < 4 ) && bEnable; ++i )
@@ -378,10 +346,9 @@ namespace pcr
                 bEnable = false;
         }
 
-        m_pOK->Enable( bEnable );
+        m_xOK->set_sensitive(bEnable);
     }
 
-
     OUString FormLinkDialog::getFormDataSourceType( const Reference< 
XPropertySet >& _rxForm )
     {
         OUString sReturn;
@@ -408,7 +375,6 @@ namespace pcr
         return sReturn;
     }
 
-
     void FormLinkDialog::getFormFields( const Reference< XPropertySet >& 
_rxForm, Sequence< OUString >& /* [out] */ _rNames ) const
     {
         _rNames.realloc( 0 );
@@ -417,7 +383,7 @@ namespace pcr
         OUString sCommand;
         try
         {
-            WaitObject aWaitCursor( const_cast< FormLinkDialog* >( this ) );
+            weld::WaitObject aWaitCursor(m_xDialog.get());
 
             OSL_ENSURE( _rxForm.is(), "FormLinkDialog::getFormFields: invalid 
form!" );
 
@@ -455,11 +421,10 @@ namespace pcr
             SQLContext aContext;
             aContext.Message = sErrorMessage;
             aContext.NextException = aErrorInfo.get();
-            ::dbtools::showError( aContext, VCLUnoHelper::GetInterface( 
const_cast< FormLinkDialog* >( this ) ), m_xContext );
+            ::dbtools::showError(aContext, m_xDialog->GetXWindow(), 
m_xContext);
         }
     }
 
-
     void FormLinkDialog::ensureFormConnection( const Reference< XPropertySet 
>& _rxFormProps, Reference< XConnection >& /* [out] */ _rxConnection ) const
     {
         OSL_PRECOND( _rxFormProps.is(), "FormLinkDialog::ensureFormConnection: 
invalid form!" );
@@ -641,7 +606,7 @@ namespace pcr
                 bEnable = ( m_aRelationMasterColumns.size() <= 4 );
             }
 
-            m_pSuggest->Enable( bEnable );
+            m_xSuggest->set_sensitive(bEnable);
         }
         catch( const Exception& )
         {
@@ -649,19 +614,16 @@ namespace pcr
         }
     }
 
-
-    IMPL_LINK_NOARG( FormLinkDialog, OnSuggest, Button*, void )
+    IMPL_LINK_NOARG( FormLinkDialog, OnSuggest, weld::Button&, void )
     {
         initializeFieldRowsFrom( m_aRelationDetailColumns, 
m_aRelationMasterColumns );
     }
 
-
     IMPL_LINK_NOARG( FormLinkDialog, OnFieldChanged, FieldLinkRow&, void )
     {
         updateOkButton();
     }
 
-
     IMPL_LINK_NOARG( FormLinkDialog, OnInitialize, void*, void )
     {
         initializeColumnLabels();
diff --git a/extensions/source/propctrlr/formlinkdialog.hxx 
b/extensions/source/propctrlr/formlinkdialog.hxx
index 867c16ab9fdb..45d669137120 100644
--- a/extensions/source/propctrlr/formlinkdialog.hxx
+++ b/extensions/source/propctrlr/formlinkdialog.hxx
@@ -20,9 +20,7 @@
 #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMLINKDIALOG_HXX
 #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMLINKDIALOG_HXX
 
-#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
 
 #include <com/sun/star/form/XForm.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -35,25 +33,13 @@
 
 namespace pcr
 {
-
-
     class FieldLinkRow;
 
     //= FormLinkDialog
 
-    class FormLinkDialog : public ModalDialog
+    class FormLinkDialog : public weld::GenericDialogController
     {
     private:
-        VclPtr<FixedText>                      m_pExplanation;
-        VclPtr<FixedText>                      m_pDetailLabel;
-        VclPtr<FixedText>                      m_pMasterLabel;
-        VclPtr<FieldLinkRow>                   m_aRow1;
-        VclPtr<FieldLinkRow>                   m_aRow2;
-        VclPtr<FieldLinkRow>                   m_aRow3;
-        VclPtr<FieldLinkRow>                   m_aRow4;
-        VclPtr<OKButton>                       m_pOK;
-        VclPtr<PushButton>                     m_pSuggest;
-
         css::uno::Reference< css::uno::XComponentContext >
                                         m_xContext;
         css::uno::Reference< css::beans::XPropertySet >
@@ -67,9 +53,19 @@ namespace pcr
         OUString                 m_sDetailLabel;
         OUString                 m_sMasterLabel;
 
+        std::unique_ptr<weld::Label> m_xExplanation;
+        std::unique_ptr<weld::Label> m_xDetailLabel;
+        std::unique_ptr<weld::Label> m_xMasterLabel;
+        std::unique_ptr<FieldLinkRow> m_xRow1;
+        std::unique_ptr<FieldLinkRow> m_xRow2;
+        std::unique_ptr<FieldLinkRow> m_xRow3;
+        std::unique_ptr<FieldLinkRow> m_xRow4;
+        std::unique_ptr<weld::Button> m_xOK;
+        std::unique_ptr<weld::Button> m_xSuggest;
+
     public:
         FormLinkDialog(
-            vcl::Window* _pParent,
+            weld::Window* _pParent,
             const css::uno::Reference< css::beans::XPropertySet >& 
_rxDetailForm,
             const css::uno::Reference< css::beans::XPropertySet >& 
_rxMasterForm,
             const css::uno::Reference< css::uno::XComponentContext >& 
_rxContext,
@@ -77,14 +73,14 @@ namespace pcr
             const OUString& _sDetailLabel = OUString(),
             const OUString& _sMasterLabel = OUString()
         );
-        virtual ~FormLinkDialog( ) override;
-        virtual void dispose() override;
+
+        virtual ~FormLinkDialog() override;
 
         // Dialog overridables
-        virtual short   Execute() override;
+        virtual short run() override;
 
     private:
-        DECL_LINK( OnSuggest,    Button*, void );
+        DECL_LINK( OnSuggest,    weld::Button&, void );
         DECL_LINK( OnFieldChanged, FieldLinkRow&, void );
         DECL_LINK( OnInitialize, void*, void);
 
@@ -129,10 +125,8 @@ namespace pcr
                     );
     };
 
-
 }   // namespace pcr
 
-
 #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_FORMLINKDIALOG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui 
b/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui
deleted file mode 100644
index a9eeccba8e3b..000000000000
--- a/extensions/uiconfig/spropctrlr/ui/fieldlinkrow.ui
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface domain="pcr">
-  <requires lib="gtk+" version="3.18"/>
-  <object class="GtkBox" id="FieldLinkRow">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="hexpand">True</property>
-    <property name="spacing">6</property>
-    <child>
-      <object class="GtkComboBoxText" id="detailCombobox">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="hexpand">True</property>
-        <property name="has_entry">True</property>
-        <property name="entry_text_column">0</property>
-        <property name="id_column">1</property>
-        <child internal-child="entry">
-          <object class="GtkEntry" id="comboboxtext-entry1">
-            <property name="can_focus">False</property>
-          </object>
-        </child>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">0</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkComboBoxText" id="masterCombobox">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="hexpand">True</property>
-        <property name="has_entry">True</property>
-        <property name="entry_text_column">0</property>
-        <property name="id_column">1</property>
-        <child internal-child="entry">
-          <object class="GtkEntry" id="comboboxtext-entry2">
-            <property name="can_focus">False</property>
-          </object>
-        </child>
-      </object>
-      <packing>
-        <property name="expand">False</property>
-        <property name="fill">True</property>
-        <property name="position">1</property>
-      </packing>
-    </child>
-  </object>
-</interface>
diff --git a/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui 
b/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui
index 004bbae97414..dff7e4f8ff4c 100644
--- a/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui
+++ b/extensions/uiconfig/spropctrlr/ui/formlinksdialog.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
 <interface domain="pcr">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkDialog" id="FormLinks">
@@ -7,27 +8,30 @@
     <property name="vexpand">True</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" 
context="formlinksdialog|FormLinks">Link fields</property>
+    <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="layout_style">start</property>
+            <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
+              <object class="GtkButton" id="suggestButton">
+                <property name="label" translatable="yes" 
context="formlinksdialog|suggestButton">Suggest</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -36,13 +40,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
-                <property name="yalign">0.49000000953674316</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -51,8 +56,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -65,16 +70,18 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="suggestButton">
-                <property name="label" translatable="yes" 
context="formlinksdialog|suggestButton">Suggest</property>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
               </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">3</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
           </object>
@@ -97,10 +104,11 @@
               <object class="GtkLabel" id="explanationLabel">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="xalign">0</property>
                 <property name="label" translatable="yes" 
context="formlinksdialog|explanationLabel">Sub forms can be used to display 
detailed data about the current record of the master form. To do this, you can 
specify which columns in the sub form match which columns in the master 
form.</property>
                 <property name="wrap">True</property>
+                <property name="width_chars">60</property>
                 <property name="max_width_chars">60</property>
+                <property name="xalign">0</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -145,6 +153,210 @@
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkBox" id="FieldLinkRow1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkComboBoxText" id="detailCombobox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="masterCombobox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="FieldLinkRow2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkComboBoxText" id="detailCombobox2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="masterCombobox2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="FieldLinkRow3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkComboBoxText" id="detailCombobox3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="masterCombobox3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="FieldLinkRow4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkComboBoxText" id="detailCombobox4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="masterCombobox4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry">
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -155,10 +367,10 @@
       </object>
     </child>
     <action-widgets>
+      <action-widget response="101">suggestButton</action-widget>
       <action-widget response="-5">ok</action-widget>
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
-      <action-widget response="101">suggestButton</action-widget>
     </action-widgets>
   </object>
 </interface>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to