diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-26 10:21:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 09:47:42 +0000 |
commit | 0b21f434b45c350cd9cc5b820226245d6824bf86 (patch) | |
tree | 2db24f59783e6a91bee55fb2cd75421836f6dd60 | |
parent | Fix the WebDAV lock owner name shown on file locked dialog UI (diff) | |
download | core-0b21f434b45c350cd9cc5b820226245d6824bf86.tar.gz core-0b21f434b45c350cd9cc5b820226245d6824bf86.zip |
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
(cherry picked from commit a860df25dd7bf62ecb6b3d3ed38803b981f56d52)
Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Reviewed-on: https://gerrit.libreoffice.org/27537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
136 files changed, 258 insertions, 260 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index a245c400478b..6d3e34f874d0 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), VCL_MESSAGE_WARNING)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_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 c8bc435a4c6f..44f3b64786d9 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -481,7 +481,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 8dee9c81913b..c8d9fa669c9e 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 29d9824b1a5f..f903fcbea48b 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 ) @@ -329,7 +329,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 d0ab4a3c0658..0e6fd56efd51 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 505192801b07..35dd1818dfbf 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -613,7 +613,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), VCL_MESSAGE_WARNING)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDEResId(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute(); return; } } @@ -622,7 +622,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; @@ -695,7 +695,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 e5773252edb9..97d2690bdf7b 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VCL_MESSAGE_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; } @@ -896,7 +896,7 @@ void LibPage::InsertLib() aErrStr = aErrStr.replaceAll("XX", aLibName); aErrStr += "\n"; aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrStr)->Execute(); continue; } @@ -913,7 +913,7 @@ void LibPage::InsertLib() aErrStr = aErrStr.replaceAll("XX", aLibName); aErrStr += "\n" ; aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED); - ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, aErrStr)->Execute(); continue; } } @@ -932,7 +932,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; } } @@ -1498,15 +1498,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 f08edc8d0061..363e5ab4f61b 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 2767d016e738..fb9c7bac05cb 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -135,7 +135,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(); } @@ -750,7 +750,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 1160f34b8e79..a13248ea0605 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 639dfa8d0fd9..f4771819d290 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1519,7 +1519,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 7b0178b8dc55..ee111f790ad9 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2347,7 +2347,7 @@ 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 ), VCL_MESSAGE_INFO )->Execute(); } @@ -5235,7 +5235,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(); @@ -5357,7 +5357,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] ); @@ -5385,7 +5385,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 c9207f9ad8d8..ccf9127327ec 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 5468c9e4b5c0..dce482bd228f 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VCL_MESSAGE_INFO)->Execute(); pNameEdit->GrabFocus(); return; } diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 2dc815a8d8a7..51bd7a7bd24b 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 6cf6e03deea8..36d64cb1f388 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1009,7 +1009,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 0fa0782bf304..56be39bf89db 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1465,7 +1465,7 @@ SfxTabPage::sfxpg 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 4ab7c8ec911a..b65c3d4583b9 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -1695,7 +1695,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 de4366432e8b..25d44420edf3 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 3eab7dea9f19..0fd06c5918dc 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 3364d3e9de9c..34f3020cd112 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 2d0b1ff0cadd..4453ea11ddad 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1383,7 +1383,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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() != RET_YES) + if (ScopedVclPtrInstance<MessageDialog>(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_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 26fce195d51d..0614726f75bf 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -455,7 +455,7 @@ namespace dbaui if ( !pWin ) pWin = getView()->Window::GetParent(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, aMessage, VCL_MESSAGE_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 160dca9945f8..eac2869f6d58 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 cff9469c682b..fb900b9d530b 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 8a96808a58db..dfa1db928d8d 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1052,7 +1052,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; } @@ -1404,7 +1404,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 6794269da175..2502116d3bb7 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -404,7 +404,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 @@ -946,7 +946,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 c03287858cdf..c3bb938d900c 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 6337edf50faa..9118443279c1 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -831,7 +831,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 2aaf8bce1e81..926f2e4a36ae 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)), VCL_MESSAGE_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)), VCL_MESSAGE_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 f8f9e9f00a10..336fbf2ef451 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 01b29e6b74b4..3b950b0472ab 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -717,7 +717,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 fe3514d932bd..5e6f8a15e018 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 6051c2abfa4b..cc8950e1124e 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 cafd3af373f1..3b5d4023b375 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -809,7 +809,7 @@ SfxTabPage::sfxpg 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 4c4ede28575f..40cc3d982ed9 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(); } } @@ -4956,7 +4956,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 d8276e090c72..25aee4090de9 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -793,7 +793,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 ace439883bee..15b1278438b1 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), VCL_MESSAGE_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), VCL_MESSAGE_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 8cf0202b979d..7c7b2a6b967e 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, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, *pMsg, VCL_MESSAGE_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 eaa620a2451f..a91d3f4ad2b3 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 74c1606b4d4a..4599a426595a 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -203,7 +203,7 @@ SfxTabPage::sfxpg ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP ) if ( nReturn == KEEP_PAGE ) { - 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 be45355014a7..0581e14d883d 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 8545781c7d7b..5b9ca84c56ef 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -410,7 +410,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 ffb20f53a761..a7008964506a 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 d857b380e238..4a77b7cf1eb7 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 4d45f0a72165..0d3779a505d5 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -233,7 +233,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 4488b7bb2eff..4e684288558e 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 8d4ebec6f2b3..a8388d46e76f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -634,7 +634,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 { @@ -679,7 +679,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 { @@ -707,7 +707,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 { @@ -1190,7 +1190,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 { @@ -1374,7 +1374,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 { @@ -2088,7 +2088,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 { @@ -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 { @@ -2224,7 +2224,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 { @@ -2244,7 +2244,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 { @@ -2265,7 +2265,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 { @@ -2286,7 +2286,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 { @@ -2328,7 +2328,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 { @@ -2420,7 +2420,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 53963102144b..797db0835971 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 4f03e86cea32..bd265622f501 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -1257,7 +1257,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 f382ff321e40..17c7987902d2 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 3608334e526a..33f0d12534b7 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -585,7 +585,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 b78c09bff7cf..c801d58b0a2c 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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK) + if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_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 29eae5c9070c..68e3082daeb8 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 ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>( this, SfxResId( STR_POOL_STYLE_NAME ), VCL_MESSAGE_INFO )->Execute(); return; } diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 23a9fd3f5d79..bf66655e1647 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -125,7 +125,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 aa7f9132f299..a2360a2e7fcf 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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) { CancelCheckOut( ); @@ -1379,7 +1379,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) ) { // Only OASIS and OOo6.x formats will be handled further - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute(); return; } @@ -1413,8 +1413,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) if ( nVersion >= SvtSaveOptions::ODFVER_012 ) { - if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) - || (!bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) + if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) + || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) ) { sal_uInt16 nId = SID_SAVEDOC; if ( !GetMedium() || GetMedium()->GetName().isEmpty() ) @@ -1430,7 +1430,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 ), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute(); return; } } @@ -1445,7 +1445,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 315f8978ce48..78ccbf16ef57 100644 --- a/sfx2/source/doc/saveastemplatedlg.cxx +++ b/sfx2/source/doc/saveastemplatedlg.cxx @@ -94,7 +94,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 df1e7bf2cc22..a13c05b179a4 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -724,7 +724,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; } } @@ -845,7 +845,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(); } } @@ -1067,7 +1067,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(); } } } @@ -1156,12 +1156,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::VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, sText.replaceFirst("$1", OUString::number(nCount)), VclMessageType::VCL_MESSAGE_INFO)->Execute(); } } } @@ -1221,7 +1221,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(); } } } @@ -1251,7 +1251,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(); } } } @@ -1279,7 +1279,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 { @@ -1422,7 +1422,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 8a3bc96238af..4560057e467e 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VCL_MESSAGE_INFO)->Execute(); return false; } break; case SfxClassificationCheckPasteResult::DocClassificationTooLow: { if (!Application::IsHeadlessModeEnabled()) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VCL_MESSAGE_INFO)->Execute(); return false; } break; diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index ad240875f81d..c3380dcf62df 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, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() ) + RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VCL_MESSAGE_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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO)->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); return; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ccccfeaf8409..0ac145833c4e 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() ); @@ -721,7 +720,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() ); @@ -1020,7 +1019,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 eba45ac01734..c5e48524448f 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1864,7 +1864,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 bc6c3f7309ac..b46de7618948 100644 --- a/svtools/source/dialogs/restartdialog.cxx +++ b/svtools/source/dialogs/restartdialog.cxx @@ -98,7 +98,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 1096ea891ce5..d87088053ac0 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -531,9 +531,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 67b5d999693d..c86c729e68c7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1475,7 +1475,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; } @@ -3147,7 +3147,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 b193f7f1fc5c..fe54a7201e69 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 d942ba69e7bc..b0d49dd43c44 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1160,7 +1160,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 2c7bd27a0b8c..711ae9348977 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 47996d76c935..55715369e49a 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1024,7 +1024,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 03486c3abe19..c82405e36620 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -668,7 +668,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 4f53dff41419..4228aa3a6c77 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_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 f40210598488..ebf82363b049 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 3db1ed3cde6d..bf0b40cc4c49 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_PASSWORD), VCL_MESSAGE_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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_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), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute()) + RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_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 b1aa3308bada..a9974cd11b21 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 03b7f6269ea4..1ab72f89b660 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 b84742525609..ae7547f83c6f 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -462,7 +462,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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX)); m_pShortNameEdit->GrabFocus(); return true; @@ -599,7 +599,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) Init(); else { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO)->Execute(); } } } @@ -812,7 +812,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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute(); m_pNewShort->GrabFocus(); } else diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index d6adf602324f..0487095cda5a 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -382,7 +382,7 @@ void SwSortDlg::Apply() } if( !bRet ) - ScopedVclPtrInstance<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_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 ce1ea9b90ed7..0627784dd3c7 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -628,7 +628,7 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) OUString sTableName = m_pNameED->GetText(); if(sTableName.indexOf(' ') != -1) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO)->Execute(); m_pNameED->GrabFocus(); return KEEP_PAGE; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 38d8dad14889..cbadba7734b1 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, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VCL_MESSAGE_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, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 40d5233821d1..f72263dd6406 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 bde5c24684bd..581ee6101f74 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), VCL_MESSAGE_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, VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTemp, sInfo, VCL_MESSAGE_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 08bf9c1b29d3..07ff9119e1df 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -325,7 +325,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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO)->Execute(); } if( !pCurGrp ) delete pTmp; @@ -479,7 +479,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 e496d29c9c9e..47114389f9af 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1705,7 +1705,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, if( bMsg && nResId ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SW_RES( nResId ), VCL_MESSAGE_INFO)->Execute(); } return bRet; } @@ -1779,7 +1779,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), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO )->Execute(); } else { @@ -2157,7 +2157,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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VCL_MESSAGE_INFO)->Execute(); pDDETyp = nullptr; break; } @@ -2166,7 +2166,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if( !nRows || !nCols ) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute(); pDDETyp = nullptr; break; } @@ -2709,7 +2709,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); } return bRet; } @@ -2748,7 +2748,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute(); } return bRet; } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index c997b4a843f8..c2225b18aa94 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -265,7 +265,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 434ab27ef89a..a9b4c0d38fa2 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 b369b4e6c70a..3978f537e090 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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VCL_MESSAGE_INFO)->Execute(); } } else diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 115ba4d22865..bee281630c14 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), VCL_MESSAGE_INFO )->Execute(); + ScopedVclPtrInstance<MessageDialog>( nullptr, SW_RES(STR_SCAN_NOSOURCE), VCL_MESSAGE_INFO )->Execute(); rReq.Ignore(); } else diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index ad55f89b1265..717f4aaa2200 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2267,7 +2267,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), VCL_MESSAGE_INFO)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, SW_RES(STR_NO_MERGE_ENTRY), VCL_MESSAGE_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 30094b7edd2c..108a80e1b3da 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 e7855d887172..5736b5dd5c39 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -221,7 +221,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 9a3be2a76968..77dfc9f7a289 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 f79296fb5d32..d09f99b0b547 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -277,7 +277,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), VCL_MESSAGE_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(); } } |