Replace SVGFilter using SVGIO

Desktop / LibreOffice - Armin Le Grand [cib.de] - 18 May 2018 18:11 EDT

Target of this change is to get rid of the SVGFilter in current LO which is based on the standard-ODF importer using it's functionality by passing in/handing over temporary created XML-Stream-Data.

First step is to alternatively import the given SVG file to a newly created Document and to strip the existing Filter-Code.

Adding the first prototype of the changed import. It is capable of importing the given SVG to the created Draw/Impress document. It adds the SVG which gets imported by SVGIO as GraphicObject. It adapts sizes and positions of Page and GraphicObject to have a smooth import.

Adding stripping of SVGFilter and used ressources. Done as deep as possible, hopefully all places found.

Adapted now to create an Impress document. Also added needed adaptions to PageSize(s), including layout and PresObj stuff to make all MasterPages/LayoutPages work correctly.

Added reaction on empty SVG. This is needed since the PageSize is adapted to the Graphic. With empty Graphic a Size(0,0) results and this goes wrong.

Change-Id: Ia364a5783bee7dadcbe91e700efbabc121cf98f9 Reviewed-on: https://gerrit.libreoffice.org/54096

3ca7be09834a Replace SVGFilter using SVGIO
Repository.mk | 1 -
compilerplugins/clang/store/constantfunction.cxx | 4 -
filter/Executable_svg2odf.mk | 46 -
filter/Library_svgfilter.mk | 6 -
filter/Module_filter.mk | 6 -
filter/inc/parserfragments.hxx | 69 -
filter/inc/svgreader.hxx | 47 -
.../filters/SVG___Scalable_Vector_Graphics.xcu | 2 +-
filter/source/svg/b2dellipse.cxx | 27 -
filter/source/svg/b2dellipse.hxx | 51 -
filter/source/svg/parserfragments.cxx | 587 -----
filter/source/svg/svgfilter.cxx | 187 +-
filter/source/svg/svgfilter.hxx | 3 -
filter/source/svg/svgimport.cxx | 119 -
filter/source/svg/svgreader.cxx | 2304 --------------------
filter/source/svg/test/parsertest.cxx | 172 --
filter/source/svg/test/svg2odf.cxx | 134 --
filter/source/svg/tokenmap.cxx | 74 -
filter/source/svg/tokenmap.hxx | 27 -
filter/source/svg/units.cxx | 143 --
filter/source/svg/units.hxx | 59 -
include/svx/svdmodel.hxx | 10 +-
sd/inc/drawdoc.hxx | 31 +-
sd/source/core/drawdoc.cxx | 176 +-
sd/source/ui/view/viewshe2.cxx | 167 +-
svx/source/svdraw/svdmodel.cxx | 12 +
26 files changed, 454 insertions(+), 4010 deletions(-)

Upstream: cgit.freedesktop.org


  • Share