summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-23 09:35:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-26 15:27:09 +0000
commit942f05996bc287923cdbcae12c64e57adf8ec975 (patch)
tree7005380763a9ecb93f5f27c28174633b9774abb7 /svx
parentc410a3dcfeb68ba2247c0d879727afe4ca8ed3da (diff)
convert remaining ErrorBox to weld::MessageDialog
and convert remaining QueryBox to weld::MessageDialog Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/prtqry.cxx2
-rw-r--r--svx/source/form/databaselocationinput.cxx13
2 files changed, 8 insertions, 7 deletions
diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx
index 3f8ddf0934d4..6be88dff8c31 100644
--- a/svx/source/dialog/prtqry.cxx
+++ b/svx/source/dialog/prtqry.cxx
@@ -27,7 +27,7 @@ SvxPrtQryBox::SvxPrtQryBox(vcl::Window* pParent) :
SvxResId(RID_SVXSTR_QRY_PRINT_TITLE),
SvxResId(RID_SVXSTR_QRY_PRINT_MSG))
{
- SetImage( QueryBox::GetStandardImage() );
+ SetImage(GetStandardQueryBoxImage());
AddButton(SvxResId(RID_SVXSTR_QRY_PRINT_SELECTION), RET_OK,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index fd2497e38a11..1f024b4bba50 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -34,13 +34,11 @@
#include <unotools/confignode.hxx>
#include <unotools/ucbhelper.hxx>
#include <vcl/button.hxx>
-#include <vcl/msgbox.hxx>
-
+#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
namespace svx
{
-
-
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XComponentContext;
@@ -124,8 +122,11 @@ namespace svx
{
if ( ::utl::UCBContentHelper::Exists( sURL ) )
{
- ScopedVclPtrInstance< QueryBox > aBox( m_rLocationInput.GetSystemWindow(), MessBoxStyle::YesNo, SvxResId(RID_STR_ALREADYEXISTOVERWRITE) );
- if ( aBox->Execute() != RET_YES )
+ vcl::Window* pWin = m_rLocationInput.GetSystemWindow();
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ VclMessageType::Question, VclButtonsType::YesNo,
+ SvxResId(RID_STR_ALREADYEXISTOVERWRITE)));
+ if (xQueryBox->run() != RET_YES)
return false;
}
}