summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-26 10:21:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-26 11:26:52 +0100
commita860df25dd7bf62ecb6b3d3ed38803b981f56d52 (patch)
tree591e39d4fc9b3da4d3b84882e69baf88baa05507 /sw/source/uibase/uiview
parent87e2b0142a1724b9075f31acfc44011082ce8e12 (diff)
masses of MessBoxes not being disposed promptly
since... commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f Date: Thu May 28 21:35:43 2015 +0100 tdf#91702 - fix stack-based MessBox allocation. There is no special ScopedVclPtr<X>::Create or ScopedVclPtrInstance<X>::Create just VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo doesn't call dispose on the owned X Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
Diffstat (limited to 'sw/source/uibase/uiview')
-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
5 files changed, 8 insertions, 8 deletions
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;