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 /cui/source/options | |
parent | c410a3dcfeb68ba2247c0d879727afe4ca8ed3da (diff) |
convert remaining ErrorBox to weld::MessageDialog
and
convert remaining QueryBox to weld::MessageDialog
Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optinet2.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/personalization.cxx | 27 |
2 files changed, 25 insertions, 12 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 1b4161575e67..19de5d14b8ad 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -23,7 +23,7 @@ #include <officecfg/Office/Common.hxx> #include <officecfg/Office/Security.hxx> #include <tools/config.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <svl/intitem.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> @@ -663,8 +663,12 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl, Button*, void) } else { - ScopedVclPtrInstance< QueryBox > aQuery( this, MessBoxStyle::YesNo|MessBoxStyle::DefaultNo, m_sPasswordStoringDeactivateStr ); - sal_uInt16 nRet = aQuery->Execute(); + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Question, VclButtonsType::YesNo, + m_sPasswordStoringDeactivateStr)); + xQueryBox->set_default_response(RET_NO); + + sal_uInt16 nRet = xQueryBox->run(); if( RET_YES == nRet ) { diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 9b3e482b55d2..b6af6903d0c7 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -21,7 +21,7 @@ #include <rtl/strbuf.hxx> #include <tools/urlobj.hxx> #include <vcl/edit.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <vcl/lstbox.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -709,8 +709,11 @@ void SearchAndParseThread::execute() sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); - ScopedVclPtrInstance< ErrorBox > aBox( nullptr, MessBoxStyle::Ok, sError); - aBox->Execute(); + + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Error, VclButtonsType::Ok, + sError)); + xBox->run(); return; } } @@ -722,8 +725,10 @@ void SearchAndParseThread::execute() sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); - ScopedVclPtrInstance< ErrorBox > aBox( nullptr, MessBoxStyle::Ok, sError ); - aBox->Execute(); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Error, VclButtonsType::Ok, + sError)); + xBox->run(); return; } @@ -763,8 +768,10 @@ void SearchAndParseThread::execute() sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); - ScopedVclPtrInstance< ErrorBox > aBox( nullptr, MessBoxStyle::Ok, sError); - aBox->Execute(); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Error, VclButtonsType::Ok, + sError)); + xBox->run(); return; } continue; @@ -847,8 +854,10 @@ void SearchAndParseThread::execute() sError = CuiResId( RID_SVXSTR_SEARCHERROR ); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); - ScopedVclPtrInstance< ErrorBox > aBox( nullptr, MessBoxStyle::Ok, sError); - aBox->Execute(); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Error, VclButtonsType::Ok, + sError)); + xBox->run(); return; } |