summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-03-30 10:13:12 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-03-30 09:39:32 +0000
commitab07ba6a9f89aedf4c33fbe911ed8a7d55ced1dd (patch)
treef1a548ba1d9e0dfc28c20bb28189e8db7f764ee0 /svx/source/xoutdev
parentaa8fb790e8d3f975c7ffadcb5a4fa390186c6d5d (diff)
Report correct mimetypes for TIF and EMF
Change-Id: I2eeb07780e3581eea29a9ad98b493de4e78a5d65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149745 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index d392426defb5..9fbb4d5690b5 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -155,6 +155,10 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
}
rFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+ if (pMediaType)
+ if (auto xGraphic = rGraphic.GetXGraphic().query<css::beans::XPropertySet>())
+ xGraphic->getPropertyValue("MimeType") >>= *pMediaType;
+
SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC);
SvStream* pOStm = aMedium.GetOutStream();