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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 16:36:34 UTC 2018


 dbaccess/source/ui/browser/dbtreemodel.cxx         |    1 
 dbaccess/source/ui/control/ColumnControlWindow.cxx |    1 
 dbaccess/source/ui/control/dbtreelistbox.cxx       |    1 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx  |    1 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx    |    1 
 dbaccess/source/ui/dlg/adtabdlg.cxx                |    1 
 dbaccess/source/ui/dlg/advancedsettings.cxx        |    1 
 dbaccess/source/ui/dlg/dbadmin.cxx                 |   87 ++++++++-------------
 dbaccess/source/ui/dlg/textconnectionsettings.cxx  |    1 
 dbaccess/source/ui/inc/dbadmin.hxx                 |   17 +---
 dbaccess/source/ui/inc/dbu_dlg.hxx                 |    2 
 dbaccess/source/ui/inc/dbu_pageids.hxx             |   38 ---------
 dbaccess/source/ui/misc/TableCopyHelper.cxx        |    1 
 dbaccess/source/ui/misc/UITools.cxx                |    1 
 dbaccess/source/ui/misc/imageprovider.cxx          |    1 
 dbaccess/source/ui/querydesign/querycontroller.cxx |    1 
 dbaccess/source/ui/uno/admindlg.cxx                |    6 -
 dbaccess/source/ui/uno/copytablewizard.cxx         |    1 
 dbaccess/uiconfig/ui/admindialog.ui                |   55 ++++++++++++-
 dbaccess/uiconfig/ui/advancedsettingsdialog.ui     |    2 
 20 files changed, 95 insertions(+), 125 deletions(-)

New commits:
commit f62efe43a25770b8bcbe9b7bc681284b9a006ea0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 23 16:18:53 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 24 18:36:08 2018 +0200

    weld ODbAdminDialog
    
    Change-Id: I691ce67b55fb16d06d7266ebe671ac31e30c05d5
    Reviewed-on: https://gerrit.libreoffice.org/62297
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/browser/dbtreemodel.cxx b/dbaccess/source/ui/browser/dbtreemodel.cxx
index 173a8ccceca5..88a9faeb0eb2 100644
--- a/dbaccess/source/ui/browser/dbtreemodel.cxx
+++ b/dbaccess/source/ui/browser/dbtreemodel.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "dbtreemodel.hxx"
-#include <dbu_pageids.hxx>
 
 namespace dbaui
 {
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index bf649ae486bb..706e5f85168f 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -23,7 +23,6 @@
 #include <connectivity/dbtools.hxx>
 #include <UITools.hxx>
 #include <core_resource.hxx>
-#include <dbu_pageids.hxx>
 #include <strings.hrc>
 #include <com/sun/star/util/NumberFormatter.hpp>
 
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 9bbf1b2af5a9..e3c5eec3dca4 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <dbtreelistbox.hxx>
-#include <dbu_pageids.hxx>
 #include <browserids.hxx>
 #include <listviewitems.hxx>
 #include <callbacks.hxx>
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 57c91bf5dc75..b8277d4a88d4 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -24,7 +24,6 @@
 #include <sqlmessage.hxx>
 #include <dbu_dlg.hxx>
 #include <strings.hrc>
-#include <dbu_pageids.hxx>
 #include <svl/itemset.hxx>
 #include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 8903a32ebe90..80bb9d580955 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -25,7 +25,6 @@
 #include <dbu_dlg.hxx>
 #include <strings.hrc>
 #include <strings.hxx>
-#include <dbu_pageids.hxx>
 #include <svl/itemset.hxx>
 #include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 3d12fe670f9a..5f7da6a57965 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -22,7 +22,6 @@
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <core_resource.hxx>
-#include <dbu_pageids.hxx>
 #include <dbu_dlg.hxx>
 #include <strings.hrc>
 #include <sfx2/sfxsids.hrc>
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 696c0fe78c52..0b9750703f99 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -27,7 +27,6 @@
 #include "DbAdminImpl.hxx"
 #include "DriverSettings.hxx"
 #include "optionalboolitem.hxx"
-#include <dbu_pageids.hxx>
 #include <dbu_dlg.hxx>
 
 #include <svl/eitem.hxx>
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index d267f7efa08c..34b80d261f19 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -46,17 +46,17 @@ using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
 
 // ODbAdminDialog
-ODbAdminDialog::ODbAdminDialog(vcl::Window* _pParent
-                               , SfxItemSet const * _pItems
-                               , const Reference< XComponentContext >& _rxContext)
-    : SfxTabDialog(_pParent, "AdminDialog",
-        "dbaccess/ui/admindialog.ui", _pItems)
+ODbAdminDialog::ODbAdminDialog(weld::Window* pParent,
+                               SfxItemSet const * _pItems,
+                               const Reference< XComponentContext >& _rxContext)
+    : SfxTabDialogController(pParent, "dbaccess/ui/admindialog.ui", "AdminDialog", _pItems)
     , m_bUIEnabled(true)
+    , m_sMainPageID("advanced")
 {
-    m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,GetFrameWeld(), _pParent ? _pParent->GetFrameWeld() : nullptr, this));
+    m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext, m_xDialog.get(), pParent, this));
 
     // add the initial tab page
