diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /uui | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (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 'uui')
-rw-r--r-- | uui/source/authfallbackdlg.cxx | 15 | ||||
-rw-r--r-- | uui/source/authfallbackdlg.hxx | 12 | ||||
-rw-r--r-- | uui/source/fltdlg.cxx | 16 | ||||
-rw-r--r-- | uui/source/fltdlg.hxx | 6 | ||||
-rw-r--r-- | uui/source/iahndl-authentication.cxx | 22 | ||||
-rw-r--r-- | uui/source/iahndl-errorhandler.cxx | 12 | ||||
-rw-r--r-- | uui/source/iahndl-filter.cxx | 3 | ||||
-rw-r--r-- | uui/source/iahndl-locking.cxx | 18 | ||||
-rw-r--r-- | uui/source/iahndl-ssl.cxx | 6 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 22 | ||||
-rw-r--r-- | uui/source/logindlg.cxx | 25 | ||||
-rw-r--r-- | uui/source/logindlg.hxx | 32 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 17 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.hxx | 8 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.cxx | 16 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.hxx | 6 | ||||
-rw-r--r-- | uui/source/nameclashdlg.cxx | 19 | ||||
-rw-r--r-- | uui/source/nameclashdlg.hxx | 12 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 23 | ||||
-rw-r--r-- | uui/source/passworddlg.hxx | 12 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 15 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.hxx | 19 | ||||
-rw-r--r-- | uui/source/unknownauthdlg.cxx | 14 | ||||
-rw-r--r-- | uui/source/unknownauthdlg.hxx | 10 |
24 files changed, 254 insertions, 106 deletions
diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx index eac0d301b300..58362cb24494 100644 --- a/uui/source/authfallbackdlg.cxx +++ b/uui/source/authfallbackdlg.cxx @@ -32,6 +32,21 @@ AuthFallbackDlg::AuthFallbackDlg(Window* pParent, const OUString& instructions, m_pEDUrl->SetText( url ); } +AuthFallbackDlg::~AuthFallbackDlg() +{ + disposeOnce(); +} + +void AuthFallbackDlg::dispose() +{ + m_pTVInstructions.clear(); + m_pEDUrl.clear(); + m_pEDCode.clear(); + m_pBTOk.clear(); + m_pBTCancel.clear(); + ModalDialog::dispose(); +} + IMPL_LINK ( AuthFallbackDlg, OKHdl, Button *, EMPTYARG ) { EndDialog( RET_OK ); diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx index d73eebf70f4f..29634d1f69b0 100644 --- a/uui/source/authfallbackdlg.hxx +++ b/uui/source/authfallbackdlg.hxx @@ -19,15 +19,17 @@ class AuthFallbackDlg : public ModalDialog { private: - VclMultiLineEdit* m_pTVInstructions; - Edit* m_pEDUrl; - Edit* m_pEDCode; - PushButton* m_pBTOk; - PushButton* m_pBTCancel; + VclPtr<VclMultiLineEdit> m_pTVInstructions; + VclPtr<Edit> m_pEDUrl; + VclPtr<Edit> m_pEDCode; + VclPtr<PushButton> m_pBTOk; + VclPtr<PushButton> m_pBTCancel; public: AuthFallbackDlg(Window* pParent, const OUString& instructions, const OUString& url); + virtual ~AuthFallbackDlg(); + virtual void dispose() SAL_OVERRIDE; OUString GetCode() const { return m_pEDCode->GetText(); } diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx index a24a34e1e35a..c2135bead606 100644 --- a/uui/source/fltdlg.cxx +++ b/uui/source/fltdlg.cxx @@ -57,6 +57,18 @@ FilterDialog::FilterDialog( vcl::Window* pParentWindow ) m_pFtURL->SetSizePixel(Size(aSize.Width(), m_pFtURL->GetOptimalSize().Height())); } +FilterDialog::~FilterDialog() +{ + disposeOnce(); +} + +void FilterDialog::dispose() +{ + m_pFtURL.clear(); + m_pLbFilters.clear(); + ModalDialog::dispose(); +} + /*-************************************************************************************************************ @short set file name on dialog control @descr We convert given URL (it must be an URL!) into valid file name and show it on our dialog. @@ -157,7 +169,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util: { public: StringCalculator( const OutputDevice* pDevice ) - : m_pDevice( pDevice ) + : m_pDevice( const_cast< OutputDevice * >( pDevice ) ) { } @@ -167,7 +179,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util: } private: - const OutputDevice* m_pDevice; + VclPtr<OutputDevice> m_pDevice; }; /*-************************************************************************************************************ diff --git a/uui/source/fltdlg.hxx b/uui/source/fltdlg.hxx index 6c245445ab97..958ad99f5f54 100644 --- a/uui/source/fltdlg.hxx +++ b/uui/source/fltdlg.hxx @@ -47,6 +47,8 @@ class FilterDialog : public ModalDialog // public interface public: FilterDialog ( vcl::Window* pParentWindow ); + virtual ~FilterDialog(); + virtual void dispose() SAL_OVERRIDE; void SetURL ( const OUString& sURL ); void ChangeFilters( const FilterNameList* pFilterNames ); bool AskForFilter ( FilterNameListPtr& pSelectedItem ); @@ -58,8 +60,8 @@ class FilterDialog : public ModalDialog // member private: - FixedText *m_pFtURL ; - ListBox *m_pLbFilters ; + VclPtr<FixedText> m_pFtURL ; + VclPtr<ListBox> m_pLbFilters ; const FilterNameList* m_pFilterNames; }; // class FilterDialog diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 51bf286ffe5b..47ed642a8868 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -88,8 +88,8 @@ executeLoginDialog( if (!bCanUseSysCreds) nFlags |= LF_NO_USESYSCREDS; - boost::scoped_ptr< LoginDialog > xDialog( - new LoginDialog(pParent, nFlags, rInfo.GetServer(), rRealm)); + VclPtr< LoginDialog > xDialog( + VclPtr<LoginDialog>::Create(pParent, nFlags, rInfo.GetServer(), rRealm)); if (!rInfo.GetErrorText().isEmpty()) xDialog->SetErrorText(rInfo.GetErrorText()); xDialog->SetName(rInfo.GetUserName()); @@ -417,8 +417,8 @@ executeMasterPasswordDialog( boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui")); if( nMode == task::PasswordRequestMode_PASSWORD_CREATE ) { - boost::scoped_ptr< MasterPasswordCreateDialog > xDialog( - new MasterPasswordCreateDialog(pParent, xManager.get())); + VclPtr< MasterPasswordCreateDialog > xDialog( + VclPtr<MasterPasswordCreateDialog>::Create(pParent, xManager.get())); rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); aMaster = OUStringToOString( @@ -426,8 +426,8 @@ executeMasterPasswordDialog( } else { - boost::scoped_ptr< MasterPasswordDialog > xDialog( - new MasterPasswordDialog(pParent, nMode, xManager.get())); + VclPtr< MasterPasswordDialog > xDialog( + VclPtr<MasterPasswordDialog>::Create(pParent, nMode, xManager.get())); rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); aMaster = OUStringToOString( @@ -517,8 +517,8 @@ executePasswordDialog( { if (bIsSimplePasswordRequest) { - boost::scoped_ptr< PasswordDialog > pDialog( - new PasswordDialog( pParent, nMode, xManager.get(), aDocName, + VclPtr< PasswordDialog > pDialog( + VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName, bIsPasswordToModify, bIsSimplePasswordRequest ) ); pDialog->SetMinLen(0); @@ -541,8 +541,8 @@ executePasswordDialog( } else // enter password or reenter password { - boost::scoped_ptr< PasswordDialog > pDialog( - new PasswordDialog( pParent, nMode, xManager.get(), aDocName, + VclPtr< PasswordDialog > pDialog( + VclPtr<PasswordDialog>::Create( pParent, nMode, xManager.get(), aDocName, bIsPasswordToModify, bIsSimplePasswordRequest ) ); pDialog->SetMinLen(0); @@ -752,7 +752,7 @@ UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions, uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations ) { vcl::Window * pParent = getParentProperty( ); - AuthFallbackDlg *dlg = new AuthFallbackDlg( pParent, instructions, url ); + VclPtrInstance<AuthFallbackDlg> dlg( pParent, instructions, url ); int retCode = dlg->Execute( ); uno::Reference< task::XInteractionAbort > xAbort; uno::Reference< ucb::XInteractionAuthFallback > xAuthFallback; diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index 68b09382baed..3b12c7ba011c 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -55,19 +55,19 @@ executeErrorDialog( //TODO! must be internationalized aText.append(rMessage); - boost::scoped_ptr< MessBox > xBox; + VclPtr< MessBox > xBox; try { switch (eClassification) { case task::InteractionClassification_ERROR: - xBox.reset(new ErrorBox(pParent, + xBox.reset(VclPtr<ErrorBox>::Create(pParent, nButtonMask, aText.makeStringAndClear())); break; case task::InteractionClassification_WARNING: - xBox.reset(new WarningBox(pParent, + xBox.reset(VclPtr<WarningBox>::Create(pParent, nButtonMask, aText.makeStringAndClear())); break; @@ -76,16 +76,16 @@ executeErrorDialog( # define WB_DEF_BUTTONS (WB_DEF_OK | WB_DEF_CANCEL | WB_DEF_RETRY) //(want to ignore any default button settings)... if ((nButtonMask & WB_DEF_BUTTONS) == WB_DEF_OK) - xBox.reset(new InfoBox(pParent, + xBox.reset(VclPtr<InfoBox>::Create(pParent, aText.makeStringAndClear())); else - xBox.reset(new ErrorBox(pParent, + xBox.reset(VclPtr<ErrorBox>::Create(pParent, nButtonMask, aText.makeStringAndClear())); break; case task::InteractionClassification_QUERY: - xBox.reset(new QueryBox(pParent, + xBox.reset(VclPtr<QueryBox>::Create(pParent, nButtonMask, aText.makeStringAndClear())); break; diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index 6291553f7203..710cd8ae545c 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -55,8 +55,7 @@ executeFilterDialog( { SolarMutexGuard aGuard; - boost::scoped_ptr< uui::FilterDialog > xDialog( - new uui::FilterDialog(pParent)); + ScopedVclPtrInstance< uui::FilterDialog > xDialog(pParent); xDialog->SetURL(rURL); xDialog->ChangeFilters(&rFilters); diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index e7e911bb8aef..0b7c5cfd5fea 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -93,8 +93,7 @@ handleLockedDocumentRequest_( aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); - boost::scoped_ptr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox( - pParent, xManager.get(), aMessage ) ); + ScopedVclPtrInstance< OpenLockedQueryBox > xDialog(pParent, xManager.get(), aMessage); nResult = xDialog->Execute(); } else if ( nMode == UUI_DOC_SAVE_LOCK ) @@ -107,8 +106,7 @@ handleLockedDocumentRequest_( aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); - boost::scoped_ptr< TryLaterQueryBox > xDialog( - new TryLaterQueryBox( pParent, xManager.get(), aMessage ) ); + ScopedVclPtrInstance< TryLaterQueryBox > xDialog( pParent, xManager.get(), aMessage ); nResult = xDialog->Execute(); } else if ( nMode == UUI_DOC_OWN_LOAD_LOCK || @@ -122,8 +120,8 @@ handleLockedDocumentRequest_( aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); - boost::scoped_ptr< AlreadyOpenQueryBox > xDialog( - new AlreadyOpenQueryBox( pParent, + VclPtr< AlreadyOpenQueryBox > xDialog( + VclPtr<AlreadyOpenQueryBox>::Create( pParent, xManager.get(), aMessage, nMode == UUI_DOC_OWN_SAVE_LOCK ) ); @@ -163,8 +161,8 @@ handleChangedByOthersRequest_( if (!xManager.get()) return; - boost::scoped_ptr< FileChangedQueryBox > xDialog( - new FileChangedQueryBox( pParent, xManager.get() ) ); + VclPtr< FileChangedQueryBox > xDialog( + VclPtr<FileChangedQueryBox>::Create( pParent, xManager.get() ) ); sal_Int32 nResult = xDialog->Execute(); if ( nResult == RET_YES ) @@ -198,8 +196,8 @@ handleLockFileIgnoreRequest_( if (!xManager.get()) return; - boost::scoped_ptr< LockFailedQueryBox > xDialog( - new LockFailedQueryBox( pParent, xManager.get() ) ); + VclPtr< LockFailedQueryBox > xDialog( + VclPtr<LockFailedQueryBox>::Create( pParent, xManager.get() ) ); sal_Int32 nResult = xDialog->Execute(); if ( nResult == RET_OK ) diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index 47969699e0de..e42ed909b5b2 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -145,8 +145,7 @@ executeUnknownAuthDialog( { SolarMutexGuard aGuard; - boost::scoped_ptr< UnknownAuthDialog > xDialog( - new UnknownAuthDialog(pParent, rXCert, xContext)); + ScopedVclPtrInstance< UnknownAuthDialog > xDialog(pParent, rXCert, xContext); // Get correct resource string OUString aMessage; @@ -187,8 +186,7 @@ executeSSLWarnDialog( { SolarMutexGuard aGuard; - boost::scoped_ptr< SSLWarnDialog > xDialog( - new SSLWarnDialog(pParent, rXCert, xContext)); + ScopedVclPtrInstance< SSLWarnDialog > xDialog(pParent, rXCert, xContext); // Get correct resource string OUString aMessage_1; diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f265fe6370b4..e0ea07c1b85f 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1024,9 +1024,9 @@ executeMessageBox( { SolarMutexGuard aGuard; - MessBox xBox( pParent, nButtonMask, rTitle, rMessage ); + ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, rTitle, rMessage); - sal_uInt16 aResult = xBox.Execute(); + sal_uInt16 aResult = xBox->Execute(); switch( aResult ) { case RET_OK: @@ -1059,11 +1059,11 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p if ( !xManager.get() ) return ABORT; - NameClashDialog aDialog( pParent, xManager.get(), rTargetFolderURL, - rClashingName, rProposedNewName, bAllowOverwrite ); + ScopedVclPtrInstance<NameClashDialog> aDialog(pParent, xManager.get(), rTargetFolderURL, + rClashingName, rProposedNewName, bAllowOverwrite); - NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog.Execute(); - rProposedNewName = aDialog.getNewName(); + NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute(); + rProposedNewName = aDialog->getNewName(); return eResult; } @@ -1207,20 +1207,20 @@ UUIInteractionHelper::handleMacroConfirmRequest( if ( pResMgr.get() ) { bool bShowSignatures = aSignInfo.getLength() > 0; - MacroWarning aWarning( + ScopedVclPtrInstance<MacroWarning> aWarning( getParentProperty(), bShowSignatures, *pResMgr.get() ); - aWarning.SetDocumentURL( aDocumentURL ); + aWarning->SetDocumentURL( aDocumentURL ); if ( aSignInfo.getLength() > 1 ) { - aWarning.SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); + aWarning->SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); } else if ( aSignInfo.getLength() == 1 ) { - aWarning.SetCertificate( aSignInfo[ 0 ].Signer ); + aWarning->SetCertificate( aSignInfo[ 0 ].Signer ); } - bApprove = aWarning.Execute() == RET_OK; + bApprove = aWarning->Execute() == RET_OK; } if ( bApprove && xApprove.is() ) diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index c28e17098a51..ca44729e15f0 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -36,6 +36,31 @@ using namespace com::sun::star; +LoginDialog::~LoginDialog() +{ + disposeOnce(); +} + +void LoginDialog::dispose() +{ + m_pErrorFT.clear(); + m_pErrorInfo.clear(); + m_pRequestInfo.clear(); + m_pPathFT.clear(); + m_pPathED.clear(); + m_pPathBtn.clear(); + m_pNameFT.clear(); + m_pNameED.clear(); + m_pPasswordFT.clear(); + m_pPasswordED.clear(); + m_pAccountFT.clear(); + m_pAccountED.clear(); + m_pSavePasswdBtn.clear(); + m_pUseSysCredsCB.clear(); + m_pOKBtn.clear(); + ModalDialog::dispose(); +} + void LoginDialog::HideControls_Impl( sal_uInt16 nFlags ) { if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH ) diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 0cd7eb6e2016..cc32d5e94ae9 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -43,21 +43,21 @@ class LoginDialog : public ModalDialog { - FixedText* m_pErrorFT; - FixedText* m_pErrorInfo; - FixedText* m_pRequestInfo; - FixedText* m_pPathFT; - Edit* m_pPathED; - PushButton* m_pPathBtn; - FixedText* m_pNameFT; - Edit* m_pNameED; - FixedText* m_pPasswordFT; - Edit* m_pPasswordED; - FixedText* m_pAccountFT; - Edit* m_pAccountED; - CheckBox* m_pSavePasswdBtn; - CheckBox* m_pUseSysCredsCB; - OKButton* m_pOKBtn; + VclPtr<FixedText> m_pErrorFT; + VclPtr<FixedText> m_pErrorInfo; + VclPtr<FixedText> m_pRequestInfo; + VclPtr<FixedText> m_pPathFT; + VclPtr<Edit> m_pPathED; + VclPtr<PushButton> m_pPathBtn; + VclPtr<FixedText> m_pNameFT; + VclPtr<Edit> m_pNameED; + VclPtr<FixedText> m_pPasswordFT; + VclPtr<Edit> m_pPasswordED; + VclPtr<FixedText> m_pAccountFT; + VclPtr<Edit> m_pAccountED; + VclPtr<CheckBox> m_pSavePasswdBtn; + VclPtr<CheckBox> m_pUseSysCredsCB; + VclPtr<OKButton> m_pOKBtn; void HideControls_Impl( sal_uInt16 nFlags ); void EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ); @@ -69,6 +69,8 @@ class LoginDialog : public ModalDialog public: LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags, const OUString& rServer, const OUString &rRealm); + virtual ~LoginDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetPath() const { return m_pPathED->GetText(); } void SetPath( const OUString& rNewPath ) { m_pPathED->SetText( rNewPath ); } diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index a7acc0189a26..85ddf2754b81 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -41,8 +41,8 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) else { OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr )); - MessageDialog aErrorBox(this, aErrorMsg); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aErrorMsg); + aErrorBox->Execute(); m_pEDMasterPasswordCrt->SetText( OUString() ); m_pEDMasterPasswordRepeat->SetText( OUString() ); m_pEDMasterPasswordCrt->GrabFocus(); @@ -63,4 +63,17 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, Res m_pEDMasterPasswordCrt->SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) ); } +MasterPasswordCreateDialog::~MasterPasswordCreateDialog() +{ + disposeOnce(); +} + +void MasterPasswordCreateDialog::dispose() +{ + m_pEDMasterPasswordCrt.clear(); + m_pEDMasterPasswordRepeat.clear(); + m_pOKBtn.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx index 31e9eb60ab87..b8279fcec363 100644 --- a/uui/source/masterpasscrtdlg.hxx +++ b/uui/source/masterpasscrtdlg.hxx @@ -32,9 +32,9 @@ class MasterPasswordCreateDialog : public ModalDialog { private: - Edit* m_pEDMasterPasswordCrt; - Edit* m_pEDMasterPasswordRepeat; - OKButton* m_pOKBtn; + VclPtr<Edit> m_pEDMasterPasswordCrt; + VclPtr<Edit> m_pEDMasterPasswordRepeat; + VclPtr<OKButton> m_pOKBtn; DECL_LINK(OKHdl_Impl, void *); @@ -42,6 +42,8 @@ private: public: MasterPasswordCreateDialog( vcl::Window* pParent, ResMgr * pResMgr ); + virtual ~MasterPasswordCreateDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetMasterPassword() const { return m_pEDMasterPasswordCrt->GetText(); } diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 3b6a071968a3..924112b088c7 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -49,11 +49,23 @@ MasterPasswordDialog::MasterPasswordDialog if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER ) { OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr )); - MessageDialog aErrorBox(pParent, aErrorMsg); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(pParent, aErrorMsg); + aErrorBox->Execute(); } m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); }; +MasterPasswordDialog::~MasterPasswordDialog() +{ + disposeOnce(); +} + +void MasterPasswordDialog::dispose() +{ + m_pEDMasterPassword.clear(); + m_pOKBtn.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx index 4b834d4fa5ed..1d37d0d93d78 100644 --- a/uui/source/masterpassworddlg.hxx +++ b/uui/source/masterpassworddlg.hxx @@ -30,13 +30,15 @@ class MasterPasswordDialog : public ModalDialog { - Edit* m_pEDMasterPassword; - OKButton* m_pOKBtn; + VclPtr<Edit> m_pEDMasterPassword; + VclPtr<OKButton> m_pOKBtn; DECL_LINK(OKHdl_Impl, void *); public: MasterPasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr ); + virtual ~MasterPasswordDialog(); + virtual void dispose() SAL_OVERRIDE; OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); } diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 63ad0926dc02..06ff359bf3ca 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -34,8 +34,8 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) OUString aNewName = m_pEDNewName->GetText(); if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) { - MessageDialog aError(NULL, maSameName); - aError.Execute(); + ScopedVclPtrInstance< MessageDialog > aError(nullptr, maSameName); + aError->Execute(); return 1; } maNewName = aNewName; @@ -94,4 +94,19 @@ NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr, m_pEDNewName->SetText( rClashingName ); } +NameClashDialog::~NameClashDialog() +{ + disposeOnce(); +} + +void NameClashDialog::dispose() +{ + m_pFTMessage.clear(); + m_pEDNewName.clear(); + m_pBtnOverwrite.clear(); + m_pBtnRename.clear(); + m_pBtnCancel.clear(); + ModalDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/nameclashdlg.hxx b/uui/source/nameclashdlg.hxx index 6185e996305c..545f581dd077 100644 --- a/uui/source/nameclashdlg.hxx +++ b/uui/source/nameclashdlg.hxx @@ -31,11 +31,11 @@ enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE }; class NameClashDialog : public ModalDialog { - FixedText *m_pFTMessage; - Edit *m_pEDNewName; - PushButton *m_pBtnOverwrite; - PushButton *m_pBtnRename; - CancelButton *m_pBtnCancel; + VclPtr<FixedText> m_pFTMessage; + VclPtr<Edit> m_pEDNewName; + VclPtr<PushButton> m_pBtnOverwrite; + VclPtr<PushButton> m_pBtnRename; + VclPtr<CancelButton> m_pBtnCancel; OUString maSameName; OUString maNewName; @@ -48,6 +48,8 @@ public: OUString const & rClashingName, OUString const & rProposedNewName, bool bAllowOverwrite ); + virtual ~NameClashDialog(); + virtual void dispose() SAL_OVERRIDE; OUString getNewName() const { return maNewName; } }; diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 2e5ed497b599..2563ea745de7 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -44,8 +44,8 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId; OUString aErrorMsg(ResId(nErrStrId, *pResourceMgr).toString()); - MessageDialog aErrorBox(GetParent(), aErrorMsg); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(GetParent(), aErrorMsg); + aErrorBox->Execute(); } // default settings for enter password or reenter passwd... @@ -82,6 +82,21 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, m_pOKBtn->SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) ); } +PasswordDialog::~PasswordDialog() +{ + disposeOnce(); +} + +void PasswordDialog::dispose() +{ + m_pFTPassword.clear(); + m_pEDPassword.clear(); + m_pFTConfirmPassword.clear(); + m_pEDConfirmPassword.clear(); + m_pOKBtn.clear(); + ModalDialog::dispose(); +} + IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) { bool bEDPasswdValid = m_pEDPassword->GetText().getLength() >= nMinLen; @@ -91,8 +106,8 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch) { - MessageDialog aErrorBox(this, aPasswdMismatch); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aPasswdMismatch); + aErrorBox->Execute(); } else if (bValid) EndDialog( RET_OK ); diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx index 3cec5ca190d3..712bcfae0ee3 100644 --- a/uui/source/passworddlg.hxx +++ b/uui/source/passworddlg.hxx @@ -32,11 +32,11 @@ class PasswordDialog : public ModalDialog { - FixedText* m_pFTPassword; - Edit* m_pEDPassword; - FixedText* m_pFTConfirmPassword; - Edit* m_pEDConfirmPassword; - OKButton* m_pOKBtn; + VclPtr<FixedText> m_pFTPassword; + VclPtr<Edit> m_pEDPassword; + VclPtr<FixedText> m_pFTConfirmPassword; + VclPtr<Edit> m_pEDConfirmPassword; + VclPtr<OKButton> m_pOKBtn; sal_uInt16 nMinLen; OUString aPasswdMismatch; @@ -46,6 +46,8 @@ class PasswordDialog : public ModalDialog public: PasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, const OUString& aDocURL, bool bOpenToModify = false, bool bIsSimplePasswordRequest = false ); + virtual ~PasswordDialog(); + virtual void dispose() SAL_OVERRIDE; void SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; } OUString GetPassword() const { return m_pEDPassword->GetText(); } diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 935ecf66ecf4..cb32f762299b 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -89,6 +89,21 @@ MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures, ResMgr MacroWarning::~MacroWarning() { + disposeOnce(); +} + +void MacroWarning::dispose() +{ + mpSymbolImg.clear(); + mpDocNameFI.clear(); + mpDescr1FI.clear(); + mpSignsFI.clear(); + mpViewSignsBtn.clear(); + mpDescr2FI.clear(); + mpAlwaysTrustCB.clear(); + mpEnableBtn.clear(); + mpDisableBtn.clear(); + ModalDialog::dispose(); } void MacroWarning::SetDocumentURL( const OUString& rDocURL ) diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 84daaad9ee3a..076916fc10cc 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -44,15 +44,15 @@ private: OUString maODFVersion; const css::uno::Sequence< css::security::DocumentSignatureInformation >* mpInfos; - FixedImage* mpSymbolImg; - FixedText* mpDocNameFI; - FixedText* mpDescr1FI; - FixedText* mpSignsFI; - PushButton* mpViewSignsBtn; - FixedText* mpDescr2FI; - CheckBox* mpAlwaysTrustCB; - PushButton* mpEnableBtn; - PushButton* mpDisableBtn; + VclPtr<FixedImage> mpSymbolImg; + VclPtr<FixedText> mpDocNameFI; + VclPtr<FixedText> mpDescr1FI; + VclPtr<FixedText> mpSignsFI; + VclPtr<PushButton> mpViewSignsBtn; + VclPtr<FixedText> mpDescr2FI; + VclPtr<CheckBox> mpAlwaysTrustCB; + VclPtr<PushButton> mpEnableBtn; + VclPtr<PushButton> mpDisableBtn; const bool mbSignedMode; // modus of dialog (signed / unsigned macros) const bool mbShowSignatures; @@ -68,6 +68,7 @@ private: public: MacroWarning( vcl::Window* pParent, bool _bShowSignatures, ResMgr& rResMgr ); virtual ~MacroWarning(); + virtual void dispose() SAL_OVERRIDE; void SetDocumentURL( const OUString& rDocURL ); diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx index 34f706fec139..731882ccc45b 100644 --- a/uui/source/unknownauthdlg.cxx +++ b/uui/source/unknownauthdlg.cxx @@ -75,4 +75,18 @@ UnknownAuthDialog::UnknownAuthDialog(vcl::Window* pParent, m_pCommandButtonOK->SetClickHdl(LINK(this, UnknownAuthDialog, OKHdl_Impl)); } +UnknownAuthDialog::~UnknownAuthDialog() +{ + disposeOnce(); +} + +void UnknownAuthDialog::dispose() +{ + m_pCommandButtonOK.clear(); + m_pView_Certificate.clear(); + m_pOptionButtonAccept.clear(); + m_pOptionButtonDontAccept.clear(); + MessageDialog::dispose(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/unknownauthdlg.hxx b/uui/source/unknownauthdlg.hxx index 0b8d1e64ab2b..2eafe5e3b5f0 100644 --- a/uui/source/unknownauthdlg.hxx +++ b/uui/source/unknownauthdlg.hxx @@ -31,10 +31,10 @@ class UnknownAuthDialog : public MessageDialog { private: - PushButton* m_pCommandButtonOK; - PushButton* m_pView_Certificate; - RadioButton* m_pOptionButtonAccept; - RadioButton* m_pOptionButtonDontAccept; + VclPtr<PushButton> m_pCommandButtonOK; + VclPtr<PushButton> m_pView_Certificate; + VclPtr<RadioButton> m_pOptionButtonAccept; + VclPtr<RadioButton> m_pOptionButtonDontAccept; const css::uno::Reference< css::uno::XComponentContext >& m_xContext; const css::uno::Reference< css::security::XCertificate >& m_rXCert; @@ -46,6 +46,8 @@ public: UnknownAuthDialog(vcl::Window* pParent, const css::uno::Reference< css::security::XCertificate >& rXCert, const css::uno::Reference< css::uno::XComponentContext >& xContext); + virtual ~UnknownAuthDialog(); + virtual void dispose() SAL_OVERRIDE; css::uno::Reference< css::security::XCertificate > getCert() { |