summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-03-30 09:24:26 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-03-30 07:53:15 +0000
commit8e97ef854fb225dac37185c1911894b7d206fa8d (patch)
tree4cc0de1ef2b775c68b5b3b4842660865c1263ff3 /include/svx
parent0e536abc286b50de171ecb0b6a57dad37467a516 (diff)
sw reqif-xhtml export: fix export of transparent TIF
Since commit 22b50f1937de67e4ad9e692d6964aa5b8d33af7a (use libtiff for tiff import, 2022-05-21), transparent TIFs are imported correctly. As the result, reqif export started to output the transparent TIF images as GIFs, because XOutFlags::UseGifIfSensible handles case of transparency, and XOutFlags::UseNativeIfPossible didn't handle TIF. Additionally, the resulting mediatype was reported incorrectly: <reqif-xhtml:object data="[...].gif" type="image/tiff" ... > 1. Handle TIFs in XOutBitmap::WriteGraphic when XOutFlags::UseNativeIfPossible is specified. 2. Return the corrected mediatype from XOutBitmap::WriteGraphic, to inform the caller about the possible change. 3. Remove the XOutFlags::UseGifIfSensible flag when doing the reqif export, to avoid the format change at all. Change-Id: I99f7cfb8d12ef66d372700ec810bd8b269868ffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149744 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/xoutbmp.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 43a666d06277..d2137f670c8a 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -59,7 +59,8 @@ public:
static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const OUString& rFilterName, const XOutFlags nFlags,
const Size* pMtfSize_100TH_MM = nullptr,
- const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr);
+ const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr,
+ OUString* pMediaType = nullptr );
static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString,
bool bAddPrefix = true,
ConvertDataFormat aTargetFormat = ConvertDataFormat::Unknown);