[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 15:11:06 UTC 2018


 dbaccess/source/ui/dlg/detailpages.cxx |   27 +++++++++++----------------
 dbaccess/source/ui/dlg/detailpages.hxx |    7 +++----
 dbaccess/uiconfig/ui/odbcpage.ui       |    6 +++---
 3 files changed, 17 insertions(+), 23 deletions(-)

New commits:
commit c61e12c64868b5e8f4f7793ef27c28bbdc5cd371
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 23 21:37:34 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 24 17:10:40 2018 +0200

    weld OOdbcDetailsPage
    
    Change-Id: I798fa10a1cb4288b0a73e8439b71851c56113129
    Reviewed-on: https://gerrit.libreoffice.org/62287
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 01ed8d698457..88d07213d6a2 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -376,11 +376,12 @@ namespace dbaui
     }
 
     // OOdbcDetailsPage
-    OOdbcDetailsPage::OOdbcDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs )
-        :OCommonBehaviourTabPage(pParent, "ODBC", "dbaccess/ui/odbcpage.ui", _rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
+    OOdbcDetailsPage::OOdbcDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs)
+        : DBOCommonBehaviourTabPage(pParent, "dbaccess/ui/odbcpage.ui", "ODBC", rCoreAttrs,
+                                    OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
+        , m_xUseCatalog(m_xBuilder->weld_check_button("useCatalogCheckbutton"))
     {
-        get(m_pUseCatalog, "useCatalogCheckbutton");
-        m_pUseCatalog->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
+        m_xUseCatalog->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
     }
 
     OOdbcDetailsPage::~OOdbcDetailsPage()
@@ -388,21 +389,15 @@ namespace dbaui
         disposeOnce();
     }
 
-    void OOdbcDetailsPage::dispose()
-    {
-        m_pUseCatalog.clear();
-        OCommonBehaviourTabPage::dispose();
-    }
-
-    VclPtr<SfxTabPage> ODriversSettings::CreateODBC( TabPageParent pParent, const SfxItemSet* _rAttrSet )
+    VclPtr<SfxTabPage> ODriversSettings::CreateODBC(TabPageParent pParent, const SfxItemSet* pAttrSet)
     {
-        return VclPtr<OOdbcDetailsPage>::Create( pParent.pParent, *_rAttrSet );
+        return VclPtr<OOdbcDetailsPage>::Create(pParent, *pAttrSet);
     }
 
     bool OOdbcDetailsPage::FillItemSet( SfxItemSet* _rSet )
     {
-        bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
-        fillBool(*_rSet,m_pUseCatalog,DSID_USECATALOG,bChangedSomething);
+        bool bChangedSomething = DBOCommonBehaviourTabPage::FillItemSet(_rSet);
+        fillBool(*_rSet,m_xUseCatalog.get(),DSID_USECATALOG,false,bChangedSomething);
         return bChangedSomething;
     }
     void OOdbcDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
@@ -414,9 +409,9 @@ namespace dbaui
         const SfxBoolItem* pUseCatalogItem = _rSet.GetItem<SfxBoolItem>(DSID_USECATALOG);
 
         if ( bValid )
-            m_pUseCatalog->Check(pUseCatalogItem->GetValue());
+            m_xUseCatalog->set_active(pUseCatalogItem->GetValue());
 
-        OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
+        DBOCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
     }
     // OOdbcDetailsPage
     OUserDriverDetailsPage::OUserDriverDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs )
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 767e6669963b..e309310c93c2 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -161,18 +161,17 @@ namespace dbaui
     };
 
     // OOdbcDetailsPage
-    class OOdbcDetailsPage : public OCommonBehaviourTabPage
+    class OOdbcDetailsPage : public DBOCommonBehaviourTabPage
     {
     public:
         virtual bool        FillItemSet ( SfxItemSet* _rCoreAttrs ) override;
 
-        OOdbcDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
+        OOdbcDetailsPage(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
         virtual ~OOdbcDetailsPage() override;
-        virtual void dispose() override;
     protected:
         virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
     private:
-        VclPtr<CheckBox>           m_pUseCatalog;
+        std::unique_ptr<weld::CheckButton> m_xUseCatalog;
     };
 
     // OUserDriverDetailsPage
diff --git a/dbaccess/uiconfig/ui/odbcpage.ui b/dbaccess/uiconfig/ui/odbcpage.ui
index 81f22747f230..91cf10d07177 100644
--- a/dbaccess/uiconfig/ui/odbcpage.ui
+++ b/dbaccess/uiconfig/ui/odbcpage.ui
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="dba">
   <requires lib="gtk+" version="3.18"/>
-  <requires lib="LibreOffice" version="1.0"/>
   <object class="GtkBox" id="ODBC">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -46,7 +45,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="dbulo-CharSetListBox" id="charset">
+                  <object class="GtkComboBox" id="charset">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
@@ -124,6 +123,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
+                        <property name="activates_default">True</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>


More information about the Libreoffice-commits mailing list