diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2022-05-15 10:05:54 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-10-26 08:18:55 +0200 |
commit | 038c4a42834014b421a2e8a99ae436eb2dc8f8c5 (patch) | |
tree | 2e519361c64ef0e940b4788bdc6df6111069ea0d /svx/source/svdraw/svdxcgv.cxx | |
parent | 110370baa621f33a095e1da908f89bdfb5a68ce6 (diff) |
lok: support embedded media
Change-Id: Ie8f3ed188cec0050a10a5d49325756931b902ef1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141807
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx/source/svdraw/svdxcgv.cxx')
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 90723501be91..f579a50911e4 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -27,6 +27,7 @@ #include <svx/svdoutl.hxx> #include <svx/svdundo.hxx> #include <svx/svdograf.hxx> +#include <svx/svdomedia.hxx> #include <svx/svdoole2.hxx> #include <svx/svdorect.hxx> #include <svx/svdopage.hxx> @@ -628,6 +629,18 @@ Graphic SdrExchangeView::GetObjGraphic(const SdrObject& rSdrObject) aRet = *pSdrOle2Obj->GetGraphic(); } } + else + { + // Support extracting a snapshot from video media, if possible. + const SdrMediaObj* pSdrMediaObj = dynamic_cast<const SdrMediaObj*>(&rSdrObject); + if (pSdrMediaObj) + { + const css::uno::Reference<css::graphic::XGraphic>& xGraphic + = pSdrMediaObj->getSnapshot(); + if (xGraphic.is()) + aRet = Graphic(xGraphic); + } + } // if graphic could not be retrieved => go the hard way and create a MetaFile if((GraphicType::NONE == aRet.GetType()) || (GraphicType::Default == aRet.GetType())) |