diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 13:28:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-27 09:52:32 +0000 |
commit | 0fad8d308122a862aa49dece498d56a418df2afe (patch) | |
tree | e67e7df1f9d315648535f436b424c9941dea589e /chart2 | |
parent | f3a4129ed5946e2b8661dc8df23e00c4b6c6ecc8 (diff) |
convert remaining WarningBox to weld::MessageDialog
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
Diffstat (limited to 'chart2')
20 files changed, 15 insertions, 26 deletions
diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index afce85d48159..30880931d066 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -147,7 +147,6 @@ #include <vcl/metaact.hxx> #include <vcl/metaactiontypes.hxx> #include <vcl/metric.hxx> -#include <vcl/msgbox.hxx> #include <vcl/notebookbar.hxx> #include <vcl/outdev.hxx> #include <vcl/outdevmap.hxx> diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index b16a20a57401..2864c840a353 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -36,7 +36,6 @@ #include <vcl/fixed.hxx> #include <vcl/image.hxx> #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> #include <vcl/weld.hxx> #include <vcl/settings.hxx> #include <rtl/math.hxx> @@ -131,8 +130,12 @@ void SeriesHeaderEdit::MouseButtonDown( const MouseEvent& rMEvt ) Edit::MouseButtonDown( rMEvt ); if( m_bShowWarningBox ) - ScopedVclPtrInstance<WarningBox>(this, MessBoxStyle::Ok, - SchResId(STR_INVALID_NUMBER))->Execute(); + { + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, + SchResId(STR_INVALID_NUMBER))); + xWarn->run(); + } } class SeriesHeader @@ -752,8 +755,10 @@ void DataBrowser::MouseButtonDown( const BrowserMouseEvent& rEvt ) void DataBrowser::ShowWarningBox() { - ScopedVclPtrInstance<WarningBox>(this, MessBoxStyle::Ok, - SchResId(STR_INVALID_NUMBER))->Execute(); + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, + SchResId(STR_INVALID_NUMBER))); + xWarn->run(); } bool DataBrowser::ShowQueryBox() diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index ff9ecc746ebd..29b8cfc7185b 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -24,7 +24,6 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <toolkit/awt/vclxwindow.hxx> -#include <vcl/msgbox.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/supportsservice.hxx> #include <comphelper/servicehelper.hxx> diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index 9392444e8494..d30b01cfe212 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -23,7 +23,6 @@ #include <ResId.hxx> #include <sfx2/dispatch.hxx> -#include <vcl/msgbox.hxx> #include <vcl/taskpanelist.hxx> #include <svtools/miscopt.hxx> #include <unotools/pathoptions.hxx> diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index 0c666cba08c7..60c7a153ea62 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -28,7 +28,6 @@ #include "tp_DataSource.hxx" #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> // for RET_OK using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx index 7b731f863bd2..8c7e97122f08 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.cxx +++ b/chart2/source/controller/dialogs/dlg_View3D.cxx @@ -28,8 +28,6 @@ #include <ControllerLockGuard.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -#include <vcl/msgbox.hxx> - namespace chart { diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index a81c46a51d5f..fb3cc7783eb8 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -29,7 +29,6 @@ #include <svl/ilstitem.hxx> #include <editeng/eeitem.hxx> #include <editeng/frmdiritem.hxx> -#include <vcl/msgbox.hxx> #include <svx/svxids.hrc> #include <svl/zforlist.hxx> #include <svtools/controldims.hxx> diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 0c63a6f003c2..4e759a59ed24 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -28,7 +28,6 @@ #include <svx/dialmgr.hxx> #include <rtl/math.hxx> #include <svtools/colrdlg.hxx> -#include <vcl/msgbox.hxx> #include <svx/svx3ditems.hxx> #include <svx/svddef.hxx> #include <vcl/builderfactory.hxx> diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index 9225d9831967..6e0edb6fb9d0 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -30,7 +30,6 @@ #include <svx/chrtitem.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> -#include <vcl/msgbox.hxx> #include <svl/zformat.hxx> #include <svtools/controldims.hxx> diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index d69f88aed855..f1d0df70a1de 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -31,7 +31,6 @@ #include <svtools/miscopt.hxx> #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> namespace chart { diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index ea5c7f6ef704..2e6db479409e 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -34,7 +34,6 @@ #include <com/sun/star/util/XModifiable.hpp> #include <com/sun/star/chart2/data/XDataSink.hpp> -#include <vcl/msgbox.hxx> #include <rtl/ustrbuf.hxx> #include <functional> diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 024341aa2bc1..868dc2812a2b 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -29,7 +29,7 @@ #include <svx/chrtitem.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <svl/zformat.hxx> #include <svtools/controldims.hxx> @@ -614,7 +614,10 @@ bool ScaleTabPage::ShowWarning(const char* pResIdMessage, Control* pControl /* = if (pResIdMessage == nullptr) return false; - ScopedVclPtrInstance<WarningBox>(this, MessBoxStyle::Ok, SchResId(pResIdMessage))->Execute(); + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, + SchResId(pResIdMessage))); + xWarn->run(); if( pControl ) { pControl->GrabFocus(); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index bb2e6c71eabb..8ad8cb32ce3b 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -69,7 +69,6 @@ #include <com/sun/star/chart2/XDataProviderAccess.hpp> #include <svx/sidebar/SelectionChangeHandler.hxx> -#include <vcl/msgbox.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index 3ad6b90b8770..a274a1e402df 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -27,7 +27,6 @@ #include <ResId.hxx> #include <strings.hrc> -#include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/chart2/XChartDocument.hpp> diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 5ad74c244d2f..3589d0cc2d02 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -55,7 +55,6 @@ #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <svx/ActionDescriptionProvider.hxx> -#include <vcl/msgbox.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/svapp.hxx> diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index e0dee1b7f8d1..3c11b591d469 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -31,7 +31,6 @@ #include <CommonConverters.hxx> #include <svx/ActionDescriptionProvider.hxx> -#include <vcl/msgbox.hxx> #include <svx/svxids.hrc> #include <svx/rectenum.hxx> #include <svl/aeitem.hxx> diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index 46f5579542ad..bcbe8d303930 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -54,7 +54,6 @@ #include <memory> -#include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <svx/ActionDescriptionProvider.hxx> diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 9c129617fc6a..5b5378b5f7d1 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -31,7 +31,6 @@ #include <chartview/DrawModelWrapper.hxx> #include <svx/svdotext.hxx> -#include <vcl/msgbox.hxx> #include <svx/svdoutl.hxx> #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index d00f9e73a2dc..e3df574732de 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -72,7 +72,6 @@ #include <svx/svddrgmt.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <vcl/msgbox.hxx> #include <vcl/weld.hxx> #include <rtl/math.hxx> #include <svtools/acceleratorexecute.hxx> diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index aabf175e0e33..6abf9a97f1ed 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/frame/CommandGroup.hpp> #include <com/sun/star/frame/XStorable.hpp> -#include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <editeng/formatbreakitem.hxx> #include <svx/dialogs.hrc> |