diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-21 21:20:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-25 20:03:26 +0100 |
commit | d75144cf44779a8f6cc9bccf9b0a6328b94a5b90 (patch) | |
tree | 25b9f3c677c50ad715e1a0bc6bef3d5bf79ef957 /dbaccess | |
parent | 8d42909cd326cb26d8ba1fb383b5578f820c72ed (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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 7 |
3 files changed, 11 insertions, 6 deletions
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 28a79c048981..12b1e62f4fe9 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -29,7 +29,7 @@ #include <sfx2/filedlghelper.hxx> #include <sfx2/docfilt.hxx> #include <vcl/stdtext.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <svl/stritem.hxx> #include <vcl/waitobj.hxx> #include <com/sun/star/sdbc/XDriverAccess.hpp> @@ -717,8 +717,10 @@ namespace dbaui if ( aFileDlg.GetCurrentFilter() != pFilter->GetUIName() || !pFilter->GetWildcard().Matches(sPath) ) { OUString sMessage(DBA_RES(STR_ERR_USE_CONNECT_TO)); - ScopedVclPtrInstance< InfoBox > aError(this, sMessage); - aError->Execute(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Info, VclButtonsType::Ok, + sMessage)); + xInfoBox->run(); m_pRB_ConnectDatabase->Check(); OnSetupModeSelected( m_pRB_ConnectDatabase ); return; diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 469102a47886..315bae099e57 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -622,7 +622,7 @@ void OSQLMessageBox::Construct( MessBoxStyle _nStyle, MessageType _eImage ) OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" ); SAL_FALLTHROUGH; case Info: - m_aInfoImage->SetImage(InfoBox::GetStandardImage()); + m_aInfoImage->SetImage(GetStandardInfoBoxImage()); break; case Warning: m_aInfoImage->SetImage(WarningBox::GetStandardImage()); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 5351959eceb8..8937943db748 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <stringconstants.hxx> #include "QTableWindow.hxx" -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <vcl/settings.hxx> #include "QueryDesignFieldUndoAct.hxx" #include <sqlmessage.hxx> @@ -523,7 +523,10 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon m_pVisibleCell->GetBox().EnableInput(false); OUString aMessage(DBA_RES(STR_QRY_ORDERBY_UNRELATED)); OQueryDesignView* paDView = getDesignView(); - ScopedVclPtrInstance<InfoBox>(paDView, aMessage)->Execute(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(paDView ? paDView->GetFrameWeld() : nullptr, + VclMessageType::Info, VclButtonsType::Ok, + aMessage)); + xInfoBox->run(); } } break; case BROW_ORDER_ROW: |