diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-10 17:49:19 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-18 20:11:35 +0200 |
commit | 3ca7be09834a26fbd1c371deabd7a58111092676 (patch) | |
tree | 560c1ee287e529b8879bbc2375b5a48f87c65a51 /sd/inc | |
parent | c845135b7b605257b5c94b382d88627282cb05a3 (diff) |
Replace SVGFilter using SVGIO
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
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'sd/inc')
-rw-r--r-- | sd/inc/drawdoc.hxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index ac824cf90653..a302fa6eb726 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -77,6 +77,7 @@ struct SpellCallbackInfo; class SdDrawDocument; class SdCustomShow; class SdCustomShowList; +class SdUndoGroup; namespace sd { @@ -202,8 +203,34 @@ protected: public: - SAL_DLLPRIVATE SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh); - SAL_DLLPRIVATE virtual ~SdDrawDocument() override; + SAL_DLLPRIVATE SdDrawDocument(DocumentType eType, SfxObjectShell* pDocSh); + SAL_DLLPRIVATE virtual ~SdDrawDocument() override; + + // Adapt to given Size and Borders scaling all contained data, maybe + // including PresObj's in higher derivations + virtual void adaptSizeAndBorderForAllPages( + const Size& rNewSize, + long nLeft = 0, + long nRight = 0, + long nUpper = 0, + long nLower = 0) override; + + // Adapt PageSize for all Pages of PageKind ePageKind. Also + // set Borders to left/right/upper/lower, ScaleAll, Orientation, + // PaperBin and BackgroundFullSize. Create Undo-Actions when + // a SdUndoGroup is given (then used from the View probably) + void AdaptPageSizeForAllPages( + const Size& rNewSize, + PageKind ePageKind, + SdUndoGroup* pUndoGroup = nullptr, + long nLeft = 0, + long nRight = 0, + long nUpper = 0, + long nLower = 0, + bool bScaleAll = false, + Orientation eOrientation = Orientation::Landscape, + sal_uInt16 nPaperBin = 0, + bool bBackgroundFullSize = false); SAL_DLLPRIVATE SdDrawDocument* AllocSdDrawDocument() const; SAL_DLLPRIVATE virtual SdrModel* AllocModel() const override; //forwards to AllocSdDrawDocument |