diff options
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 3 | ||||
-rw-r--r-- | avmedia/source/viewer/mediawindow.cxx | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 59f6c3cce90e..23cf4944e11c 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -28,6 +28,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/lstbox.hxx> +#include <vcl/weld.hxx> #include <unotools/syslocale.hxx> #include <sfx2/viewfrm.hxx> #include <math.h> @@ -299,7 +300,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void ) if (MediaWindow::executeMediaURLDialog(this, aURL, nullptr)) { if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) ) - MediaWindow::executeFormatErrorBox( this ); + MediaWindow::executeFormatErrorBox(GetFrameWeld()); else { aExecItem.setURL( aURL, "", ""/*TODO?*/ ); diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index df416bb96db7..4d8ad4edec5c 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -23,7 +23,8 @@ #include <bitmaps.hlst> #include <strings.hrc> #include <tools/urlobj.hxx> -#include <vcl/layout.hxx> +#include <vcl/svapp.hxx> +#include <vcl/weld.hxx> #include <unotools/pathoptions.hxx> #include <sfx2/filedlghelper.hxx> #include <comphelper/processfactory.hxx> @@ -295,16 +296,13 @@ bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rU return !rURL.isEmpty(); } - -void MediaWindow::executeFormatErrorBox( vcl::Window* pParent ) +void MediaWindow::executeFormatErrorBox(weld::Widget* pParent) { - ScopedVclPtrInstance< MessageDialog > aErrBox( pParent, AvmResId( AVMEDIA_STR_ERR_URL ) ); - - aErrBox->Execute(); - aErrBox.disposeAndClear(); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent, + VclMessageType::Warning, VclButtonsType::Ok, AvmResId(AVMEDIA_STR_ERR_URL))); + xBox->run(); } - bool MediaWindow::isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep, Size* pPreferredSizePixel ) { const INetURLObject aURL( rURL ); |