diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/impldde.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/openuriexternally.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/recfloat.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/QuerySaveDocument.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 6 |
23 files changed, 56 insertions, 56 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index a307e81cfe37..2fcaa8ec9d94 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -462,7 +462,7 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) bool bNewWin = false; vcl::Window* pTopWin = GetTopWindow(); - VclPtr<SfxTemplateManagerDlg> aTemplDlg(new SfxTemplateManagerDlg); + ScopedVclPtr<SfxTemplateManagerDlg> aTemplDlg(new SfxTemplateManagerDlg); int nRet = aTemplDlg->Execute(); if ( nRet == RET_OK ) { @@ -831,7 +831,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) SolarMutexGuard aGuard; vcl::Window *pWindow = SfxGetpApp()->GetTopWindow(); - VclPtr<MessageDialog> aSecurityWarningBox(new MessageDialog(pWindow, + ScopedVclPtr<MessageDialog> aSecurityWarningBox(new MessageDialog(pWindow, SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS), VCL_MESSAGE_WARNING)); aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() ); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 6fece61c4f78..27b4c9163752 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -451,7 +451,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SHOW_LICENSE: { - VclPtr<LicenseDialog> aDialog(new LicenseDialog); + ScopedVclPtr<LicenseDialog> aDialog(new LicenseDialog); aDialog->Execute(); break; } @@ -539,7 +539,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_TEMPLATE_MANAGER: { - VclPtr<SfxTemplateManagerDlg> dlg(new SfxTemplateManagerDlg); + ScopedVclPtr<SfxTemplateManagerDlg> dlg(new SfxTemplateManagerDlg); dlg->Execute(); bDone = true; break; @@ -547,7 +547,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_TEMPLATE_ADDRESSBOKSOURCE: { - VclPtr<svt::AddressBookSourceDialog> aDialog(new svt::AddressBookSourceDialog(GetTopWindow(), ::comphelper::getProcessComponentContext())); + ScopedVclPtr<svt::AddressBookSourceDialog> aDialog(new svt::AddressBookSourceDialog(GetTopWindow(), ::comphelper::getProcessComponentContext())); aDialog->Execute(); bDone = true; break; diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 196962befa88..8d66fa2bb126 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -271,7 +271,7 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl ) { - VclPtr<SvDDELinkEditDialog> aDlg(new SvDDELinkEditDialog(pParent, pBaseLink) ); + ScopedVclPtr<SvDDELinkEditDialog> aDlg(new SvDDELinkEditDialog(pParent, pBaseLink) ); if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() ) { OUString sCommand = aDlg->GetCmd(); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 321ef7f328de..8debf888d69b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1079,7 +1079,7 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl) if ( aFactories.empty() ) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VCL_MESSAGE_INFO) ); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_INFO_NOSEARCHRESULTS ), VCL_MESSAGE_INFO) ); aBox->Execute(); } } @@ -1225,7 +1225,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction ) sal_Int32 nPos = GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - VclPtr<SfxAddHelpBookmarkDialog_Impl> aDlg(new SfxAddHelpBookmarkDialog_Impl(this, true)); + ScopedVclPtr<SfxAddHelpBookmarkDialog_Impl> aDlg(new SfxAddHelpBookmarkDialog_Impl(this, true)); aDlg->SetTitle( GetEntry( nPos ) ); if ( aDlg->Execute() == RET_OK ) { @@ -2337,7 +2337,7 @@ IMPL_LINK( SfxHelpTextWindow_Impl, FindHdl, sfx2::SearchDialog*, pDlg ) else { DBG_ASSERT( pSrchDlg, "no search dialog" ); - VclPtr<MessageDialog> aBox(new MessageDialog(pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VCL_MESSAGE_INFO) ); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pSrchDlg, SfxResId( STR_INFO_NOSEARCHTEXTFOUND ), VCL_MESSAGE_INFO) ); aBox->Execute(); pSrchDlg->SetFocusOnEdit(); } @@ -3212,7 +3212,7 @@ void SfxHelpWindow_Impl::DoAction( sal_uInt16 nActionId ) if ( aAny >>= aValue ) { OUString aTitle( aValue ); - VclPtr<SfxAddHelpBookmarkDialog_Impl> aDlg(new SfxAddHelpBookmarkDialog_Impl(this, false)); + ScopedVclPtr<SfxAddHelpBookmarkDialog_Impl> aDlg(new SfxAddHelpBookmarkDialog_Impl(this, false)); aDlg->SetTitle( aTitle ); if ( aDlg->Execute() == RET_OK ) { diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 10c4d705d734..348668185062 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -158,7 +158,7 @@ short SvxOpenGraphicDialog::Execute() // could not load? if ( nFound == USHRT_MAX ) { - VclPtr<WarningBox> aWarningBox(new WarningBox(NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString()) ); + ScopedVclPtr<WarningBox> aWarningBox(new WarningBox(NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString()) ); bQuitLoop = aWarningBox->Execute() != RET_RETRY; } else diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx index 7394b8fb8d72..4dc04f206fdb 100644 --- a/sfx2/source/appl/openuriexternally.cxx +++ b/sfx2/source/appl/openuriexternally.cxx @@ -44,7 +44,7 @@ bool sfx2::openUriExternally( "unexpected IllegalArgumentException: " + e.Message); } SolarMutexGuard g; - VclPtr<MessageDialog> eb(new MessageDialog( + ScopedVclPtr<MessageDialog> eb(new MessageDialog( SfxGetpApp()->GetTopWindow(), SfxResId(STR_NO_ABS_URI_REF))); eb->set_primary_text(eb->get_primary_text().replaceFirst("$(ARG1)", uri)); eb->Execute(); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 246248da3ae9..148bb159ff10 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -605,7 +605,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const if ( impl_showOnlineHelp( aHelpURL ) ) return true; - VclPtr<NoHelpErrorBox> aErrBox(new NoHelpErrorBox(const_cast< vcl::Window* >( pWindow )) ); + ScopedVclPtr<NoHelpErrorBox> aErrBox(new NoHelpErrorBox(const_cast< vcl::Window* >( pWindow )) ); aErrBox->Execute(); return false; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 02da90cb125e..4715a55fb694 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -534,7 +534,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) // Here could a re-installation be offered OUString aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() ); aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() ); - VclPtr<QueryBox> aQuery(new QueryBox(NULL, WB_YES_NO | WB_DEF_YES, aText) ); + ScopedVclPtr<QueryBox> aQuery(new QueryBox(NULL, WB_YES_NO | WB_DEF_YES, aText) ); short nRet = aQuery->Execute(); if ( nRet == RET_YES ) { diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 4af32d2478e2..b367b086e36a 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -858,7 +858,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css: SolarMutexGuard aGuard; vcl::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow ); - VclPtr<MessageDialog> aBox(new MessageDialog(pParentWindow, "ErrorFindEmailDialog", "sfx/ui/errorfindemaildialog.ui")); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(pParentWindow, "ErrorFindEmailDialog", "sfx/ui/errorfindemaildialog.ui")); aBox->Execute(); eResult = SEND_MAIL_CANCELLED; } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index b4dd4e5adfcb..d9e393703949 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -645,7 +645,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) if (!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' '))) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO)); aBox->Execute(); m_pNameRw->GrabFocus(); m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); @@ -662,7 +662,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) { if ( !pStyle->SetFollow( aFollowEntry ) ) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO)); aBox->Execute(); m_pFollowLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; @@ -682,7 +682,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) { if ( !pStyle->SetParent( aParentEntry ) ) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO)); aBox->Execute(); m_pBaseLb->GrabFocus(); return SfxTabPage::KEEP_PAGE; diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 192130584288..8eef6a765c69 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -71,7 +71,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl) bConfirmFailed = true; if ( bConfirmFailed ) { - VclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId(STR_ERROR_WRONG_CONFIRM))); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(this, SfxResId(STR_ERROR_WRONG_CONFIRM))); aBox->Execute(); mpConfirm1ED->SetText( OUString() ); mpConfirm1ED->GrabFocus(); diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index e9da704e257c..7461eddd5473 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -152,7 +152,7 @@ bool SfxRecordingFloatWrapper_Impl::QueryClose() com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder(); if ( xRecorder.is() && !xRecorder->getRecordedMacro().isEmpty() ) { - VclPtr<QueryBox> aBox(new QueryBox(GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString())); + ScopedVclPtr<QueryBox> aBox(new QueryBox(GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString())); aBox->SetText( SfxResId(STR_CANCEL_RECORDING).toString() ); bRet = ( aBox->Execute() == RET_YES ); } diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 81e54371aa19..0313bbfa0afd 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -99,7 +99,7 @@ static bool lcl_GetPassword( /*out*/OUString &rPassword ) { bool bRes = false; - VclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(pParent)); + ScopedVclPtr<SfxPasswordDialog> aPasswdDlg(new SfxPasswordDialog(pParent)); aPasswdDlg->SetMinLen( 1 ); if (bProtect) aPasswdDlg->ShowExtras( SHOWEXTRAS_CONFIRM ); @@ -335,7 +335,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl) bool bAlreadyDone = false; if (!m_bEndRedliningWarningDone) { - VclPtr<WarningBox> aBox(new WarningBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO), + ScopedVclPtr<WarningBox> aBox(new WarningBox(m_rMyTabPage.GetParent(), WinBits(WB_YES_NO | WB_DEF_NO), m_aEndRedliningWarning )); if (aBox->Execute() != RET_YES) bAlreadyDone = true; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b4e374293f28..b1c8bf013b0d 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1618,7 +1618,7 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(sal_uInt16 nEntry) nFilter=pStyleSheetPool->GetSearchMask(); pStyleSheetPool->SetSearchMask( eFam, SFXSTYLEBIT_USERDEF ); - VclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg(pWindow, *pStyleSheetPool)); + ScopedVclPtr<SfxNewStyleDlg> pDlg(new SfxNewStyleDlg(pWindow, *pStyleSheetPool)); // why? : FloatingWindow must not be parent of a modal dialog if(RET_OK == pDlg->Execute()) { @@ -1817,10 +1817,10 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *) if ( bUsedStyle ) { #if defined UNX - VclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), aMsg, + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); #else - VclPtr<MessageDialog> aBox(new MessageDialog(GetWindow(), aMsg, + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(GetWindow(), aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); #endif aApproved = aBox->Execute() == RET_YES; diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx index 9ab89a78c374..d2a6cc20d976 100644 --- a/sfx2/source/doc/QuerySaveDocument.cxx +++ b/sfx2/source/doc/QuerySaveDocument.cxx @@ -29,7 +29,7 @@ short ExecuteQuerySaveDocument(vcl::Window* _pParent, const OUString& _rTitle) return RET_NO; } - VclPtr<MessageDialog> aQBox(new MessageDialog(_pParent, "QuerySaveDialog", "sfx/ui/querysavedialog.ui")); + ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(_pParent, "QuerySaveDialog", "sfx/ui/querysavedialog.ui")); aQBox->set_primary_text(aQBox->get_primary_text().replaceFirst("$(DOC)", _rTitle)); return aQBox->Execute(); } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index f336c22a39e7..ea8e30165c25 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -190,7 +190,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) if ( ( aValue >>= bPassWord ) && bPassWord ) { // ask for the password - VclPtr<SfxPasswordDialog> aPasswordDlg( new SfxPasswordDialog(NULL) ); + ScopedVclPtr<SfxPasswordDialog> aPasswordDlg( new SfxPasswordDialog(NULL) ); aPasswordDlg->ShowExtras( SHOWEXTRAS_CONFIRM ); short nRet = aPasswordDlg->Execute(); if ( RET_OK == nRet ) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 8e36955ad454..3837720d1733 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -666,7 +666,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) { // notify the user that SaveAs is going to be done vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel ); - VclPtr<MessageDialog> aMessageBox(new MessageDialog(pWin, SfxResId(STR_NEW_FILENAME_SAVE), + ScopedVclPtr<MessageDialog> aMessageBox(new MessageDialog(pWin, SfxResId(STR_NEW_FILENAME_SAVE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL)); if ( aMessageBox->Execute() == RET_OK ) nResult = STATUS_SAVEAS; @@ -1856,7 +1856,7 @@ bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XMod return true; vcl::Window* pWin = SfxStoringHelper::GetModelWindow( xModel ); - VclPtr<SfxAlienWarningDialog> aDlg(new SfxAlienWarningDialog(pWin, aOldUIName)); + ScopedVclPtr<SfxAlienWarningDialog> aDlg(new SfxAlienWarningDialog(pWin, aOldUIName)); return aDlg->Execute() == RET_OK; } diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 357595727694..ed0c5865be33 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -464,7 +464,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) { OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() ); sMessage = sMessage.replaceAll( "$(ARG1)", aTemplName ); - VclPtr<sfx2::QueryTemplateBox> aBox(new sfx2::QueryTemplateBox(GetDialogParent(), sMessage) ); + ScopedVclPtr<sfx2::QueryTemplateBox> aBox(new sfx2::QueryTemplateBox(GetDialogParent(), sMessage) ); if ( RET_YES == aBox->Execute() ) bLoad = true; } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 2a7cb3c328c1..146d8808c9c5 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -335,7 +335,7 @@ void SfxObjectShell::CheckOut( ) } catch ( const uno::RuntimeException& e ) { - VclPtr<MessageDialog> pErrorBox(new MessageDialog( &GetFrame()->GetWindow(), e.Message )); + ScopedVclPtr<MessageDialog> pErrorBox(new MessageDialog( &GetFrame()->GetWindow(), e.Message )); pErrorBox->Execute( ); } } @@ -353,7 +353,7 @@ void SfxObjectShell::CancelCheckOut( ) } catch ( const uno::RuntimeException& e ) { - VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); + ScopedVclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); pErrorBox->Execute( ); } } @@ -364,7 +364,7 @@ void SfxObjectShell::CheckIn( ) { uno::Reference< document::XCmisDocument > xCmisDoc( GetModel(), uno::UNO_QUERY_THROW ); // Pop up dialog to ask for comment and major - VclPtr<SfxCheckinDialog> checkinDlg(new SfxCheckinDialog(&GetFrame( )->GetWindow( ))); + ScopedVclPtr<SfxCheckinDialog> checkinDlg(new SfxCheckinDialog(&GetFrame( )->GetWindow( ))); if ( checkinDlg->Execute( ) == RET_OK ) { OUString sComment = checkinDlg->GetComment( ); @@ -377,7 +377,7 @@ void SfxObjectShell::CheckIn( ) } catch ( const uno::RuntimeException& e ) { - VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); + ScopedVclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); pErrorBox->Execute( ); } } @@ -391,7 +391,7 @@ uno::Sequence< document::CmisVersion > SfxObjectShell::GetCmisVersions( ) } catch ( const uno::RuntimeException& e ) { - VclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); + ScopedVclPtr<MessageDialog> pErrorBox(new MessageDialog(&GetFrame()->GetWindow(), e.Message)); pErrorBox->Execute( ); } return uno::Sequence< document::CmisVersion > ( ); @@ -439,7 +439,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( !IsOwnStorageFormat_Impl( *GetMedium() ) ) return; - VclPtr<SfxVersionDialog> pDlg(new SfxVersionDialog( pFrame, IsSaveVersionOnClose() )); + ScopedVclPtr<SfxVersionDialog> pDlg(new SfxVersionDialog( pFrame, IsSaveVersionOnClose() )); pDlg->Execute(); SetSaveVersionOnClose( pDlg->IsSaveVersionOnClose() ); rReq.Done(); @@ -499,7 +499,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // creating dialog is done via virtual method; application will // add its own statistics page - VclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet)); + ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet)); if ( RET_OK == pDlg->Execute() ) { SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pDocInfoItem, SfxDocumentInfoItem, SID_DOCINFO, false); @@ -857,7 +857,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) case SID_DOCTEMPLATE: { // save as document templates - VclPtr<SfxTemplateManagerDlg> aDlg(new SfxTemplateManagerDlg); + ScopedVclPtr<SfxTemplateManagerDlg> aDlg(new SfxTemplateManagerDlg); aDlg->setDocumentModel(GetModel()); aDlg->setSaveMode(); aDlg->Execute(); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index c68a4b94c034..c5a26a58531c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3019,7 +3019,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl:: { sMessage += "\n"; sMessage += SfxResId(nResId).toString(); - VclPtr<WarningBox> aWBox(new WarningBox(pParent, WB_YES_NO | WB_DEF_NO, sMessage)); + ScopedVclPtr<WarningBox> aWBox(new WarningBox(pParent, WB_YES_NO | WB_DEF_NO, sMessage)); nRet = aWBox->Execute(); } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 23a000345309..5d156eb7a43d 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -624,7 +624,7 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) } else if (nMenuId == MNI_REPOSITORY_NEW) { - VclPtr<PlaceEditDialog> dlg(new PlaceEditDialog(this)); + ScopedVclPtr<PlaceEditDialog> dlg(new PlaceEditDialog(this)); if (dlg->Execute()) { @@ -639,7 +639,7 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) { OUString aMsg(SfxResId(STR_MSG_ERROR_REPOSITORY_NAME).toString()); aMsg = aMsg.replaceFirst("$1",xPlace->GetName()); - VclPtr<MessageDialog>(new MessageDialog(this, aMsg))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg)->Execute(); } } } @@ -1168,14 +1168,14 @@ void SfxTemplateManagerDlg::OnTemplateProperties () { const TemplateViewItem *pItem = static_cast<const TemplateViewItem*>(*maSelTemplates.begin()); - VclPtr<SfxTemplateInfoDlg> aDlg(new SfxTemplateInfoDlg); + ScopedVclPtr<SfxTemplateInfoDlg> aDlg(new SfxTemplateInfoDlg); aDlg->loadDocument(pItem->getPath()); aDlg->Execute(); } void SfxTemplateManagerDlg::OnTemplateDelete () { - VclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + ScopedVclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if ( aQueryDlg->Execute() != RET_YES ) return; @@ -1246,7 +1246,7 @@ void SfxTemplateManagerDlg::OnTemplateAsDefault () void SfxTemplateManagerDlg::OnFolderNew() { - VclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); + ScopedVclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); int ret = dlg->Execute(); @@ -1260,7 +1260,7 @@ void SfxTemplateManagerDlg::OnFolderNew() void SfxTemplateManagerDlg::OnFolderDelete() { - VclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + ScopedVclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if ( aQueryDlg->Execute() != RET_YES ) return; @@ -1313,7 +1313,7 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() return; } - VclPtr<InputDialog> aDlg(new InputDialog(SfxResId(STR_INPUT_TEMPLATE_NEW).toString(),this)); + ScopedVclPtr<InputDialog> aDlg(new InputDialog(SfxResId(STR_INPUT_TEMPLATE_NEW).toString(),this)); if (aDlg->Execute()) { @@ -1323,7 +1323,7 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() { OUString aFolderList; OUString aQMsg(SfxResId(STR_QMSG_TEMPLATE_OVERWRITE).toString()); - VclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, OUString(), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + ScopedVclPtr<MessageDialog> aQueryDlg(new MessageDialog(this, OUString(), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if (mpLocalView->isNonRootRegionVisible()) { @@ -1451,7 +1451,7 @@ void SfxTemplateManagerDlg::localMoveTo(sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - VclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); + ScopedVclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); int ret = dlg->Execute(); @@ -1499,7 +1499,7 @@ void SfxTemplateManagerDlg::remoteMoveTo(const sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - VclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); + ScopedVclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); int ret = dlg->Execute(); @@ -1553,7 +1553,7 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId) if (nMenuId == MNI_MOVE_NEW) { - VclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); + ScopedVclPtr<InputDialog> dlg(new InputDialog(SfxResId(STR_INPUT_NEW).toString(),this)); int ret = dlg->Execute(); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 42f18115b295..adbea8f641b5 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -495,7 +495,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() ) { // ::com::sun::star::sdbcx::User offering to open it as a template - VclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if ( RET_YES == aBox->Execute() ) { @@ -579,7 +579,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( bDo && GetFrame().DocIsModified_Impl() && !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) ) { - VclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION), + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); bDo = ( RET_YES == aBox->Execute() ); } @@ -756,7 +756,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( bForEdit && SID_EDITDOC == rReq.GetSlot() ) { // ask user for opening as template - VclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); if ( RET_YES == aBox->Execute() ) { diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 34b1690dc82b..cee8e5517781 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -595,7 +595,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if ( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - VclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); aBox->Execute(); rReq.Ignore(); } @@ -615,7 +615,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) SfxMailModel::SendMailResult eResult = aModel.SaveAndSend( xFrame, OUString() ); if( eResult == SfxMailModel::SEND_MAIL_ERROR ) { - VclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); + ScopedVclPtr<MessageDialog> aBox(new MessageDialog(SfxGetpApp()->GetTopWindow(), SfxResId( STR_ERROR_SEND_MAIL ), VCL_MESSAGE_INFO)); aBox->Execute(); rReq.Ignore(); } @@ -1311,7 +1311,7 @@ bool SfxViewShell::PrepareClose { if ( bUI ) { - VclPtr<MessageDialog> aInfoBox(new MessageDialog(&GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO )); + ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(&GetViewFrame()->GetWindow(), SfxResId( STR_CANT_CLOSE ), VCL_MESSAGE_INFO )); aInfoBox->Execute(); } |