summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx9
-rw-r--r--editeng/source/editeng/editeng.cxx8
-rw-r--r--editeng/source/misc/unolingu.cxx10
3 files changed, 20 insertions, 7 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 297fbf7a98dd..3dbdadb6af22 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -21,7 +21,7 @@
#include <memory>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/svapp.hxx>
#include <editeng/lspcitem.hxx>
@@ -482,7 +482,12 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
}
fclose( fp );
if ( bInfoBox )
- ScopedVclPtrInstance<InfoBox>(nullptr, OUString( "D:\\DEBUG.LOG !" ) )->Execute();
+ {
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ "D:\\DEBUG.LOG !" ));
+ xInfoBox->run();
+ }
}
#endif
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index a822a23406ef..0e5fdd3e596a 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -21,7 +21,7 @@
#include <comphelper/lok.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/dialog.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/svapp.hxx>
#include <svtools/ctrltool.hxx>
@@ -1042,7 +1042,11 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
bDebugPaint = !bDebugPaint;
OStringBuffer aInfo("DebugPaint: ");
aInfo.append(bDebugPaint ? "On" : "Off");
- ScopedVclPtrInstance<InfoBox>(nullptr, OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US))->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
+ VclMessageType::Info, VclButtonsType::Ok,
+ OStringToOUString(aInfo.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US)));
+ xInfoBox->run();
+
}
bDone = false;
}
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index 57c03f20d26a..6263a0db5398 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -44,8 +44,8 @@
#include <unotools/localfilehelper.hxx>
#include <ucbhelper/commandenvironment.hxx>
#include <ucbhelper/content.hxx>
-#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
#include <linguistic/misc.hxx>
#include <editeng/eerdll.hxx>
#include <editeng/editrids.hrc>
@@ -727,7 +727,7 @@ SvxDicListChgClamp::~SvxDicListChgClamp()
}
}
-short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError )
+short SvxDicError(weld::Window *pParent, linguistic::DictionaryError nError)
{
short nRes = 0;
if (linguistic::DictionaryError::NONE != nError)
@@ -741,7 +741,11 @@ short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError )
pRid = RID_SVXSTR_DIC_ERR_UNKNOWN;
SAL_WARN("editeng", "unexpected case");
}
- nRes = ScopedVclPtrInstance<InfoBox>(pParent, EditResId(pRid))->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent,
+ VclMessageType::Info, VclButtonsType::Ok,
+ EditResId(pRid)));
+ nRes = xInfoBox->run();
+
}
return nRes;
}