From e485d917058ff3c5ebf348c1e0ec28f0fa9b1b93 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 6 Sep 2022 21:35:03 +0200 Subject: 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 --- include/vcl/graphicfilter.hxx | 1 + vcl/source/filter/graphicfilter.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit