From 9eebbbcbf7a022e252c5f34f091f3e4b398271cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 21 Jan 2014 09:33:35 +0000 Subject: [PATCH] convert OTableSubscriptionDialog to SfxSingleTabDialog Change-Id: I8335012139ccaf58bc18d0779e63a5bc388c9fb4 --- dbaccess/UIConfig_dbaccess.mk | 1 + dbaccess/source/ui/dlg/TablesSingleDlg.cxx | 15 ++-- dbaccess/source/ui/inc/TablesSingleDlg.hxx | 2 +- dbaccess/source/ui/inc/dbu_resource.hrc | 1 - dbaccess/uiconfig/ui/tablesfilterdialog.ui | 82 ++++++++++++++++++++++ 5 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 dbaccess/uiconfig/ui/tablesfilterdialog.ui diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index 702b9a20d83c..7148268fa755 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/querypropertiesdialog \ dbaccess/uiconfig/ui/rowheightdialog \ dbaccess/uiconfig/ui/sortdialog \ + dbaccess/uiconfig/ui/tablesfilterdialog \ )) # vim: set noet sw=4 ts=4: diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index f470a5473aa1..f19080e9536e 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -42,10 +42,11 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent ,SfxItemSet* _pItems ,const Reference< XComponentContext >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName) - :SfxNoLayoutSingleTabDialog(pParent,DLG_TABLE_FILTER,_pItems) - ,m_pImpl( new ODbDataSourceAdministrationHelper( _rxORB, pParent, this ) ) - ,m_bStopExecution(sal_False) - ,m_pOutSet(_pItems) + : SfxSingleTabDialog(pParent, _pItems, "TablesFilterDialog", + "dbaccess/ui/tablesfilterdialog.ui") + , m_pImpl( new ODbDataSourceAdministrationHelper( _rxORB, pParent, this ) ) + , m_bStopExecution(sal_False) + , m_pOutSet(_pItems) { DBG_CTOR(OTableSubscriptionDialog,NULL); m_pImpl->setDataSourceOrName(_aDataSourceName); @@ -55,9 +56,9 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent m_pImpl->translateProperties(xDatasource, *m_pOutSet); SetInputSet(m_pOutSet); - OTableSubscriptionPage* pTabPage = new OTableSubscriptionPage(this,*m_pOutSet,this); + OTableSubscriptionPage* pTabPage = new OTableSubscriptionPage(get_content_area(), *m_pOutSet, this); pTabPage->SetServiceFactory(_rxORB); - SetTabPage(pTabPage); + setTabPage(pTabPage); } OTableSubscriptionDialog::~OTableSubscriptionDialog() @@ -71,7 +72,7 @@ short OTableSubscriptionDialog::Execute() short nRet = RET_CANCEL; if ( !m_bStopExecution ) { - nRet = SfxNoLayoutSingleTabDialog::Execute(); + nRet = SfxSingleTabDialog::Execute(); if ( nRet == RET_OK ) { m_pOutSet->Put(*GetOutputItemSet()); diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx b/dbaccess/source/ui/inc/TablesSingleDlg.hxx index 14c4ec6348bc..ba118439a29b 100644 --- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx +++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx @@ -40,7 +40,7 @@ namespace dbaui { class ODbDataSourceAdministrationHelper; // OTableSubscriptionDialog - class OTableSubscriptionDialog : public SfxNoLayoutSingleTabDialog, public IItemSetHelper + class OTableSubscriptionDialog : public SfxSingleTabDialog, public IItemSetHelper { ::std::auto_ptr m_pImpl; sal_Bool m_bStopExecution; // set when the dialog should not be executed diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index 2905821f7dba..bbe093ec6b46 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -98,7 +98,6 @@ #define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28 #define DLG_DATABASE_WIZARD RID_DIALOG_START + 29 #define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31 -#define DLG_TABLE_FILTER RID_DIALOG_START + 32 //======================================================================== // tab pages diff --git a/dbaccess/uiconfig/ui/tablesfilterdialog.ui b/dbaccess/uiconfig/ui/tablesfilterdialog.ui new file mode 100644 index 000000000000..b311189c7ab8 --- /dev/null +++ b/dbaccess/uiconfig/ui/tablesfilterdialog.ui @@ -0,0 +1,82 @@ + + + + + + False + 6 + Tables Filter + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + + + + ok + cancel + help + + +