[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Feb 19 20:45:40 UTC 2018
sw/source/ui/table/tautofmt.cxx | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
New commits:
commit 869a85ad66f36292f34ffb2c0617e4eb480d9035
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Feb 19 15:40:10 2018 +0000
weld: convert delete autotable entry message dialog
Change-Id: I58d70958872725ebbe27799b8e5158c5111e117b
Reviewed-on: https://gerrit.libreoffice.org/50005
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/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 5336024736fa..f2b27433bfda 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -20,10 +20,10 @@
#include <memory>
#include <vcl/edit.hxx>
#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/builderfactory.hxx>
+#include <vcl/weld.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/BreakIterator.hpp>
@@ -370,8 +370,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl, Button*, void)
if( !bFormatInserted )
{
- bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
- ->Execute();
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Error, VclButtonsType::OkCancel, aStrInvalidFormat));
+ bOk = RET_CANCEL == xBox->run();
}
}
else
@@ -386,10 +386,11 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl, Button*, void)
aMessage += m_pLbFormat->GetSelectedEntry();
aMessage += "\n";
- VclPtrInstance<MessBox> pBox( this, MessBoxStyle::OkCancel, 0,
- aStrDelTitle, aMessage );
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Question,
+ VclButtonsType::OkCancel, aStrDelTitle));
+ xBox->set_secondary_text(aMessage);
- if ( pBox->Execute() == RET_OK )
+ if (xBox->run() == RET_OK)
{
m_pLbFormat->RemoveEntry( nDfltStylePos + nIndex );
m_pLbFormat->SelectEntryPos( nDfltStylePos + nIndex-1 );
@@ -409,7 +410,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl, Button*, void)
bCoreDataChanged = true;
}
}
- pBox.reset();
SelFormatHdl( *m_pLbFormat );
}
@@ -468,8 +468,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl, Button*, void)
if( !bFormatRenamed )
{
- bOk = RET_CANCEL == ScopedVclPtrInstance<MessageDialog>(this, aStrInvalidFormat, VclMessageType::Error, VclButtonsType::OkCancel)
- ->Execute();
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Error, VclButtonsType::OkCancel, aStrInvalidFormat));
+ bOk = RET_CANCEL == xBox->run();
}
}
else
More information about the Libreoffice-commits
mailing list