-    m_nMainPageID = AddTabPage("advanced", OConnectionTabPage::Create, nullptr);
+    AddTabPage(m_sMainPageID, OConnectionTabPage::Create, nullptr);
 
     // remove the reset button - it's meaning is much too ambiguous in this dialog
     RemoveResetButton();
@@ -64,41 +64,29 @@ ODbAdminDialog::ODbAdminDialog(vcl::Window* _pParent
 
 ODbAdminDialog::~ODbAdminDialog()
 {
-    disposeOnce();
-}
-
-void ODbAdminDialog::dispose()
-{
     SetInputSet(nullptr);
-    DELETEZ(m_pExampleSet);
-    SfxTabDialog::dispose();
 }
 
 short ODbAdminDialog::Ok()
 {
-    SfxTabDialog::Ok();
+    SfxTabDialogController::Ok();
     m_bUIEnabled = false;
     return ( AR_LEAVE_MODIFIED == implApplyChanges() ) ? RET_OK : RET_CANCEL;
         // TODO : AR_ERROR is not handled correctly, we always close the dialog here
 }
 
-void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
+void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
 {
     // register ourself as modified listener
     static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
     static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(this,this);
 
-    vcl::Window *pWin = GetViewWindow();
-    if(pWin)
-        pWin->Invalidate();
-
-    SfxTabDialog::PageCreated(_nId, _rPage);
+    SfxTabDialogController::PageCreated(rId, _rPage);
 }
 
-void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, const char* pTextId, CreateTabPage _pCreateFunc)
+void ODbAdminDialog::addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc)
 {
-    AddTabPage(_nPageId, DBA_RES(pTextId), _pCreateFunc);
-    m_aCurrentDetailPages.push(_nPageId);
+    AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc, nullptr);
 }
 
 void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName)
