summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-09-06 21:35:03 +0200
committerJulien Nabet <serval2412@yahoo.fr>2022-09-07 18:04:37 +0200
commite485d917058ff3c5ebf348c1e0ec28f0fa9b1b93 (patch)
tree5e78f477a9fdc7601aa89a8e3c344deca0a7ef05
parentce79edd7e79c28516ba43814e4f900b2c05ab23a (diff)
tdf#150808: General error importing svgz file
Change-Id: I7f2a8c6ffe4eba0c9e75913bd3e4671b0727fd94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139537 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--include/vcl/graphicfilter.hxx1
-rw-r--r--vcl/source/filter/graphicfilter.cxx2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 8985b09eab32..72a767b3d551 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -79,6 +79,7 @@ namespace o3tl
#define IMP_XBM "SVIXBM"
#define IMP_XPM "SVIXPM"
#define IMP_SVG "SVISVG"
+#define IMP_SVGZ "SVISVGZ"
#define IMP_PDF "SVIPDF"
#define IMP_TIFF "SVTIFF"
#define IMP_TGA "SVTGA"
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6aa2af7d23aa..e616c09853f4 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1428,7 +1428,7 @@ ErrCode GraphicFilter::ImportGraphic(Graphic& rGraphic, std::u16string_view rPat
{
nStatus = readJPEG(rIStream, rGraphic, eLinkType, nImportFlags);
}
- else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG))
+ else if (aFilterName.equalsIgnoreAsciiCase(IMP_SVG) || aFilterName.equalsIgnoreAsciiCase(IMP_SVGZ))
{
nStatus = readSVG(rIStream, rGraphic, eLinkType, pGraphicContent, nGraphicContentSize);
}