diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-07-20 17:13:36 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-07-20 19:06:20 +0200 |
commit | f3b2fc2276ee8a7f64e73d9975d0143d1696362c (patch) | |
tree | 5a7d484e25f84fa1ecc5c80614632e384ad78418 /svx | |
parent | 3077399b156477963a22c6c89c432ff49583e2c3 (diff) |
sw XHTML import, improved <object> handling for images: support more formats
This was working for only png and gif in the past, handle more formats:
- bmp
- jpg
- emf
- svg
- wmf
- tif
Change-Id: I2af42157428550977f0abab88f2ed728636d2a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119287
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/_xoutbmp.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index ef2b31716a2f..a3505202310e 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -134,7 +134,11 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, { const bool bIsSvg(rFilterName.equalsIgnoreAsciiCase("svg") && VectorGraphicDataType::Svg == rVectorGraphicDataPtr->getType()); const bool bIsWmf(rFilterName.equalsIgnoreAsciiCase("wmf") && VectorGraphicDataType::Wmf == rVectorGraphicDataPtr->getType()); - const bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getType()); + bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getType()); + if (!bIsEmf) + { + bIsEmf = rGraphic.GetGfxLink().IsEMF(); + } const bool bIsPdf(rFilterName.equalsIgnoreAsciiCase("pdf") && VectorGraphicDataType::Pdf == rVectorGraphicDataPtr->getType()); if (bIsSvg || bIsWmf || bIsEmf || bIsPdf) |