summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/Outliner.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-19 16:33:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-22 22:07:38 +0100
commit6a4c464b49dbfa2801818ead1b50bc9580824d00 (patch)
tree3d6381b6b13576bc536670992b36784436486e95 /sd/source/ui/view/Outliner.cxx
parentf7733528e88a6619f82b54b59e92a9bca72c0a89 (diff)
weld native message dialogs
just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/view/Outliner.cxx')
-rw-r--r--sd/source/ui/view/Outliner.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 45ea0dcec4fa..f25fdd32b7f8 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -29,7 +29,7 @@
#include <vcl/outdev.hxx>
#include <svx/dlgutil.hxx>
#include <svx/xtable.hxx>
-#include <vcl/layout.hxx>
+#include <vcl/weld.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
@@ -1208,8 +1208,9 @@ void SdOutliner::ShowEndOfSearchDialog()
// Show the message in an info box that is modal with respect to the
// whole application.
- ScopedVclPtrInstance< MessageDialog > aInfoBox(nullptr, aString, VclMessageType::Info);
- ShowModalMessageBox (*aInfoBox.get());
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Info, VclButtonsType::Ok, aString));
+ ShowModalMessageBox(*xInfoBox.get());
}
bool SdOutliner::ShowWrapArroundDialog()
@@ -1247,9 +1248,9 @@ bool SdOutliner::ShowWrapArroundDialog()
// Pop up question box that asks the user whether to wrap around.
// The dialog is made modal with respect to the whole application.
- ScopedVclPtrInstance<QueryBox> aQuestionBox(nullptr, MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, SdResId(pStringId));
- aQuestionBox->SetImage(QueryBox::GetStandardImage());
- sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get());
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Question, VclButtonsType::YesNo, SdResId(pStringId)));
+ sal_uInt16 nBoxResult = ShowModalMessageBox(*xQueryBox.get());
return (nBoxResult == RET_YES);
}
@@ -1685,7 +1686,7 @@ bool SdOutliner::ConvertNextDocument()
return !mbEndOfSearch;
}
-sal_uInt16 SdOutliner::ShowModalMessageBox (Dialog& rMessageBox)
+sal_uInt16 SdOutliner::ShowModalMessageBox(weld::MessageDialog& rMessageBox)
{
// We assume that the parent of the given message box is NULL, i.e. it is
// modal with respect to the top application window. However, this
@@ -1718,7 +1719,7 @@ sal_uInt16 SdOutliner::ShowModalMessageBox (Dialog& rMessageBox)
if (pSearchDialog != nullptr)
pSearchDialog->EnableInput(false);
- sal_uInt16 nResult = rMessageBox.Execute();
+ sal_uInt16 nResult = rMessageBox.run();
// Unlock the search dialog.
if (pSearchDialog != nullptr)