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/viewfun3.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/viewfun3.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 83b3a51edd86..623966231e62 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -32,7 +32,7 @@ #include <sot/storage.hxx> #include <vcl/graph.hxx> #include <vcl/virdev.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <tools/urlobj.hxx> #include <sot/exchange.hxx> #include <memory> @@ -1052,9 +1052,13 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, { ScWaitCursorOff aWaitOff( GetFrameWin() ); OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER ); - ScopedVclPtrInstance<QueryBox> aBox( GetViewData().GetDialogParent(), - MessBoxStyle::YesNo | MessBoxStyle::DefaultNo, aMessage ); - if ( aBox->Execute() != RET_YES ) + + vcl::Window* pWin = GetViewData().GetDialogParent(); + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + VclMessageType::Question, VclButtonsType::YesNo, + aMessage)); + xQueryBox->set_default_response(RET_NO); + if (xQueryBox->run() != RET_YES) { return false; } |