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

Caolán McNamara caolanm at redhat.com
Fri Jan 10 12:53:32 PST 2014


 cui/source/factory/dlgfact.cxx    |   11 +++--------
 cui/source/inc/dbregister.hxx     |    2 +-
 cui/source/options/dbregister.cxx |   14 +++++++-------
 cui/uiconfig/ui/dbregisterpage.ui |    2 ++
 4 files changed, 13 insertions(+), 16 deletions(-)

New commits:
commit 5ac26a7f0054ca3d1af41f3483dc0e32a343bb96
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 10 20:52:16 2014 +0000

    Resolves: fdo#73260 fix Registered Database single tab dialog
    
    Change-Id: I71bfe44b3d1f88a44a2c53b10c6880c2a3a4ede0

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 3a7bca7..3ab8e86 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1615,16 +1615,14 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
                                                                         )
 {
 
-// TODO will fix this ugly hack when all cases are in SfxSingleTabDialog
-    SfxNoLayoutSingleTabDialog* pDlg=NULL;
-    SfxSingleTabDialog* pDlg1=NULL;
+    SfxSingleTabDialog* pDlg=NULL;
     switch ( nResId )
     {
         case RID_SVXPAGE_MEASURE :
-            pDlg1 = new SvxMeasureDialog( pParent, rAttr, pView );
+            pDlg = new SvxMeasureDialog( pParent, rAttr, pView );
             break;
         case RID_SVXPAGE_CONNECTION :
-            pDlg1 = new SvxConnectionDialog( pParent, rAttr, pView );
+            pDlg = new SvxConnectionDialog( pParent, rAttr, pView );
             break;
         case RID_SFXPAGE_DBREGISTER :
             pDlg = new DatabaseRegistrationDialog( pParent, rAttr );
@@ -1636,9 +1634,6 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
     if ( pDlg )
         return new CuiAbstractSfxDialog_Impl( pDlg );
 
-    if ( pDlg1 )
-        return new CuiAbstractSfxDialog_Impl( pDlg1 );
-
     return 0;
 }
 
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index b74d31c..b47b784 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -125,7 +125,7 @@ namespace svx
     //= DatabaseRegistrationDialog
     //====================================================================
     class DatabaseRegistrationDialog    :public RegistrationItemSetHolder
-                                        ,public SfxNoLayoutSingleTabDialog
+                                        ,public SfxSingleTabDialog
     {
     public:
         DatabaseRegistrationDialog( Window* pParent, const SfxItemSet& rAttr );
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index 269e33a..e7a59a3 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -26,6 +26,7 @@
 #include "svtools/treelistentry.hxx"
 #include <cuires.hrc>
 #include <vcl/field.hxx>
+#include <vcl/layout.hxx>
 #include <svl/eitem.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/uno/Exception.hpp>
@@ -74,13 +75,12 @@ RegistrationItemSetHolder::~RegistrationItemSetHolder()
 // class DatabaseRegistrationDialog  ------------------------------------------------
 
 DatabaseRegistrationDialog::DatabaseRegistrationDialog( Window* pParent, const SfxItemSet& rInAttrs )
-    :RegistrationItemSetHolder( rInAttrs )
-    ,SfxNoLayoutSingleTabDialog( pParent, getRegistrationItems(), RID_SFXPAGE_DBREGISTER )
+    : RegistrationItemSetHolder(rInAttrs)
+    , SfxSingleTabDialog(pParent, getRegistrationItems())
 {
-    SfxTabPage* page = DbRegistrationOptionsPage::Create( this, getRegistrationItems() );
-
-    SetTabPage( page );
-    SetText( page->GetText() );
+    SfxTabPage* page = DbRegistrationOptionsPage::Create(get_content_area(), getRegistrationItems());
+    setTabPage(page);
+    SetText(page->get<VclFrame>("frame1")->get_label());
 }
 
 DatabaseRegistrationDialog::~DatabaseRegistrationDialog()
@@ -89,7 +89,7 @@ DatabaseRegistrationDialog::~DatabaseRegistrationDialog()
 
 short DatabaseRegistrationDialog::Execute()
 {
-    short result = SfxNoLayoutSingleTabDialog::Execute();
+    short result = SfxSingleTabDialog::Execute();
     if ( result == RET_OK )
     {
         DBG_ASSERT( GetOutputItemSet(), "DatabaseRegistrationDialog::Execute: no output items!" );
diff --git a/cui/uiconfig/ui/dbregisterpage.ui b/cui/uiconfig/ui/dbregisterpage.ui
index bc7425b..29db15f 100644
--- a/cui/uiconfig/ui/dbregisterpage.ui
+++ b/cui/uiconfig/ui/dbregisterpage.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Fri Jan 10 20:45:20 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <!-- interface-requires LibreOffice 1.0 -->
@@ -32,6 +33,7 @@
                   <object class="svtlo-SvSimpleTableContainer" id="pathctrl">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="vexpand">True</property>
                     <child internal-child="selection">
                       <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
                     </child>


More information about the Libreoffice-commits mailing list