diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-23 09:35:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-26 15:27:09 +0000 |
commit | 942f05996bc287923cdbcae12c64e57adf8ec975 (patch) | |
tree | 7005380763a9ecb93f5f27c28174633b9774abb7 /sc/source/ui/view/cellsh1.cxx | |
parent | c410a3dcfeb68ba2247c0d879727afe4ca8ed3da (diff) |
convert remaining ErrorBox to weld::MessageDialog
and
convert remaining QueryBox to weld::MessageDialog
Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
Diffstat (limited to 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index f24c6b4c60a6..8c8ecb6b4426 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -34,7 +34,6 @@ #include <svl/zformat.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> -#include <vcl/msgbox.hxx> #include <vcl/weld.hxx> #include <svx/svxdlg.hxx> #include <sot/formats.hxx> @@ -2015,9 +2014,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // or should create a new overlapping conditional format if(!bCondFormatDlg && bContainsExistingCondFormat) { - ScopedVclPtrInstance<QueryBox> aBox( pTabViewShell->GetDialogParent(), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, - ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS) ); - bool bEditExisting = aBox->Execute() == RET_YES; + vcl::Window* pWin = pTabViewShell->GetDialogParent(); + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + VclMessageType::Question, VclButtonsType::YesNo, + ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS))); + xQueryBox->set_default_response(RET_YES); + bool bEditExisting = xQueryBox->run() == RET_YES; if(bEditExisting) { // differentiate between ranges where one conditional format is defined @@ -2930,11 +2932,12 @@ void ScCellShell::ExecuteDataPilotDialog() if ( pDoc->HasSubTotalCells( aRange ) ) { // confirm selection if it contains SubTotal cells - - ScopedVclPtrInstance<QueryBox> aBox( pTabViewShell->GetDialogParent(), - MessBoxStyle::YesNo | MessBoxStyle::DefaultYes, - ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ); - if (aBox->Execute() == RET_NO) + vcl::Window* pWin = pTabViewShell->GetDialogParent(); + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + VclMessageType::Question, VclButtonsType::YesNo, + ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL))); + xQueryBox->set_default_response(RET_YES); + if (xQueryBox->run() == RET_NO) bOK = false; } if (bOK) |