diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2022-05-16 11:37:57 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-05-19 10:26:01 +0200 |
commit | d4ab6a4693c0f3147b086173d5a9787f1f0eee34 (patch) | |
tree | ec1439ec593c320be8fe22067904cf238814e02a /avmedia | |
parent | 30ed714415eb6a5f200f893afa34b9d274ae8d1f (diff) |
tdf#148923 PPTX import: fix incorrect image in media file
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 <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/viewer/mediawindow.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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<css::media::XPlayer>& xPlayer) +uno::Reference<graphic::XGraphic> +MediaWindow::grabFrame(const uno::Reference<media::XPlayer>& xPlayer, + const uno::Reference<graphic::XGraphic>& 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; } |