summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx4
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/filldlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx6
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx2
-rw-r--r--sc/source/ui/navipi/scenwnd.cxx2
-rw-r--r--sc/source/ui/optdlg/tpcalc.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx8
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/view/cellsh3.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/spelleng.cxx4
-rw-r--r--sc/source/ui/view/tabvwshf.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
25 files changed, 35 insertions, 35 deletions
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();
}