diff options
Diffstat (limited to 'sw')
26 files changed, 47 insertions, 48 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index bde11875f6be..ca68ace23e7c 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -660,7 +660,7 @@ short SwShellCursor::MaxReplaceArived() } vActionCounts.push_back(nActCnt); } - nRet = ScopedVclPtrInstance<MessageDialog>::Create(pDlg, "AskSearchDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(pDlg, "AskSearchDialog", "modules/swriter/ui/asksearchdialog.ui")->Execute(); auto pActionCount = vActionCounts.begin(); for(SwViewShell& rShell : const_cast< SwCursorShell* >( GetShell() )->GetRingContainer()) diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index d9c1e16c0eef..c621ce918dc0 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -114,7 +114,7 @@ IMPL_LINK_NOARG_TYPED(SwBreakDlg, OkHdl, Button*, void) default:; //prevent warning } if(!bOk) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); m_pPageNumEdit->GrabFocus(); return; } diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index 620bc6e5059e..6bb081e06a4f 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -222,7 +222,7 @@ IMPL_LINK_NOARG_TYPED(SwMailConfigPage, AuthenticationHdl, Button*, void) IMPL_LINK_NOARG_TYPED(SwMailConfigPage, TestHdl, Button*, void) { - ScopedVclPtrInstance<SwTestAccountSettingsDialog>::Create(this)->Execute(); + ScopedVclPtrInstance<SwTestAccountSettingsDialog>(this)->Execute(); } SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pParent) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 097e1d435b60..5f9e64020f2d 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -182,7 +182,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, catch (const uno::Exception& e) { OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); - ScopedVclPtrInstance<MessageDialog>::Create(this, e.Message)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, e.Message)->Execute(); } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 12b0bb612cb6..60e0dd250bc7 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -413,7 +413,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); } } } @@ -978,7 +978,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, UseFileHdl, Button *, pButton, void ) bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { - if (RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) + if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } if( bFile ) @@ -1254,7 +1254,7 @@ IMPL_LINK_TYPED( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void ) } else { - ScopedVclPtrInstance<MessageDialog>::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); ChangePasswdHdl(pBox); break; } @@ -1697,7 +1697,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, voi } else { - ScopedVclPtrInstance<MessageDialog>::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); } } else if(!bChange) @@ -1721,7 +1721,7 @@ IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) if( pBox->IsChecked() ) { if( m_pWrtSh->HasSelection() && - RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) + RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute()) pBox->Check( false ); } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 8a889e042106..c1c39dd85b8d 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -643,7 +643,7 @@ IMPL_LINK_NOARG_TYPED(SwSaveLabelDlg, OkHdl, Button*, void) if ( rCfg.IsPredefinedLabel(sMake, sType) ) { SAL_WARN( "sw.envelp", "label is predefined and cannot be overwritten" ); - ScopedVclPtrInstance<MessageDialog>::Create(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute(); return; } diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index bdbe2c680e79..56734dc38fab 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -63,7 +63,7 @@ IMPL_LINK_NOARG_TYPED(SwInsertBookmarkDlg, ModifyHdl, Edit&, void) if (sTmp.getLength() != nLen) { m_pEditBox->SetText(sTmp); - ScopedVclPtr<InfoBox>::Create(this, sRemoveWarning + sMsg)->Execute(); + ScopedVclPtrInstance<InfoBox>(this, sRemoveWarning + sMsg)->Execute(); } sal_Int32 nSelectedEntries = 0; diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 63cc50410805..93fccce83ddc 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -464,7 +464,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) const OUString aShortName(m_pShortNameEdit->GetText()); if(pGlossaryHdl->HasShortName(aShortName)) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX)); m_pShortNameEdit->GrabFocus(); return true; @@ -601,7 +601,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) Init(); else { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); } } } @@ -814,7 +814,7 @@ IMPL_LINK_NOARG_TYPED(SwNewGlosNameDlg, Rename, Button*, void) if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText()) && sNew != m_pOldShort->GetText() ) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pNewShort->GrabFocus(); } else diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 3649dd90ec9e..99e42c031a69 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -364,7 +364,7 @@ void SwSortDlg::Apply() } if( !bRet ) - ScopedVclPtrInstance<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); } IMPL_LINK_TYPED( SwSortDlg, DelimHdl, Button*, pButton, void ) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c3cdf8d985ed..d1be3eb429f6 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -628,7 +628,7 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) OUString sTableName = m_pNameED->GetText(); if(sTableName.indexOf(' ') != -1) { - ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); m_pNameED->GrabFocus(); return DeactivateRC::KeepPage; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 691bf1ee647a..fc3d22dcdc50 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -357,7 +357,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) if( !bFormatInserted ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } @@ -455,7 +455,7 @@ IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) if( !bFormatRenamed ) { - bOk = RET_CANCEL == ScopedVclPtr<MessageDialog>::Create(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) + bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VCL_BUTTONS_OK_CANCEL) ->Execute(); } } diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 70fe182e63da..c0068d01db76 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -176,7 +176,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { if(!bAPICall) { - ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); } return nullptr; } @@ -543,8 +543,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); if( !xWriter.Is() ) { // Filter not available - ScopedVclPtr<InfoBox>::Create( nullptr, - SW_RESSTR(STR_DLLNOTFOUND) )->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_DLLNOTFOUND))->Execute(); return false; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 17dfe2330bdf..b4607eb74544 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1090,7 +1090,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( !bDone && !rReq.IsAPI() ) { - ScopedVclPtr<InfoBox>::Create( nullptr, SW_RESSTR( STR_CANTCREATE ))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR( STR_CANTCREATE))->Execute(); } } } diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index fe4dcff0d091..dc383d0cbce6 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -391,7 +391,7 @@ The code below would only be part of the solution. if(m_pSpellState->m_xStartRange.is()) { LockFocusNotification( true ); - sal_uInt16 nRet = ScopedVclPtr<MessageDialog>::Create(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), + sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute(); if(RET_YES == nRet) { @@ -421,7 +421,7 @@ The code below would only be part of the solution. OUString sInfo(SW_RES(STR_SPELLING_COMPLETED)); // #i84610# vcl::Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5 - ScopedVclPtrInstance<MessageDialog>::Create(pTemp, sInfo, VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTemp, sInfo, VclMessageType::Info)->Execute(); LockFocusNotification( false ); // take care that the now valid selection is stored LoseFocus(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 2735790ee134..72bea275d9d2 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -323,7 +323,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam rCfg.IsSaveRelFile(), pOnlyText ); if(nSuccess == (sal_uInt16) -1 ) { - ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); } if( !pCurGrp ) delete pTmp; @@ -477,7 +477,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, } OUString aTmp( SW_RES(STR_NOGLOS)); aTmp = aTmp.replaceFirst("%1", aShortName); - ScopedVclPtr<InfoBox>::Create( pWrtShell->GetView().GetWindow(), aTmp )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWrtShell->GetView().GetWindow(), aTmp)->Execute(); } return false; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 85e7a6ae2d4b..387ceb9ba88e 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1703,7 +1703,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, if( bMsg && nResId ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(nResId), VclMessageType::Info)->Execute(); } return bRet; } @@ -1777,7 +1777,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( !IsError( aReader.Read( *pRead )) ) bRet = true; else if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info)->Execute(); } else { @@ -2155,7 +2155,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if (nRows > USHRT_MAX || nCols > USHRT_MAX) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2164,7 +2164,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if( !nRows || !nCols ) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2707,7 +2707,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } @@ -2746,7 +2746,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index afe4e8a57660..9737b0691c73 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -270,7 +270,7 @@ void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt ) } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); } } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 1631ffac5110..9a6244ceb0f1 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1865,7 +1865,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } @@ -2041,7 +2041,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } @@ -2489,7 +2489,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else { - ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog", + ScopedVclPtrInstance<MessageDialog>(this, "InfoReadonlyDialog", "modules/swriter/ui/inforeadonlydialog.ui")->Execute(); eKeyState = KS_End; } diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index f5a4dcd1658a..dc2a33cc89ff 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -120,7 +120,7 @@ SwHyphWrapper::~SwHyphWrapper() if( nPageCount ) ::EndProgress( pView->GetDocShell() ); if( bInfoBox ) - ScopedVclPtr<InfoBox>::Create( &pView->GetEditWin(), SW_RESSTR(STR_HYP_OK) )->Execute(); + ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SW_RESSTR(STR_HYP_OK))->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index da4e49a27909..07ba09615e36 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -618,7 +618,7 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, { if(bNotFoundMessage) { - ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "InfoNotFoundDialog", + ScopedVclPtrInstance<MessageDialog>(nullptr, "InfoNotFoundDialog", "modules/swriter/ui/infonotfounddialog.ui")->Execute(); } else if(!bRecursive) @@ -627,12 +627,12 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if (!bForward) { - nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueEndDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryContinueEndDialog", "modules/swriter/ui/querycontinueenddialog.ui")->Execute(); } else { - nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueBeginDialog", + nRet = ScopedVclPtrInstance<MessageDialog>(nullptr, "QueryContinueBeginDialog", "modules/swriter/ui/querycontinuebegindialog.ui")->Execute(); } @@ -815,7 +815,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) else { vcl::Window *pTmpWindow = &GetViewFrame()->GetWindow(); - ScopedVclPtrInstance<MessageDialog>::Create(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); } } else diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 0c5c8e4b992f..5a0b42d8811b 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -183,7 +183,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) if( !bDone ) { - ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info )->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info)->Execute(); rReq.Ignore(); } else diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 9b66fdcbbc0b..80f943bd222b 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2249,7 +2249,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe if (!bCompare && !nFound) { vcl::Window* pWin = &GetEditWin(); - ScopedVclPtrInstance<MessageDialog>::Create(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); } if( nRet==2 && xDocSh.Is() ) xDocSh->DoClose(); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 094377cc3ff8..0514637477d1 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -421,7 +421,7 @@ void SwView::HyphenateDocument() // do not hyphenate if interactive hyphenation is active elsewhere if (SwEditShell::HasHyphIter()) { - ScopedVclPtr<MessBox>::Create( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), + ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute(); return; } diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index f9a116b96428..852b51019946 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -220,7 +220,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) { if( ( pSh->IsSelection() || pSh->IsFrameSelected() || pSh->IsObjSelected() ) ) { - short nBtn = ScopedVclPtr<SvxPrtQryBox>::Create(&GetEditWin())->Execute(); + short nBtn = ScopedVclPtrInstance<SvxPrtQryBox>(&GetEditWin())->Execute(); if( RET_CANCEL == nBtn ) return; diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index e3b705a8e1c2..219823f5023f 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -97,7 +97,7 @@ void SwOneExampleFrame::CreateErrorMessage() { OUString sInfo(SW_RES(STR_SERVICE_UNAVAILABLE)); sInfo += cFrameControl; - ScopedVclPtr<InfoBox>::Create(nullptr, sInfo)->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, sInfo)->Execute(); SwOneExampleFrame::bShowServiceNotAvailableMessage = false; } } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index aa61757607e1..5429a9202508 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1790,9 +1790,9 @@ void SwWrtShell::ChangeHeaderOrFooter( vcl::Window* pParent = &GetView().GetViewFrame()->GetWindow(); short nResult; if (bHeader) { - nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(pParent)->Execute(); + nResult = ScopedVclPtrInstance<DeleteHeaderDialog>(pParent)->Execute(); } else { - nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(pParent)->Execute(); + nResult = ScopedVclPtrInstance<DeleteFooterDialog>(pParent)->Execute(); } bExecute = nResult == RET_YES; |