From 52533c194fa4153dfe71027b2689390edb1e7cce 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 Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134635 --- svx/source/svdraw/svdomedia.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 515bdff11b42..bc030c7d6d3f 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -146,7 +146,9 @@ uno::Reference< graphic::XGraphic > const & SdrMediaObj::getSnapshot() const OUString aRealURL = m_xImpl->m_MediaProperties.getTempURL(); if( aRealURL.isEmpty() ) aRealURL = m_xImpl->m_MediaProperties.getURL(); - m_xImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_xImpl->m_MediaProperties.getReferer(), m_xImpl->m_MediaProperties.getMimeType()); + uno::Reference xGraphic + = m_xImpl->m_MediaProperties.getGraphic().GetXGraphic(); + m_xImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_xImpl->m_MediaProperties.getReferer(), m_xImpl->m_MediaProperties.getMimeType(), xGraphic); } #endif return m_xImpl->m_xCachedSnapshot; -- cgit