[Libreoffice-commits] core.git: cui/source

Caolán McNamara caolanm at redhat.com
Tue Mar 20 08:53:42 UTC 2018


 cui/source/tabpages/tplnedef.cxx |   19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 87d303201fcb9d390b0260759404ef6a2ec76b11
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 19 21:31:46 2018 +0000

    convert SvxMessDialog use to standard message dialog
    
    Change-Id: Id70d0d93027f6e9e35227b20f6a22f982b287eaa
    Reviewed-on: https://gerrit.libreoffice.org/51602
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 73f5f8c87e9e..2d55e7beb9e3 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <tools/urlobj.hxx>
-#include <vcl/msgbox.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/weld.hxx>
 #include <unotools/pathoptions.hxx>
@@ -239,16 +238,14 @@ void SvxLineDefTabPage::CheckChanges_Impl()
         m_pLbType2->IsValueChangedFromSaved() ||
         m_pMtrDistance->IsValueChangedFromSaved() )
     {
-        Image aWarningBoxImage = GetStandardWarningBoxImage();
-        ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
-                                                      SvxResId( RID_SVXSTR_LINESTYLE ),
-                                                      CuiResId(RID_SVXSTR_ASK_CHANGE_LINESTYLE),
-                                                      &aWarningBoxImage );
-        DBG_ASSERT(aMessDlg, "Dialog creation failed!");
-        aMessDlg->SetButtonText( SvxMessDialogButton::N1, CuiResId(RID_SVXSTR_CHANGE) );
-        aMessDlg->SetButtonText( SvxMessDialogButton::N2, CuiResId(RID_SVXSTR_ADD) );
-
-        short nRet = aMessDlg->Execute();
+        std::unique_ptr<weld::MessageDialog> xMessDlg(Application::CreateMessageDialog(GetFrameWeld(),
+                                                      VclMessageType::Warning, VclButtonsType::Cancel,
+                                                      CuiResId(RID_SVXSTR_ASK_CHANGE_LINESTYLE)));
+        xMessDlg->set_title(SvxResId(RID_SVXSTR_LINESTYLE));
+        xMessDlg->add_button(CuiResId(RID_SVXSTR_CHANGE), RET_BTN_1);
+        xMessDlg->add_button(CuiResId(RID_SVXSTR_ADD), RET_BTN_2);
+
+        short nRet = xMessDlg->run();
 
         switch( nRet )
         {


More information about the Libreoffice-commits mailing list