summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/cmdlinehelp.hxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.cxx10
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx43
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx42
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx14
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx17
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx16
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx30
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx7
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx14
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx29
14 files changed, 155 insertions, 91 deletions
diff --git a/desktop/source/app/cmdlinehelp.hxx b/desktop/source/app/cmdlinehelp.hxx
index 2a3bda797896..7837dc368c58 100644
--- a/desktop/source/app/cmdlinehelp.hxx
+++ b/desktop/source/app/cmdlinehelp.hxx
@@ -34,10 +34,10 @@ namespace desktop
public:
CmdlineHelpDialog ( void );
- FixedText* m_pftHead;
- FixedText* m_pftLeft;
- FixedText* m_pftRight;
- FixedText* m_pftBottom;
+ VclPtr<FixedText> m_pftHead;
+ VclPtr<FixedText> m_pftLeft;
+ VclPtr<FixedText> m_pftRight;
+ VclPtr<FixedText> m_pftBottom;
};
#endif
}
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index ca6eb1b4ce03..f93712e744eb 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
@@ -50,4 +50,14 @@ DependencyDialog::DependencyDialog(
}
}
+DependencyDialog::~DependencyDialog()
+{
+ dispose();
+}
+
+void DependencyDialog::dispose()
+{
+ m_list.clear();
+ ModalDialog::dispose();
+}
/* 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 eec14539869a..2d7d3e9a13da 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -37,12 +37,14 @@ class DependencyDialog: public ModalDialog {
public:
DependencyDialog(
vcl::Window * parent, std::vector< OUString > const & dependencies);
+ virtual ~DependencyDialog();
+ virtual void dispose() SAL_OVERRIDE;
private:
DependencyDialog(DependencyDialog &) SAL_DELETED_FUNCTION;
void operator =(DependencyDialog &) SAL_DELETED_FUNCTION;
- ListBox* m_list;
+ VclPtr<ListBox> m_list;
};
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index b3a7195507da..403bd89ba61d 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -116,11 +116,11 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
{
bool m_bInterfaceLocked;
- PushButton *m_pOptionsBtn;
- PushButton *m_pEnableBtn;
- PushButton *m_pRemoveBtn;
+ VclPtr<PushButton> m_pOptionsBtn;
+ VclPtr<PushButton> m_pEnableBtn;
+ VclPtr<PushButton> m_pRemoveBtn;
- ExtMgrDialog *m_pParent;
+ VclPtr<ExtMgrDialog> m_pParent;
void SetButtonPos( const Rectangle& rRect );
void SetButtonStatus( const TEntry_Impl& rEntry );
@@ -208,9 +208,10 @@ ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl()
void ExtBoxWithBtns_Impl::dispose()
{
- delete m_pOptionsBtn;
- delete m_pEnableBtn;
- delete m_pRemoveBtn;
+ m_pOptionsBtn.clear();
+ m_pEnableBtn.clear();
+ m_pRemoveBtn.clear();
+ m_pParent.clear();
ExtensionBox_Impl::dispose();
}
@@ -729,6 +730,17 @@ ExtMgrDialog::~ExtMgrDialog()
void ExtMgrDialog::dispose()
{
m_aIdle.Stop();
+ m_pExtensionBox.clear();
+ m_pAddBtn.clear();
+ m_pUpdateBtn.clear();
+ m_pCloseBtn.clear();
+ m_pBundledCbx.clear();
+ m_pSharedCbx.clear();
+ m_pUserCbx.clear();
+ m_pGetExtensions.clear();
+ m_pProgressText.clear();
+ m_pProgressBar.clear();
+ m_pCancelBtn.clear();
ModelessDialog::dispose();
}
@@ -1216,6 +1228,13 @@ UpdateRequiredDialog::~UpdateRequiredDialog()
void UpdateRequiredDialog::dispose()
{
m_aIdle.Stop();
+ m_pExtensionBox.clear();
+ m_pUpdateNeeded.clear();
+ m_pUpdateBtn.clear();
+ m_pCloseBtn.clear();
+ m_pCancelBtn.clear();
+ m_pProgressText.clear();
+ m_pProgressBar.clear();
ModalDialog::dispose();
}
@@ -1589,6 +1608,16 @@ ShowLicenseDialog::ShowLicenseDialog( vcl::Window * pParent,
m_pLicenseText->SetText(xPackage->getLicenseText());
}
+ShowLicenseDialog::~ShowLicenseDialog()
+{
+ dispose();
+}
+
+void ShowLicenseDialog::dispose()
+{
+ m_pLicenseText.clear();
+ ModalDialog::dispose();
+}
// UpdateRequiredDialogService
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index c5e7c38b16f8..2f6052be71af 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -55,7 +55,7 @@ class TheExtensionManager;
class DialogHelper
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
- Dialog* m_pVCLWindow;
+ VclPtr<Dialog> m_pVCLWindow;
ImplSVEvent * m_nEventID;
bool m_bIsBusy;
@@ -99,17 +99,17 @@ public:
class ExtMgrDialog : public ModelessDialog,
public DialogHelper
{
- ExtBoxWithBtns_Impl *m_pExtensionBox;
- PushButton *m_pAddBtn;
- PushButton *m_pUpdateBtn;
- CloseButton *m_pCloseBtn;
- CheckBox *m_pBundledCbx;
- CheckBox *m_pSharedCbx;
- CheckBox *m_pUserCbx;
- FixedHyperlink *m_pGetExtensions;
- FixedText *m_pProgressText;
- ProgressBar *m_pProgressBar;
- CancelButton *m_pCancelBtn;
+ VclPtr<ExtBoxWithBtns_Impl> m_pExtensionBox;
+ VclPtr<PushButton> m_pAddBtn;
+ VclPtr<PushButton> m_pUpdateBtn;
+ VclPtr<CloseButton> m_pCloseBtn;
+ VclPtr<CheckBox> m_pBundledCbx;
+ VclPtr<CheckBox> m_pSharedCbx;
+ VclPtr<CheckBox> m_pUserCbx;
+ VclPtr<FixedHyperlink> m_pGetExtensions;
+ VclPtr<FixedText> m_pProgressText;
+ VclPtr<ProgressBar> m_pProgressBar;
+ VclPtr<CancelButton> m_pCancelBtn;
const OUString m_sAddPackages;
OUString m_sProgressText;
OUString m_sLastFolderURL;
@@ -174,13 +174,13 @@ public:
class UpdateRequiredDialog : public ModalDialog,
public DialogHelper
{
- ExtensionBox_Impl* m_pExtensionBox;
- FixedText* m_pUpdateNeeded;
- PushButton* m_pUpdateBtn;
- PushButton* m_pCloseBtn;
- CancelButton* m_pCancelBtn;
- FixedText* m_pProgressText;
- ProgressBar* m_pProgressBar;
+ VclPtr<ExtensionBox_Impl> m_pExtensionBox;
+ VclPtr<FixedText> m_pUpdateNeeded;
+ VclPtr<PushButton> m_pUpdateBtn;
+ VclPtr<PushButton> m_pCloseBtn;
+ VclPtr<CancelButton> m_pCancelBtn;
+ VclPtr<FixedText> m_pProgressText;
+ VclPtr<ProgressBar> m_pProgressBar;
const OUString m_sAddPackages;
const OUString m_sCloseText;
OUString m_sProgressText;
@@ -242,9 +242,11 @@ public:
class ShowLicenseDialog : public ModalDialog
{
- VclMultiLineEdit* m_pLicenseText;
+ VclPtr<VclMultiLineEdit> m_pLicenseText;
public:
ShowLicenseDialog(vcl::Window * pParent, const css::uno::Reference< css::deployment::XPackage > &xPackage);
+ virtual ~ShowLicenseDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 8eaf3f71e1a6..07a7d067f2d1 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -253,17 +253,13 @@ void ExtensionBox_Impl::dispose()
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )
{
- if ( (*iIndex)->m_pPublisher )
- {
- delete (*iIndex)->m_pPublisher;
- (*iIndex)->m_pPublisher = NULL;
- }
+ (*iIndex)->m_pPublisher.clear();
(*iIndex)->m_xPackage->removeEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
}
m_vEntries.clear();
- delete m_pScrollBar;
+ m_pScrollBar.clear();
m_xRemoveListener.clear();
@@ -439,11 +435,7 @@ void ExtensionBox_Impl::DeleteRemoved()
for ( ITER iIndex = m_vRemovedEntries.begin(); iIndex < m_vRemovedEntries.end(); ++iIndex )
{
- if ( (*iIndex)->m_pPublisher )
- {
- delete (*iIndex)->m_pPublisher;
- (*iIndex)->m_pPublisher = NULL;
- }
+ (*iIndex)->m_pPublisher.clear();
}
m_vRemovedEntries.clear();
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index c2635edd9f51..d49e4a132690 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -78,7 +78,7 @@ struct Entry_Impl
OUString m_sLicenseText;
Image m_aIcon;
Image m_aIconHC;
- FixedHyperlink* m_pPublisher;
+ VclPtr<FixedHyperlink> m_pPublisher;
::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage> m_xPackage;
@@ -99,7 +99,7 @@ class ExtensionBox_Impl;
class ExtensionRemovedListener : public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener >
{
- ExtensionBox_Impl *m_pParent;
+ VclPtr<ExtensionBox_Impl> m_pParent;
public:
@@ -134,7 +134,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
Image m_aDefaultImage;
Link m_aClickHdl;
- ScrollBar *m_pScrollBar;
+ VclPtr<ScrollBar> m_pScrollBar;
com::sun::star::uno::Reference< ExtensionRemovedListener > m_xRemoveListener;
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index f3584d043640..07168b74a4fd 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -98,8 +98,6 @@ TheExtensionManager::TheExtensionManager( vcl::Window *pParent,
TheExtensionManager::~TheExtensionManager()
{
- delete m_pUpdReqDialog;
- delete m_pExtMgrDialog;
delete m_pExecuteCmdQueue;
}
@@ -171,8 +169,7 @@ sal_Int16 TheExtensionManager::execute()
if ( m_pUpdReqDialog )
{
nRet = m_pUpdReqDialog->Execute();
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pUpdReqDialog.clear();
}
return nRet;
@@ -259,10 +256,8 @@ void TheExtensionManager::terminateDialog()
if ( ! dp_misc::office_is_running() )
{
const SolarMutexGuard guard;
- delete m_pExtMgrDialog;
- m_pExtMgrDialog = NULL;
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pExtMgrDialog.clear();
+ m_pUpdReqDialog.clear();
Application::Quit();
}
}
@@ -426,10 +421,8 @@ void TheExtensionManager::disposing( lang::EventObject const & rEvt )
if ( dp_misc::office_is_running() )
{
const SolarMutexGuard guard;
- delete m_pExtMgrDialog;
- m_pExtMgrDialog = NULL;
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pExtMgrDialog.clear();
+ m_pUpdReqDialog.clear();
}
s_ExtMgr.clear();
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index 67836b2223d3..9281ddef4c05 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -53,9 +53,9 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNameAccessNodes;
- vcl::Window *m_pParent;
- ExtMgrDialog *m_pExtMgrDialog;
- UpdateRequiredDialog *m_pUpdReqDialog;
+ VclPtr<vcl::Window> m_pParent;
+ VclPtr<ExtMgrDialog> m_pExtMgrDialog;
+ VclPtr<UpdateRequiredDialog> m_pUpdReqDialog;
ExtensionCmdQueue *m_pExecuteCmdQueue;
OUString m_sGetExtensionsURL;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 0aa7c2f0da20..e7a677080acb 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -579,7 +579,21 @@ void UpdateDialog::dispose()
{
delete (*i);
}
- delete m_pUpdates;
+ m_pchecking.clear();
+ m_pthrobber.clear();
+ m_pUpdate.clear();
+ m_pContainer.clear();
+ m_pUpdates.clear();
+ m_pAll.clear();
+ m_pDescription.clear();
+ m_pPublisherLabel.clear();
+ m_pPublisherLink.clear();
+ m_pReleaseNotesLabel.clear();
+ m_pReleaseNotesLink.clear();
+ m_pDescriptions.clear();
+ m_pHelp.clear();
+ m_pOk.clear();
+ m_pClose.clear();
ModalDialog::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index 8420aacc9bf5..18fa9de6ebde 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -168,21 +168,21 @@ private:
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
m_context;
- FixedText* m_pchecking;
- Throbber* m_pthrobber;
- FixedText* m_pUpdate;
- VclViewport* m_pContainer;
- UpdateDialog::CheckListBox* m_pUpdates;
- CheckBox* m_pAll;
- FixedText* m_pDescription;
- FixedText* m_pPublisherLabel;
- FixedHyperlink* m_pPublisherLink;
- FixedText* m_pReleaseNotesLabel;
- FixedHyperlink* m_pReleaseNotesLink;
- VclMultiLineEdit* m_pDescriptions;
- HelpButton* m_pHelp;
- PushButton* m_pOk;
- PushButton* m_pClose;
+ VclPtr<FixedText> m_pchecking;
+ VclPtr<Throbber> m_pthrobber;
+ VclPtr<FixedText> m_pUpdate;
+ VclPtr<VclViewport> m_pContainer;
+ VclPtr<UpdateDialog::CheckListBox> m_pUpdates;
+ VclPtr<CheckBox> m_pAll;
+ VclPtr<FixedText> m_pDescription;
+ VclPtr<FixedText> m_pPublisherLabel;
+ VclPtr<FixedHyperlink> m_pPublisherLink;
+ VclPtr<FixedText> m_pReleaseNotesLabel;
+ VclPtr<FixedHyperlink> m_pReleaseNotesLink;
+ VclPtr<VclMultiLineEdit> m_pDescriptions;
+ VclPtr<HelpButton> m_pHelp;
+ VclPtr<PushButton> m_pOk;
+ VclPtr<PushButton> m_pClose;
OUString m_error;
OUString m_none;
OUString m_noInstallable;
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index b67c026c7284..5c8ab0caf4e3 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -244,6 +244,13 @@ UpdateInstallDialog::~UpdateInstallDialog()
void UpdateInstallDialog::dispose()
{
+ m_pFt_action.clear();
+ m_pStatusbar.clear();
+ m_pFt_extension_name.clear();
+ m_pMle_info.clear();
+ m_pHelp.clear();
+ m_pOk.clear();
+ m_pCancel.clear();
ModalDialog::dispose();
}
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index d9a343790193..9c05abd36358 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -105,13 +105,13 @@ private:
OUString m_sNoInstall;
OUString m_sThisErrorOccurred;
- FixedText *m_pFt_action;
- ProgressBar *m_pStatusbar;
- FixedText *m_pFt_extension_name;
- VclMultiLineEdit *m_pMle_info;
- HelpButton *m_pHelp;
- OKButton *m_pOk;
- CancelButton *m_pCancel;
+ VclPtr<FixedText> m_pFt_action;
+ VclPtr<ProgressBar> m_pStatusbar;
+ VclPtr<FixedText> m_pFt_extension_name;
+ VclPtr<VclMultiLineEdit> m_pMle_info;
+ VclPtr<HelpButton> m_pHelp;
+ VclPtr<OKButton> m_pOk;
+ VclPtr<CancelButton> m_pCancel;
};
}
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 916525a6b7fb..840b90baad88 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -77,14 +77,14 @@ protected:
struct LicenseDialogImpl : public ModalDialog
{
cssu::Reference<cssu::XComponentContext> m_xComponentContext;
- FixedText* m_pFtHead;
- FixedImage* m_pArrow1;
- FixedImage* m_pArrow2;
- LicenseView* m_pLicense;
- PushButton* m_pDown;
+ VclPtr<FixedText> m_pFtHead;
+ VclPtr<FixedImage> m_pArrow1;
+ VclPtr<FixedImage> m_pArrow2;
+ VclPtr<LicenseView> m_pLicense;
+ VclPtr<PushButton> m_pDown;
- PushButton* m_pAcceptButton;
- PushButton* m_pDeclineButton;
+ VclPtr<PushButton> m_pAcceptButton;
+ VclPtr<PushButton> m_pDeclineButton;
DECL_LINK(PageDownHdl, void *);
DECL_LINK(ScrolledHdl, void *);
@@ -99,11 +99,26 @@ struct LicenseDialogImpl : public ModalDialog
css::uno::Reference< css::uno::XComponentContext > const & xContext,
const OUString & sExtensionName,
const OUString & sLicenseText);
+ virtual ~LicenseDialogImpl() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
virtual void Activate() SAL_OVERRIDE;
};
+void LicenseDialogImpl::dispose()
+{
+ m_pFtHead.clear();
+ m_pArrow1.clear();
+ m_pArrow2.clear();
+ m_pLicense.clear();
+ m_pDown.clear();
+ m_pAcceptButton.clear();
+ m_pDeclineButton.clear();
+ ModalDialog::dispose();
+}
+
+
LicenseView::LicenseView( vcl::Window* pParent, WinBits nStyle )
: MultiLineEdit( pParent, nStyle )
{