diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-05-26 16:26:35 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-28 08:44:31 +0000 |
commit | 1379e2feaad6344999358bbfb271edbaea66ce2a (patch) | |
tree | f2d15c298b21e8aa83ec4bbc025ca0561896906e /sfx2/source/view/viewprn.cxx | |
parent | f9e0e3a4eb8a23bfb9fb66055511c53d120e6579 (diff) |
Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like
ADialog(some params).Execute()
by
ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute()
Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639
Reviewed-on: https://gerrit.libreoffice.org/15915
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 5655d61b7a50..3f238fb9d965 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -343,7 +343,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt // "real" problem (not simply printing cancelled by user) OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() ); if ( !m_bApi ) - MessageDialog(mpViewShell->GetWindow(), aMsg).Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(mpViewShell->GetWindow(), aMsg)->Execute(); // intentionally no break } case view::PrintableState_JOB_ABORTED : @@ -521,7 +521,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter ) // Ask if possible, if page format should be taken over from printer. if ( ( bOriChg || bPgSzChg ) && - RET_YES == MessageDialog(NULL, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() ) + RET_YES == ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() ) { // Flags with changes for <SetPrinter(SfxPrinter*)> are maintained nChangedFlags |= nNewOpt; @@ -794,7 +794,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // no valid printer either in ItemSet or at the document if ( !bSilent ) - MessageDialog(NULL, SfxResId(STR_NODEFPRINTER)).Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_NODEFPRINTER))->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); @@ -806,7 +806,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // if printer is busy, abort configuration if ( !bSilent ) - MessageDialog(NULL, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO).Execute(); + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO)->Execute(); rReq.SetReturnValue(SfxBoolItem(0,false)); return; |