@@ -115,35 +103,35 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
     switch ( eType )
     {
         case  ::dbaccess::DST_DBASE:
-            addDetailPage(PAGE_DBASE, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
+            addDetailPage("dbase", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
             break;
 
         case  ::dbaccess::DST_ADO:
-            addDetailPage(PAGE_ADO, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
+            addDetailPage("ado", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
             break;
 
         case  ::dbaccess::DST_FLAT:
-            addDetailPage(PAGE_TEXT, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
+            addDetailPage("text", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
             break;
 
         case  ::dbaccess::DST_ODBC:
-            addDetailPage(PAGE_ODBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
+            addDetailPage("odbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
             break;
 
         case  ::dbaccess::DST_MYSQL_ODBC:
-            addDetailPage(PAGE_MYSQL_ODBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
+            addDetailPage("mysqlodbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
             break;
 
         case  ::dbaccess::DST_MYSQL_JDBC:
-            addDetailPage(PAGE_MYSQL_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
+            addDetailPage("mysqljdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
             break;
 
         case  ::dbaccess::DST_ORACLE_JDBC:
-            addDetailPage(PAGE_ORACLE_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
+            addDetailPage("oraclejdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
             break;
 
         case  ::dbaccess::DST_LDAP:
-            addDetailPage(PAGE_LDAP,STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
+            addDetailPage("ldap",STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
             break;
         case  ::dbaccess::DST_USERDEFINE1:  /// first user defined driver
         case  ::dbaccess::DST_USERDEFINE2:
@@ -157,8 +145,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
         case  ::dbaccess::DST_USERDEFINE10:
             {
                 OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED));
-                AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, 1);
-                m_aCurrentDetailPages.push(PAGE_USERDRIVER);
+                AddTabPage("user" + OString(static_cast<int>(eType)), aTitle, ODriversSettings::CreateUser, nullptr);
             }
             break;
         default:
@@ -176,7 +163,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
     // reset the pages
 
     // prevent flicker
-    SetUpdateMode(false);
+    m_xDialog->freeze();
 
     // remove all items which relate to indirect properties from the input set
     // (without this, the following may happen: select an arbitrary data source where some indirect properties
@@ -190,33 +177,33 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
     m_pImpl->translateProperties(_rxDatasource, *GetInputSetImpl());
 
     // reset the example set
-    delete m_pExampleSet;
-    m_pExampleSet = new SfxItemSet(*GetInputSetImpl());
+    m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl()));
 
     // special case: MySQL Native does not have the generic "advanced" page
 
     const DbuTypeCollectionItem& rCollectionItem = dynamic_cast<const DbuTypeCollectionItem&>(*getOutputSet()->GetItem(DSID_TYPECOLLECTION));
     ::dbaccess::ODsnTypeCollection* pCollection = rCollectionItem.getCollection();
-    if ( pCollection->determineType(getDatasourceType( *m_pExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
+    if ( pCollection->determineType(getDatasourceType( *m_xExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
     {
-        AddTabPage( PAGE_MYSQL_NATIVE, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE );
+        OString sMySqlNative("mysqlnative");
+        AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE, nullptr);
         RemoveTabPage("advanced");
-        m_nMainPageID = PAGE_MYSQL_NATIVE;
+        m_sMainPageID = sMySqlNative;
     }
 
-    ShowPage( m_nMainPageID );
-    SfxTabPage* pConnectionPage = GetTabPage( m_nMainPageID );
+    SetCurPageId(m_sMainPageID);
+    SfxTabPage* pConnectionPage = GetTabPage(m_sMainPageID);
     if ( pConnectionPage )
         pConnectionPage->Reset(GetInputSetImpl());
     // if this is NULL, the page has not been created yet, which means we're called before the
     // dialog was displayed (probably from inside the ctor)
 
-    SetUpdateMode(true);
+    m_xDialog->thaw();
 }
 
-void ODbAdminDialog::setTitle(const OUString& _sTitle)
+void ODbAdminDialog::setTitle(const OUString& rTitle)
 {
-    SetText(_sTitle);
+    m_xDialog->set_title(rTitle);
 }
 
 void ODbAdminDialog::enableConfirmSettings( bool ) {}
@@ -233,15 +220,9 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges()
         return AR_KEEP;
     }
 
-    if ( !m_pImpl->saveChanges(*m_pExampleSet) )
+    if ( !m_pImpl->saveChanges(*m_xExampleSet) )
         return AR_KEEP;
 
-    if ( m_bUIEnabled )
-        ShowPage(GetCurPageId());
-        // This does the usual ActivatePage, so the pages can save their current status.
-        // This way, next time they're asked what has changed since now and here, they really
-        // can compare with the status they have _now_ (not the one they had before this apply call).
-
     return AR_LEAVE_MODIFIED;
 }
 
@@ -257,7 +238,7 @@ const SfxItemSet* ODbAdminDialog::getOutputSet() const
 
 SfxItemSet* ODbAdminDialog::getWriteOutputSet()
 {
-    return m_pExampleSet;
+    return m_xExampleSet.get();
 }
 
 std::pair< Reference<XConnection>,bool> ODbAdminDialog::createConnection()
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index dcf578c6e40d..2532440ebda6 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -19,7 +19,6 @@
 
 #include <textconnectionsettings.hxx>
 #include "TextConnectionHelper.hxx"
-#include <dbu_pageids.hxx>
 #include <dsitems.hxx>
 #include <stringconstants.hxx>
 
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index 65ff82a197fb..04b88151df8c 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -44,26 +44,21 @@ namespace dbaui
 class ODbDataSourceAdministrationHelper;
 /** tab dialog for administrating the office wide registered data sources
 */
-class ODbAdminDialog final : public SfxTabDialog , public IItemSetHelper, public IDatabaseSettingsDialog
+class ODbAdminDialog final : public SfxTabDialogController, public IItemSetHelper, public IDatabaseSettingsDialog
 {
 private:
-    std::stack< sal_Int32 > m_aCurrentDetailPages;  // ids of all currently enabled (type-dependent) detail pages
-
     std::unique_ptr<ODbDataSourceAdministrationHelper>  m_pImpl;
 
     bool                m_bUIEnabled : 1;   /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
-    sal_uInt16          m_nMainPageID;
+    OString             m_sMainPageID;
 
 public:
     /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
         after the dialog has been destroyed
     */
-    ODbAdminDialog(vcl::Window* pParent,
-        SfxItemSet const * _pItems,
-        const css::uno::Reference< css::uno::XComponentContext >& _rxORB
-        );
+    ODbAdminDialog(weld::Window* pParent, SfxItemSet const * _pItems,
+                   const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
     virtual ~ODbAdminDialog() override;
-    virtual void dispose() override;
 
     /** create and return an item set for use with the dialog.
         @param      _pTypeCollection        pointer to an <type>ODatasourceMap</type>. May be NULL, in this case
@@ -95,9 +90,9 @@ public:
 
 private:
     // adds a new detail page and remove all the old ones
-    void addDetailPage(sal_uInt16 _nPageId, const char* pTextId, CreateTabPage pCreateFunc);
+    void addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc);
 
-    virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) override;
+    virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
     virtual short Ok() override;
 
     /// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
diff --git a/dbaccess/source/ui/inc/dbu_dlg.hxx b/dbaccess/source/ui/inc/dbu_dlg.hxx
index 2990728ff047..f6d36879efdf 100644
--- a/dbaccess/source/ui/inc/dbu_dlg.hxx
+++ b/dbaccess/source/ui/inc/dbu_dlg.hxx
@@ -19,8 +19,6 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
 
-#include "dbu_pageids.hxx"
-
 #define PAGE_X              281
 #define PAGE_Y              215
 #define WIZARD_PAGE_X       225
diff --git a/dbaccess/source/ui/inc/dbu_pageids.hxx b/dbaccess/source/ui/inc/dbu_pageids.hxx
deleted file mode 100644
index 710a582d933a..000000000000
--- a/dbaccess/source/ui/inc/dbu_pageids.hxx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_RESOURCE_HRC
-#define INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_RESOURCE_HRC
-
-// tab pages
-
-#define PAGE_DBASE           1001
-#define PAGE_ODBC            1003
-#define PAGE_TEXT            1004
-#define PAGE_ADO             1007
-#define PAGE_LDAP            1015
-#define PAGE_MYSQL_ODBC      1017
-#define PAGE_USERDRIVER      1019
-#define PAGE_MYSQL_JDBC      1020
-#define PAGE_MYSQL_NATIVE    1024
-#define PAGE_ORACLE_JDBC     1027
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 473aec22de63..f075b33f5853 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -37,7 +37,6 @@
 #include <TokenWriter.hxx>
 #include <UITools.hxx>
 #include <dbaccess/dataview.hxx>
-#include <dbu_pageids.hxx>
 #include <unotools/ucbhelper.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/diagnose_ex.h>
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 0f9b8dddbe47..78ef021ca8b9 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -22,7 +22,6 @@
 #include <callbacks.hxx>
 #include <core_resource.hxx>
 #include <stringconstants.hxx>
-#include <dbu_pageids.hxx>
 #include <dlgsave.hxx>
 #include <dbtreelistbox.hxx>
 #include <defaultobjectnamecheck.hxx>
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 031d1cd41579..4410caf7e4db 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <imageprovider.hxx>
-#include <dbu_pageids.hxx>
 #include <stringconstants.hxx>
 #include <bitmaps.hlst>
 
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index ff240a54130e..b47c8727bf3e 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -23,7 +23,6 @@
 #include <strings.hrc>
 #include <query.hrc>
 #include <dbu_reghelper.hxx>
-#include <dbu_pageids.hxx>
 #include <stringconstants.hxx>
 #include <defaultobjectnamecheck.hxx>
 #include <dlgsave.hxx>
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index 7c4ab1f18d1f..b59627def0a4 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -94,13 +94,13 @@ Reference<XPropertySetInfo>  SAL_CALL ODataSourcePropertyDialog::getPropertySetI
 
 svt::OGenericUnoDialog::Dialog ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
 {
-    VclPtrInstance<ODbAdminDialog> pDialog(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext);
+    std::unique_ptr<ODbAdminDialog> xDialog(new ODbAdminDialog(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext));
 
     // the initial selection
     if ( m_aInitialSelection.hasValue() )
-        pDialog->selectDataSource(m_aInitialSelection);
+        xDialog->selectDataSource(m_aInitialSelection);
 
-    return svt::OGenericUnoDialog::Dialog(pDialog);
+    return svt::OGenericUnoDialog::Dialog(std::move(xDialog));
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 40c6eee976bb..fe18ac32a139 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -19,7 +19,6 @@
 
 #include <memory>
 #include <dbu_reghelper.hxx>
-#include <dbu_pageids.hxx>
 #include <strings.hrc>
 #include <strings.hxx>
 #include <stringconstants.hxx>
diff --git a/dbaccess/uiconfig/ui/admindialog.ui b/dbaccess/uiconfig/ui/admindialog.ui
index 0b6c84dba3ca..787f34dfcf10 100644
--- a/dbaccess/uiconfig/ui/admindialog.ui
+++ b/dbaccess/uiconfig/ui/admindialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="dba">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkDialog" id="AdminDialog">
@@ -7,7 +7,13 @@
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="admindialog|AdminDialog">Database Properties</property>
     <property name="resizable">False</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>
@@ -18,6 +24,20 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
+              <object class="GtkButton" id="reset">
+                <property name="label">gtk-revert-to-saved</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">0</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
@@ -30,7 +50,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">0</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
@@ -44,7 +64,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">1</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -58,7 +78,7 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="position">2</property>
+                <property name="position">3</property>
                 <property name="secondary">True</property>
               </packing>
             </child>
@@ -73,7 +93,7 @@
         <child>
           <object class="GtkNotebook" id="tabcontrol">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can_focus">True</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <property name="scrollable">True</property>
@@ -85,6 +105,30 @@
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
             </child>
             <child type="tab">
@@ -108,6 +152,7 @@
       </object>
     </child>
     <action-widgets>
+      <action-widget response="0">reset</action-widget>
       <action-widget response="-5">ok</action-widget>
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
diff --git a/dbaccess/uiconfig/ui/advancedsettingsdialog.ui b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui
index a94e7718d285..00c92610a1b1 100644
--- a/dbaccess/uiconfig/ui/advancedsettingsdialog.ui
+++ b/dbaccess/uiconfig/ui/advancedsettingsdialog.ui
@@ -8,6 +8,8 @@
     <property name="title" translatable="yes" context="advancedsettingsdialog|AdvancedSettingsDialog">Advanced Settings</property>
     <property name="resizable">False</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/>


More information about the Libreoffice-commits mailing list