From d4ab6a4693c0f3147b086173d5a9787f1f0eee34 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Mon, 16 May 2022 11:37:57 +0200 Subject: tdf#148923 PPTX import: fix incorrect image in media file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linked media file was imported with incorrect image, if the Impress couldn't play the media file. Regression from commit 9564747d2fd5d2c859a359dd7fa6242c6859c0d7 (tdf#53970 PPTX: fix import of linked media files). Change-Id: Ib277a61e83c3794376d2c090b7f742707e779832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134394 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh --- avmedia/source/viewer/mediawindow.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'avmedia') diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index d6649a2d743c..c9b7f9bf20bb 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -363,7 +363,9 @@ uno::Reference< media::XPlayer > MediaWindow::createPlayer( const OUString& rURL return priv::MediaWindowImpl::createPlayer( rURL, rReferer, pMimeType ); } -uno::Reference< graphic::XGraphic > MediaWindow::grabFrame(const css::uno::Reference& xPlayer) +uno::Reference +MediaWindow::grabFrame(const uno::Reference& xPlayer, + const uno::Reference& rGraphic) { uno::Reference< graphic::XGraphic > xRet; std::unique_ptr< Graphic > xGraphic; @@ -401,7 +403,11 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame(const css::uno::Refer } if (xGraphic) + { + if (rGraphic) + xGraphic.reset(new Graphic(rGraphic)); xRet = xGraphic->GetXGraphic(); + } return xRet; } -- cgit