diff options
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 17 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviews6.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 5 |
4 files changed, 22 insertions, 12 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) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index de6c08948bd3..615bfb9e9a00 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -96,6 +96,7 @@ #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <vcl/waitobj.hxx> +#include <vcl/weld.hxx> #include <editeng/cmapitem.hxx> #include <editeng/escapementitem.hxx> @@ -1283,13 +1284,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (pObj && pObj->GetGraphicType() == GraphicType::Bitmap) { vcl::Window* pWin = GetActiveWindow(); + weld::Window* pFrame = GetFrameWeld(); GraphicAttr aGraphicAttr = pObj->GetGraphicAttr(); short nState = RET_CANCEL; if (aGraphicAttr != GraphicAttr()) // the image has been modified { - if (pWin) + if (pFrame) { - nState = GraphicHelper::HasToSaveTransformedImage(pWin); + nState = GraphicHelper::HasToSaveTransformedImage(pFrame); } } else diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index d332935e4799..f9a736b7744b 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -24,6 +24,7 @@ #include <sfx2/request.hxx> #include <sfx2/dispatch.hxx> #include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <sfx2/viewfrm.hxx> #include <svx/svdograf.hxx> #include <svx/svxids.hrc> @@ -284,9 +285,10 @@ void DrawViewShell::ExecBmpMask( SfxRequest const & rReq ) if (xNewObj->IsLinkedGraphic()) { - ScopedVclPtrInstance< MessageDialog > aQueryBox( static_cast<vcl::Window*>(GetActiveWindow()),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui"); + std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/sdraw/ui/queryunlinkimagedialog.ui")); + std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryUnlinkImageDialog")); - if (RET_YES == aQueryBox->Execute()) + if (RET_YES == xQueryBox->run()) xNewObj->ReleaseGraphicLink(); else bCont = false; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 0497d6693656..9a8c4e856198 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -1655,6 +1655,11 @@ void ViewShell::NotifyAccUpdate( ) GetViewShellBase().GetDrawController().NotifyAccUpdate(); } +weld::Window* ViewShell::GetFrameWeld() const +{ + return mpActiveWindow ? mpActiveWindow->GetFrameWeld() : nullptr; +} + sd::Window* ViewShell::GetContentWindow() const { return mpContentWindow.get(); |