summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-21 21:20:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-25 20:03:26 +0100
commitd75144cf44779a8f6cc9bccf9b0a6328b94a5b90 (patch)
tree25b9f3c677c50ad715e1a0bc6bef3d5bf79ef957 /cui/source
parent8d42909cd326cb26d8ba1fb383b5578f820c72ed (diff)
convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/SpellDialog.cxx3
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx8
-rw-r--r--cui/source/dialogs/multipat.cxx11
-rw-r--r--cui/source/options/optdict.cxx4
-rw-r--r--cui/source/options/treeopt.cxx7
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
7 files changed, 24 insertions, 13 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 94b02b86b56d..7d5ce9d4da6b 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3478,7 +3478,7 @@ SvxIconChangeDialog::SvxIconChangeDialog(
pLineEditDescription->set_width_request(aSize.Width());
pLineEditDescription->set_height_request(aSize.Height());
- pFImageInfo->SetImage(InfoBox::GetStandardImage());
+ pFImageInfo->SetImage(GetStandardInfoBoxImage());
pLineEditDescription->SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() );
pLineEditDescription->SetText(aMessage);
}
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 95e611a313cb..2bc16dc0df0e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -18,6 +18,7 @@
*/
#include <memory>
+#include <vcl/weld.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/menu.hxx>
#include <vcl/layout.hxx>
@@ -900,7 +901,7 @@ void SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu const *p
}
if (DictionaryError::NONE != nAddRes)
{
- SvxDicError( this, nAddRes );
+ SvxDicError(GetFrameWeld(), nAddRes);
return; // don't continue
}
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index ef138dc257a2..7c64d613c1b6 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -25,7 +25,7 @@
#include <vcl/errinf.hxx>
#include <ucbhelper/content.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/weld.hxx>
#include <avmedia/mediawindow.hxx>
#include <unotools/pathoptions.hxx>
@@ -562,8 +562,10 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, Button*, void)
aStr += " (" + pInfo->GetThemeName() + ")";
- ScopedVclPtrInstance< InfoBox > aBox( this, aStr );
- aBox->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok,
+ aStr));
+ xInfoBox->run();
m_pLbResName->GrabFocus();
bDifferentThemeExists = true;
}
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 27f576713467..eccc81553ebd 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -21,7 +21,8 @@
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
#include <sfx2/filedlghelper.hxx>
#include <multipat.hxx>
@@ -92,7 +93,9 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void)
{
OUString sMsg( CuiResId( RID_MULTIPATH_DBL_ERR ) );
sMsg = sMsg.replaceFirst( "%1", sInsPath );
- ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok, sMsg));
+ xInfoBox->run();
}
SelectHdl_Impl( nullptr );
@@ -116,7 +119,9 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, Button*, void)
{
OUString sMsg( CuiResId( RID_MULTIPATH_DBL_ERR ) );
sMsg = sMsg.replaceFirst( "%1", sInsPath );
- ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok, sMsg));
+ xInfoBox->run();
}
else
{
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 7b4e4ea5797e..30eb207acbc2 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -180,7 +180,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void)
xNewDic = nullptr;
// error: couldn't create new dictionary
SfxErrorContext aContext( ERRCTX_SVX_LINGU_DICTIONARY, OUString(),
- this, RID_SVXERRCTX, SvxResLocale() );
+ GetFrameWeld(), RID_SVXERRCTX, SvxResLocale() );
ErrorHandler::HandleError( *new StringErrorInfo(
ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE, sDict ) );
EndDialog();
@@ -646,7 +646,7 @@ bool SvxEditDictionaryDialog::NewDelHdl(void const * pBtn)
}
}
if (DictionaryError::NONE != nAddRes)
- SvxDicError( this, nAddRes );
+ SvxDicError(GetFrameWeld(), nAddRes);
if(DictionaryError::NONE == nAddRes && !sEntry.isEmpty())
{
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 877f2cfa6a95..8bfd3462b8c9 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -101,7 +101,7 @@
#include <unotools/viewoptions.hxx>
#include <vcl/help.hxx>
#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/waitobj.hxx>
#include <vcl/settings.hxx>
#include <svtools/treelistentry.hxx>
@@ -974,7 +974,10 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
if(!pGroupInfo->m_pModule)
{
pGroupInfo->m_bLoadError = true;
- ScopedVclPtrInstance<InfoBox>(pBox, sNotLoadedError)->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pBox->GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok,
+ sNotLoadedError));
+ xInfoBox->run();
return;
}
if(bIdentical)
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index ddf8dcb024b4..a89591b092de 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -880,7 +880,7 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl()
{
SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND,
OUString(),
- this,
+ GetFrameWeld(),
RID_SVXERRCTX,
SvxResLocale() );