summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/gui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /desktop/source/deployment/gui
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'desktop/source/deployment/gui')
-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.cxx111
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx44
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx28
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx24
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx7
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx23
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx27
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx33
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx17
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx15
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx41
15 files changed, 250 insertions, 145 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index da831ad9b38f..56db76bd1b64 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
@@ -50,6 +50,14 @@ DependencyDialog::DependencyDialog(
}
}
-DependencyDialog::~DependencyDialog() {}
+DependencyDialog::~DependencyDialog()
+{
+ disposeOnce();
+}
+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 1175470c33d5..2d7d3e9a13da 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -37,14 +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 0aba4b407dcb..60c9db1ee306 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 );
@@ -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);
@@ -165,9 +166,9 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog)
m_pParent = pParentDialog;
- m_pOptionsBtn = new PushButton( this, WB_TABSTOP );
- m_pEnableBtn = new PushButton( this, WB_TABSTOP );
- m_pRemoveBtn = new PushButton( this, WB_TABSTOP );
+ m_pOptionsBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
+ m_pEnableBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
+ m_pRemoveBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS );
@@ -202,9 +203,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeExtBoxWithBtns(vcl::Wi
ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl()
{
- delete m_pOptionsBtn;
- delete m_pEnableBtn;
- delete m_pRemoveBtn;
+ disposeOnce();
+}
+
+void ExtBoxWithBtns_Impl::dispose()
+{
+ m_pOptionsBtn.disposeAndClear();
+ m_pEnableBtn.disposeAndClear();
+ m_pRemoveBtn.disposeAndClear();
+ m_pParent.clear();
+ ExtensionBox_Impl::dispose();
}
@@ -400,8 +408,8 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
break;
case CMD_SHOW_LICENSE:
{
- ShowLicenseDialog aLicenseDlg( m_pParent, GetEntryData( nPos )->m_xPackage );
- aLicenseDlg.Execute();
+ ScopedVclPtrInstance< ShowLicenseDialog > aLicenseDlg( m_pParent, GetEntryData( nPos )->m_xPackage );
+ aLicenseDlg->Execute();
break;
}
}
@@ -587,12 +595,11 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
{
const SolarMutexGuard guard;
- MessageDialog aInfoBox(pParent, getResId(nResID),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
-
+ ScopedVclPtrInstance<MessageDialog> aInfoBox(pParent, getResId(nResID),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
bHadWarning = true;
- if ( RET_OK == aInfoBox.Execute() )
+ if ( RET_OK == aInfoBox->Execute() )
return true;
else
return false;
@@ -619,32 +626,32 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard;
- MessageDialog aErrorBox(NULL, msg);
- aErrorBox.SetText( sTitle );
- aErrorBox.Execute();
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, msg);
+ aErrorBox->SetText( sTitle );
+ aErrorBox->Execute();
}
}
bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
{
const SolarMutexGuard guard;
- MessageDialog aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
+ ScopedVclPtrInstance<MessageDialog> aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
- OUString sText(aInfo.get_primary_text());
+ OUString sText(aInfo->get_primary_text());
sText = sText.replaceAll("%NAME", rExtensionName);
- aInfo.set_primary_text(sText);
+ aInfo->set_primary_text(sText);
- return ( RET_OK == aInfo.Execute() );
+ return ( RET_OK == aInfo->Execute() );
}
bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const
{
const SolarMutexGuard guard;
- MessageDialog aQuery(m_pVCLWindow, "InstallForAllDialog",
- "desktop/ui/installforalldialog.ui");
+ ScopedVclPtrInstance<MessageDialog> aQuery(m_pVCLWindow, "InstallForAllDialog",
+ "desktop/ui/installforalldialog.ui");
- short nRet = aQuery.Execute();
+ short nRet = aQuery->Execute();
if (nRet == RET_CANCEL)
return false;
@@ -716,7 +723,24 @@ ExtMgrDialog::ExtMgrDialog(vcl::Window *pParent, TheExtensionManager *pManager)
ExtMgrDialog::~ExtMgrDialog()
{
+ disposeOnce();
+}
+
+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();
}
@@ -769,14 +793,14 @@ void ExtMgrDialog::checkEntries()
bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
{
const SolarMutexGuard guard;
- MessageDialog aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
+ ScopedVclPtrInstance<MessageDialog> aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
- OUString sText(aInfo.get_primary_text());
+ OUString sText(aInfo->get_primary_text());
sText = sText.replaceAll("%NAME", rExtensionName);
- aInfo.set_primary_text(sText);
+ aInfo->set_primary_text(sText);
- return ( RET_OK == aInfo.Execute() );
+ return ( RET_OK == aInfo->Execute() );
}
bool ExtMgrDialog::enablePackage( const uno::Reference< deployment::XPackage > &xPackage,
@@ -1197,7 +1221,20 @@ UpdateRequiredDialog::UpdateRequiredDialog(vcl::Window *pParent, TheExtensionMan
UpdateRequiredDialog::~UpdateRequiredDialog()
{
+ disposeOnce();
+}
+
+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();
}
long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
@@ -1570,6 +1607,16 @@ ShowLicenseDialog::ShowLicenseDialog( vcl::Window * pParent,
m_pLicenseText->SetText(xPackage->getLicenseText());
}
+ShowLicenseDialog::~ShowLicenseDialog()
+{
+ disposeOnce();
+}
+
+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 0db6be025f18..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;
@@ -141,6 +141,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;
@@ -173,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;
@@ -212,6 +213,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;
@@ -240,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_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index adcb6c740fa3..7e97c526d33c 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -451,12 +451,12 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
verExc.Deployed->getDisplayName());
{
SolarMutexGuard guard;
- MessageDialog box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
- ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
+ ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
+ ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
OUString s;
if (bEqualNames)
{
- s = box.get_primary_text();
+ s = box->get_primary_text();
}
else if (id == RID_STR_WARNING_VERSION_EQUAL)
{
@@ -477,8 +477,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
s = s.replaceAll("$OLDNAME", verExc.Deployed->getDisplayName());
s = s.replaceAll("$NEW", getVersion(verExc.NewVersion));
s = s.replaceAll("$DEPLOYED", getVersion(verExc.Deployed));
- box.set_primary_text(s);
- approve = box.Execute() == RET_OK;
+ box->set_primary_text(s);
+ approve = box->Execute() == RET_OK;
abort = !approve;
}
}
@@ -506,8 +506,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
SolarMutexGuard guard;
OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString());
sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName());
- MessageDialog box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg);
- box.Execute();
+ ScopedVclPtrInstance< MessageDialog > box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, sMsg);
+ box->Execute();
approve = true;
}
@@ -571,7 +571,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
text = ::comphelper::anyToString( rStatus ); // fallback
const SolarMutexGuard aGuard;
- const boost::scoped_ptr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text));
+ ScopedVclPtrInstance< MessageDialog > aBox(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, text);
aBox->Execute();
}
++m_nCurrentProgress;
@@ -813,8 +813,8 @@ void ExtensionCmdQueue::Thread::execute()
msg = ::comphelper::anyToString(exc);
const SolarMutexGuard guard;
- boost::scoped_ptr<MessageDialog> box(
- new MessageDialog(currentCmdEnv->activeDialog(), msg));
+ ScopedVclPtr<MessageDialog> box(
+ VclPtr<MessageDialog>::Create(currentCmdEnv->activeDialog(), msg));
if ( m_pDialogHelper )
box->SetText( m_pDialogHelper->getWindow()->GetText() );
box->Execute();
@@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE
void ExtensionCmdQueue::Thread::_checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{
- UpdateDialog* pUpdateDialog;
- std::vector< UpdateData > vData;
-
const SolarMutexGuard guard;
- pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData );
+ std::vector< UpdateData > vData;
+ ScopedVclPtrInstance<UpdateDialog> pUpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, vExtensionList, &vData );
pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon
@@ -970,7 +968,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
else
pUpdateDialog->notifyMenubar( false, false ); // check if there updates to be notified via menu bar icon
- delete pUpdateDialog;
+ pUpdateDialog.disposeAndClear();
}
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index ade275724174..1b3f6a17fc8e 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init()
{
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
- m_pScrollBar = new ScrollBar( this, WB_VERT );
+ m_pScrollBar = VclPtr<ScrollBar>::Create( this, WB_VERT );
m_pScrollBar->SetScrollHdl( LINK( this, ExtensionBox_Impl, ScrollHdl ) );
m_pScrollBar->EnableDrag();
@@ -239,6 +239,11 @@ void ExtensionBox_Impl::Init()
ExtensionBox_Impl::~ExtensionBox_Impl()
{
+ disposeOnce();
+}
+
+void ExtensionBox_Impl::dispose()
+{
if ( ! m_bInDelete )
DeleteRemoved();
@@ -248,22 +253,19 @@ ExtensionBox_Impl::~ExtensionBox_Impl()
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.disposeAndClear();
(*iIndex)->m_xPackage->removeEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
}
m_vEntries.clear();
- delete m_pScrollBar;
+ m_pScrollBar.disposeAndClear();
m_xRemoveListener.clear();
delete m_pLocale;
delete m_pCollator;
+ ::svt::IExtensionListBox::dispose();
}
@@ -433,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.disposeAndClear();
}
m_vRemovedEntries.clear();
@@ -546,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt
// Init publisher link here
if ( !rEntry->m_pPublisher && !rEntry->m_sPublisher.isEmpty() )
{
- rEntry->m_pPublisher = new FixedHyperlink( this );
+ rEntry->m_pPublisher = VclPtr<FixedHyperlink>::Create( this );
rEntry->m_pPublisher->SetBackground();
rEntry->m_pPublisher->SetPaintTransparent( true );
rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL );
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 1590f82500a5..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;
@@ -182,6 +182,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_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 45839a498619..f07042d44a23 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal(
catch (const Exception & exc) {
if (bAppUp) {
const SolarMutexGuard guard;
- boost::scoped_ptr<MessageDialog> box(
- new MessageDialog(Application::GetActiveTopWindow(),
- exc.Message));
+ ScopedVclPtrInstance<MessageDialog> box(
+ Application::GetActiveTopWindow(), exc.Message);
box->Execute();
}
throw;
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index f3584d043640..3980a2396b81 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -98,8 +98,8 @@ TheExtensionManager::TheExtensionManager( vcl::Window *pParent,
TheExtensionManager::~TheExtensionManager()
{
- delete m_pUpdReqDialog;
- delete m_pExtMgrDialog;
+ m_pUpdReqDialog.disposeAndClear();
+ m_pExtMgrDialog.disposeAndClear();
delete m_pExecuteCmdQueue;
}
@@ -112,7 +112,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{
if ( !m_pUpdReqDialog )
{
- m_pUpdReqDialog = new UpdateRequiredDialog( NULL, this );
+ m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext );
createPackageList();
@@ -120,7 +120,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
}
else if ( !m_pExtMgrDialog )
{
- m_pExtMgrDialog = new ExtMgrDialog( m_pParent, this );
+ m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext );
m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL );
@@ -171,8 +171,7 @@ sal_Int16 TheExtensionManager::execute()
if ( m_pUpdReqDialog )
{
nRet = m_pUpdReqDialog->Execute();
- delete m_pUpdReqDialog;
- m_pUpdReqDialog = NULL;
+ m_pUpdReqDialog.disposeAndClear();
}
return nRet;
@@ -259,10 +258,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.disposeAndClear();
+ m_pUpdReqDialog.disposeAndClear();
Application::Quit();
}
}
@@ -426,10 +423,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.disposeAndClear();
+ m_pUpdReqDialog.disposeAndClear();
}
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 5a66653d400e..8e75bd04b42a 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -520,7 +520,7 @@ UpdateDialog::UpdateDialog(
get(m_pthrobber, "THROBBER");
get(m_pUpdate, "UPDATE_LABEL");
get(m_pContainer, "UPDATES_CONTAINER");
- m_pUpdates = new UpdateDialog::CheckListBox(m_pContainer, *this);
+ m_pUpdates = VclPtr<UpdateDialog::CheckListBox>::Create(m_pContainer, *this);
Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT));
m_pUpdates->set_width_request(aSize.Width());
m_pUpdates->set_height_request(aSize.Height());
@@ -564,6 +564,11 @@ UpdateDialog::UpdateDialog(
UpdateDialog::~UpdateDialog()
{
+ disposeOnce();
+}
+
+void UpdateDialog::dispose()
+{
storeIgnoredUpdates();
for ( std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); i != m_ListboxEntries.end(); ++i )
@@ -574,7 +579,22 @@ UpdateDialog::~UpdateDialog()
{
delete (*i);
}
- delete m_pUpdates;
+ m_pUpdates.disposeAndClear();
+ m_pchecking.clear();
+ m_pthrobber.clear();
+ m_pUpdate.clear();
+ m_pContainer.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();
}
@@ -599,9 +619,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 c2eedcbba4b2..18fa9de6ebde 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:
@@ -169,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 e844e35fa5bd..69c49d8bbeac 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -237,7 +237,22 @@ UpdateInstallDialog::UpdateInstallDialog(
m_pHelp->Disable();
}
-UpdateInstallDialog::~UpdateInstallDialog() {}
+UpdateInstallDialog::~UpdateInstallDialog()
+{
+ disposeOnce();
+}
+
+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();
+}
bool UpdateInstallDialog::Close()
{
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index bff71e788820..9c05abd36358 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;
@@ -104,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 c9aab531d127..710052f3180f 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 );
@@ -76,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 *);
@@ -98,11 +99,26 @@ struct LicenseDialogImpl : public ModalDialog
css::uno::Reference< css::uno::XComponentContext > const & xContext,
const OUString & sExtensionName,
const OUString & sLicenseText);
+ virtual ~LicenseDialogImpl() { disposeOnce(); }
+ 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 )
{
@@ -122,9 +138,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLicenseView(vcl::Windo
LicenseView::~LicenseView()
{
+ disposeOnce();
+}
+
+void LicenseView::dispose()
+{
maEndReachedHdl = Link();
maScrolledHdl = Link();
EndListeningAll();
+ MultiLineEdit::dispose();
}
void LicenseView::ScrollDown( ScrollType eScroll )
@@ -307,8 +329,9 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
sal_Int16 LicenseDialog::solar_execute()
{
- std::unique_ptr<LicenseDialogImpl> dlg(
- new LicenseDialogImpl(
+ VclPtr<LicenseDialogImpl> dlg(
+ VclPtr<LicenseDialogImpl>::Create(
+
VCLUnoHelper::GetWindow(m_parent),
m_xComponentContext, m_sExtensionName, m_sLicenseText));