diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 10:21:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 11:26:52 +0100 |
commit | a860df25dd7bf62ecb6b3d3ed38803b981f56d52 (patch) | |
tree | 591e39d4fc9b3da4d3b84882e69baf88baa05507 | |
parent | 87e2b0142a1724b9075f31acfc44011082ce8e12 (diff) |
masses of MessBoxes not being disposed promptly
since...
commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date: Thu May 28 21:35:43 2015 +0100
tdf#91702 - fix stack-based MessBox allocation.
There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X
Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
136 files changed, 259 insertions, 261 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 90e33aeb1df7..dcbbb3f817de 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -304,7 +304,7 @@ void ModulWindow::BasicExecute() { if ( !aDocument.allowMacros() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); return; } } @@ -434,7 +434,7 @@ void ModulWindow::LoadBasic() ErrorHandler::HandleError( nError ); } else - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTREAD))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_COULDNTREAD))->Execute(); } } @@ -475,7 +475,7 @@ void ModulWindow::SaveBasicSource() ErrorHandler::HandleError( nError ); } else - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_COULDNTWRITE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_COULDNTWRITE))->Execute(); } } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 431cf60508a1..8c863989fa04 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -480,7 +480,7 @@ bool EditorWindow::ImpCanModify() { // If in Trace-mode, abort the trace or refuse input // Remove markers in the modules in Notify at Basic::Stoped - if ( ScopedVclPtr<QueryBox>::Create( nullptr, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString() )->Execute() == RET_OK ) + if (ScopedVclPtrInstance<QueryBox>(nullptr, WB_OK_CANCEL, IDEResId(RID_STR_WILLSTOPPRG).toString())->Execute() == RET_OK) { rModulWindow.GetBasicStatus().bIsRunning = false; StopBasic(); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 5fe34036f3be..185dba446794 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -827,7 +827,7 @@ void DialogWindow::SaveDialog() } } else - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTWRITE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_COULDNTWRITE))->Execute(); } } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 50ea0d686de5..6819a7c13dc6 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -97,7 +97,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) nActModWindows++; } - if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && ScopedVclPtr<QueryBox>::Create( pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString() )->Execute() == RET_YES ) ) + if ( nActModWindows <= 1 || ( !rSearchItem.GetSelection() && ScopedVclPtrInstance<QueryBox>(pCurWin, WB_YES_NO|WB_DEF_YES, IDEResId(RID_STR_SEARCHALLMODULES).toString())->Execute() == RET_YES ) ) { for (WindowTableIt it = aWindowTable.begin(); it != aWindowTable.end(); ++it) { @@ -110,7 +110,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES)); aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound)); - ScopedVclPtr<InfoBox>::Create( pCurWin, aReplStr )->Execute(); + ScopedVclPtrInstance<InfoBox>(pCurWin, aReplStr)->Execute(); } else { @@ -177,7 +177,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SetCurWindow( pWin, true ); } if ( !nFound && !bCanceled ) - ScopedVclPtr<InfoBox>::Create( pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString() )->Execute(); + ScopedVclPtrInstance<InfoBox>(pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND).toString())->Execute(); } rReq.Done(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 7619e5635765..66c7be6c17db 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -383,7 +383,7 @@ bool Shell::PrepareClose( bool bUI ) if( bUI ) { vcl::Window *pParent = &GetViewFrame()->GetWindow(); - ScopedVclPtr<InfoBox>::Create( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE))->Execute(); } return false; } diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index d3447105263e..82a7ea2543dc 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -69,7 +69,7 @@ void Organize( sal_Int16 tabId ) aDesc = pCurWin->CreateEntryDescriptor(); vcl::Window* pParent = Application::GetDefDialogParent(); - ScopedVclPtrInstance<OrganizeDialog>::Create(pParent, tabId, aDesc)->Execute(); + ScopedVclPtrInstance<OrganizeDialog>(pParent, tabId, aDesc)->Execute(); } bool IsValidSbxName( const OUString& rName ) @@ -324,7 +324,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, { // error bError = true; - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, IDEResId(RID_STR_ERRORCHOOSEMACRO))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, IDEResId(RID_STR_ERRORCHOOSEMACRO))->Execute(); } } } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index be7e136241d1..fb57bc791ece 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -541,7 +541,7 @@ TabBarAllowRenamingReturnCode TabBar::AllowRenaming() bool const bValid = IsValidSbxName(GetEditText()); if ( !bValid ) - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); return bValid ? TABBAR_RENAMING_YES : TABBAR_RENAMING_NO; } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 3c15cbc1434a..c10aab995af5 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -609,7 +609,7 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() && !aDocument.allowMacros() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_CANNOTRUNMACRO), VclMessageType::Warning)->Execute(); return; } } @@ -618,7 +618,7 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return; @@ -691,7 +691,7 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_BADSBXNAME))->Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index de29b82b3c8b..a513944fed83 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -271,7 +271,7 @@ bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& ) OUString aLibName = GetEntryText( pEntry, 0 ); if ( aLibName.equalsIgnoreAsciiCase( "Standard" ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB))->Execute(); return false; } @@ -281,7 +281,7 @@ bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& ) if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_LIBISREADONLY))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_LIBISREADONLY))->Execute(); return false; } @@ -331,7 +331,7 @@ bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName ) } catch (const container::ElementExistException& ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED))->Execute(); return false; } catch (const container::NoSuchElementException& ) @@ -344,9 +344,9 @@ bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName ) if ( !bValid ) { if ( rNewName.getLength() > 30 ) - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_LIBNAMETOLONG))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_LIBNAMETOLONG))->Execute(); else - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); } return bValid; @@ -359,7 +359,7 @@ IMPL_LINK_NOARG_TYPED(NewObjectDialog, OkButtonHandler, Button*, void) EndDialog(1); else { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); m_pEdit->GrabFocus(); } } @@ -847,7 +847,7 @@ void LibPage::InsertLib() } if ( !pLibDlg ) - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VclMessageType::Info)->Execute(); else { bool bChanges = false; @@ -884,7 +884,7 @@ void LibPage::InsertLib() // check, if the library is the Standard library if ( aLibName == "Standard" ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_REPLACESTDLIB))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_REPLACESTDLIB))->Execute(); continue; } @@ -894,7 +894,7 @@ void LibPage::InsertLib() { OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) ); aErrStr = aErrStr.replaceAll("XX", aLibName) + "\n" + IDE_RESSTR(RID_STR_LIBISREADONLY); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrStr)->Execute(); continue; } @@ -909,7 +909,7 @@ void LibPage::InsertLib() else aErrStr = IDE_RESSTR(RID_STR_IMPORTNOTPOSSIBLE); aErrStr = aErrStr.replaceAll("XX", aLibName) + "\n" +IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrStr)->Execute(); continue; } } @@ -928,7 +928,7 @@ void LibPage::InsertLib() { OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) ); aErrStr = aErrStr.replaceAll("XX", aLibName); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrStr)->Execute(); continue; } } @@ -1494,15 +1494,15 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, if ( aLibName.getLength() > 30 ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_LIBNAMETOLONG).toString())->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, IDEResId(RID_STR_LIBNAMETOLONG).toString())->Execute(); } else if ( !IsValidSbxName( aLibName ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_BADSBXNAME).toString())->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, IDEResId(RID_STR_BADSBXNAME).toString())->Execute(); } else if ( rDocument.hasLibrary( E_SCRIPTS, aLibName ) || rDocument.hasLibrary( E_DIALOGS, aLibName ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_SBXNAMEALLREADYUSED2).toString())->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, IDEResId(RID_STR_SBXNAMEALLREADYUSED2).toString())->Execute(); } else { diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index a1eafce59e58..cf4e55776bd2 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -92,7 +92,7 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT { if ( !IsValidSbxName(rNewText) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute(); return false; } @@ -828,7 +828,7 @@ void ObjectPage::NewDialog() if ( aDocument.hasDialog( aLibName, aDlgName ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute(); } else { @@ -1043,7 +1043,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, } catch (const container::ElementExistException& ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute(); } catch (const container::NoSuchElementException& ) { diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index e10b7b356111..a9ceda6801ad 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -103,7 +103,7 @@ void BasicDLL::BasicBreak() { bJustStopping = true; StarBASIC::Stop(); - ScopedVclPtr<InfoBox>::Create( nullptr, BasResId(IDS_SBERR_TERMINATED).toString() )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, BasResId(IDS_SBERR_TERMINATED).toString())->Execute(); bJustStopping = false; } } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index b9b682358ca7..c6c1390ea87c 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -742,9 +742,9 @@ void SbiIoSystem::Shutdown() { #if defined __GNUC__ vcl::Window* pParent = Application::GetDefDialogParent(); - ScopedVclPtrInstance<MessBox>::Create( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute(); #else - ScopedVclPtrInstance<MessBox>::Create( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute(); + ScopedVclPtrInstance<MessBox>( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute(); #endif } aOut.clear(); @@ -887,10 +887,10 @@ void SbiIoSystem::WriteCon(const OUString& rText) } { SolarMutexGuard aSolarGuard; - if( !ScopedVclPtr<MessBox>::Create( + if( !ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), WinBits( WB_OK_CANCEL | WB_DEF_OK ), - OUString(), s )->Execute() ) + OUString(), s)->Execute() ) { nError = ERRCODE_BASIC_USER_ABORT; } diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 6187109918f7..d71dfa7c739a 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -131,7 +131,7 @@ void SeriesHeaderEdit::MouseButtonDown( const MouseEvent& rMEvt ) Edit::MouseButtonDown( rMEvt ); if( m_bShowWarningBox ) - ScopedVclPtr<WarningBox>::Create(this, WinBits( WB_OK ), + ScopedVclPtrInstance<WarningBox>(this, WinBits( WB_OK ), SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } @@ -746,7 +746,7 @@ void DataBrowser::MouseButtonDown( const BrowserMouseEvent& rEvt ) void DataBrowser::ShowWarningBox() { - ScopedVclPtr<WarningBox>::Create(this, WinBits( WB_OK ), + ScopedVclPtrInstance<WarningBox>(this, WinBits( WB_OK ), SCH_RESSTR(STR_INVALID_NUMBER))->Execute(); } diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index d53ba44dc376..cdf8c6484c77 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -619,7 +619,7 @@ bool ScaleTabPage::ShowWarning( sal_uInt16 nResIdMessage, Control* pControl /* = if( nResIdMessage == 0 ) return false; - ScopedVclPtr<WarningBox>::Create( this, WinBits( WB_OK ), SCH_RESSTR( nResIdMessage ) )->Execute(); + ScopedVclPtrInstance<WarningBox>(this, WinBits( WB_OK ), SCH_RESSTR(nResIdMessage))->Execute(); if( pControl ) { pControl->GrabFocus(); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index dfe6811998f3..41c6ef807770 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1516,7 +1516,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) if( ! bReturn ) { SolarMutexGuard aGuard; - ScopedVclPtr<InfoBox>::Create( m_pChartWindow, SCH_RESSTR( STR_ACTION_NOTPOSSIBLE ))->Execute(); + ScopedVclPtrInstance<InfoBox>(m_pChartWindow, SCH_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5595e6bd7316..ada85afcbdd1 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2346,9 +2346,9 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI( IMPL_LINK_NOARG_TYPED( SvxConfigPage, AsyncInfoMsg, void*, void ) { // Asynchronous msg because of D&D - ScopedVclPtr<MessageDialog>::Create( this, + ScopedVclPtrInstance<MessageDialog>(this, CUI_RES( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), - VclMessageType::Info )->Execute(); + VclMessageType::Info)->Execute(); } IMPL_LINK_TYPED( SvxConfigPage, MoveHdl, Button *, pButton, void ) @@ -5233,7 +5233,7 @@ IMPL_LINK_NOARG_TYPED( SvxIconSelectorDialog, ImportHdl, Button *, void) IMPL_LINK_NOARG_TYPED( SvxIconSelectorDialog, DeleteHdl, Button *, void ) { OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM ); - if ( ScopedVclPtr<WarningBox>::Create( this, WinBits(WB_OK_CANCEL), message )->Execute() == RET_OK ) + if (ScopedVclPtrInstance<WarningBox>(this, WinBits(WB_OK_CANCEL), message)->Execute() == RET_OK) { sal_uInt16 nCount = pTbSymbol->GetItemCount(); @@ -5355,7 +5355,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[0].lastIndexOf( '/' ); aIconName = rPaths[0].copy( aIndex+1 ); - ret = ScopedVclPtr<SvxIconReplacementDialog>::Create( this, aIconName )->ShowDialog(); + ret = ScopedVclPtrInstance<SvxIconReplacementDialog>(this, aIconName)->ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( rPaths[0] ); @@ -5383,7 +5383,7 @@ void SvxIconSelectorDialog::ImportGraphics( { aIndex = rPaths[i].lastIndexOf( '/' ); aIconName = rPaths[i].copy( aIndex+1 ); - ret = ScopedVclPtr<SvxIconReplacementDialog>::Create( this, aIconName, true )->ShowDialog(); + ret = ScopedVclPtrInstance<SvxIconReplacementDialog>(this, aIconName, true)->ShowDialog(); if ( ret == 2 ) { ReplaceGraphicItem( aPath ); diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index e0b944498af0..7fcc94334679 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -736,7 +736,7 @@ IMPL_LINK_TYPED(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProg sal_uInt16 nErrorId = (FmSearchProgress::STATE_ERROR == pProgress->aSearchState) ? RID_STR_SEARCH_GENERAL_ERROR : RID_STR_SEARCH_NORECORD; - ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RES(nErrorId))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CUI_RES(nErrorId))->Execute(); SAL_FALLTHROUGH; } case FmSearchProgress::STATE_CANCELED: diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index ca99ba88756c..9e6c715a106d 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -986,7 +986,7 @@ IMPL_LINK_NOARG_TYPED(TPGalleryThemeProperties, SelectFileTypeHdl, ComboBox&, vo { aLastFilterName = aText; - if( ScopedVclPtrInstance<MessageDialog>::Create( this, "QueryUpdateFileListDialog","cui/ui/queryupdategalleryfilelistdialog.ui" )->Execute() == RET_YES ) + if( ScopedVclPtrInstance<MessageDialog>( this, "QueryUpdateFileListDialog","cui/ui/queryupdategalleryfilelistdialog.ui" )->Execute() == RET_YES ) SearchFiles(); } } diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index c98baa8943cd..9c0b5a596274 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -284,7 +284,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); aErr = aErr.replaceFirst( "%", aFileName ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErr)->Execute(); } else { @@ -292,7 +292,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) ); aErr = aErr.replaceFirst( "%", aServerName ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErr)->Execute(); } } } @@ -333,7 +333,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); aErr = aErr.replaceFirst( "%", aFileName ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErr)->Execute(); } } } diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 39624134b669..bd4e9ade7028 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -92,7 +92,7 @@ IMPL_LINK_NOARG_TYPED(SvxMultiPathDialog, AddHdl_Impl, Button*, void) { OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); - ScopedVclPtr<InfoBox>::Create( this, sMsg )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute(); } SelectHdl_Impl( nullptr ); @@ -116,7 +116,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathSelectDialog, AddHdl_Impl, Button*, void) { OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); - ScopedVclPtr<InfoBox>::Create( this, sMsg )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute(); } else { diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index a4d6b7948ed1..40ab495e6774 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -152,7 +152,7 @@ IMPL_LINK_NOARG_TYPED(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void) if ( bFound ) { // duplicate names? - ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VclMessageType::Info)->Execute(); pNameEdit->GrabFocus(); return; } diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index b52418d9d918..fc817a31d4b8 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -132,7 +132,7 @@ void SvxNoSpaceEdit::Modify() if ( !comphelper::string::isdigitAsciiString(aValue) || (long)aValue.toInt32() > USHRT_MAX ) // the maximum value of a port number is USHRT_MAX - ScopedVclPtrInstance<MessageDialog>::Create( this, CUI_RES( RID_SVXSTR_OPT_PROXYPORTS ) )->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CUI_RES( RID_SVXSTR_OPT_PROXYPORTS))->Execute(); } } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 20a651b600c0..9fba0a917e05 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -1024,7 +1024,7 @@ IMPL_LINK_NOARG_TYPED(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void) { OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sFile ); - ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sMsg)->Execute(); } } EnableRemoveButton(); @@ -1059,7 +1059,7 @@ IMPL_LINK_NOARG_TYPED(SvxJavaClassPathDlg, AddPathHdl_Impl, Button*, void) { OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sNewFolder ); - ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sMsg)->Execute(); } } EnableRemoveButton(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d61a661d2ce8..4c4c62fd20f6 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1008,7 +1008,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() if(!pGroupInfo->m_pModule) { pGroupInfo->m_bLoadError = true; - ScopedVclPtr<InfoBox>::Create(pBox, sNotLoadedError)->Execute(); + ScopedVclPtrInstance<InfoBox>(pBox, sNotLoadedError)->Execute(); return; } if(bIdentical) diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 65bc2d1ddc96..f6fea2903635 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1429,7 +1429,7 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet ) if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && IsMarginOutOfRange() ) { - if ( ScopedVclPtr<QueryBox>::Create( this, WB_YES_NO | WB_DEF_NO, m_pPrintRangeQueryText->GetText() )->Execute() == RET_NO ) + if (ScopedVclPtrInstance<QueryBox>(this, WB_YES_NO | WB_DEF_NO, m_pPrintRangeQueryText->GetText())->Execute() == RET_NO) { MetricField* pField = nullptr; if ( IsPrinterRangeOverflow( *m_pLeftMarginEdit, nFirstLeftMargin, nLastLeftMargin, MARGIN_LEFT ) ) diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 87155bc1a3fe..6f425521dbf3 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -1468,7 +1468,7 @@ IMPL_LINK_NOARG_TYPED( SvxAreaTabPage, ClickImportHdl_Impl, Button*, void ) else { // graphic could not be loaded - ScopedVclPtrInstance<MessageDialog>::Create (this, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr)))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr)))->Execute(); } } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 00d1a7b35248..82599b085282 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -125,7 +125,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickLoadHdl_Impl, Button*, void) if( IsModified() && GetList()->Count() > 0 ) { - nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + nReturn = ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"AskSaveList" ,"cui/ui/querysavelistdialog.ui")->Execute(); @@ -179,7 +179,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickLoadHdl_Impl, Button*, void) } else { - ScopedVclPtrInstance<MessageDialog>::Create( mpTopDlg + ScopedVclPtrInstance<MessageDialog>(mpTopDlg ,"NoLoadedFileDialog" ,"cui/ui/querynoloadedfiledialog.ui")->Execute(); } @@ -247,7 +247,7 @@ IMPL_LINK_NOARG_TYPED(SvxColorTabPage, ClickSaveHdl_Impl, Button*, void) } else { - ScopedVclPtrInstance<MessageDialog>::Create( mpTopDlg + ScopedVclPtrInstance<MessageDialog>(mpTopDlg ,"NoSaveFileDialog" ,"cui/ui/querynosavefiledialog.ui")->Execute(); } diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 52ea9ddf390b..499dfb54fa20 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -726,7 +726,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void) if ( *pnDashListState & ChangeType::MODIFIED ) { - nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + nReturn = ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"AskSaveList" ,"cui/ui/querysavelistdialog.ui")->Execute(); @@ -778,7 +778,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void) } else //aIStream.Close(); - ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"NoLoadedFileDialog" ,"cui/ui/querynoloadedfiledialog.ui")->Execute(); } @@ -845,7 +845,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void) } else { - ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"NoSaveFileDialog" ,"cui/ui/querynosavefiledialog.ui")->Execute(); } diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index e2d039e41c88..511b973870a4 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -540,7 +540,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void) if ( *pnLineEndListState & ChangeType::MODIFIED ) { - nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + nReturn = ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"AskSaveList" ,"cui/ui/querysavelistdialog.ui")->Execute(); @@ -593,7 +593,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void) *pnLineEndListState &= ~ChangeType::MODIFIED; } else - ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"NoLoadedFileDialog" ,"cui/ui/querynoloadedfiledialog.ui")->Execute(); } @@ -660,7 +660,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickSaveHdl_Impl, Button*, void) } else { - ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog() + ScopedVclPtrInstance<MessageDialog>(GetParentDialog() ,"NoSaveFileDialog" ,"cui/ui/querynosavefiledialog.ui")->Execute(); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 38077829752c..af2612671873 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1380,7 +1380,7 @@ void SbaXDataBrowserController::resetted(const css::lang::EventObject& rEvent) t sal_Bool SbaXDataBrowserController::confirmDelete(const css::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception ) { - if (ScopedVclPtrInstance<MessageDialog>::Create(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) + if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) return false; return true; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 49be4caf4bd5..7efded163552 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -674,7 +674,7 @@ namespace dbaui { OUString sFile = ModuleRes( STR_FILE_DOES_NOT_EXIST ); sFile = sFile.replaceFirst("$file$", aTransformer.get(OFileNotation::N_SYSTEM)); - ScopedVclPtr<OSQLWarningBox>::Create( this, sFile )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(this, sFile)->Execute(); setURLNoPrefix(sOldPath); SetRoadmapStateValue(false); callModifiedHdl(); diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index ac71da227f04..00c5be330508 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -309,7 +309,7 @@ namespace dbaui } else return true; - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, MnemonicGenerator::EraseAllMnemonicChars(aErrorText))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, MnemonicGenerator::EraseAllMnemonicChars(aErrorText))->Execute(); pErrorWin->GrabFocus(); return false; } diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index c1c0e77453c8..ee659136ebbb 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -203,7 +203,7 @@ namespace dbaui OUString sMessage(ModuleRes(STR_COULD_NOT_CONVERT_PARAM)); sMessage = sMessage.replaceAll( "$name$", sName ); - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, sMessage)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, sMessage)->Execute(); m_pParam->GrabFocus(); return true; } diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 086d1282b77b..8027c7aed2b1 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -940,7 +940,7 @@ bool appendToFilter(const Reference<XConnection>& _xConnection, if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_rxContext)) { OUString aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED)); - ScopedVclPtr<OSQLWarningBox>::Create( _pParent, aMessage )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(_pParent, aMessage)->Execute(); bRet = false; } else diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index 5e030f2ac8fe..7d520a44d2a7 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -456,7 +456,7 @@ namespace dbaui if ( !pWin ) pWin = getView()->Window::GetParent(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, aMessage, VclMessageType::Info)->Execute(); } const Reference< XConnection >& DBSubComponentController::getConnection() const { diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index b7d4fac51ec0..8f8748c5312e 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -755,7 +755,7 @@ namespace { // only show the messagebox the first time if (!bCritsOnAsterikWarning) - ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute(); + ScopedVclPtrInstance<MessageDialog>(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute(); bCritsOnAsterikWarning = true; continue; } @@ -912,7 +912,7 @@ namespace { // only show the MessageBox the first time if (!bCritsOnAsterikWarning) - ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute(); + ScopedVclPtrInstance<MessageDialog>(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute(); bCritsOnAsterikWarning = true; continue; } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index e9d14ebfd121..8a823a0b61c3 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -523,7 +523,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon m_pVisibleCell->GetBox().EnableInput(false); OUString aMessage(ModuleRes(STR_QRY_ORDERBY_UNRELATED)); OQueryDesignView* paDView = getDesignView(); - ScopedVclPtr<InfoBox>::Create(paDView, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(paDView, aMessage)->Execute(); } } break; case BROW_ORDER_ROW: @@ -613,7 +613,7 @@ bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUSt { OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST)); sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName); - ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMsg )->Execute(); + ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMsg)->Execute(); bError = true; } else @@ -718,7 +718,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _ // something different which we have to check OUString sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",_sFieldName); - ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute(); + ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMessage)->Execute(); return true; } @@ -874,7 +874,7 @@ bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _ { // the field could not be inserted OUString sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",aSelEntry->GetField()); - ScopedVclPtr<OSQLErrorBox>::Create( this, sErrorMessage )->Execute(); + ScopedVclPtrInstance<OSQLErrorBox>(this, sErrorMessage)->Execute(); bError = true; } } @@ -1141,7 +1141,7 @@ bool OSelectionBrowseBox::SaveModified() { if ( !m_bDisableErrorBox ) { - ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(this, aErrorMsg)->Execute(); } bError = true; } @@ -1150,7 +1150,7 @@ bool OSelectionBrowseBox::SaveModified() { if ( !m_bDisableErrorBox ) { - ScopedVclPtr<OSQLWarningBox>::Create( this, aErrorMsg )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(this, aErrorMsg)->Execute(); } bError = true; } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 66a203b18314..f56bcab8c05e 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1046,7 +1046,7 @@ void OQueryController::impl_initialize() m_bGraphicalDesign = false; getContainer()->initialize(); ODataView* pWindow = getView(); - ScopedVclPtr<OSQLMessageBox>::Create(pWindow,e)->Execute(); + ScopedVclPtrInstance<OSQLMessageBox>(pWindow,e)->Execute(); } throw; } @@ -1398,7 +1398,7 @@ bool OQueryController::doSaveAsDoc(bool _bSaveAs) if ( !editingCommand() && !haveDataSource() ) { OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED)); - ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(getView(), aMessage)->Execute(); return false; } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 49dc65001157..8f51f9a4babd 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -160,7 +160,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue if(!::dbaui::checkDataSourceAvailable(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_NAME)), getORB())) { OUString aMessage(ModuleRes(STR_DATASOURCE_DELETED)); - ScopedVclPtr<OSQLWarningBox>::Create( getView(), aMessage )->Execute(); + ScopedVclPtrInstance<OSQLWarningBox>(getView(), aMessage)->Execute(); } else { diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index c7f720f09708..4a691c835c41 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -396,7 +396,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & } { SolarMutexGuard guard; - short n = ScopedVclPtrInstance<DependencyDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, deps )->Execute(); + short n = ScopedVclPtrInstance<DependencyDialog>( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, deps )->Execute(); // Distinguish between closing the dialog and programatically // canceling the dialog (headless VCL): approve = n == RET_OK @@ -940,7 +940,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates( short nDialogResult = RET_OK; if ( !dataDownload.empty() ) { - nDialogResult = ScopedVclPtrInstance<UpdateInstallDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, dataDownload, m_xContext )->Execute(); + nDialogResult = ScopedVclPtrInstance<UpdateInstallDialog>( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, dataDownload, m_xContext )->Execute(); pUpdateDialog->notifyMenubar( false, true ); // Check, if there are still pending updates to be notified via menu bar icon } else diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index ef6ab7a51412..2e984e7da7c6 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -482,7 +482,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox ) } fclose( fp ); if ( bInfoBox ) - ScopedVclPtr<InfoBox>::Create(nullptr, OUString( "D:\\DEBUG.LOG !" ) )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, OUString( "D:\\DEBUG.LOG !" ) )->Execute(); } #endif diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 970f6b3289d3..37718c5f75e4 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1031,7 +1031,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v bDebugPaint = !bDebugPaint; OStringBuffer aInfo("DebugPaint: "); aInfo.append(bDebugPaint ? "On" : "Off"); - ScopedVclPtr<InfoBox>::Create(nullptr, OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US))->Execute(); } bDone = false; } diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 17e3c08a74d4..a9d28011fb69 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -788,7 +788,7 @@ short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError ) nRid = RID_SVXSTR_DIC_ERR_UNKNOWN; SAL_WARN("editeng", "unexpected case"); } - nRes = ScopedVclPtr<InfoBox>::Create( pParent, EE_RESSTR( nRid ) )->Execute(); + nRes = ScopedVclPtrInstance<InfoBox>(pParent, EE_RESSTR(nRid))->Execute(); } return nRes; } diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index def9876347f8..a7b6c79df019 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -262,7 +262,7 @@ namespace abp if ( aTables.empty() ) { - if (RET_YES != ScopedVclPtrInstance<MessageDialog>::Create(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_YES != ScopedVclPtrInstance<MessageDialog>(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) { // cannot ask the user, or the user chose to use this data source, though there are no tables bAllow = false; diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index a9aa624770ad..eda77ceda855 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1397,7 +1397,7 @@ namespace pcr } catch(const PropertyVetoException& eVetoException) { - ScopedVclPtr<InfoBox>::Create(m_pView, eVetoException.Message)->Execute(); + ScopedVclPtrInstance<InfoBox>(m_pView, eVetoException.Message)->Execute(); PropertyHandlerRef handler = impl_getHandlerForProperty_throw( rName ); Any aNormalizedValue = handler->getPropertyValue( rName ); getPropertyBox().SetPropertyValue( rName, aNormalizedValue, false ); diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 25f56553dd0c..b28c11e76b0a 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -586,7 +586,7 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg mrJob->execute( aEmpty ); } catch(const uno::Exception&) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, ResId( STR_NO_WEBBROWSER_FOUND, *mpSfxResMgr ))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, ResId( STR_NO_WEBBROWSER_FOUND, *mpSfxResMgr))->Execute(); } } diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index d02fad0a53c9..06b663779c14 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -34,7 +34,7 @@ #include "consdlg.hxx" #include <vcl/msgbox.hxx> -#define INFOBOX(id) ScopedVclPtr<InfoBox>::Create(this, ScGlobal::GetRscString(id))->Execute() +#define INFOBOX(id) ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(id))->Execute() class ScAreaData { diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 76d84853008d..0621fad5915c 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -37,7 +37,7 @@ class DBSaveData; static DBSaveData* pSaveObj = nullptr; -#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>(this, s)->Execute() // class DBSaveData diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 5a2c6baa3fc4..23713771e4a8 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -680,7 +680,7 @@ IMPL_LINK_TYPED( ScFilterDlg, EndDlgHdl, Button*, pBtn, void ) if (!pExpander->get_expanded()) pExpander->set_expanded(true); - ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(STR_INVALID_TABREF))->Execute(); pEdCopyArea->GrabFocus(); bAreaInputOk = false; } diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 6d40b208d947..5cefb49045a1 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -171,12 +171,12 @@ IMPL_LINK_NOARG_TYPED(ScNewScenarioDlg, OkHdl, Button*, void) if ( !ScDocument::ValidTabName( aName ) ) { - ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_INVALIDTABNAME ) )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(STR_INVALIDTABNAME))->Execute(); m_pEdName->GrabFocus(); } else if ( !bIsEdit && !pDoc->ValidNewTabName( aName ) ) { - ScopedVclPtr<InfoBox>::Create( this, ScGlobal::GetRscString( STR_NEWTABNAMENOTUNIQUE ) )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, ScGlobal::GetRscString(STR_NEWTABNAMENOTUNIQUE))->Execute(); m_pEdName->GrabFocus(); } else diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 4cbe66ff405a..2a3e82d386fb 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -39,7 +39,7 @@ // DEFINE -------------------------------------------------------------------- -#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(rid))->Execute() +#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(rid))->Execute() // class ScSpecialFilterDialog diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 15d53eef9ef6..01bd5346928a 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -801,7 +801,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) if ( !bPosInputOk ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute(); m_pEdOutPos->GrabFocus(); m_pEdOutPos->SetSelection( Selection( 0, SELECTION_MAX ) ); theOutPos.Set(0,0,0); diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 2fad9d99840b..983f29d431b0 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -990,7 +990,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtr<MessBox>::Create( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance<MessBox>( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 97ab8fe7aa1d..d2b1cc852afe 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -389,7 +389,7 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) aModificator.SetDocumentModified(); if ( bOverflow ) { - ScopedVclPtr<InfoBox>::Create( nullptr, + ScopedVclPtrInstance<InfoBox>( nullptr, ScGlobal::GetRscString( STR_DETINVALID_OVERFLOW ) )->Execute(); } } @@ -4951,7 +4951,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, aMessage += aName; aMessage += aTemplate.getToken( 1, '#' ); - short nResult = ScopedVclPtr<QueryBox>::Create( ScDocShell::GetActiveDialogParent(), + short nResult = ScopedVclPtrInstance<QueryBox>( ScDocShell::GetActiveDialogParent(), WinBits(WB_YES_NO_CANCEL | WB_DEF_YES), aMessage )->Execute(); if ( nResult == RET_YES ) diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 0d2c57be0f99..59df51a3cc46 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -26,8 +26,8 @@ #include <vcl/msgbox.hxx> #include <memory> -#define ERRORBOX(s) ScopedVclPtr<MessageDialog>::Create(this, s)->Execute() -#define QUERYBOX(m) ScopedVclPtr<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() +#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>(this, s)->Execute() +#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute() const sal_uLong nEntryDataCol = 0; const sal_uLong nEntryDataRow = 1; diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index c2da83919bc2..e52eaf26547c 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -324,7 +324,7 @@ IMPL_LINK_NOARG_TYPED(ScFillSeriesDlg, OKHdl, Button*, void) EndDialog( RET_OK ); else { - ScopedVclPtr<MessageDialog>::Create(this, aErrMsgInvalidVal)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrMsgInvalidVal)->Execute(); pEdWrong->GrabFocus(); } } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index ff1714c23932..4594b3fe2adc 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -301,7 +301,7 @@ IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, DoEnterHdl, Button*, void) else { OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); - (void)ScopedVclPtrInstance<MessageDialog>::Create(this, aErrMsg)->Execute(); + (void)ScopedVclPtrInstance<MessageDialog>(this, aErrMsg)->Execute(); } } diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index e5b1cf18d401..5b15550b2492 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -783,7 +783,7 @@ IMPL_LINK_TYPED( ScOptSolverDlg, CursorDownHdl, ScCursorRefEdit&, rEdit, void ) void ScOptSolverDlg::ShowError( bool bCondition, formula::RefEdit* pFocus ) { OUString aMessage = bCondition ? maConditionError : maInputError; - ScopedVclPtrInstance<MessageDialog>::Create(this, aMessage)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMessage)->Execute(); if (pFocus) { mpEdActive = pFocus; diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index e0f4e9267d03..19033d9cb463 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -261,7 +261,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, AddHdl, Button*, void) if ( !bFmtInserted ) { - sal_uInt16 nRet = ScopedVclPtr<MessageDialog>::Create(this, + sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(STR_INVALID_AFNAME), VclMessageType::Error, VCL_BUTTONS_OK_CANCEL @@ -286,7 +286,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RemoveHdl, Button*, void) aMsg += aStrDelMsg.getToken( 1, '#' ); if ( RET_YES == - ScopedVclPtr<QueryBox>::Create( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) + ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) { m_pLbFormat->RemoveEntry( nIndex ); m_pLbFormat->SelectEntryPos( nIndex-1 ); @@ -381,7 +381,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) } if( !bFmtRenamed ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create( this, + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>( this, ScGlobal::GetRscString(STR_INVALID_AFNAME), VclMessageType::Error, VCL_BUTTONS_OK_CANCEL diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 29f0f7e3f974..34c079ac2425 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -35,7 +35,7 @@ namespace { void lclErrorDialog( vcl::Window* pParent, const OUString& aString ) { - ScopedVclPtrInstance<MessageDialog>::Create(pParent, aString)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pParent, aString)->Execute(); } } diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 06d46343a4d8..ee458748f853 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -223,7 +223,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError ) break; } - ScopedVclPtrInstance<MessageDialog>::Create(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL)->Execute(); pEd->GrabFocus(); } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 88347cb610c4..c5976d9c443f 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -189,7 +189,7 @@ void ScScenarioListBox::EditScenario() void ScScenarioListBox::DeleteScenario() { if( GetSelectEntryCount() > 0 ) - if( ScopedVclPtr<QueryBox>::Create( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) + if( ScopedVclPtrInstance<QueryBox>( nullptr, WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString( STR_QUERY_DELSCENARIO ) )->Execute() == RET_YES ) ExecuteScenarioSlot( SID_DELETE_SCENARIO ); } diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index a9834f4e69aa..adb13de41bd2 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -204,7 +204,7 @@ DeactivateRC ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP ) if ( nReturn == DeactivateRC::KeepPage ) { - ScopedVclPtr<MessageDialog>::Create( this, + ScopedVclPtrInstance<MessageDialog>( this, ScGlobal::GetRscString( STR_INVALID_EPS ) )->Execute(); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index aca56c1693c6..598d6f12b0d7 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -357,7 +357,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) ) { - nCellDir = ScopedVclPtr<ScColOrRowDlg>::Create( this, aStrCopyList, aStrCopyFrom )->Execute(); + nCellDir = ScopedVclPtrInstance<ScColOrRowDlg>(this, aStrCopyList, aStrCopyFrom)->Execute(); } else if ( nStartCol != nEndCol ) nCellDir = SCRET_ROWS; @@ -421,7 +421,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( bValueIgnored ) { - ScopedVclPtr<InfoBox>::Create( this, aStrCopyErr )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, aStrCopyErr)->Execute(); } } @@ -616,7 +616,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) aMsg += mpLbLists->GetEntry( nRemovePos ); aMsg += aStrQueryRemove.getToken( 1, '#' ); - if ( RET_YES == ScopedVclPtr<QueryBox>::Create( this, + if ( RET_YES == ScopedVclPtrInstance<QueryBox>( this, WinBits( WB_YES_NO | WB_DEF_YES ), aMsg )->Execute() ) @@ -695,7 +695,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) } else { - ScopedVclPtr<MessageDialog>::Create(this, + ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString( STR_INVALID_TABREF ) )->Execute(); mpEdCopyFrom->GrabFocus(); diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 324eeeae7846..07c4dcc572db 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -52,7 +52,7 @@ enum { }; #define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl ) -#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(nId))->Execute() +#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>(this, ScGlobal::GetRscString(nId))->Execute() // globale Funktionen (->am Ende der Datei): diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index e8766a0661bf..f88cb6c4961f 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -430,7 +430,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { if ( rReq.IsAPI() || RET_YES == - ScopedVclPtr<QueryBox>::Create( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + ScopedVclPtrInstance<QueryBox>( pTabViewShell->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString(STR_UPDATE_SCENARIO) )-> Execute() ) { diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index a2bc7999d383..ef704685447d 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -354,7 +354,7 @@ void ScDBFunc::ToggleAutoFilter() { if (!bHeader) { - if ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + if ( ScopedVclPtrInstance<MessBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), // "StarCalc" ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // header from first row? )->Execute() == RET_YES ) diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 576c349ebc58..c2904091f837 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -395,7 +395,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (rParam.bReplace) if (rDoc.TestRemoveSubTotals( nTab, rParam )) { - bOk = ( ScopedVclPtr<MessBox>::Create( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), + bOk = ( ScopedVclPtrInstance<MessBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "delete data?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_1 ) )->Execute() diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 93767c6755dd..f8b7f29fa25b 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -294,7 +294,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView ) { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); + ScopedVclPtrInstance<InfoBox>( pParent, ScGlobal::GetRscString( STR_NOLANGERR ) )->Execute(); } } @@ -322,7 +322,7 @@ void ScSpellingEngine::ShowFinishDialog() { vcl::Window* pParent = GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - ScopedVclPtr<InfoBox>::Create( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); + ScopedVclPtrInstance<InfoBox>( pParent, ScGlobal::GetRscString( STR_SPELLING_STOP_OK ) )->Execute(); } vcl::Window* ScSpellingEngine::GetDialogParent() diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index fa9ee6e5062d..63ba25e160a8 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -425,7 +425,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - nRet = ScopedVclPtr<MessageDialog>::Create(GetDialogParent(), + nRet = ScopedVclPtrInstance<MessageDialog>(GetDialogParent(), aErrMsg )->Execute(); } @@ -595,7 +595,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // no parameter given, ask for confirmation bDoIt = ( RET_YES == - ScopedVclPtr<QueryBox>::Create( GetDialogParent(), + ScopedVclPtrInstance<QueryBox>( GetDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ), ScGlobal::GetRscString(STR_QUERY_DELTAB) )->Execute() ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index a6f3d675f8cd..649c384e6347 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -438,7 +438,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, { OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) ); aMessage += aCorrectedFormula; - nResult = ScopedVclPtr<QueryBox>::Create( GetViewData().GetDialogParent(), + nResult = ScopedVclPtrInstance<QueryBox>( GetViewData().GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), aMessage )->Execute(); } diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index b0a51fe1047c..4e94a6f8f53a 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -635,7 +635,7 @@ namespace dlgprov aOUFinal += aQuoteChar; aOUFinal += aRes.copy( nIndex + 2 ); - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aOUFinal)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, aOUFinal)->Execute(); } } } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index b371fe7a71a0..b736595418a3 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -466,7 +466,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( pBMPage->GetLwrBorder() != pRefPage->GetLwrBorder()) { OUString aStr(SD_RESSTR(STR_SCALE_OBJECTS)); - sal_uInt16 nBut = ScopedVclPtr<QueryBox>::Create( nullptr, WB_YES_NO_CANCEL, aStr)->Execute(); + sal_uInt16 nBut = ScopedVclPtrInstance<QueryBox>(nullptr, WB_YES_NO_CANCEL, aStr)->Execute(); bScaleObjects = nBut == RET_YES; bContinue = nBut != RET_CANCEL; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 7ecdbe5c14fc..b3349c396094 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -234,7 +234,7 @@ void SdModule::Execute(SfxRequest& rReq) } else { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE))->Execute(); const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK); if( pLinkItem ) diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index f3671b5628e5..ea6efb81f1bc 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -531,7 +531,7 @@ IMPL_LINK_NOARG_TYPED(SdDefineCustomShowDlg, OKHdl, Button*, void) } else { - ScopedVclPtr<WarningBox>::Create( this, WinBits( WB_OK ), + ScopedVclPtrInstance<WarningBox>( this, WinBits( WB_OK ), SD_RESSTR( STR_WARN_NAME_DUPLICATE ) )->Execute(); m_pEdtName->GrabFocus(); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 926161743aa6..8d773a940e48 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -340,7 +340,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) { if (mpView->IsPresObjSelected(false, true, false, true)) { - ScopedVclPtr<InfoBox>::Create(mpWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(mpWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx index f9680f0ad320..ddc34a850764 100644 --- a/sd/source/ui/func/futhes.cxx +++ b/sd/source/ui/func/futhes.cxx @@ -112,7 +112,7 @@ void FuThesaurus::DoExecute( SfxRequest& ) if (eState == EE_SPELL_NOLANGUAGE) { - ScopedVclPtrInstance<MessageDialog>::Create(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute(); } } } @@ -139,7 +139,7 @@ void FuThesaurus::DoExecute( SfxRequest& ) if (eState == EE_SPELL_NOLANGUAGE) { - ScopedVclPtrInstance<MessageDialog>::Create(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute(); } } } diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 4343113ddcc8..df01fde9d11d 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -433,7 +433,7 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt { if (IsPresObjSelected(false)) { - ScopedVclPtr<InfoBox>::Create(mpDrawViewShell->GetActiveWindow(), + ScopedVclPtrInstance<InfoBox>(mpDrawViewShell->GetActiveWindow(), SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); bResult = false; } diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 829ee91607be..214cc7351fb1 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -604,7 +604,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -649,7 +649,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -677,7 +677,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(true,true,true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1160,7 +1160,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1344,7 +1344,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) #endif ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(nId))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(nId))->Execute(); } else { @@ -2051,7 +2051,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected( true, true, true ) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2170,7 +2170,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2187,7 +2187,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2207,7 +2207,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2228,7 +2228,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2249,7 +2249,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2291,7 +2291,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2383,7 +2383,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index fc2360803384..c390ffaf244e 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -107,7 +107,7 @@ void DrawViewShell::DeleteActualLayer() // replace placeholder aString = aString.replaceFirst("$", rName); - if (ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, aString)->Execute() == RET_YES) + if (ScopedVclPtrInstance<QueryBox>(GetActiveWindow(), WB_YES_NO, aString)->Execute() == RET_YES) { const SdrLayer* pLayer = rAdmin.GetLayer(rName, false); mpDrawView->DeleteLayer( pLayer->GetName() ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 4bfe80539068..d156e48f4a9d 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -327,9 +327,9 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } - else if ( ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, + else if ( ScopedVclPtrInstance<QueryBox>(GetActiveWindow(), WB_YES_NO, SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) )->Execute() == RET_YES ) { @@ -364,9 +364,9 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } - else if ( ScopedVclPtr<QueryBox>::Create(GetActiveWindow(), WB_YES_NO, + else if ( ScopedVclPtrInstance<QueryBox>(GetActiveWindow(), WB_YES_NO, SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) )->Execute() == RET_YES ) { @@ -672,7 +672,7 @@ void DrawViewShell::FuDeleteSelectedObjects() if (mpDrawView->IsPresObjSelected(false, true, false, true)) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); bConsumed = true; } @@ -782,7 +782,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -804,7 +804,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<InfoBox>::Create(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index b76b8717892a..d9147c711cd8 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -584,7 +584,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void) */ IMPL_LINK_NOARG_TYPED(View, DropErrorHdl, Idle *, void) { - ScopedVclPtr<InfoBox>::Create( mpViewSh ? mpViewSh->GetActiveWindow() : nullptr, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>( mpViewSh ? mpViewSh->GetActiveWindow() : nullptr, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); } /** diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index a947fd20b0e0..1f2c3dda91ef 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1253,7 +1253,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) SvtModuleOptions aModuleOpt; if ( !aModuleOpt.IsImpress() ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SFX2_RESSTR( STR_MODULENOTINSTALLED ))->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SFX2_RESSTR( STR_MODULENOTINSTALLED ))->Execute(); return; } diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index df5d5afb08f5..cfac8e848405 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -317,7 +317,7 @@ void LinkManager::UpdateAllLinks( if( bAskUpdate ) { - int nRet = ScopedVclPtr<QueryBox>::Create( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() )->Execute(); + int nRet = ScopedVclPtrInstance<QueryBox>(pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString())->Execute(); if( RET_YES != nRet ) { SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist(); diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 7b154c15be45..dcd71af622a5 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -518,7 +518,7 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName ) else return false; - ScopedVclPtrInstance<MessageDialog>::Create(pImpl->m_pParentWin, sError)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pImpl->m_pParentWin, sError)->Execute(); } } else if( !pImpl->m_bIsConnect ) diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index d820d49bb092..e58ac1090a4a 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -509,7 +509,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFi { #ifdef DBG_UTIL // Start Setup - ScopedVclPtr<InfoBox>::Create( nullptr, "Here should the Setup now be starting!" )->Execute(); + ScopedVclPtrInstance<InfoBox>( nullptr, "Here should the Setup now be starting!" )->Execute(); #endif // Installation must still give feedback if it worked or not, // then the Filterflag be deleted @@ -521,7 +521,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFi { OUString aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() ); aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() ); - ScopedVclPtr<InfoBox>::Create( nullptr, aText )->Execute(); + ScopedVclPtrInstance<InfoBox>( nullptr, aText )->Execute(); return false; } else diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 3ad5d07f87a7..86ee344304a2 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -621,7 +621,7 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s { OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString()); sMsg = sMsg.replaceFirst("$1",getRegionName(nTargetRegion)); - ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg.replaceFirst( "$2",pViewItem->maTitle))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst( "$2",pViewItem->maTitle))->Execute(); return false; //return if any single move operation fails } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 7fe6aad9844d..a2e8fc7c8d12 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1657,7 +1657,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr if ( bIsFromTypeBox ) // LoseFocus of TypeBox pLine->m_bTypeLostFocus = true; vcl::Window* pParent = GetParent()->GetParent(); - if (ScopedVclPtrInstance<MessageDialog>::Create(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK) + if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK) pLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(CUSTOM_TYPE_TEXT) ) ); else pLine->m_aValueEdit->GrabFocus(); diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 0a016939b78a..fc0d4f973a80 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -40,7 +40,7 @@ IMPL_LINK_NOARG_TYPED( SfxNewStyleDlg, OKHdl, ComboBox&, void ) { if ( !pStyle->IsUserDefined() ) { - ScopedVclPtrInstance<MessageDialog>::Create( this, SfxResId( STR_POOL_STYLE_NAME ), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>( this, SfxResId( STR_POOL_STYLE_NAME ), VclMessageType::Info )->Execute(); return; } diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 985f1b55b13f..e5151e470961 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -124,7 +124,7 @@ static bool lcl_IsPasswordCorrect( const OUString &rPassword ) if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword )) bRes = true; // password was correct else - ScopedVclPtr<InfoBox>::Create( nullptr, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD) )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD))->Execute(); return bRes; } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index a58785ead036..2ff94f7cb5a3 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -861,7 +861,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } case SID_CANCELCHECKOUT: { - if (ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) { CancelCheckOut( ); @@ -1360,7 +1360,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) ) { // Only OASIS and OOo6.x formats will be handled further - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); return; } @@ -1394,8 +1394,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) if ( nVersion >= SvtSaveOptions::ODFVER_012 ) { - if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) - || (!bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) + if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) { sal_uInt16 nId = SID_SAVEDOC; if ( !GetMedium() || GetMedium()->GetName().isEmpty() ) @@ -1411,7 +1411,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) || SotStorage::GetVersion( GetMedium()->GetStorage() ) <= SOFFICE_FILEFORMAT_60 ) ) { // Only OASIS format will be handled further - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VclMessageType::Info )->Execute(); return; } } @@ -1426,7 +1426,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) } else { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_ODF12_EXPECTED))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_ODF12_EXPECTED))->Execute(); return; } diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx index 2822e998c402..cd384ac545aa 100644 --- a/sfx2/source/doc/saveastemplatedlg.cxx +++ b/sfx2/source/doc/saveastemplatedlg.cxx @@ -95,7 +95,7 @@ IMPL_LINK_NOARG_TYPED(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void) else { OUString sText( SfxResId(STR_ERROR_SAVEAS).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, sText.replaceFirst("$1", msTemplateName))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sText.replaceFirst("$1", msTemplateName))->Execute(); } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 840e3ef104a7..f746147fa1e8 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -610,7 +610,7 @@ IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, ImportClickHdl, Button*, void) else { OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1", sCategory))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", sCategory))->Execute(); return; } } @@ -728,7 +728,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pI if (!aDeletedTemplate.isEmpty()) { OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_TEMPLATE).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1",aDeletedTemplate))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1",aDeletedTemplate))->Execute(); } } @@ -949,7 +949,7 @@ void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory) { OUString aMsg(SfxResId(STR_MSG_ERROR_IMPORT).toString()); aMsg = aMsg.replaceFirst("$1",pContItem->maTitle); - ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$2",aTemplateList))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$2",aTemplateList))->Execute(); } } } @@ -1038,12 +1038,12 @@ void SfxTemplateManagerDlg::OnTemplateExport() if (!aTemplateList.isEmpty()) { OUString aText( SfxResId(STR_MSG_ERROR_EXPORT).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aText.replaceFirst("$1",aTemplateList))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aText.replaceFirst("$1",aTemplateList))->Execute(); } else { OUString sText( SfxResId(STR_MSG_EXPORT_SUCCESS).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, sText.replaceFirst("$1", OUString::number(nCount)), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sText.replaceFirst("$1", OUString::number(nCount)), VclMessageType::Info)->Execute(); } } } @@ -1103,7 +1103,7 @@ void SfxTemplateManagerDlg::OnCategoryNew() else { OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1", aName))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", aName))->Execute(); } } } @@ -1133,7 +1133,7 @@ void SfxTemplateManagerDlg::OnCategoryRename() else { OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1", aName))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", aName))->Execute(); } } } @@ -1161,7 +1161,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete() if (!mpLocalView->removeRegion(nItemId)) { OUString sMsg( SfxResId(STR_MSG_ERROR_DELETE_FOLDER).toString() ); - ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg.replaceFirst("$1",sCategory))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst("$1",sCategory))->Execute(); } else { @@ -1228,7 +1228,7 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nItemId) OUString sDst = mpLocalView->getRegionItemName(nItemId); OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString()); sMsg = sMsg.replaceFirst("$1",sDst); - ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg.replaceFirst( "$2",pItem->maTitle))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst( "$2",pItem->maTitle))->Execute(); } } } diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index cda045f275fb..f1914a37d191 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -504,14 +504,14 @@ bool SfxClassificationHelper::ShowPasteInfo(SfxClassificationCheckPasteResult eR case SfxClassificationCheckPasteResult::TargetDocNotClassified: { if (!Application::IsHeadlessModeEnabled()) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VclMessageType::Info)->Execute(); return false; } break; case SfxClassificationCheckPasteResult::DocClassificationTooLow: { if (!Application::IsHeadlessModeEnabled()) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VclMessageType::Info)->Execute(); return false; } break; diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 87b0869f3fb8..2bc571e3bffd 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -344,7 +344,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState ) // "real" problem (not simply printing cancelled by user) OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() ); if ( !m_bApi ) - ScopedVclPtrInstance<MessageDialog>::Create(mpViewShell->GetWindow(), aMsg)->Execute(); + ScopedVclPtrInstance<MessageDialog>(mpViewShell->GetWindow(), aMsg)->Execute(); SAL_FALLTHROUGH; } case view::PrintableState_JOB_ABORTED : @@ -520,7 +520,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter ) // Ask if possible, if page format should be taken over from printer. if ( ( bOriChg || bPgSzChg ) && - RET_YES == ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() ) + RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() ) { // Flags with changes for <SetPrinter(SfxPrinter*)> are maintained nChangedFlags |= nNewOpt; @@ -793,7 +793,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // no valid printer either in ItemSet or at the document if ( !bSilent ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_NODEFPRINTER))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_NODEFPRINTER))->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); @@ -805,7 +805,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // if printer is busy, abort configuration if ( !bSilent ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VclMessageType::Info)->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); return; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index d5fe1435b2e2..c1540c91bb5d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -423,7 +423,7 @@ public: IMPL_LINK_NOARG_TYPED( SmFontSizeDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -523,10 +523,9 @@ IMPL_LINK_TYPED( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu, bool ) return false; } - IMPL_LINK_NOARG_TYPED( SmFontTypeDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -722,7 +721,7 @@ IMPL_LINK_TYPED( SmDistanceDialog, MenuSelectHdl, Menu *, pMenu, bool ) IMPL_LINK_NOARG_TYPED( SmDistanceDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); @@ -1021,7 +1020,7 @@ void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/ IMPL_LINK_NOARG_TYPED( SmAlignDialog, DefaultButtonClickHdl, Button *, void ) { - if (ScopedVclPtr<SaveDefaultsQuery>::Create(this)->Execute() == RET_YES) + if (ScopedVclPtrInstance<SaveDefaultsQuery>(this)->Execute() == RET_YES) { SmModule *pp = SM_MOD(); SmFormat aFmt( pp->GetConfig()->GetStandardFormat() ); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index eeff4a987a40..605fe7539c4b 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1858,7 +1858,7 @@ void SmViewShell::Execute(SfxRequest& rReq) SAL_WARN_IF( !pDev, "starmath", "device for font list missing" ); SmModule *pp = SM_MOD(); - ScopedVclPtrInstance<SmSymbolDialog>::Create( nullptr, pDev, pp->GetSymbolManager(), *this )->Execute(); + ScopedVclPtrInstance<SmSymbolDialog>( nullptr, pDev, pp->GetSymbolManager(), *this )->Execute(); } break; } diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx index 2c1528370109..a905d219e75a 100644 --- a/svtools/source/dialogs/restartdialog.cxx +++ b/svtools/source/dialogs/restartdialog.cxx @@ -101,7 +101,7 @@ void svtools::executeRestartDialog( css::uno::Reference< css::uno::XComponentContext > const & context, vcl::Window * parent, RestartReason reason) { - if (ScopedVclPtrInstance<RestartDialog>::Create(parent, reason)->Execute()) { + if (ScopedVclPtrInstance<RestartDialog>(parent, reason)->Execute()) { css::task::OfficeRestartManager::get(context)->requestRestart( css::uno::Reference< css::task::XInteractionHandler >()); } diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 31bf45cc34a4..165f13dd215f 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -250,7 +250,7 @@ sal_Int16 SvFilterOptionsDialog::execute() aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat ); bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) ); - if ( ScopedVclPtrInstance<ExportDialog>::Create( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection, bIsPixelFormat )->Execute() == RET_OK ) + if ( ScopedVclPtrInstance<ExportDialog>( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection, bIsPixelFormat )->Execute() == RET_OK ) nRet = ui::dialogs::ExecutableDialogResults::OK; pResMgr.reset(); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 8386822eef4a..57e1cc71ffcc 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -530,9 +530,9 @@ IMPL_LINK_TYPED( SvxHFPage, TurnOnHdl, Button *, pButton, void ) { short nResult; if (nId == SID_ATTR_PAGE_HEADERSET) - nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(this)->Execute(); + nResult = ScopedVclPtrInstance<DeleteHeaderDialog>(this)->Execute(); else - nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(this)->Execute(); + nResult = ScopedVclPtrInstance<DeleteFooterDialog>(this)->Execute(); bDelete = nResult == RET_YES; } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 983d90fffa84..0c5549f77eb1 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -736,8 +736,8 @@ IMPL_LINK_NOARG_TYPED(SvxIMapDlg, UpdateHdl, Idle *, void) if ( pOwnData->pUpdateEditingObject != pCheckObj ) { if ( pIMapWnd->IsChanged() && - ( ScopedVclPtrInstance<MessageDialog>::Create( this,"QuerySaveImageMapChangesDialog", - "svx/ui/querysaveimagemapchangesdialog.ui" )->Execute() == RET_YES ) ) + ( ScopedVclPtrInstance<MessageDialog>(this,"QuerySaveImageMapChangesDialog", + "svx/ui/querysaveimagemapchangesdialog.ui")->Execute() == RET_YES ) ) { DoSave(); } diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index 6a1430dcabae..5dc973ed2f45 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -30,7 +30,7 @@ IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, ButtonHdl, Button*, void) if ( m_pNewPasswdED->GetText() != m_pRepeatPasswdED->GetText() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, aRepeatPasswdErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aRepeatPasswdErrStr)->Execute(); m_pNewPasswdED->SetText( "" ); m_pRepeatPasswdED->SetText( "" ); m_pNewPasswdED->GrabFocus(); @@ -39,7 +39,7 @@ IMPL_LINK_NOARG_TYPED(SvxPasswordDialog, ButtonHdl, Button*, void) if ( bOK && aCheckPasswordHdl.IsSet() && !aCheckPasswordHdl.Call( this ) ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, aOldPasswdErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aOldPasswdErrStr)->Execute(); m_pOldPasswdED->SetText( "" ); m_pOldPasswdED->GrabFocus(); bOK = false; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index f81e8cb0eb94..dd67e6e42fe3 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1464,7 +1464,7 @@ void FmXFormShell::ExecuteSearch() if (m_aSearchForms.empty() ) { // es gibt keine Controls, die alle Bedingungen fuer eine Suche erfuellen - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute(); return; } @@ -3136,7 +3136,7 @@ void FmXFormShell::CreateExternalView() if (!bHaveUsableControls) { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); return; } } diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 3a5e08bba459..e3012a1d07bf 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -363,7 +363,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) case MN_DELETE: { - if( ScopedVclPtrInstance<MessageDialog>::Create( nullptr, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui")->Execute() == RET_YES ) + if( ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui")->Execute() == RET_YES ) mpGallery->RemoveTheme( mpThemes->GetSelectEntry() ); } break; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index d56141c5fc8d..c6069dec1fb7 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1133,7 +1133,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId ) case MN_DELETE: { if( !mpCurTheme->IsReadOnly() && - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui")->Execute() == RET_YES ) + ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui")->Execute() == RET_YES ) { mpCurTheme->RemoveObject( mnCurActionPos ); } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 38d52217aff5..f6d9d4045433 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -984,7 +984,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index bcd01d3a2921..ab5416fbbd7d 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1640,7 +1640,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index d8394579f46e..1b5a20af652f 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1015,7 +1015,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll) if(bHasEEFeatureItems) { OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); - ScopedVclPtr<InfoBox>::Create(nullptr, aMessage)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, aMessage)->Execute(); } } #endif diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index bde11875f6be..ca68ace23e7c 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -660,7 +660,7 @@ short SwShellCursor::MaxReplaceArived() } vActionCounts.push_back(nActCnt); } - nRet = ScopedVclPtrInstance<MessageDialog>::Create(pDlg, "AskSearchDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(pDlg, "AskSearchDialog", "modules/swriter/ui/asksearchdialog.ui")->Execute(); auto pActionCount = vActionCounts.begin(); for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer()) diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index d9c1e16c0eef..c621ce918dc0 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -114,7 +114,7 @@ IMPL_LINK_NOARG_TYPED(SwBreakDlg, OkHdl, Button*, void) default:; //prevent warning } if(!bOk) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); m_pPageNumEdit->GrabFocus(); return; } diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 620bc6e5059e..6bb081e06a4f 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -222,7 +222,7 @@ IMPL_LINK_NOARG_TYPED(SwMailConfigPage, AuthenticationHdl, Button*, void) IMPL_LINK_NOARG_TYPED(SwMailConfigPage, TestHdl, Button*, void) { - ScopedVclPtrInstance<SwTestAccountSettingsDialog>::Create(this)->Execute(); + ScopedVclPtrInstance<SwTestAccountSettingsDialog>(this)->Execute(); } SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pParent) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 097e1d435b60..5f9e64020f2d 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -182,7 +182,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, catch (const uno::Exception& e) { OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); - ScopedVclPtrInstance<MessageDialog>::Create(this, e.Message)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, e.Message)->Execute(); } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 12b0bb612cb6..60e0dd250bc7 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -413,7 +413,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); } } } @@ -978,7 +978,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, UseFileHdl, Button *, pButton, void ) bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { - if (RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } if( bFile ) @@ -1254,7 +1254,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void ) } else { - ScopedVclPtrInstance<MessageDialog>::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); ChangePasswdHdl(pBox); break; } @@ -1697,7 +1697,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, voi } else { - ScopedVclPtrInstance<MessageDialog>::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); } } else if(!bChange) @@ -1721,7 +1721,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) if( pBox->IsChecked() ) { if( m_pWrtSh->HasSelection() && - RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) + RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 8a889e042106..c1c39dd85b8d 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -643,7 +643,7 @@ IMPL_LINK_NOARG_TYPED(SwSaveLabelDlg, OkHdl, Button*, void) if ( rCfg.IsPredefinedLabel(sMake, sType) ) { SAL_WARN( "sw.envelp", "label is predefined and cannot be overwritten" ); - ScopedVclPtrInstance<MessageDialog>::Create(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute(); return; } diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index bdbe2c680e79..56734dc38fab 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -63,7 +63,7 @@ IMPL_LINK_NOARG_TYPED(SwInsertBookmarkDlg, ModifyHdl, Edit&, void) if (sTmp.getLength() != nLen) { m_pEditBox->SetText(sTmp); - ScopedVclPtr<InfoBox>::Create(this, sRemoveWarning + sMsg)->Execute(); + ScopedVclPtrInstance<InfoBox>(this, sRemoveWarning + sMsg)->Execute(); } sal_Int32 nSelectedEntries = 0; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 63cc50410805..93fccce83ddc 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -464,7 +464,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) const OUString aShortName(m_pShortNameEdit->GetText()); if(pGlossaryHdl->HasShortName(aShortName)) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX)); m_pShortNameEdit->GrabFocus(); return true; @@ -601,7 +601,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) Init(); else { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); } } } @@ -814,7 +814,7 @@ IMPL_LINK_NOARG_TYPED(SwNewGlosNameDlg, Rename, Button*, void) if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText()) && sNew != m_pOldShort->GetText() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pNewShort->GrabFocus(); } else diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 3649dd90ec9e..99e42c031a69 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -364,7 +364,7 @@ void SwSortDlg::Apply() } if( !bRet ) - ScopedVclPtrInstance<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); } IMPL_LINK_TYPED( SwSortDlg, DelimHdl, Button*, pButton, void ) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c3cdf8d985ed..d1be3eb429f6 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -628,7 +628,7 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) OUString sTableName = m_pNameED->GetText(); if(sTableName.indexOf(' ') != -1) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); m_pNameED->GrabFocus(); return DeactivateRC::KeepPage; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 691bf1ee647a..fc3d22dcdc50 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -357,7 +357,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) if( !bFormatInserted ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } @@ -455,7 +455,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) if( !bFormatRenamed ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 70fe182e63da..c0068d01db76 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -176,7 +176,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { if(!bAPICall) { - ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); } return nullptr; } @@ -543,8 +543,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); if( !xWriter.Is() ) { // Filter not available - ScopedVclPtr<InfoBox>::Create( nullptr, - SW_RESSTR(STR_DLLNOTFOUND) )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_DLLNOTFOUND))->Execute(); return false; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 17dfe2330bdf..b4607eb74544 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1090,7 +1090,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( !bDone && !rReq.IsAPI() ) { - ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR( STR_CANTCREATE ))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR( STR_CANTCREATE))->Execute(); } } } diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index fe4dcff0d091..dc383d0cbce6 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -391,7 +391,7 @@ The code below would only be part of the solution. if(m_pSpellState->m_xStartRange.is()) { LockFocusNotification( true ); - sal_uInt16 nRet = ScopedVclPtr<MessageDialog>::Create(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), + sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute(); if(RET_YES == nRet) { @@ -421,7 +421,7 @@ The code below would only be part of the solution. OUString sInfo(SW_RES(STR_SPELLING_COMPLETED)); // #i84610# vcl::Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5 - ScopedVclPtrInstance<MessageDialog>::Create(pTemp, sInfo, VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTemp, sInfo, VclMessageType::Info)->Execute(); LockFocusNotification( false ); // take care that the now valid selection is stored LoseFocus(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 2735790ee134..72bea275d9d2 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -323,7 +323,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam rCfg.IsSaveRelFile(), pOnlyText ); if(nSuccess == (sal_uInt16) -1 ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); } if( !pCurGrp ) delete pTmp; @@ -477,7 +477,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, } OUString aTmp( SW_RES(STR_NOGLOS)); aTmp = aTmp.replaceFirst("%1", aShortName); - ScopedVclPtr<InfoBox>::Create( pWrtShell->GetView().GetWindow(), aTmp )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWrtShell->GetView().GetWindow(), aTmp)->Execute(); } return false; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 85e7a6ae2d4b..387ceb9ba88e 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1703,7 +1703,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, if( bMsg && nResId ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(nResId), VclMessageType::Info)->Execute(); } return bRet; } @@ -1777,7 +1777,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( !IsError( aReader.Read( *pRead )) ) bRet = true; else if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info)->Execute(); } else { @@ -2155,7 +2155,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if (nRows > USHRT_MAX || nCols > USHRT_MAX) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2164,7 +2164,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if( !nRows || !nCols ) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2707,7 +2707,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } @@ -2746,7 +2746,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index afe4e8a57660..9737b0691c73 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -270,7 +270,7 @@ void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt ) } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); } } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 1631ffac5110..9a6244ceb0f1 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1865,7 +1865,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } @@ -2041,7 +2041,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } @@ -2489,7 +2489,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index f5a4dcd1658a..dc2a33cc89ff 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -120,7 +120,7 @@ SwHyphWrapper::~SwHyphWrapper() if( nPageCount ) ::EndProgress( pView->GetDocShell() ); if( bInfoBox ) - ScopedVclPtr<InfoBox>::Create( &pView->GetEditWin(), SW_RESSTR(STR_HYP_OK) )->Execute(); + ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SW_RESSTR(STR_HYP_OK))->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index da4e49a27909..07ba09615e36 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -618,7 +618,7 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, { if(bNotFoundMessage) { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "InfoNotFoundDialog", + ScopedVclPtrInstance<MessageDialog>(nullptr, "InfoNotFoundDialog", "modules/swriter/ui/infonotfounddialog.ui")->Execute(); } else if(!bRecursive) @@ -627,12 +627,12 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if (!bForward) { - nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueEndDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryContinueEndDialog", "modules/swriter/ui/querycontinueenddialog.ui")->Execute(); } else { - nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueBeginDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryContinueBeginDialog", "modules/swriter/ui/querycontinuebegindialog.ui")->Execute(); } @@ -815,7 +815,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) else { vcl::Window *pTmpWindow = &GetViewFrame()->GetWindow(); - ScopedVclPtrInstance<MessageDialog>::Create(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); } } else diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 0c5c8e4b992f..5a0b42d8811b 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -183,7 +183,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) if( !bDone ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info)->Execute(); rReq.Ignore(); } else diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 9b66fdcbbc0b..80f943bd222b 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2249,7 +2249,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe if (!bCompare && !nFound) { vcl::Window* pWin = &GetEditWin(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); } if( nRet==2 && xDocSh.Is() ) xDocSh->DoClose(); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 094377cc3ff8..0514637477d1 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -421,7 +421,7 @@ void SwView::HyphenateDocument() // do not hyphenate if interactive hyphenation is active elsewhere if (SwEditShell::HasHyphIter()) { - ScopedVclPtr<MessBox>::Create( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), + ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute(); return; } diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f9a116b96428..852b51019946 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -220,7 +220,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) { if( ( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() ) ) { - short nBtn = ScopedVclPtr<SvxPrtQryBox>::Create(&GetEditWin())->Execute(); + short nBtn = ScopedVclPtrInstance<SvxPrtQryBox>(&GetEditWin())->Execute(); if( RET_CANCEL == nBtn ) return; diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index e3b705a8e1c2..219823f5023f 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -97,7 +97,7 @@ void SwOneExampleFrame::CreateErrorMessage() { OUString sInfo(SW_RES(STR_SERVICE_UNAVAILABLE)); sInfo += cFrameControl; - ScopedVclPtr<InfoBox>::Create(nullptr, sInfo)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, sInfo)->Execute(); SwOneExampleFrame::bShowServiceNotAvailableMessage = false; } } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index aa61757607e1..5429a9202508 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1790,9 +1790,9 @@ void SwWrtShell::ChangeHeaderOrFooter( vcl::Window* pParent = &GetView().GetViewFrame()->GetWindow(); short nResult; if (bHeader) { - nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(pParent)->Execute(); + nResult = ScopedVclPtrInstance<DeleteHeaderDialog>(pParent)->Execute(); } else { - nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(pParent)->Execute(); + nResult = ScopedVclPtrInstance<DeleteFooterDialog>(pParent)->Execute(); } bExecute = nResult == RET_YES; diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 196ccb01fdb5..e7456a9a72b2 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -276,7 +276,7 @@ bool DigitalSignaturesDialog::canAddRemove() //It the user presses 'Add' or 'Remove' several times then, then the warning //is shown every time until the user presses 'OK'. From then on, the warning //is not displayed anymore as long as the signatures dialog is alive. - if (ScopedVclPtr<MessageDialog>::Create( + if (ScopedVclPtrInstance<MessageDialog>( nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_NO) ret = false; else diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index d9987108c60d..5ced7d40d20b 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -294,7 +294,7 @@ IMPL_LINK_NOARG_TYPED(MyWin, VerifyDigitalSignaturesHdl, Button*, void) if ( !rInf.SignatureIsValid ) aText.append( "NOT " ); aText.append( "valid" ); - ScopedVclPtr<InfoBox>::Create( this, aText )->Execute(); + ScopedVclPtrInstance<InfoBox>(this, aText)->Execute(); } } |