summaryrefslogtreecommitdiff
path: root/sfx2/source/view
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 /sfx2/source/view
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 'sfx2/source/view')
-rw-r--r--sfx2/source/view/classificationhelper.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx8
2 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index cda045f275fb..f1914a37d191 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), VclMessageType::Info)->Execute();
+ ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VclMessageType::Info)->Execute();
return false;
}
break;
case SfxClassificationCheckPasteResult::DocClassificationTooLow:
{
if (!Application::IsHeadlessModeEnabled())
- ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VclMessageType::Info)->Execute();
+ ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VclMessageType::Info)->Execute();
return false;
}
break;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 87b0869f3fb8..2bc571e3bffd 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, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() )
+ RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::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), VclMessageType::Info)->Execute();
+ ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VclMessageType::Info)->Execute();
rReq.SetReturnValue(SfxBoolItem(0,false));
return;