summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-26 10:21:41 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-03 09:47:42 +0000
commit0b21f434b45c350cd9cc5b820226245d6824bf86 (patch)
tree2db24f59783e6a91bee55fb2cd75421836f6dd60 /sw
parentc4c30cfac570aeb0f8ac91b36b986e438e2811bc (diff)
masses of MessBoxes not being disposed promptly
since... commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. There is no special ScopedVclPtr<X>::Create or ScopedVclPtrInstance<X>::Create just VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo doesn't call dispose on the owned X (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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/viscrs.cxx2
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/ui/misc/srtdlg.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
-rw-r--r--sw/source/uibase/app/docsh.cxx5
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx4
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx12
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx6
-rw-r--r--sw/source/uibase/lingu/hyp.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx8
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx2
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
26 files changed, 47 insertions, 48 deletions
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;