[Libreoffice-commits] core.git: Branch 'feature/vclref' - 4 commits - basctl/source dbaccess/source desktop/source forms/source include/dbaccess sfx2/source svx/source
Noel Grandin
noel at peralex.com
Fri Jan 16 05:31:38 PST 2015
basctl/source/basicide/baside2b.cxx | 2
dbaccess/source/ext/macromigration/macromigrationpages.cxx | 6
dbaccess/source/ext/macromigration/macromigrationpages.hxx | 1
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 132 +++++-----
dbaccess/source/ui/app/AppDetailPageHelper.hxx | 13 -
dbaccess/source/ui/app/AppDetailView.cxx | 143 ++++++-----
dbaccess/source/ui/app/AppDetailView.hxx | 20 -
dbaccess/source/ui/app/AppIconControl.cxx | 7
dbaccess/source/ui/app/AppIconControl.hxx | 1
dbaccess/source/ui/app/AppSwapWindow.cxx | 44 +--
dbaccess/source/ui/app/AppSwapWindow.hxx | 10
dbaccess/source/ui/app/AppTitleWindow.cxx | 30 +-
dbaccess/source/ui/app/AppTitleWindow.hxx | 7
dbaccess/source/ui/app/AppView.cxx | 22 +
dbaccess/source/ui/app/AppView.hxx | 2
dbaccess/source/ui/browser/brwview.cxx | 7
dbaccess/source/ui/browser/dataview.cxx | 12
dbaccess/source/ui/browser/dbtreeview.cxx | 6
dbaccess/source/ui/browser/dbtreeview.hxx | 1
dbaccess/source/ui/browser/sbagrid.cxx | 6
dbaccess/source/ui/control/ColumnControlWindow.cxx | 5
dbaccess/source/ui/control/FieldDescControl.cxx | 5
dbaccess/source/ui/control/RelationControl.cxx | 5
dbaccess/source/ui/control/TableGrantCtrl.cxx | 6
dbaccess/source/ui/control/VertSplitView.cxx | 6
dbaccess/source/ui/control/charsetlistbox.cxx | 4
dbaccess/source/ui/control/curledit.cxx | 6
dbaccess/source/ui/control/dbtreelistbox.cxx | 6
dbaccess/source/ui/control/marktree.cxx | 7
dbaccess/source/ui/control/sqledit.cxx | 6
dbaccess/source/ui/dlg/CollectionView.cxx | 5
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 6
dbaccess/source/ui/dlg/ConnectionHelper.hxx | 1
dbaccess/source/ui/dlg/ConnectionPage.cxx | 4
dbaccess/source/ui/dlg/ConnectionPage.hxx | 1
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 4
dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 1
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 52 +---
dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 11
dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx | 4
dbaccess/source/ui/dlg/RelationDlg.cxx | 4
dbaccess/source/ui/dlg/TablesSingleDlg.cxx | 6
dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 5
dbaccess/source/ui/dlg/TextConnectionHelper.hxx | 1
dbaccess/source/ui/dlg/UserAdmin.cxx | 31 +-
dbaccess/source/ui/dlg/UserAdmin.hxx | 3
dbaccess/source/ui/dlg/UserAdminDlg.cxx | 8
dbaccess/source/ui/dlg/admincontrols.cxx | 4
dbaccess/source/ui/dlg/admincontrols.hxx | 1
dbaccess/source/ui/dlg/adtabdlg.cxx | 6
dbaccess/source/ui/dlg/advancedsettings.cxx | 18 +
dbaccess/source/ui/dlg/advancedsettings.hxx | 2
dbaccess/source/ui/dlg/dbadmin.cxx | 7
dbaccess/source/ui/dlg/dbwiz.cxx | 6
dbaccess/source/ui/dlg/dbwizsetup.cxx | 6
dbaccess/source/ui/dlg/detailpages.cxx | 46 ++-
dbaccess/source/ui/dlg/detailpages.hxx | 16 -
dbaccess/source/ui/dlg/directsql.cxx | 7
dbaccess/source/ui/dlg/dlgattr.cxx | 7
dbaccess/source/ui/dlg/dlgsave.cxx | 6
dbaccess/source/ui/dlg/dsselect.cxx | 4
dbaccess/source/ui/dlg/dsselect.hxx | 1
dbaccess/source/ui/dlg/generalpage.cxx | 4
dbaccess/source/ui/dlg/generalpage.hxx | 1
dbaccess/source/ui/dlg/indexdialog.cxx | 7
dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 7
dbaccess/source/ui/dlg/paramdialog.cxx | 7
dbaccess/source/ui/dlg/queryfilter.cxx | 4
dbaccess/source/ui/dlg/queryorder.cxx | 4
dbaccess/source/ui/dlg/sqlmessage.cxx | 67 ++---
dbaccess/source/ui/dlg/tablespage.cxx | 7
dbaccess/source/ui/dlg/tablespage.hxx | 1
dbaccess/source/ui/dlg/textconnectionsettings.cxx | 4
dbaccess/source/ui/inc/CollectionView.hxx | 1
dbaccess/source/ui/inc/ColumnControlWindow.hxx | 1
dbaccess/source/ui/inc/FieldDescControl.hxx | 1
dbaccess/source/ui/inc/JoinDesignView.hxx | 1
dbaccess/source/ui/inc/JoinTableView.hxx | 13 -
dbaccess/source/ui/inc/LimitBox.hxx | 1
dbaccess/source/ui/inc/QueryDesignView.hxx | 7
dbaccess/source/ui/inc/QueryPropertiesDialog.hxx | 1
dbaccess/source/ui/inc/QueryTableView.hxx | 1
dbaccess/source/ui/inc/QueryTextView.hxx | 1
dbaccess/source/ui/inc/RelationDesignView.hxx | 1
dbaccess/source/ui/inc/RelationDlg.hxx | 3
dbaccess/source/ui/inc/RelationTableView.hxx | 1
dbaccess/source/ui/inc/TableConnection.hxx | 1
dbaccess/source/ui/inc/TableDesignControl.hxx | 1
dbaccess/source/ui/inc/TableDesignHelpBar.hxx | 1
dbaccess/source/ui/inc/TableDesignView.hxx | 4
dbaccess/source/ui/inc/TableGrantCtrl.hxx | 1
dbaccess/source/ui/inc/TableWindow.hxx | 7
dbaccess/source/ui/inc/TableWindowListBox.hxx | 1
dbaccess/source/ui/inc/TableWindowTitle.hxx | 1
dbaccess/source/ui/inc/TablesSingleDlg.hxx | 1
dbaccess/source/ui/inc/UserAdminDlg.hxx | 1
dbaccess/source/ui/inc/VertSplitView.hxx | 1
dbaccess/source/ui/inc/WCPage.hxx | 1
dbaccess/source/ui/inc/WColumnSelect.hxx | 1
dbaccess/source/ui/inc/WCopyTable.hxx | 1
dbaccess/source/ui/inc/WExtendPages.hxx | 4
dbaccess/source/ui/inc/WNameMatch.hxx | 1
dbaccess/source/ui/inc/WTypeSelect.hxx | 2
dbaccess/source/ui/inc/adtabdlg.hxx | 1
dbaccess/source/ui/inc/advancedsettingsdlg.hxx | 1
dbaccess/source/ui/inc/brwview.hxx | 1
dbaccess/source/ui/inc/charsetlistbox.hxx | 1
dbaccess/source/ui/inc/curledit.hxx | 1
dbaccess/source/ui/inc/dbadmin.hxx | 1
dbaccess/source/ui/inc/dbtreelistbox.hxx | 1
dbaccess/source/ui/inc/dbwiz.hxx | 1
dbaccess/source/ui/inc/dbwizsetup.hxx | 1
dbaccess/source/ui/inc/directsql.hxx | 1
dbaccess/source/ui/inc/dlgattr.hxx | 1
dbaccess/source/ui/inc/dlgsave.hxx | 1
dbaccess/source/ui/inc/indexdialog.hxx | 1
dbaccess/source/ui/inc/indexfieldscontrol.hxx | 1
dbaccess/source/ui/inc/marktree.hxx | 1
dbaccess/source/ui/inc/paramdialog.hxx | 1
dbaccess/source/ui/inc/querycontainerwindow.hxx | 1
dbaccess/source/ui/inc/queryfilter.hxx | 1
dbaccess/source/ui/inc/queryorder.hxx | 1
dbaccess/source/ui/inc/queryview.hxx | 1
dbaccess/source/ui/inc/sbagrid.hxx | 1
dbaccess/source/ui/inc/sqledit.hxx | 1
dbaccess/source/ui/inc/sqlmessage.hxx | 7
dbaccess/source/ui/inc/textconnectionsettings.hxx | 1
dbaccess/source/ui/misc/WCPage.cxx | 4
dbaccess/source/ui/misc/WColumnSelect.cxx | 6
dbaccess/source/ui/misc/WCopyTable.cxx | 6
dbaccess/source/ui/misc/WNameMatch.cxx | 4
dbaccess/source/ui/misc/WTypeSelect.cxx | 11
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx | 6
dbaccess/source/ui/querydesign/JoinDesignView.cxx | 6
dbaccess/source/ui/querydesign/JoinTableView.cxx | 18 +
dbaccess/source/ui/querydesign/LimitBox.cxx | 4
dbaccess/source/ui/querydesign/QTableConnection.cxx | 4
dbaccess/source/ui/querydesign/QTableConnection.hxx | 1
dbaccess/source/ui/querydesign/QTableWindow.cxx | 8
dbaccess/source/ui/querydesign/QTableWindow.hxx | 1
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 38 +-
dbaccess/source/ui/querydesign/QueryTableView.cxx | 4
dbaccess/source/ui/querydesign/QueryTextView.cxx | 6
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 5
dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx | 1
dbaccess/source/ui/querydesign/TableWindow.cxx | 39 +--
dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 6
dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 6
dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 5
dbaccess/source/ui/querydesign/querycontainerwindow.cxx | 6
dbaccess/source/ui/querydesign/querydlg.cxx | 6
dbaccess/source/ui/querydesign/querydlg.hxx | 1
dbaccess/source/ui/querydesign/queryview.cxx | 5
dbaccess/source/ui/relationdesign/RTableConnection.cxx | 4
dbaccess/source/ui/relationdesign/RTableConnection.hxx | 1
dbaccess/source/ui/relationdesign/RelationDesignView.cxx | 4
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 6
dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 6
dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx | 1
dbaccess/source/ui/tabledesign/TEditControl.cxx | 6
dbaccess/source/ui/tabledesign/TEditControl.hxx | 1
dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 5
dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx | 6
dbaccess/source/ui/tabledesign/TableDesignView.cxx | 32 +-
dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 6
dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx | 1
desktop/source/deployment/gui/dp_gui_dependencydialog.cxx | 2
desktop/source/deployment/gui/dp_gui_dependencydialog.hxx | 2
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 19 +
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 2
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 6
desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 1
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 9
desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 3
desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 10
desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx | 1
desktop/source/deployment/gui/license_dialog.cxx | 7
forms/source/richtext/richtextvclcontrol.cxx | 6
forms/source/richtext/richtextvclcontrol.hxx | 1
forms/source/solar/control/navtoolbar.cxx | 11
forms/source/solar/inc/navtoolbar.hxx | 2
include/dbaccess/dataview.hxx | 3
sfx2/source/sidebar/TabBar.cxx | 1
svx/source/tbxctrls/tbcontrl.cxx | 2
184 files changed, 864 insertions(+), 528 deletions(-)
New commits:
commit 8b3621f5b4ea493ebf78a4c8e4eb5181eb2eb802
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jan 16 15:30:06 2015 +0200
vcl: VclPtr conversion in various
Change-Id: Id4f0cc26e4f5bda345f41130c9838fc44312e98e
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 8c1805d..1f67922 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -271,6 +271,7 @@ void EditorWindow::dispose()
EndListening( *pEditEngine );
pEditEngine->RemoveView(pEditView.get());
}
+ vcl::Window::dispose();
}
OUString EditorWindow::GetWordAtCursor()
@@ -1661,6 +1662,7 @@ void WatchWindow::dispose()
aHeaderBar.disposeAndClear();
aTreeListBox.disposeAndClear();
GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this );
+ DockingWindow::dispose();
}
diff --git a/include/dbaccess/dataview.hxx b/include/dbaccess/dataview.hxx
index b501492..e0652b9 100644
--- a/include/dbaccess/dataview.hxx
+++ b/include/dbaccess/dataview.hxx
@@ -38,7 +38,7 @@ namespace dbaui
protected:
IController& m_rController; // the controller in where we resides in
- FixedLine m_aSeparator;
+ VclPtr<FixedLine> m_aSeparator;
::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
public:
@@ -47,6 +47,7 @@ namespace dbaui
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& ,
WinBits nStyle = 0 );
virtual ~ODataView();
+ virtual void dispose() SAL_OVERRIDE;
/// late construction
virtual void Construct();
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 4302d4e..45d1093 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -71,6 +71,7 @@ TabBar::TabBar (
TabBar::~TabBar()
{
+ dispose();
}
void TabBar::dispose()
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 7ae1264..50530a7 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -283,7 +283,7 @@ protected:
public:
SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
virtual ~SvxLineWindow_Impl() { dispose(); }
- virtual void dispose() SAL_OVERRIDE { m_aLineStyleLb.disposeAndClear(); }
+ virtual void dispose() SAL_OVERRIDE { m_aLineStyleLb.disposeAndClear(); SfxPopupWindow::dispose(); }
virtual SfxPopupWindow* Clone() const SAL_OVERRIDE;
};
commit 491dc252bf21c132d366bf718f7fd1a9a5851591
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jan 16 15:29:55 2015 +0200
vcl: VclPtr conversion in forms
Change-Id: Ib6a84b5d52a695aca69e1fcfde6390d1059a3745
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index fe7ffe6..ab45db7 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -59,7 +59,13 @@ namespace frm
RichTextControl::~RichTextControl( )
{
+ dispose();
+ }
+
+ void RichTextControl::dispose()
+ {
delete m_pImpl;
+ Control::dispose();
}
diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx
index 4e3123d..b5532ca 100644
--- a/forms/source/richtext/richtextvclcontrol.hxx
+++ b/forms/source/richtext/richtextvclcontrol.hxx
@@ -52,6 +52,7 @@ namespace frm
);
virtual ~RichTextControl( );
+ virtual void dispose() SAL_OVERRIDE;
/* enables the change notifications for a particular attribute
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 3ccbf2e..b7da152 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -147,6 +147,11 @@ namespace frm
NavigationToolBar::~NavigationToolBar( )
{
+ dispose();
+ }
+
+ void NavigationToolBar::dispose()
+ {
for ( ::std::vector< vcl::Window* >::iterator loopChildWins = m_aChildWins.begin();
loopChildWins != m_aChildWins.end();
++loopChildWins
@@ -155,6 +160,7 @@ namespace frm
delete *loopChildWins;
}
delete m_pToolbar;
+ vcl::Window::dispose();
}
@@ -658,11 +664,6 @@ namespace frm
}
- RecordPositionInput::~RecordPositionInput()
- {
- }
-
-
void RecordPositionInput::setDispatcher( const IFeatureDispatcher* _pDispatcher )
{
m_pDispatcher = _pDispatcher;
diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx
index 5be47c8..91d8cb1 100644
--- a/forms/source/solar/inc/navtoolbar.hxx
+++ b/forms/source/solar/inc/navtoolbar.hxx
@@ -71,6 +71,7 @@ namespace frm
const ::boost::shared_ptr< const ICommandDescriptionProvider >& _pDescriptionProvider
);
virtual ~NavigationToolBar( );
+ virtual void dispose() SAL_OVERRIDE;
/** sets the dispatcher which is to be used for the features
@@ -158,7 +159,6 @@ namespace frm
public:
RecordPositionInput( vcl::Window* _pParent );
- virtual ~RecordPositionInput();
/** sets the dispatcher which is to be used for the features
*/
commit fb844f0b51212aece72ea1f126e8513f891bbd56
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jan 16 15:29:45 2015 +0200
vcl: VclPtr conversion in forms
Change-Id: I141cbe218fec31f2e6428b1d8c56c00557134a36
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index da831ad..ca6eb1b 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
@@ -50,6 +50,4 @@ DependencyDialog::DependencyDialog(
}
}
-DependencyDialog::~DependencyDialog() {}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
index a778ad3..8a726cc 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -38,8 +38,6 @@ public:
DependencyDialog(
vcl::Window * parent, std::vector< OUString > const & dependencies);
- virtual ~DependencyDialog();
-
private:
DependencyDialog(DependencyDialog &); // not defined
void operator =(DependencyDialog &); // not defined
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 056f0b1..98a7031 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -137,6 +137,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
public:
ExtBoxWithBtns_Impl(vcl::Window* pParent);
virtual ~ExtBoxWithBtns_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void InitFromDialog(ExtMgrDialog *pParentDialog);
@@ -202,9 +203,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeExtBoxWithBtns(vcl::Wi
ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl()
{
+ dispose();
+}
+
+void ExtBoxWithBtns_Impl::dispose()
+{
delete m_pOptionsBtn;
delete m_pEnableBtn;
delete m_pRemoveBtn;
+ ExtensionBox_Impl::dispose();
}
@@ -716,7 +723,13 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager)
ExtMgrDialog::~ExtMgrDialog()
{
+ dispose();
+}
+
+void ExtMgrDialog::dispose()
+{
m_aIdle.Stop();
+ ModelessDialog::dispose();
}
@@ -1197,7 +1210,13 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan
UpdateRequiredDialog::~UpdateRequiredDialog()
{
+ dispose();
+}
+
+void UpdateRequiredDialog::dispose()
+{
m_aIdle.Stop();
+ ModalDialog::dispose();
}
long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index e2c1629..a46d8d9 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -140,6 +140,7 @@ class ExtMgrDialog : public ModelessDialog,
public:
ExtMgrDialog( vcl::Window * pParent, TheExtensionManager *pManager );
virtual ~ExtMgrDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
@@ -211,6 +212,7 @@ class UpdateRequiredDialog : public ModalDialog,
public:
UpdateRequiredDialog( vcl::Window * pParent, TheExtensionManager *pManager );
virtual ~UpdateRequiredDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index a75d2c4..4b47145 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -239,6 +239,11 @@ void ExtensionBox_Impl::Init()
ExtensionBox_Impl::~ExtensionBox_Impl()
{
+ dispose();
+}
+
+void ExtensionBox_Impl::dispose()
+{
if ( ! m_bInDelete )
DeleteRemoved();
@@ -264,6 +269,7 @@ ExtensionBox_Impl::~ExtensionBox_Impl()
delete m_pLocale;
delete m_pCollator;
+ ::svt::IExtensionListBox::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index a4bdef2..38c87a9 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -183,6 +183,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
public:
ExtensionBox_Impl(vcl::Window* pParent);
virtual ~ExtensionBox_Impl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 01420bf..acdc4af 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -564,6 +564,11 @@ UpdateDialog::UpdateDialog(
UpdateDialog::~UpdateDialog()
{
+ dispose();
+}
+
+void UpdateDialog::dispose()
+{
storeIgnoredUpdates();
for ( std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); i != m_ListboxEntries.end(); ++i )
@@ -575,6 +580,7 @@ UpdateDialog::~UpdateDialog()
delete (*i);
}
delete m_pUpdates;
+ ModalDialog::dispose();
}
@@ -599,9 +605,6 @@ UpdateDialog::CheckListBox::CheckListBox( vcl::Window* pParent, UpdateDialog & d
SetNormalStaticImage(Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT)));
}
-UpdateDialog::CheckListBox::~CheckListBox() {}
-
-
sal_uInt16 UpdateDialog::CheckListBox::getItemCount() const {
sal_uLong i = GetEntryCount();
OSL_ASSERT(i <= std::numeric_limits< sal_uInt16 >::max());
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index de86167..47c84d0 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -85,6 +85,7 @@ public:
std::vector< dp_gui::UpdateData > * updateData);
virtual ~UpdateDialog();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
@@ -111,8 +112,6 @@ private:
CheckListBox(
vcl::Window* pParent, UpdateDialog & dialog);
- virtual ~CheckListBox();
-
sal_uInt16 getItemCount() const;
private:
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index f4aab63..75540ea 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -238,7 +238,15 @@ UpdateInstallDialog::UpdateInstallDialog(
m_pHelp->Disable();
}
-UpdateInstallDialog::~UpdateInstallDialog() {}
+UpdateInstallDialog::~UpdateInstallDialog()
+{
+ dispose();
+}
+
+void UpdateInstallDialog::dispose()
+{
+ ModalDialog::dispose();
+}
bool UpdateInstallDialog::Close()
{
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 3bad18a..d285b60 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -60,6 +60,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCtx);
virtual ~UpdateInstallDialog();
+ virtual void dispose() SAL_OVERRIDE;
bool Close() SAL_OVERRIDE;
virtual short Execute() SAL_OVERRIDE;
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index c9aab53..916525a 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -57,6 +57,7 @@ class LicenseView : public MultiLineEdit, public SfxListener
public:
LicenseView( vcl::Window* pParent, WinBits nStyle );
virtual ~LicenseView();
+ virtual void dispose() SAL_OVERRIDE;
void ScrollDown( ScrollType eScroll );
@@ -122,9 +123,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLicenseView(vcl::Windo
LicenseView::~LicenseView()
{
+ dispose();
+}
+
+void LicenseView::dispose()
+{
maEndReachedHdl = Link();
maScrolledHdl = Link();
EndListeningAll();
+ MultiLineEdit::dispose();
}
void LicenseView::ScrollDown( ScrollType eScroll )
commit 718c96b7fa513bb23908b366c0a9317926a94193
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jan 16 15:29:28 2015 +0200
vcl: VclPtr conversion in dbaccess
Change-Id: I85fce0403121ffe55204d78445e4809960ec404a
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 3a2f559..d323daf 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -95,7 +95,13 @@ namespace dbmm
SaveDBDocPage::~SaveDBDocPage()
{
+ dispose();
+ }
+
+ void SaveDBDocPage::dispose()
+ {
delete m_pLocationController;
+ MacroMigrationPage::dispose();
}
void SaveDBDocPage::impl_updateLocationDependentItems()
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index fc6ffc9..a093313 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -73,6 +73,7 @@ namespace dbmm
public:
SaveDBDocPage(MacroMigrationDialog& _rParentDialog);
virtual ~SaveDBDocPage();
+ virtual void dispose() SAL_OVERRIDE;
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
public:
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 559f9be..8b8bc2c 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -188,34 +188,34 @@ namespace
// class OAppDetailPageHelper
OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindow& _rBorderWin,PreviewMode _ePreviewMode) : Window(_pParent,WB_DIALOGCONTROL)
,m_rBorderWin(_rBorderWin)
- ,m_aFL(this,WB_VERT)
- ,m_aTBPreview(this,WB_TABSTOP )
- ,m_aBorder(this,WB_BORDER | WB_READONLY)
- ,m_aPreview(&m_aBorder)
- ,m_aDocumentInfo(&m_aBorder,WB_LEFT | WB_VSCROLL | WB_READONLY )
+ ,m_aFL(new FixedLine(this,WB_VERT))
+ ,m_aTBPreview(new ToolBox(this,WB_TABSTOP) )
+ ,m_aBorder(new Window(this,WB_BORDER | WB_READONLY))
+ ,m_aPreview(new OPreviewWindow(m_aBorder.get()))
+ ,m_aDocumentInfo(new ::svtools::ODocumentInfoPreview(m_aBorder.get(), WB_LEFT | WB_VSCROLL | WB_READONLY) )
,m_pTablePreview(NULL)
,m_ePreviewMode(_ePreviewMode)
{
- m_aBorder.SetBorderStyle(WindowBorderStyle::MONO);
+ m_aBorder->SetBorderStyle(WindowBorderStyle::MONO);
m_aMenu.reset(new PopupMenu( ModuleRes( RID_MENU_APP_PREVIEW ) ));
- m_aTBPreview.SetOutStyle(TOOLBOX_STYLE_FLAT);
- m_aTBPreview.InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
- m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB);
- m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) );
- m_aTBPreview.EnableMenuStrings();
- m_aTBPreview.Enable(true);
+ m_aTBPreview->SetOutStyle(TOOLBOX_STYLE_FLAT);
+ m_aTBPreview->InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
+ m_aTBPreview->SetHelpId(HID_APP_VIEW_PREVIEW_CB);
+ m_aTBPreview->SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) );
+ m_aTBPreview->EnableMenuStrings();
+ m_aTBPreview->Enable(true);
- m_aBorder.SetUniqueId(UID_APP_VIEW_PREVIEW_1);
+ m_aBorder->SetUniqueId(UID_APP_VIEW_PREVIEW_1);
- m_aPreview.SetHelpId(HID_APP_VIEW_PREVIEW_1);
+ m_aPreview->SetHelpId(HID_APP_VIEW_PREVIEW_1);
- m_pTablePreview = new OTablePreviewWindow(&m_aBorder,WB_READONLY | WB_DIALOGCONTROL );
+ m_pTablePreview = new OTablePreviewWindow(m_aBorder.get(), WB_READONLY | WB_DIALOGCONTROL );
m_pTablePreview->SetHelpId(HID_APP_VIEW_PREVIEW_2);
- m_aDocumentInfo.SetHelpId(HID_APP_VIEW_PREVIEW_3);
+ m_aDocumentInfo->SetHelpId(HID_APP_VIEW_PREVIEW_3);
m_xWindow = VCLUnoHelper::GetInterface( m_pTablePreview );
@@ -227,6 +227,11 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo
OAppDetailPageHelper::~OAppDetailPageHelper()
{
+ dispose();
+}
+
+void OAppDetailPageHelper::dispose()
+{
try
{
Reference< ::util::XCloseable> xCloseable(m_xFrame,UNO_QUERY);
@@ -250,7 +255,12 @@ OAppDetailPageHelper::~OAppDetailPageHelper()
}
}
-
+ m_aFL.disposeAndClear();
+ m_aTBPreview.disposeAndClear();
+ m_aBorder.disposeAndClear();
+ m_aPreview.disposeAndClear();
+ m_aDocumentInfo.disposeAndClear();
+ vcl::Window::dispose();
}
int OAppDetailPageHelper::getVisibleControlIndex() const
@@ -598,7 +608,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
);
pTreeView->notifyHiContrastChanged();
- m_aBorder.SetZOrder(pTreeView, WINDOW_ZORDER_BEHIND);
+ m_aBorder->SetZOrder(pTreeView, WINDOW_ZORDER_BEHIND);
}
if ( !m_pLists[E_TABLE]->GetEntryCount() )
{
@@ -684,13 +694,13 @@ void OAppDetailPageHelper::setDetailPage(vcl::Window* _pWindow)
showPreview(NULL);
bool bHasFocus = false;
- m_aFL.Show();
+ m_aFL->Show();
{
bHasFocus = pCurrent != 0 && pCurrent->HasChildPathFocus();
_pWindow->Show();
}
- m_aTBPreview.Show();
- m_aBorder.Show();
+ m_aTBPreview->Show();
+ m_aBorder->Show();
switchPreview(m_ePreviewMode,true);
if ( bHasFocus )
@@ -974,17 +984,17 @@ void OAppDetailPageHelper::Resize()
pWindow->SetPosSizePixel( Point(0, 0), Size(nHalfOutputWidth - n6PPT, nOutputHeight) );
- m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0 ), Size(aFLSize.Width(), nOutputHeight ) );
+ m_aFL->SetPosSizePixel( Point(nHalfOutputWidth , 0 ), Size(aFLSize.Width(), nOutputHeight ) );
- Size aTBSize = m_aTBPreview.CalcWindowSizePixel();
- m_aTBPreview.SetPosSizePixel(Point(nOutputWidth - aTBSize.getWidth(), 0 ),
+ Size aTBSize = m_aTBPreview->CalcWindowSizePixel();
+ m_aTBPreview->SetPosSizePixel(Point(nOutputWidth - aTBSize.getWidth(), 0 ),
aTBSize );
- m_aBorder.SetPosSizePixel(Point(nHalfOutputWidth + aFLSize.Width() + n6PPT, aTBSize.getHeight() + n6PPT ),
+ m_aBorder->SetPosSizePixel(Point(nHalfOutputWidth + aFLSize.Width() + n6PPT, aTBSize.getHeight() + n6PPT ),
Size(nHalfOutputWidth - aFLSize.Width() - n6PPT, nOutputHeight - 2*n6PPT - aTBSize.getHeight()) );
- m_aPreview.SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() );
- m_aDocumentInfo.SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() );
- m_pTablePreview->SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() );
+ m_aPreview->SetPosSizePixel(Point(0,0),m_aBorder->GetSizePixel() );
+ m_aDocumentInfo->SetPosSizePixel(Point(0,0),m_aBorder->GetSizePixel() );
+ m_pTablePreview->SetPosSizePixel(Point(0,0),m_aBorder->GetSizePixel() );
}
}
@@ -1020,7 +1030,7 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,bool _bForce)
}
m_aMenu->CheckItem(nSelectedAction);
- m_aTBPreview.SetItemText(SID_DB_APP_DISABLE_PREVIEW, m_aMenu->GetItemText(nSelectedAction));
+ m_aTBPreview->SetItemText(SID_DB_APP_DISABLE_PREVIEW, m_aMenu->GetItemText(nSelectedAction));
Resize();
// simulate a selectionChanged event at the controller, to force the preview to be updated
@@ -1034,8 +1044,8 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,bool _bForce)
else
{
m_pTablePreview->Hide();
- m_aPreview.Hide();
- m_aDocumentInfo.Hide();
+ m_aPreview->Hide();
+ m_aDocumentInfo->Hide();
}
}
}
@@ -1061,8 +1071,8 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
Any aPreview = xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference< XCommandEnvironment >());
if ( m_ePreviewMode == E_DOCUMENT )
{
- m_aDocumentInfo.Hide();
- m_aPreview.Show();
+ m_aDocumentInfo->Hide();
+ m_aPreview->Show();
Graphic aGraphic;
Sequence < sal_Int8 > aBmpSequence;
@@ -1074,24 +1084,24 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent)
GraphicConverter::Import(aData,aGraphic);
}
- m_aPreview.setGraphic( aGraphic );
- m_aPreview.Invalidate();
+ m_aPreview->setGraphic( aGraphic );
+ m_aPreview->Invalidate();
}
else
{
- m_aPreview.Hide();
- m_aDocumentInfo.clear();
- m_aDocumentInfo.Show();
+ m_aPreview->Hide();
+ m_aDocumentInfo->clear();
+ m_aDocumentInfo->Show();
Reference<document::XDocumentProperties> xProp(
aPreview, UNO_QUERY);
if ( xProp.is() )
- m_aDocumentInfo.fill(xProp,OUString());
+ m_aDocumentInfo->fill(xProp,OUString());
}
}
else
{
- m_aPreview.Hide();
- m_aDocumentInfo.Hide();
+ m_aPreview->Hide();
+ m_aDocumentInfo->Hide();
}
}
catch( const Exception& )
@@ -1108,8 +1118,8 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
if ( isPreviewEnabled() )
{
WaitObject aWaitCursor( this );
- m_aPreview.Hide();
- m_aDocumentInfo.Hide();
+ m_aPreview->Hide();
+ m_aDocumentInfo->Hide();
m_pTablePreview->Show();
if ( !m_xFrame.is() )
{
@@ -1169,17 +1179,17 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/)
{
- m_aTBPreview.EndSelection();
+ m_aTBPreview->EndSelection();
// tell the toolbox that the item is pressed down
- m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, true );
+ m_aTBPreview->SetItemDown( SID_DB_APP_DISABLE_PREVIEW, true );
// simulate a mouse move (so the "down" state is really painted)
- Point aPoint = m_aTBPreview.GetItemRect( SID_DB_APP_DISABLE_PREVIEW ).TopLeft();
+ Point aPoint = m_aTBPreview->GetItemRect( SID_DB_APP_DISABLE_PREVIEW ).TopLeft();
MouseEvent aMove( aPoint, 0, MouseEventModifiers::SIMPLEMOVE | MouseEventModifiers::SYNTHETIC );
- m_aTBPreview.MouseMove( aMove );
+ m_aTBPreview->MouseMove( aMove );
- m_aTBPreview.Update();
+ m_aTBPreview->Update();
// execute the menu
boost::scoped_ptr<PopupMenu> aMenu(new PopupMenu( ModuleRes( RID_MENU_APP_PREVIEW ) ));
@@ -1198,14 +1208,14 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/)
// no disabled entries
aMenu->RemoveDisabledEntries();
- sal_uInt16 nSelectedAction = aMenu->Execute(&m_aTBPreview, m_aTBPreview.GetItemRect( SID_DB_APP_DISABLE_PREVIEW ));
+ sal_uInt16 nSelectedAction = aMenu->Execute(m_aTBPreview.get(), m_aTBPreview->GetItemRect( SID_DB_APP_DISABLE_PREVIEW ));
// "cleanup" the toolbox state
MouseEvent aLeave( aPoint, 0, MouseEventModifiers::LEAVEWINDOW | MouseEventModifiers::SYNTHETIC );
- m_aTBPreview.MouseMove( aLeave );
- m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, false);
+ m_aTBPreview->MouseMove( aLeave );
+ m_aTBPreview->SetItemDown( SID_DB_APP_DISABLE_PREVIEW, false);
if ( nSelectedAction )
{
- m_aTBPreview.SetItemText(SID_DB_APP_DISABLE_PREVIEW, aMenu->GetItemText(nSelectedAction));
+ m_aTBPreview->SetItemText(SID_DB_APP_DISABLE_PREVIEW, aMenu->GetItemText(nSelectedAction));
Resize();
getBorderWin().getView()->getAppController().executeChecked(nSelectedAction,Sequence<PropertyValue>());
}
@@ -1257,19 +1267,19 @@ void OAppDetailPageHelper::ImplInitSettings()
aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont );
- m_aTBPreview.SetPointFont( aFont );
+ m_aTBPreview->SetPointFont( aFont );
SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor();
- m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aBorder.SetTextFillColor();
- m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aTBPreview.SetTextFillColor();
+ m_aBorder->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aBorder->SetTextFillColor();
+ m_aTBPreview->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aTBPreview->SetTextFillColor();
SetBackground( rStyleSettings.GetFieldColor() );
- m_aBorder.SetBackground( rStyleSettings.GetFieldColor() );
- m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
- m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() );
- m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() );
+ m_aBorder->SetBackground( rStyleSettings.GetFieldColor() );
+ m_aFL->SetBackground( rStyleSettings.GetFieldColor() );
+ m_aDocumentInfo->SetBackground( rStyleSettings.GetFieldColor() );
+ m_aTBPreview->SetBackground( rStyleSettings.GetFieldColor() );
m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() );
}
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 95c3b63..ef9899f 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -79,12 +79,12 @@ namespace dbaui
{
DBTreeListBox* m_pLists[ELEMENT_COUNT];
OAppBorderWindow& m_rBorderWin;
- FixedLine m_aFL;
- ToolBox m_aTBPreview;
- Window m_aBorder;
- OPreviewWindow m_aPreview;
- ::svtools::ODocumentInfoPreview
- m_aDocumentInfo;
+ VclPtr<FixedLine> m_aFL;
+ VclPtr<ToolBox> m_aTBPreview;
+ VclPtr<Window> m_aBorder;
+ VclPtr<OPreviewWindow> m_aPreview;
+ VclPtr<::svtools::ODocumentInfoPreview>
+ m_aDocumentInfo;
vcl::Window* m_pTablePreview;
::std::unique_ptr<PopupMenu> m_aMenu;
PreviewMode m_ePreviewMode;
@@ -169,6 +169,7 @@ namespace dbaui
public:
OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindow& _rBorderWin,PreviewMode _ePreviewMode);
virtual ~OAppDetailPageHelper();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void Resize() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 4882593..81ac3d8 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -341,30 +341,40 @@ void OCreationList::KeyInput( const KeyEvent& rKEvt )
OTasksWindow::OTasksWindow(vcl::Window* _pParent,OApplicationDetailView* _pDetailView)
: Window(_pParent,WB_DIALOGCONTROL )
- ,m_aCreation(*this)
- ,m_aDescription(this)
- ,m_aHelpText(this,WB_WORDBREAK)
- ,m_aFL(this,WB_VERT)
+ ,m_aCreation(new OCreationList(*this))
+ ,m_aDescription(new FixedText(this))
+ ,m_aHelpText(new FixedText(this,WB_WORDBREAK))
+ ,m_aFL(new FixedLine(this,WB_VERT))
,m_pDetailView(_pDetailView)
{
SetUniqueId(UID_APP_TASKS_WINDOW);
- m_aCreation.SetHelpId(HID_APP_CREATION_LIST);
- m_aCreation.SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl));
- m_aHelpText.SetHelpId(HID_APP_HELP_TEXT);
- m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT);
- m_aDescription.SetText(ModuleRes(STR_DESCRIPTION));
+ m_aCreation->SetHelpId(HID_APP_CREATION_LIST);
+ m_aCreation->SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl));
+ m_aHelpText->SetHelpId(HID_APP_HELP_TEXT);
+ m_aDescription->SetHelpId(HID_APP_DESCRIPTION_TEXT);
+ m_aDescription->SetText(ModuleRes(STR_DESCRIPTION));
ImageProvider aImageProvider;
Image aFolderImage = aImageProvider.getFolderImage( css::sdb::application::DatabaseObject::FORM );
- m_aCreation.SetDefaultCollapsedEntryBmp( aFolderImage );
- m_aCreation.SetDefaultExpandedEntryBmp( aFolderImage );
+ m_aCreation->SetDefaultCollapsedEntryBmp( aFolderImage );
+ m_aCreation->SetDefaultExpandedEntryBmp( aFolderImage );
ImplInitSettings(true,true,true);
}
OTasksWindow::~OTasksWindow()
{
+ dispose();
+}
+
+void OTasksWindow::dispose()
+{
Clear();
+ m_aCreation.disposeAndClear();
+ m_aDescription.disposeAndClear();
+ m_aHelpText.disposeAndClear();
+ m_aFL.disposeAndClear();
+ vcl::Window::dispose();
}
void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
@@ -394,23 +404,23 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
{
SetTextColor( rStyleSettings.GetFieldTextColor() );
SetTextFillColor();
- m_aHelpText.SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aHelpText.SetTextFillColor();
- m_aDescription.SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aDescription.SetTextFillColor();
+ m_aHelpText->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aHelpText->SetTextFillColor();
+ m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aDescription->SetTextFillColor();
}
if( bBackground )
{
SetBackground( rStyleSettings.GetFieldColor() );
- m_aHelpText.SetBackground( rStyleSettings.GetFieldColor() );
- m_aDescription.SetBackground( rStyleSettings.GetFieldColor() );
- m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
+ m_aHelpText->SetBackground( rStyleSettings.GetFieldColor() );
+ m_aDescription->SetBackground( rStyleSettings.GetFieldColor() );
+ m_aFL->SetBackground( rStyleSettings.GetFieldColor() );
}
- vcl::Font aFont = m_aDescription.GetControlFont();
+ vcl::Font aFont = m_aDescription->GetControlFont();
aFont.SetWeight(WEIGHT_BOLD);
- m_aDescription.SetControlFont(aFont);
+ m_aDescription->SetControlFont(aFont);
}
void OTasksWindow::setHelpText(sal_uInt16 _nId)
@@ -418,20 +428,20 @@ void OTasksWindow::setHelpText(sal_uInt16 _nId)
if ( _nId )
{
OUString sText = ModuleRes(_nId);
- m_aHelpText.SetText(sText);
+ m_aHelpText->SetText(sText);
}
else
{
- m_aHelpText.SetText(OUString());
+ m_aHelpText->SetText(OUString());
}
}
IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/)
{
- SvTreeListEntry* pEntry = m_aCreation.GetHdlEntry();
+ SvTreeListEntry* pEntry = m_aCreation->GetHdlEntry();
if ( pEntry )
- m_aHelpText.SetText( ModuleRes( reinterpret_cast< TaskEntry* >( pEntry->GetUserData() )->nHelpID ) );
+ m_aHelpText->SetText( ModuleRes( reinterpret_cast< TaskEntry* >( pEntry->GetUserData() )->nHelpID ) );
return 1L;
}
@@ -446,14 +456,14 @@ void OTasksWindow::Resize()
sal_Int32 n6PPT = aFLSize.Height();
long nHalfOutputWidth = static_cast<long>(nOutputWidth * 0.5);
- m_aCreation.SetPosSizePixel( Point(0, 0), Size(nHalfOutputWidth - n6PPT, nOutputHeight) );
+ m_aCreation->SetPosSizePixel( Point(0, 0), Size(nHalfOutputWidth - n6PPT, nOutputHeight) );
// i77897 make the m_aHelpText a little bit smaller. (-5)
sal_Int32 nNewWidth = nOutputWidth - nHalfOutputWidth - aFLSize.Width() - 5;
- m_aDescription.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, 0), Size(nNewWidth, nOutputHeight) );
- Size aDesc = m_aDescription.CalcMinimumSize();
- m_aHelpText.SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, aDesc.Height() ), Size(nNewWidth, nOutputHeight - aDesc.Height() - n6PPT) );
+ m_aDescription->SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, 0), Size(nNewWidth, nOutputHeight) );
+ Size aDesc = m_aDescription->CalcMinimumSize();
+ m_aHelpText->SetPosSizePixel( Point(nHalfOutputWidth + n6PPT, aDesc.Height() ), Size(nNewWidth, nOutputHeight - aDesc.Height() - n6PPT) );
- m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) );
+ m_aFL->SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) );
}
void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
@@ -485,79 +495,88 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
for ( TaskEntryList::const_iterator pTask = _rList.begin(); pTask != aEnd; ++pTask, ++pImages )
{
- SvTreeListEntry* pEntry = m_aCreation.InsertEntry( pTask->sTitle );
+ SvTreeListEntry* pEntry = m_aCreation->InsertEntry( pTask->sTitle );
pEntry->SetUserData( reinterpret_cast< void* >( new TaskEntry( *pTask ) ) );
Image aImage = Image( *pImages );
- m_aCreation.SetExpandedEntryBmp( pEntry, aImage );
- m_aCreation.SetCollapsedEntryBmp( pEntry, aImage );
+ m_aCreation->SetExpandedEntryBmp( pEntry, aImage );
+ m_aCreation->SetCollapsedEntryBmp( pEntry, aImage );
}
}
catch(Exception&)
{
}
- m_aCreation.Show();
- m_aCreation.SelectAll(false);
- m_aHelpText.Show();
- m_aDescription.Show();
- m_aFL.Show();
- m_aCreation.updateHelpText();
+ m_aCreation->Show();
+ m_aCreation->SelectAll(false);
+ m_aHelpText->Show();
+ m_aDescription->Show();
+ m_aFL->Show();
+ m_aCreation->updateHelpText();
Enable(!_rList.empty());
}
void OTasksWindow::Clear()
{
- m_aCreation.resetLastActive();
- SvTreeListEntry* pEntry = m_aCreation.First();
+ m_aCreation->resetLastActive();
+ SvTreeListEntry* pEntry = m_aCreation->First();
while ( pEntry )
{
delete reinterpret_cast< TaskEntry* >( pEntry->GetUserData() );
- pEntry = m_aCreation.Next(pEntry);
+ pEntry = m_aCreation->Next(pEntry);
}
- m_aCreation.Clear();
+ m_aCreation->Clear();
}
// class OApplicationDetailView
OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,false )
- ,m_aHorzSplitter(this)
- ,m_aTasks(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL )
- ,m_aContainer(this,0,WB_BORDER | WB_DIALOGCONTROL )
+ ,m_aHorzSplitter(new Splitter(this))
+ ,m_aTasks(new dbaui::OTitleWindow(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL) )
+ ,m_aContainer(new dbaui::OTitleWindow(this,0,WB_BORDER | WB_DIALOGCONTROL) )
,m_rBorderWin(_rParent)
{
SetUniqueId(UID_APP_DETAIL_VIEW);
ImplInitSettings( true, true, true );
- m_pControlHelper = new OAppDetailPageHelper(&m_aContainer,m_rBorderWin,_ePreviewMode);
+ m_pControlHelper = new OAppDetailPageHelper(m_aContainer.get(),m_rBorderWin,_ePreviewMode);
m_pControlHelper->Show();
- m_aContainer.setChildWindow(m_pControlHelper);
+ m_aContainer->setChildWindow(m_pControlHelper);
- OTasksWindow* pTasks = new OTasksWindow(&m_aTasks,this);
+ OTasksWindow* pTasks = new OTasksWindow(m_aTasks.get(),this);
pTasks->Show();
pTasks->Disable(m_rBorderWin.getView()->getCommandController().isDataSourceReadOnly());
- m_aTasks.setChildWindow(pTasks);
- m_aTasks.SetUniqueId(UID_APP_TASKS_VIEW);
- m_aTasks.Show();
+ m_aTasks->setChildWindow(pTasks);
+ m_aTasks->SetUniqueId(UID_APP_TASKS_VIEW);
+ m_aTasks->Show();
- m_aContainer.SetUniqueId(UID_APP_CONTAINER_VIEW);
- m_aContainer.Show();
+ m_aContainer->SetUniqueId(UID_APP_CONTAINER_VIEW);
+ m_aContainer->Show();
const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width();
- m_aHorzSplitter.SetPosSizePixel( Point(0,50), Size(0,nFrameWidth) );
+ m_aHorzSplitter->SetPosSizePixel( Point(0,50), Size(0,nFrameWidth) );
// now set the components at the base class
- set(&m_aContainer,&m_aTasks);
+ set(m_aContainer.get(),m_aTasks.get());
- m_aHorzSplitter.Show();
- m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT);
- setSplitter(&m_aHorzSplitter);
+ m_aHorzSplitter->Show();
+ m_aHorzSplitter->SetUniqueId(UID_APP_VIEW_HORZ_SPLIT);
+ setSplitter(m_aHorzSplitter.get());
}
OApplicationDetailView::~OApplicationDetailView()
{
+ dispose();
+}
+
+void OApplicationDetailView::dispose()
+{
set(NULL,NULL);
setSplitter(NULL);
m_pControlHelper = NULL;
+ m_aHorzSplitter.disposeAndClear();
+ m_aTasks.disposeAndClear();
+ m_aContainer.disposeAndClear();
+ OSplitterView::dispose();
}
void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
@@ -580,9 +599,9 @@ void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, boo
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
- m_aHorzSplitter.SetBackground( rStyleSettings.GetDialogColor() );
- m_aHorzSplitter.SetFillColor( rStyleSettings.GetDialogColor() );
- m_aHorzSplitter.SetTextFillColor(rStyleSettings.GetDialogColor() );
+ m_aHorzSplitter->SetBackground( rStyleSettings.GetDialogColor() );
+ m_aHorzSplitter->SetFillColor( rStyleSettings.GetDialogColor() );
+ m_aHorzSplitter->SetTextFillColor(rStyleSettings.GetDialogColor() );
}
void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
@@ -643,7 +662,7 @@ void OApplicationDetailView::impl_createPage( ElementType _eType, const Referenc
? false
: getBorderWin().getView()->getCommandController().isCommandEnabled( rData.aTasks[0].sUNOCommand );
getTasksWindow().Enable( bEnabled );
- m_aContainer.setTitle( rData.nTitleId );
+ m_aContainer->setTitle( rData.nTitleId );
// let our helper create the object list
if ( _eType == E_TABLE )
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index ac12a0d..9bc7ca3 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -111,10 +111,10 @@ namespace dbaui
class OTasksWindow : public vcl::Window
{
- OCreationList m_aCreation;
- FixedText m_aDescription;
- FixedText m_aHelpText;
- FixedLine m_aFL;
+ VclPtr<OCreationList> m_aCreation;
+ VclPtr<FixedText> m_aDescription;
+ VclPtr<FixedText> m_aHelpText;
+ VclPtr<FixedLine> m_aFL;
OApplicationDetailView* m_pDetailView;
DECL_LINK( OnEntrySelectHdl, SvTreeListBox* );
@@ -124,6 +124,7 @@ namespace dbaui
public:
OTasksWindow(vcl::Window* _pParent,OApplicationDetailView* _pDetailView);
virtual ~OTasksWindow();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void Resize() SAL_OVERRIDE;
@@ -135,7 +136,7 @@ namespace dbaui
inline bool HandleKeyInput( const KeyEvent& _rKEvt )
{
- return m_aCreation.HandleKeyInput( _rKEvt );
+ return m_aCreation->HandleKeyInput( _rKEvt );
}
void Clear();
@@ -144,9 +145,9 @@ namespace dbaui
class OApplicationDetailView : public OSplitterView
, public IClipboardTest
{
- Splitter m_aHorzSplitter;
- OTitleWindow m_aTasks;
- OTitleWindow m_aContainer;
+ VclPtr<Splitter> m_aHorzSplitter;
+ VclPtr<OTitleWindow> m_aTasks;
+ VclPtr<OTitleWindow> m_aContainer;
OAppBorderWindow& m_rBorderWin; // my parent
OAppDetailPageHelper* m_pControlHelper;
::std::vector< TaskPaneData > m_aTaskPaneData;
@@ -160,6 +161,7 @@ namespace dbaui
public:
OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode);
virtual ~OApplicationDetailView();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void GetFocus() SAL_OVERRIDE;
@@ -188,7 +190,7 @@ namespace dbaui
bool interceptKeyInput( const KeyEvent& _rEvent );
inline OAppBorderWindow& getBorderWin() const { return m_rBorderWin; }
- inline OTasksWindow& getTasksWindow() const { return *static_cast< OTasksWindow* >( m_aTasks.getChildWindow() ); }
+ inline OTasksWindow& getTasksWindow() const { return *static_cast< OTasksWindow* >( m_aTasks->getChildWindow() ); }
bool isCutAllowed() SAL_OVERRIDE ;
bool isCopyAllowed() SAL_OVERRIDE ;
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index ff73ba0..0345aea 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -62,6 +62,11 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
OApplicationIconControl::~OApplicationIconControl()
{
+ dispose();
+}
+
+void OApplicationIconControl::dispose()
+{
sal_uLong nCount = GetEntryCount();
for ( sal_uLong i = 0; i < nCount; ++i )
{
@@ -72,7 +77,7 @@ OApplicationIconControl::~OApplicationIconControl()
pEntry->SetUserData(NULL);
}
}
-
+ SvtIconChoiceCtrl::dispose();
}
sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt )
diff --git a/dbaccess/source/ui/app/AppIconControl.hxx b/dbaccess/source/ui/app/AppIconControl.hxx
index 5fcecef..10c425b 100644
--- a/dbaccess/source/ui/app/AppIconControl.hxx
+++ b/dbaccess/source/ui/app/AppIconControl.hxx
@@ -34,6 +34,7 @@ namespace dbaui
public:
OApplicationIconControl(vcl::Window* _pParent);
virtual ~OApplicationIconControl();
+ virtual void dispose() SAL_OVERRIDE;
void setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; }
IControlActionListener* getControlActionListener( ) const { return m_pActionListener; }
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 8c3d451..c5551b5 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -38,35 +38,41 @@ using namespace ::com::sun::star::container;
// class OApplicationSwapWindow
OApplicationSwapWindow::OApplicationSwapWindow( vcl::Window* _pParent, OAppBorderWindow& _rBorderWindow )
:Window(_pParent,WB_DIALOGCONTROL )
- ,m_aIconControl(this)
+ ,m_aIconControl(new OApplicationIconControl(this))
,m_eLastType(E_NONE)
,m_rBorderWin( _rBorderWindow )
{
ImplInitSettings( true, true, true );
- m_aIconControl.SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl));
- m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() );
- m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL);
- m_aIconControl.Show();
+ m_aIconControl->SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl));
+ m_aIconControl->setControlActionListener( &m_rBorderWin.getView()->getAppController() );
+ m_aIconControl->SetHelpId(HID_APP_SWAP_ICONCONTROL);
+ m_aIconControl->Show();
}
OApplicationSwapWindow::~OApplicationSwapWindow()
{
+ dispose();
+}
+void OApplicationSwapWindow::dispose()
+{
+ m_aIconControl.disposeAndClear();
+ vcl::Window::dispose();
}
void OApplicationSwapWindow::Resize()
{
Size aFLSize = LogicToPixel( Size( 8, 0 ), MAP_APPFONT );
long nX = 0;
- if ( m_aIconControl.GetEntryCount() != 0 )
- nX = m_aIconControl.GetBoundingBox( m_aIconControl.GetEntry(0) ).GetWidth() + aFLSize.Width();
+ if ( m_aIconControl->GetEntryCount() != 0 )
+ nX = m_aIconControl->GetBoundingBox( m_aIconControl->GetEntry(0) ).GetWidth() + aFLSize.Width();
Size aOutputSize = GetOutputSize();
- m_aIconControl.SetPosSizePixel( Point(static_cast<long>((aOutputSize.Width() - nX)*0.5), 0) ,Size(nX,aOutputSize.Height()));
- m_aIconControl.ArrangeIcons();
+ m_aIconControl->SetPosSizePixel( Point(static_cast<long>((aOutputSize.Width() - nX)*0.5), 0) ,Size(nX,aOutputSize.Height()));
+ m_aIconControl->ArrangeIcons();
}
void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
@@ -106,24 +112,24 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
void OApplicationSwapWindow::clearSelection()
{
- m_aIconControl.SetNoSelection();
+ m_aIconControl->SetNoSelection();
sal_uLong nPos = 0;
- SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos);
+ SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry(nPos);
if ( pEntry )
- m_aIconControl.InvalidateEntry(pEntry);
- m_aIconControl.GetClickHdl().Call(&m_aIconControl);
+ m_aIconControl->InvalidateEntry(pEntry);
+ m_aIconControl->GetClickHdl().Call(&m_aIconControl);
}
void OApplicationSwapWindow::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics )
{
- m_aIconControl.CreateAutoMnemonics( _rMnemonics );
+ m_aIconControl->CreateAutoMnemonics( _rMnemonics );
}
bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
{
const vcl::KeyCode& rKeyCode = _rEvent.GetKeyCode();
if ( rKeyCode.GetModifier() == KEY_MOD2 )
- return m_aIconControl.DoKeyInput( _rEvent );
+ return m_aIconControl->DoKeyInput( _rEvent );
// not handled
return false;
@@ -132,7 +138,7 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent )
ElementType OApplicationSwapWindow::getElementType() const
{
sal_uLong nPos = 0;
- SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos);
+ SvxIconChoiceCtrlEntry* pEntry = m_aIconControl->GetSelectedEntry(nPos);
return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE;
}
@@ -174,18 +180,18 @@ IMPL_LINK_NOARG(OApplicationSwapWindow, ChangeToLastSelected)
void OApplicationSwapWindow::selectContainer(ElementType _eType)
{
- sal_uLong nCount = m_aIconControl.GetEntryCount();
+ sal_uLong nCount = m_aIconControl->GetEntryCount();
SvxIconChoiceCtrlEntry* pEntry = NULL;
for (sal_uLong i=0; i < nCount; ++i)
{
- pEntry = m_aIconControl.GetEntry(i);
+ pEntry = m_aIconControl->GetEntry(i);
if ( pEntry && *static_cast<ElementType*>(pEntry->GetUserData()) == _eType )
break;
pEntry = NULL;
}
if ( pEntry )
- m_aIconControl.SetCursor(pEntry); // this call also initiates a onContainerSelected call
+ m_aIconControl->SetCursor(pEntry); // this call also initiates a onContainerSelected call
else
onContainerSelected( _eType );
}
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index 5c10903..b0f745f 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -21,6 +21,7 @@
#include "IClipBoardTest.hxx"
#include <vcl/lstbox.hxx>
+#include <vcl/vclptr.hxx>
#include "AppIconControl.hxx"
#include "AppElementType.hxx"
@@ -30,7 +31,7 @@ namespace dbaui
class OApplicationSwapWindow : public vcl::Window,
public IClipboardTest
{
- OApplicationIconControl m_aIconControl;
+ VclPtr<OApplicationIconControl> m_aIconControl;
ElementType m_eLastType;
OAppBorderWindow& m_rBorderWin;
@@ -43,6 +44,7 @@ namespace dbaui
public:
OApplicationSwapWindow( vcl::Window* _pParent, OAppBorderWindow& _rBorderWindow );
virtual ~OApplicationSwapWindow();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void Resize() SAL_OVERRIDE;
@@ -54,9 +56,9 @@ namespace dbaui
void cut() SAL_OVERRIDE { }
void paste() SAL_OVERRIDE { }
- inline sal_uLong GetEntryCount() const { return m_aIconControl.GetEntryCount(); }
- inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl.GetEntry(nPos); }
- inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl.GetBoundingBox(pEntry); }
+ inline sal_uLong GetEntryCount() const { return m_aIconControl->GetEntryCount(); }
+ inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl->GetEntry(nPos); }
+ inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl->GetBoundingBox(pEntry); }
/** automatically creates mnemonics for the icon/texts in our left hand side panel
*/
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index f4108f9..175176a 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -29,9 +29,9 @@ namespace dbaui
OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,bool _bShift)
: Window(_pParent,_nBits | WB_DIALOGCONTROL)
-, m_aSpace1(this)
-, m_aSpace2(this)
-, m_aTitle(this)
+, m_aSpace1(new FixedText(this))
+, m_aSpace2(new FixedText(this))
+, m_aTitle(new FixedText(this))
, m_pChild(NULL)
, m_bShift(_bShift)
{
@@ -40,20 +40,28 @@ OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _n
SetBorderStyle(WindowBorderStyle::MONO);
ImplInitSettings( true, true, true );
- vcl::Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle };
+ vcl::Window* pWindows [] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() };
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
pWindows[i]->Show();
}
OTitleWindow::~OTitleWindow()
{
+ dispose();
+}
+
+void OTitleWindow::dispose()
+{
if ( m_pChild )
{
m_pChild->Hide();
boost::scoped_ptr<vcl::Window> aTemp(m_pChild);
m_pChild = NULL;
}
-
+ m_aSpace1.disposeAndClear();
+ m_aSpace2.disposeAndClear();
+ m_aTitle.disposeAndClear();
+ vcl::Window::dispose();
}
void OTitleWindow::setChildWindow(vcl::Window* _pChild)
@@ -74,11 +82,11 @@ void OTitleWindow::Resize()
sal_Int32 nYOffset = aTextSize.Height();
sal_Int32 nHeight = GetTextHeight() + 2*nYOffset;
- m_aSpace1.SetPosSizePixel( Point(SPACE_BORDER, SPACE_BORDER ),
+ m_aSpace1->SetPosSizePixel( Point(SPACE_BORDER, SPACE_BORDER ),
Size(nXOffset , nHeight - SPACE_BORDER) );
- m_aSpace2.SetPosSizePixel( Point(nXOffset + SPACE_BORDER, SPACE_BORDER ),
+ m_aSpace2->SetPosSizePixel( Point(nXOffset + SPACE_BORDER, SPACE_BORDER ),
Size(nOutputWidth - nXOffset - 2*SPACE_BORDER, nYOffset) );
- m_aTitle.SetPosSizePixel( Point(nXOffset + SPACE_BORDER, nYOffset + SPACE_BORDER),
+ m_aTitle->SetPosSizePixel( Point(nXOffset + SPACE_BORDER, nYOffset + SPACE_BORDER),
Size(nOutputWidth - nXOffset - 2*SPACE_BORDER, nHeight - nYOffset - SPACE_BORDER) );
if ( m_pChild )
{
@@ -91,7 +99,7 @@ void OTitleWindow::setTitle(sal_uInt16 _nTitleId)
{
if ( _nTitleId != 0 )
{
- m_aTitle.SetText(ModuleRes(_nTitleId));
+ m_aTitle->SetText(ModuleRes(_nTitleId));
}
}
@@ -105,7 +113,7 @@ void OTitleWindow::GetFocus()
long OTitleWindow::GetWidthPixel() const
{
Size aTextSize = LogicToPixel( Size( 12, 0 ), MAP_APPFONT );
- sal_Int32 nWidth = GetTextWidth(m_aTitle.GetText()) + 2*aTextSize.Width();
+ sal_Int32 nWidth = GetTextWidth(m_aTitle->GetText()) + 2*aTextSize.Width();
return nWidth;
}
@@ -151,7 +159,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
- vcl::Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle};
+ vcl::Window* pWindows [] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get()};
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
vcl::Font aFont = pWindows[i]->GetFont();
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index e33144a..f615c2b 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -25,9 +25,9 @@ namespace dbaui
{
class OTitleWindow : public vcl::Window
{
- FixedText m_aSpace1;
- FixedText m_aSpace2;
- FixedText m_aTitle;
+ VclPtr<FixedText> m_aSpace1;
+ VclPtr<FixedText> m_aSpace2;
+ VclPtr<FixedText> m_aTitle;
vcl::Window* m_pChild;
bool m_bShift;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
@@ -36,6 +36,7 @@ namespace dbaui
public:
OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,bool _bShift = true);
virtual ~OTitleWindow();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void Resize() SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 4a9921e8..06896f5 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -86,6 +86,11 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev
OAppBorderWindow::~OAppBorderWindow()
{
+ dispose();
+}
+
+void OAppBorderWindow::dispose()
+{
// destroy children
if ( m_pPanel )
{
@@ -99,7 +104,7 @@ OAppBorderWindow::~OAppBorderWindow()
boost::scoped_ptr<vcl::Window> aTemp(m_pDetailView);
m_pDetailView = NULL;
}
-
+ vcl::Window::dispose();
}
void OAppBorderWindow::GetFocus()
@@ -204,13 +209,16 @@ OApplicationView::OApplicationView( vcl::Window* pParent
OApplicationView::~OApplicationView()
{
+ dispose();
+}
- {
- stopComponentListening(m_xObject);
- m_pWin->Hide();
- boost::scoped_ptr<vcl::Window> aTemp(m_pWin);
- m_pWin = NULL;
- }
+void OApplicationView::dispose()
+{
+ stopComponentListening(m_xObject);
+ m_pWin->Hide();
+ boost::scoped_ptr<vcl::Window> aTemp(m_pWin);
+ m_pWin = NULL;
+ ODataView::dispose();
}
void OApplicationView::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics )
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index a19118a..f557d66 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -55,6 +55,7 @@ namespace dbaui
public:
OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePreviewMode);
virtual ~OAppBorderWindow();
+ virtual void dispose() SAL_OVERRIDE;
// window overloads
virtual void GetFocus() SAL_OVERRIDE;
@@ -103,6 +104,7 @@ namespace dbaui
,PreviewMode _ePreviewMode
);
virtual ~OApplicationView();
+ virtual void dispose() SAL_OVERRIDE;
/// automatically creates mnemonics for the icon/texts in our left hand side panel
void createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index f41289e..3e66f5c 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -117,6 +117,11 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont
UnoDataBrowserView::~UnoDataBrowserView()
{
+ dispose();
+}
+
+void UnoDataBrowserView::dispose()
+{
{
boost::scoped_ptr<Splitter> aTemp(m_pSplitter);
m_pSplitter = NULL;
@@ -136,7 +141,7 @@ UnoDataBrowserView::~UnoDataBrowserView()
}
catch(const Exception&)
{}
-
+ ODataView::dispose();
}
IMPL_LINK( UnoDataBrowserView, SplitHdl, void*, /*NOINTERESTEDIN*/ )
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 7c5f33f..979db11 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -66,11 +66,11 @@ namespace dbaui
:Window(pParent,nStyle)
,m_xContext(_rxContext)
,m_rController( _rController )
- ,m_aSeparator( this )
+ ,m_aSeparator( new FixedLine(this) )
{
m_rController.acquire();
m_pAccel.reset(::svt::AcceleratorExecute::createAcceleratorHelper());
- m_aSeparator.Show();
+ m_aSeparator->Show();
}
void ODataView::Construct()
@@ -79,8 +79,14 @@ namespace dbaui
ODataView::~ODataView()
{
+ dispose();
+ }
+ void ODataView::dispose()
+ {
m_rController.release();
+ m_aSeparator.disposeAndClear();
+ vcl::Window::dispose();
}
void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ )
@@ -105,7 +111,7 @@ namespace dbaui
// position the separator
const Size aSeparatorSize = Size( aPlayground.GetWidth(), 2 );
- m_aSeparator.SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
+ m_aSeparator->SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
aPlayground.Top() += aSeparatorSize.Height() + 1;
// position the controls of the document's view
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index 2d140c3..0956ff1 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -46,6 +46,11 @@ DBTreeView::DBTreeView( vcl::Window* pParent, WinBits nBits)
DBTreeView::~DBTreeView()
{
+ dispose();
+}
+
+void DBTreeView::dispose()
+{
if (m_pTreeListBox)
{
if (m_pTreeListBox->GetModel())
@@ -56,6 +61,7 @@ DBTreeView::~DBTreeView()
boost::scoped_ptr<vcl::Window> aTemp(m_pTreeListBox);
m_pTreeListBox = NULL;
}
+ vcl::Window::dispose();
}
void DBTreeView::SetPreExpandHandler(const Link& _rHdl)
diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx
index 99bf441..bc9e11b 100644
--- a/dbaccess/source/ui/browser/dbtreeview.hxx
+++ b/dbaccess/source/ui/browser/dbtreeview.hxx
@@ -40,6 +40,7 @@ namespace dbaui
DBTreeView( vcl::Window* pParent,
WinBits nBits );
virtual ~DBTreeView();
+ virtual void dispose() SAL_OVERRIDE;
/** sets a handler which is called when an list box entry is to be expanded.
<p>When calling the link, the parameter is an SvTreeListEntry marking the entry to be expanded.
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index cf86c83..9d6f955 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -717,8 +717,14 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM,
SbaGridControl::~SbaGridControl()
{
+ dispose();
+}
+
+void SbaGridControl::dispose()
+{
if (m_nAsyncDropEvent)
Application::RemoveUserEvent(m_nAsyncDropEvent);
+ FmGridControl::dispose();
}
BrowserHeader* SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent)
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index a4d44cb..36aff78 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -47,11 +47,6 @@ OColumnControlWindow::OColumnControlWindow(vcl::Window* pParent
m_aLocale = SvtSysLocale().GetLanguageTag().getLocale();
}
-OColumnControlWindow::~OColumnControlWindow()
-{
-
-}
-
void OColumnControlWindow::ActivateAggregate( EControlType eType )
{
switch(eType )
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index ab59911..ee032b4 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -161,7 +161,11 @@ void OFieldDescControl::Contruct()
OFieldDescControl::~OFieldDescControl()
{
+ dispose();
+}
+void OFieldDescControl::dispose()
+{
{
boost::scoped_ptr<vcl::Window> aTemp(m_pVertScroll);
m_pVertScroll = NULL;
@@ -187,6 +191,7 @@ OFieldDescControl::~OFieldDescControl()
DeactivateAggregate( tpColumnName );
DeactivateAggregate( tpType );
DeactivateAggregate( tpAutoIncrementValue );
+ TabPage::dispose();
}
OUString OFieldDescControl::BoolStringPersistent(const OUString& rUIString) const
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 9c4393e..95827c5 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -83,7 +83,6 @@ namespace dbaui
{
m_pBoxControl = pController;
}
- virtual ~ORelationControl();
/** searches for a connection between these two tables
@param _pSource
@@ -143,10 +142,6 @@ namespace dbaui
return new ORelationControl(pParent);
}
- ORelationControl::~ORelationControl()
- {
- }
-
void ORelationControl::Init(const TTableConnectionData::value_type& _pConnData)
{
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 2fab5c9..dabe8a1 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -71,6 +71,11 @@ OTableGrantControl::OTableGrantControl( vcl::Window* pParent, WinBits nBits)
OTableGrantControl::~OTableGrantControl()
{
+ dispose();
+}
+
+void OTableGrantControl::dispose()
+{
if (m_nDeactivateEvent)
{
Application::RemoveUserEvent(m_nDeactivateEvent);
@@ -81,6 +86,7 @@ OTableGrantControl::~OTableGrantControl()
delete m_pEdit;
m_xTables = NULL;
+ ::svt::EditBrowseBox::dispose();
}
void OTableGrantControl::setTablesSupplier(const Reference< XTablesSupplier >& _xTablesSup)
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index d199b6f..935ea48 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -39,7 +39,13 @@ OSplitterView::OSplitterView(vcl::Window* _pParent,bool _bVertical) : Window(_pP
OSplitterView::~OSplitterView()
{
+ dispose();
+}
+
+void OSplitterView::dispose()
+{
m_pRight = m_pLeft = NULL;
+ vcl::Window::dispose();
}
IMPL_LINK( OSplitterView, SplitHdl, Splitter*, /*pSplit*/ )
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index 9daa8b9..d7a510b4 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -43,10 +43,6 @@ namespace dbaui
return new CharSetListBox(pParent);
}
- CharSetListBox::~CharSetListBox()
- {
- }
-
void CharSetListBox::SelectEntryByIanaName( const OUString& _rIanaName )
{
OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName );
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 446f0f9..d340313 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -40,8 +40,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeConnectionURLEdit(vcl:
OConnectionURLEdit::~OConnectionURLEdit()
{
+ dispose();
+}
+
+void OConnectionURLEdit::dispose()
+{
SetSubEdit(VclPtr<Edit>());
delete m_pForcedPrefix;
+ Edit::dispose();
}
void OConnectionURLEdit::SetTextNoPrefix(const OUString& _rText)
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 69a70c4..8aee700 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -84,7 +84,13 @@ void DBTreeListBox::init()
DBTreeListBox::~DBTreeListBox()
{
+ dispose();
+}
+
+void DBTreeListBox::dispose()
+{
implStopSelectionTimer();
+ SvTreeListBox::dispose();
}
SvTreeListEntry* DBTreeListBox::GetEntryPosByName( const OUString& aName, SvTreeListEntry* pStart, const IEntryFilter* _pFilter ) const
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index d51db97..697a410 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -37,8 +37,13 @@ OMarkableTreeListBox::OMarkableTreeListBox( vcl::Window* pParent, WinBits nWinSt
OMarkableTreeListBox::~OMarkableTreeListBox()
{
- delete m_pCheckButton;
+ dispose();
+}
+void OMarkableTreeListBox::dispose()
+{
+ delete m_pCheckButton;
+ DBTreeListBox::dispose();
}
void OMarkableTreeListBox::Paint(const Rectangle& _rRect)
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index ff4007f..bf4aa1f 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -105,6 +105,11 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) :
OSqlEdit::~OSqlEdit()
{
+ dispose();
+}
+
+void OSqlEdit::dispose()
+{
if (m_timerUndoActionCreation.IsActive())
m_timerUndoActionCreation.Stop();
css::uno::Reference< css::beans::XMultiPropertySet > n;
@@ -116,6 +121,7 @@ OSqlEdit::~OSqlEdit()
n->removePropertiesChangeListener(m_listener.get());
}
m_ColorConfig.RemoveListener(this);
+ MultiLineEditSyntaxHighlight::dispose();
}
void OSqlEdit::KeyInput( const KeyEvent& rKEvt )
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index f437d31..02410b9 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -91,11 +91,6 @@ OCollectionView::OCollectionView( vcl::Window * pParent
m_pPB_OK->SetClickHdl( LINK( this, OCollectionView, Save_Click ) );
}
-OCollectionView::~OCollectionView( )
-{
-}
-
-
IMPL_LINK_NOARG(OCollectionView, Save_Click)
{
OUString sName = m_pName->GetText();
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 7649be1..bd3f8bf 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -110,6 +110,11 @@ namespace dbaui
OConnectionHelper::~OConnectionHelper()
{
+ dispose();
+ }
+
+ void OConnectionHelper::dispose()
+ {
if(m_bDelete)
{
delete m_pFT_Connection;
@@ -117,6 +122,7 @@ namespace dbaui
delete m_pPB_Connection;
delete m_pPB_CreateDB;
}
+ OGenericAdministrationPage::dispose();
}
void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index 117295b..5d9ae8b 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -42,6 +42,7 @@ namespace dbaui
public:
OConnectionHelper( vcl::Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs);
virtual ~OConnectionHelper();
+ virtual void dispose() SAL_OVERRIDE;
FixedText *m_pFT_Connection;
OConnectionURLEdit *m_pConnectionURL;
PushButton *m_pPB_Connection;
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 4e7b8cc..f33b1e4 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -109,10 +109,6 @@ namespace dbaui
m_pTestJavaDriver->SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl));
}
- OConnectionTabPage::~OConnectionTabPage()
- {
- }
-
void OConnectionTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 5e1c84f..9713621 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -70,7 +70,6 @@ namespace dbaui
private:
OConnectionTabPage(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
// nControlFlags is a combination of the CBTP_xxx-constants
- virtual ~OConnectionTabPage();
private:
/** enables the test connection button, if allowed
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index db19ebb..ce72b8d 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -119,10 +119,6 @@ namespace dbaui
SetRoadmapStateValue(false);
}
- OConnectionTabPageSetup::~OConnectionTabPageSetup()
- {
- }
-
void OConnectionTabPageSetup::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
m_eType = m_pAdminDialog->getDatasourceType(_rSet);
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 5705c15..b417c78 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -71,7 +71,6 @@ namespace dbaui
OConnectionTabPageSetup(vcl::Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
virtual bool checkTestConnection() SAL_OVERRIDE;
// nControlFlags is a combination of the CBTP_xxx-constants
- virtual ~OConnectionTabPageSetup();
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 523b1aa..394073e 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -76,8 +76,13 @@ using namespace ::com::sun::star;
OTextConnectionPageSetup::~OTextConnectionPageSetup()
{
- DELETEZ(m_pTextConnectionHelper);
+ dispose();
+ }
+ void OTextConnectionPageSetup::dispose()
+ {
+ DELETEZ(m_pTextConnectionHelper);
+ OConnectionTabPageSetup::dispose();
}
IMPL_LINK(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, /*_pTextConnectionHelper*/)
@@ -241,11 +246,6 @@ using namespace ::com::sun::star;
return long(true);
}
- OMySQLIntroPageSetup::~OMySQLIntroPageSetup()
- {
-
- }
-
void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, bool /*_bSaveValue*/)
{
// show the "Connect directly" option only if the driver is installed
@@ -292,14 +292,25 @@ using namespace ::com::sun::star;
// MySQLNativeSetupPage
MySQLNativeSetupPage::MySQLNativeSetupPage( vcl::Window* _pParent, const SfxItemSet& _rCoreAttrs )
:OGenericAdministrationPage( _pParent, "DBWizMysqlNativePage", "dbaccess/ui/dbwizmysqlnativepage.ui", _rCoreAttrs )
- ,m_aMySQLSettings ( *get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink() )
+ ,m_aMySQLSettings ( new MySQLNativeSettings(*get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink()) )
{
get(m_pHelpText, "helptext");
- m_aMySQLSettings.Show();
+ m_aMySQLSettings->Show();
SetRoadmapStateValue(false);
}
+ MySQLNativeSetupPage::~MySQLNativeSetupPage()
+ {
+ dispose();
+ }
+
+ void MySQLNativeSetupPage::dispose()
+ {
+ m_aMySQLSettings.disposeAndClear();
+ OGenericAdministrationPage::dispose();
+ }
+
OGenericAdministrationPage* MySQLNativeSetupPage::Create( vcl::Window* pParent, const SfxItemSet& _rAttrSet )
{
return new MySQLNativeSetupPage( pParent, _rAttrSet );
@@ -307,23 +318,23 @@ using namespace ::com::sun::star;
void MySQLNativeSetupPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
- m_aMySQLSettings.fillControls( _rControlList );
+ m_aMySQLSettings->fillControls( _rControlList );
}
void MySQLNativeSetupPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
_rControlList.push_back( new ODisableWrapper< FixedText >( m_pHelpText ) );
- m_aMySQLSettings.fillWindows( _rControlList );
+ m_aMySQLSettings->fillWindows( _rControlList );
}
bool MySQLNativeSetupPage::FillItemSet( SfxItemSet* _rSet )
{
- return m_aMySQLSettings.FillItemSet( _rSet );
+ return m_aMySQLSettings->FillItemSet( _rSet );
}
void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, bool _bSaveValue )
{
- m_aMySQLSettings.implInitControls( _rSet );
+ m_aMySQLSettings->implInitControls( _rSet );
OGenericAdministrationPage::implInitControls( _rSet, _bSaveValue );
@@ -337,7 +348,7 @@ using namespace ::com::sun::star;
IMPL_LINK( MySQLNativeSetupPage, OnModified, Edit*, _pEdit )
{
- SetRoadmapStateValue( m_aMySQLSettings.canAdvance() );
+ SetRoadmapStateValue( m_aMySQLSettings->canAdvance() );
return OGenericAdministrationPage::getControlModifiedLink().Call( _pEdit );
}
@@ -634,11 +645,6 @@ using namespace ::com::sun::star;
m_pPasswordrequired->SetToggleHdl(getControlModifiedLink());
}
- OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup()
- {
-
- }
-
void OSpreadSheetConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/)
{
}
@@ -683,11 +689,6 @@ using namespace ::com::sun::star;
LayoutHelper::fitSizeRightAligned( *m_pPBTestConnection );
}
- OAuthentificationPageSetup::~OAuthentificationPageSetup()
- {
-
- }
-
void OAuthentificationPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
{
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pFTHelpText));
@@ -753,11 +754,6 @@ using namespace ::com::sun::star;
m_pRBRegisterDataSource->SetState(true);
}
- OFinalDBPageSetup::~OFinalDBPageSetup()
- {
-
- }
-
bool OFinalDBPageSetup::IsDatabaseDocumentToBeRegistered()
{
return m_pRBRegisterDataSource->IsChecked() && m_pRBRegisterDataSource->IsEnabled();
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 4756b6c..3b3ed06 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -45,7 +45,6 @@ namespace dbaui
protected:
CheckBox *m_pPasswordrequired;
- virtual ~OSpreadSheetConnectionPageSetup();
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
@@ -66,6 +65,7 @@ namespace dbaui
protected:
virtual ~OTextConnectionPageSetup();
+ virtual void dispose() SAL_OVERRIDE;
virtual bool prepareLeave() SAL_OVERRIDE;
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
@@ -108,10 +108,12 @@ namespace dbaui
{
private:
FixedText *m_pHelpText;
- MySQLNativeSettings m_aMySQLSettings;
+ VclPtr<MySQLNativeSettings> m_aMySQLSettings;
public:
MySQLNativeSetupPage( vcl::Window* _pParent, const SfxItemSet& _rCoreAttrs );
+ virtual ~MySQLNativeSetupPage();
+ virtual void dispose() SAL_OVERRIDE;
static OGenericAdministrationPage* Create( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
@@ -216,7 +218,6 @@ namespace dbaui
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
- virtual ~OMySQLIntroPageSetup();
private:
RadioButton *m_pODBCDatabase;
@@ -241,7 +242,6 @@ namespace dbaui
Edit* m_pETUserName;
CheckBox* m_pCBPasswordRequired;
PushButton* m_pPBTestConnection;
- virtual ~OAuthentificationPageSetup();
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
@@ -276,9 +276,6 @@ namespace dbaui
DECL_LINK(OnOpenSelected, CheckBox*);
protected:
- virtual ~OFinalDBPageSetup();
-
- protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
index 2c8b9b6..cfdab77 100644
--- a/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
+++ b/dbaccess/source/ui/dlg/QueryPropertiesDialog.cxx
@@ -28,10 +28,6 @@ QueryPropertiesDialog::QueryPropertiesDialog(
m_pLB_Limit->SetValue( nLimit );
}
-QueryPropertiesDialog::~QueryPropertiesDialog()
-{
-}
-
} ///dbaui namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index 28d3372..f0626ae 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -132,10 +132,6 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
}
}
-ORelationDialog::~ORelationDialog()
-{
-}
-
IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
{
// RadioButtons auslesen
diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
index a4a51e3..1494864 100644
--- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
+++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
@@ -61,7 +61,13 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(vcl::Window* pParent
OTableSubscriptionDialog::~OTableSubscriptionDialog()
{
+ dispose();
+}
+
+void OTableSubscriptionDialog::dispose()
+{
delete m_pOutSet;
+ SfxSingleTabDialog::dispose();
}
short OTableSubscriptionDialog::Execute()
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index c99292a..c107517 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -151,11 +151,6 @@ namespace dbaui
Show();
}
- OTextConnectionHelper::~OTextConnectionHelper()
- {
-
- }
-
IMPL_LINK(OTextConnectionHelper, OnControlModified, Control*, /*EMPTYARG*/)
{
callModifiedHdl();
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index b9317f8..03dde73 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -48,7 +48,6 @@ namespace dbaui
public:
OTextConnectionHelper( vcl::Window* pParent, const short _nAvailableSections );
- virtual ~OTextConnectionHelper();
private:
FixedText *m_pExtensionHeader;
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 6afe533..f776e80 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -114,9 +114,9 @@ OUserAdmin::OUserAdmin(vcl::Window* pParent,const SfxItemSet& _rAttrSet)
, m_pNEWUSER(0)
, m_pCHANGEPWD(0)
, m_pDELETEUSER(0)
- ,m_TableCtrl(get<VclAlignment>("table"), WB_TABSTOP)
+ ,m_TableCtrl(new OTableGrantControl(get<VclAlignment>("table"), WB_TABSTOP))
{
- m_TableCtrl.Show();
+ m_TableCtrl->Show();
get(m_pUSER, "user");
get(m_pNEWUSER, "add");
get(m_pCHANGEPWD, "changepass");
@@ -131,7 +131,14 @@ OUserAdmin::OUserAdmin(vcl::Window* pParent,const SfxItemSet& _rAttrSet)
OUserAdmin::~OUserAdmin()
{
+ dispose();
+}
+
+void OUserAdmin::dispose()
+{
m_xConnection = NULL;
+ m_TableCtrl.disposeAndClear();
+ OGenericAdministrationPage::dispose();
}
void OUserAdmin::FillUserNames()
@@ -162,11 +169,11 @@ void OUserAdmin::FillUserNames()
{
Reference<XAuthorizable> xAuth;
m_xUsers->getByName(m_UserName) >>= xAuth;
- m_TableCtrl.setGrantUser(xAuth);
+ m_TableCtrl->setGrantUser(xAuth);
}
- m_TableCtrl.setUserName(GetUser());
- m_TableCtrl.Init();
+ m_TableCtrl->setUserName(GetUser());
+ m_TableCtrl->Init();
}
}
}
@@ -177,7 +184,7 @@ void OUserAdmin::FillUserNames()
m_pDELETEUSER->Enable(xDrop.is());
m_pCHANGEPWD->Enable(m_xUsers.is());
- m_TableCtrl.Enable(m_xUsers.is());
+ m_TableCtrl->Enable(m_xUsers.is());
}
@@ -261,10 +268,10 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
IMPL_LINK( OUserAdmin, ListDblClickHdl, ListBox *, /*pListBox*/ )
{
- m_TableCtrl.setUserName(GetUser());
- m_TableCtrl.UpdateTables();
- m_TableCtrl.DeactivateCell();
- m_TableCtrl.ActivateCell(m_TableCtrl.GetCurRow(),m_TableCtrl.GetCurColumnId());
+ m_TableCtrl->setUserName(GetUser());
+ m_TableCtrl->UpdateTables();
+ m_TableCtrl->DeactivateCell();
+ m_TableCtrl->ActivateCell(m_TableCtrl->GetCurRow(),m_TableCtrl->GetCurColumnId());
return 0;
}
@@ -283,7 +290,7 @@ void OUserAdmin::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlLis
void OUserAdmin::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
- m_TableCtrl.setComponentContext(m_xORB);
+ m_TableCtrl->setComponentContext(m_xORB);
try
{
if ( !m_xConnection.is() && m_pAdminDialog )
@@ -302,7 +309,7 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
}
if ( xUsersSup.is() )
{
- m_TableCtrl.setTablesSupplier(xTablesSup);
+ m_TableCtrl->setTablesSupplier(xTablesSup);
m_xUsers = xUsersSup->getUsers();
}
}
diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx
index 605baea..20b2e8f 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.hxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.hxx
@@ -45,7 +45,7 @@ protected:
PushButton *m_pNEWUSER;
PushButton *m_pCHANGEPWD;
PushButton *m_pDELETEUSER;
- OTableGrantControl m_TableCtrl; // show the grant rights of one user
+ VclPtr<OTableGrantControl> m_TableCtrl; // show the grant rights of one user
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUsers;
@@ -65,6 +65,7 @@ public:
static SfxTabPage* Create( vcl::Window* pParent, const SfxItemSet* _rAttrSet );
virtual ~OUserAdmin();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetUser();
// must be overloaded by subclasses, but it isn't pure virtual
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index 2b17ecc..fbfa3b5 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -73,6 +73,11 @@ namespace dbaui
OUserAdminDlg::~OUserAdminDlg()
{
+ dispose();
+ }
+
+ void OUserAdminDlg::dispose()
+ {
if ( m_bOwnConnection )
{
try
@@ -86,8 +91,9 @@ namespace dbaui
SetInputSet(NULL);
DELETEZ(pExampleSet);
-
+ SfxTabDialog::dispose();
}
+
short OUserAdminDlg::Execute()
{
try
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index ddff2e6..9b6f331 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -168,10 +168,6 @@ namespace dbaui
#endif
}
- MySQLNativeSettings::~MySQLNativeSettings()
- {
- }
-
void MySQLNativeSettings::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
_rControlList.push_back( new OSaveValueWrapper< Edit >( m_pDatabaseName ) );
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index e6e214d..e1daa86 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -53,7 +53,6 @@ namespace dbaui
public:
MySQLNativeSettings( vcl::Window& _rParent, const Link& _rControlModificationLink );
- virtual ~MySQLNativeSettings();
void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList );
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index a6ca7ae..d2dd227 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -363,7 +363,13 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont
OAddTableDlg::~OAddTableDlg()
{
+ dispose();
+}
+
+void OAddTableDlg::dispose()
+{
m_rContext.onWindowClosing( this );
+ ModelessDialog::dispose();
}
void OAddTableDlg::impl_switchTo( ObjectList _eList )
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index d21a590..8f21172 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -133,7 +133,13 @@ namespace dbaui
SpecialSettingsPage::~SpecialSettingsPage()
{
+ dispose();
+ }
+
+ void SpecialSettingsPage::dispose()
+ {
m_aControlDependencies.clear();
+ OGenericAdministrationPage::dispose();
}
void SpecialSettingsPage::impl_initBooleanSettings()
@@ -316,7 +322,13 @@ namespace dbaui
GeneratedValuesPage::~GeneratedValuesPage()
{
+ dispose();
+ }
+
+ void GeneratedValuesPage::dispose()
+ {
m_aControlDependencies.clear();
+ OGenericAdministrationPage::dispose();
}
void GeneratedValuesPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
@@ -405,8 +417,14 @@ namespace dbaui
AdvancedSettingsDialog::~AdvancedSettingsDialog()
{
+ dispose();
+ }
+
+ void AdvancedSettingsDialog::dispose()
+ {
SetInputSet(NULL);
DELETEZ(pExampleSet);
+ SfxTabDialog::dispose();
}
bool AdvancedSettingsDialog::doesHaveAnyAdvancedSettings( const OUString& _sURL )
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index af8d91a..a8117b5 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -78,6 +78,7 @@ namespace dbaui
protected:
virtual ~SpecialSettingsPage();
+ virtual void dispose() SAL_OVERRIDE;
// OGenericAdministrationPage overridables
virtual void implInitControls (const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE;
@@ -115,6 +116,7 @@ namespace dbaui
// nControlFlags is a combination of the CBTP_xxx-constants
virtual ~GeneratedValuesPage();
+ virtual void dispose() SAL_OVERRIDE;
// must be overloaded by subclasses, but it isn't pure virtual
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 646db7c..a496945 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -66,9 +66,14 @@ ODbAdminDialog::ODbAdminDialog(vcl::Window* _pParent
ODbAdminDialog::~ODbAdminDialog()
{
+ dispose();
+}
+
+void ODbAdminDialog::dispose()
+{
SetInputSet(NULL);
DELETEZ(pExampleSet);
-
+ SfxTabDialog::dispose();
}
short ODbAdminDialog::Ok()
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 27c57af..346128c 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -102,7 +102,13 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent
ODbTypeWizDialog::~ODbTypeWizDialog()
{
+ dispose();
+}
+
+void ODbTypeWizDialog::dispose()
+{
delete m_pOutSet;
+ svt::OWizardMachine::dispose();
}
IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage*, _pTabPage)
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 2922922..e5ee6c3 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -264,7 +264,13 @@ OUString ODbTypeWizDialogSetup::getStateDisplayName( WizardState _nState ) const
ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup()
{
+ dispose();
+}
+
+void ODbTypeWizDialogSetup::dispose()
+{
delete m_pOutSet;
+ svt::RoadmapWizard::dispose();
}
IMPL_LINK(ODbTypeWizDialogSetup, OnTypeSelected, OGeneralPage*, /*_pTabPage*/)
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 5018b58..21ecc09 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -97,6 +97,11 @@ namespace dbaui
OCommonBehaviourTabPage::~OCommonBehaviourTabPage()
{
+ dispose();
+ }
+
+ void OCommonBehaviourTabPage::dispose()
+ {
if(m_bDelete)
{
DELETEZ(m_pOptionsLabel);
@@ -112,7 +117,7 @@ namespace dbaui
DELETEZ(m_pAutoRetrievingLabel);
DELETEZ(m_pAutoRetrieving);
}
-
+ OGenericAdministrationPage::dispose();
}
void OCommonBehaviourTabPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
@@ -194,11 +199,6 @@ namespace dbaui
m_pShowDeleted->SetClickHdl(LINK(this, ODbaseDetailsPage, OnButtonClicked));
}
- ODbaseDetailsPage::~ODbaseDetailsPage()
- {
-
- }
-
SfxTabPage* ODriversSettings::CreateDbase( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new ODbaseDetailsPage( pParent, *_rAttrSet ) );
@@ -261,10 +261,6 @@ namespace dbaui
}
- OAdoDetailsPage::~OAdoDetailsPage()
- {
-
- }
SfxTabPage* ODriversSettings::CreateAdo( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
{
return ( new OAdoDetailsPage( pParent, *_rAttrSet ) );
@@ -511,7 +507,7 @@ namespace dbaui
// MySQLNativePage
MySQLNativePage::MySQLNativePage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs )
:OCommonBehaviourTabPage(pParent, "MysqlNativePage", "dbaccess/ui/mysqlnativepage.ui", _rCoreAttrs, CBTP_USE_CHARSET )
- ,m_aMySQLSettings ( *get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink() )
+ ,m_aMySQLSettings ( new MySQLNativeSettings(*get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink()) )
{
get(m_pSeparator1, "connectionheader");
get(m_pSeparator2, "userheader");
@@ -521,13 +517,24 @@ namespace dbaui
m_pUserName->SetModifyHdl(getControlModifiedLink());
- m_aMySQLSettings.Show();
+ m_aMySQLSettings->Show();
+ }
+
+ MySQLNativePage::~MySQLNativePage()
+ {
+ dispose();
+ }
+
+ void MySQLNativePage::dispose()
+ {
+ m_aMySQLSettings.disposeAndClear();
+ OCommonBehaviourTabPage::dispose();
}
void MySQLNativePage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
{
OCommonBehaviourTabPage::fillControls( _rControlList );
- m_aMySQLSettings.fillControls( _rControlList );
+ m_aMySQLSettings->fillControls( _rControlList );
_rControlList.push_back(new OSaveValueWrapper<Edit>(m_pUserName));
_rControlList.push_back(new OSaveValueWrapper<CheckBox>(m_pPasswordRequired));
@@ -535,7 +542,7 @@ namespace dbaui
void MySQLNativePage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
{
OCommonBehaviourTabPage::fillWindows( _rControlList );
- m_aMySQLSettings.fillWindows( _rControlList);
+ m_aMySQLSettings->fillWindows( _rControlList);
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pSeparator1));
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pSeparator2));
@@ -546,7 +553,7 @@ namespace dbaui
{
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet );
- bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
+ bChangedSomething |= m_aMySQLSettings->FillItemSet( _rSet );
if ( m_pUserName->IsValueChangedFromSaved() )
{
@@ -564,7 +571,7 @@ namespace dbaui
bool bValid, bReadonly;
getFlags(_rSet, bValid, bReadonly);
- m_aMySQLSettings.implInitControls( _rSet );
+ m_aMySQLSettings->implInitControls( _rSet );
SFX_ITEMSET_GET(_rSet, pUidItem, SfxStringItem, DSID_USER, true);
SFX_ITEMSET_GET(_rSet, pAllowEmptyPwd, SfxBoolItem, DSID_PASSWORDREQUIRED, true);
@@ -680,8 +687,13 @@ namespace dbaui
OTextDetailsPage::~OTextDetailsPage()
{
- DELETEZ(m_pTextConnectionHelper);
+ dispose();
+ }
+ void OTextDetailsPage::dispose()
+ {
+ DELETEZ(m_pTextConnectionHelper);
+ OCommonBehaviourTabPage::dispose();
}
SfxTabPage* ODriversSettings::CreateText( vcl::Window* pParent, const SfxItemSet* _rAttrSet )
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index d702469..bc2d085 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -74,6 +74,7 @@ namespace dbaui
protected:
virtual ~OCommonBehaviourTabPage();
+ virtual void dispose() SAL_OVERRIDE;
// must be overloaded by subclasses, but it isn't pure virtual
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
@@ -100,10 +101,6 @@ namespace dbaui
OUString m_sDsn;
protected:
-
- virtual ~ODbaseDetailsPage();
-
- protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
private:
@@ -113,10 +110,7 @@ namespace dbaui
// OAdoDetailsPage
class OAdoDetailsPage : public OCommonBehaviourTabPage
{
- protected:
- virtual ~OAdoDetailsPage();
public:
-
OAdoDetailsPage( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs );
};
@@ -197,10 +191,12 @@ namespace dbaui
public:
MySQLNativePage( vcl::Window* pParent,
const SfxItemSet& _rCoreAttrs );
+ virtual ~MySQLNativePage();
+ virtual void dispose() SAL_OVERRIDE;
private:
FixedText *m_pSeparator1;
- MySQLNativeSettings m_aMySQLSettings;
+ VclPtr<MySQLNativeSettings> m_aMySQLSettings;
FixedText *m_pSeparator2;
FixedText *m_pUserNameLabel;
@@ -237,10 +233,7 @@ namespace dbaui
// OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
class OMozillaDetailsPage : public OCommonBehaviourTabPage
{
- protected:
- virtual ~OMozillaDetailsPage();
public:
-
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list