summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/tpoption.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-26 13:28:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-27 09:52:32 +0000
commit0fad8d308122a862aa49dece498d56a418df2afe (patch)
treee67e7df1f9d315648535f436b424c9941dea589e /sd/source/ui/dlg/tpoption.cxx
parentf3a4129ed5946e2b8661dc8df23e00c4b6c6ecc8 (diff)
convert remaining WarningBox to weld::MessageDialog
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
Diffstat (limited to 'sd/source/ui/dlg/tpoption.cxx')
-rw-r--r--sd/source/ui/dlg/tpoption.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 944d1c1c06bf..a7381b2abd38 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -31,7 +31,8 @@
#include <svx/dialogs.hrc>
#include <svx/strarray.hxx>
#include <svx/dlgutil.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
#include <sdattr.hxx>
#include <sdresid.hxx>
@@ -367,9 +368,12 @@ DeactivateRC SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
FillItemSet( pActiveSet );
return DeactivateRC::LeavePage;
}
- ScopedVclPtrInstance< WarningBox > aWarnBox( GetParent(), MessBoxStyle::YesNo, SdResId( STR_WARN_SCALE_FAIL ) );
- if( aWarnBox->Execute() == RET_YES )
+ vcl::Window* pWin = GetParent();
+ std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ VclMessageType::Warning, VclButtonsType::YesNo,
+ SdResId(STR_WARN_SCALE_FAIL)));
+ if (xWarn->run() == RET_YES)
return DeactivateRC::KeepPage;
if( pActiveSet )