diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-25 09:54:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-08 10:40:57 +0000 |
commit | f2beebbfe78bfd5dd26318ea269f49aeee6bd642 (patch) | |
tree | afd9820842752f252409590e323f72cdbd0a4c3c /include/drawinglayer | |
parent | ab731b192f40fde71c796ecab563adc8d7258da8 (diff) |
reduce copying when decomposing drawinglayer primitives
instead of returning a Primitive2DContainer from each method which we
are then going to immediately append to another container, pass down a
single container by reference which we can append to
Change-Id: I0f28a499d2ec54f7111a7044c30099767aa079e1
Reviewed-on: https://gerrit.libreoffice.org/30258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/drawinglayer')
39 files changed, 82 insertions, 73 deletions
diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx index 89782b62c864..580271bac434 100644 --- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -99,7 +99,7 @@ namespace drawinglayer depends on the point in time, so the default implementation is not useful here, it needs to be handled locally */ - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer @@ -125,7 +125,7 @@ namespace drawinglayer const Primitive2DContainer& rChildren); /// create local decomposition - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() @@ -160,7 +160,7 @@ namespace drawinglayer const Primitive2DContainer& rChildren); /// create local decomposition - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 868f1a690943..35d0221c3273 100644 --- a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -77,7 +77,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// Override standard getDecomposition call to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index b6e3ecd0e1ed..fbfafae783ca 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -189,7 +189,7 @@ namespace drawinglayer virtual sal_uInt32 getPrimitive2DID() const = 0; /// The default implementation will return an empty sequence - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const; // Methods from XPrimitive2D @@ -266,7 +266,7 @@ namespace drawinglayer /** method which is to be used to implement the local decomposition of a 2D primitive. The default implementation will just return an empty decomposition */ - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const; public: // constructor/destructor @@ -278,7 +278,7 @@ namespace drawinglayer overridden and the ViewInformation2D for the last decomposition need to be remembered, too, and be used in the next call to decide if the buffered decomposition may be reused or not. */ - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 5c73edc6e430..80d3890fe945 100644 --- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -94,7 +94,7 @@ namespace drawinglayer const geometry::ViewInformation2D& rViewInformation) const; /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -132,7 +132,7 @@ namespace drawinglayer short getStyle () const { return mnStyle; } double getPatternScale() const { return mfPatternScale; } /// Same as create2DDecomposition(), but can do pixel correction if requested. - Primitive2DContainer createDecomposition(const geometry::ViewInformation2D& rViewInformation, bool bPixelCorrection) const; + void createDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation, bool bPixelCorrection) const; /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; diff --git a/include/drawinglayer/primitive2d/controlprimitive2d.hxx b/include/drawinglayer/primitive2d/controlprimitive2d.hxx index 54df6b63a6c4..554d92d560bb 100644 --- a/include/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -63,7 +63,7 @@ namespace drawinglayer protected: /// local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -100,7 +100,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/cropprimitive2d.hxx b/include/drawinglayer/primitive2d/cropprimitive2d.hxx index 51529fead5aa..124d0504f6df 100644 --- a/include/drawinglayer/primitive2d/cropprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/cropprimitive2d.hxx @@ -86,7 +86,7 @@ namespace drawinglayer virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; /// local decomposition - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx b/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx index d4601307184d..9cca4a97a7da 100644 --- a/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx @@ -50,7 +50,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx b/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx index 7d32532290d2..12a06366a4e8 100644 --- a/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx @@ -90,7 +90,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index 38d226c7a0e8..42fecfd3421d 100644 --- a/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -82,7 +82,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/epsprimitive2d.hxx b/include/drawinglayer/primitive2d/epsprimitive2d.hxx index 1b871d5af2bb..42b10d6cf07e 100644 --- a/include/drawinglayer/primitive2d/epsprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/epsprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index df0d84fd29ab..65353312b71c 100644 --- a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -69,21 +69,23 @@ namespace drawinglayer void generateMatricesAndColors( std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, basegfx::BColor& rOuterColor) const; - Primitive2DContainer createOverlappingFill( + void createOverlappingFill( + Primitive2DContainer& rContainer, const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, const basegfx::BColor& rOuterColor, const basegfx::B2DPolygon& rUnitPolygon) const; - Primitive2DContainer createNonOverlappingFill( + void createNonOverlappingFill( + Primitive2DContainer& rContainer, const std::vector< drawinglayer::texture::B2DHomMatrixAndBColor >& rEntries, const basegfx::BColor& rOuterColor, const basegfx::B2DPolygon& rUnitPolygon) const; protected: /// local helper - Primitive2DContainer createFill(bool bOverlapping) const; + void createFill(Primitive2DContainer& rContainer, bool bOverlapping) const; /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructors. The one without definition range will use output range as definition range diff --git a/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx index 4ae5307a04c8..9008ccc9189b 100644 --- a/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 3f40a5575ac9..e320b3fa5dd8 100644 --- a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -66,7 +66,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructors. The one without definition range will use output range as definition range @@ -93,7 +93,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx index 0108ae68ec5b..f437fbda1667 100644 --- a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -60,7 +60,7 @@ namespace drawinglayer protected: /// local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor(s) diff --git a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx index 9e5b540b4e61..541168184b88 100644 --- a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx +++ b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx @@ -41,7 +41,8 @@ namespace drawinglayer Bitmaps (with the sub-categories animated bitmap, and SVG), and Metafiles. */ - Primitive2DContainer create2DDecompositionOfGraphic( + void create2DDecompositionOfGraphic( + Primitive2DContainer& rContainer, const Graphic& rGraphic, const basegfx::B2DHomMatrix& rTransform); diff --git a/include/drawinglayer/primitive2d/gridprimitive2d.hxx b/include/drawinglayer/primitive2d/gridprimitive2d.hxx index 7d4a2fac189a..51ef7959e0a2 100644 --- a/include/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -71,7 +71,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -107,7 +107,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/groupprimitive2d.hxx b/include/drawinglayer/primitive2d/groupprimitive2d.hxx index 5f6387417359..1928be18b0df 100644 --- a/include/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -76,11 +76,13 @@ namespace drawinglayer /// data read access const Primitive2DContainer& getChildren() const { return maChildren; } + void getChildren(Primitive2DContainer& rContainer) const { rContainer.insert(rContainer.end(), maChildren.begin(), maChildren.end()); } + /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const override; /// local decomposition. Implementation will just return children - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/helplineprimitive2d.hxx b/include/drawinglayer/primitive2d/helplineprimitive2d.hxx index be3a0569054d..fbc67fe382e8 100644 --- a/include/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -75,7 +75,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -102,7 +102,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx index bb59e89964ea..788d09d09b18 100644 --- a/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// local decomposition. Implementation will return empty Primitive2DSequence - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; // provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index e125eb065d56..2dd43e2ff262 100644 --- a/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/mediaprimitive2d.hxx b/include/drawinglayer/primitive2d/mediaprimitive2d.hxx index 95b89b687d5c..36d8f599580f 100644 --- a/include/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -60,7 +60,7 @@ namespace drawinglayer protected: /// local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx index 632507665e95..0d1503809a81 100644 --- a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -64,7 +64,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor MetafilePrimitive2D( diff --git a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index f4fe7c2e1528..c6639998f34d 100644 --- a/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -60,7 +60,7 @@ namespace drawinglayer protected: /// local decomposition. Implementation will just return children - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx index 8a64fdf3e71f..11d064737c45 100644 --- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx @@ -62,7 +62,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -83,7 +83,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// overload to react on evtl. buffered content - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx index 8ae8fd818765..2a41ac9d3bf2 100644 --- a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -110,7 +110,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -133,7 +133,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() @@ -168,7 +168,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -220,7 +220,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -276,7 +276,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 6a954b93e983..2cbc032e775d 100644 --- a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -107,7 +107,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -162,7 +162,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -263,7 +263,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructors. The one without definition range will use output range as definition range @@ -319,7 +319,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructors. The one without definition range will use output range as definition range @@ -375,7 +375,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructors. The one without definition range will use output range as definition range @@ -434,7 +434,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/primitivetools2d.hxx b/include/drawinglayer/primitive2d/primitivetools2d.hxx index 12e234d8bea7..cd0bacea114b 100644 --- a/include/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/include/drawinglayer/primitive2d/primitivetools2d.hxx @@ -65,7 +65,7 @@ namespace drawinglayer double getDiscreteUnit() const { return mfDiscreteUnit; } /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer @@ -103,7 +103,7 @@ namespace drawinglayer const basegfx::B2DRange& getViewport() const { return maViewport; } /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer @@ -141,7 +141,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; } /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer @@ -183,7 +183,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx index 80c0e2a07e96..ba55c31414b7 100644 --- a/include/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -98,7 +98,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// public helpers @@ -145,7 +145,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// get local decomposition. Override since this decomposition is view-dependent - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx index b3970df97d0e..13461f82478e 100644 --- a/include/drawinglayer/primitive2d/shadowprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/shadowprimitive2d.hxx @@ -72,7 +72,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// create decomposition - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx b/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx index 9fa2cd4be8b8..1ac5b2f978c5 100644 --- a/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/svggradientprimitive2d.hxx @@ -120,7 +120,7 @@ namespace drawinglayer protected: /// local helpers - Primitive2DContainer createSingleGradientEntryFill() const; + void createSingleGradientEntryFill(Primitive2DContainer& rContainer) const; virtual void createAtom( Primitive2DContainer& rTargetColor, Primitive2DContainer& rTargetOpacity, @@ -135,7 +135,8 @@ namespace drawinglayer const SvgGradientEntryVector& rEntries, sal_Int32 nOffset) const; virtual void checkPreconditions(); - Primitive2DContainer createResult( + void createResult( + Primitive2DContainer& rContainer, const Primitive2DContainer& rTargetColor, const Primitive2DContainer& rTargetOpacity, const basegfx::B2DHomMatrix& rUnitGradientToObject, @@ -196,7 +197,7 @@ namespace drawinglayer virtual void checkPreconditions() override; /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -264,7 +265,7 @@ namespace drawinglayer virtual void checkPreconditions() override; /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -319,7 +320,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -381,7 +382,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 0ab2a29d2f6e..c1b0a57277a0 100644 --- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -74,7 +74,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx index 6b16520dcd4c..733234ff6369 100644 --- a/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -64,7 +64,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -93,7 +93,7 @@ namespace drawinglayer DeclPrimitive2DIDBlock() /// Override standard getDecomposition to be view-dependent here - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/include/drawinglayer/primitive2d/textlineprimitive2d.hxx b/include/drawinglayer/primitive2d/textlineprimitive2d.hxx index 2fb9a4a5ec17..e9f5efe70c82 100644 --- a/include/drawinglayer/primitive2d/textlineprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textlineprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx index bed20c5de4b2..c9b250ceea78 100644 --- a/include/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx @@ -135,7 +135,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx b/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx index 5008fe41b307..b3771c56e8c6 100644 --- a/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx @@ -76,7 +76,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor @@ -116,7 +116,7 @@ namespace drawinglayer protected: /// local decomposition. - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx index 6341d088f90a..e24f8f3a5474 100644 --- a/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx @@ -60,7 +60,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// create decomposition - virtual Primitive2DContainer get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void get2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx b/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx index af3f256f147e..e6927398edad 100644 --- a/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/wallpaperprimitive2d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index 90c2bb2362c4..996d70362288 100644 --- a/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -60,7 +60,7 @@ namespace drawinglayer protected: /// create local decomposition - virtual Primitive2DContainer create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override; + virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; public: /// constructor diff --git a/include/drawinglayer/processor2d/baseprocessor2d.hxx b/include/drawinglayer/processor2d/baseprocessor2d.hxx index 622828a9a50b..4ace7d8fa8a1 100644 --- a/include/drawinglayer/processor2d/baseprocessor2d.hxx +++ b/include/drawinglayer/processor2d/baseprocessor2d.hxx @@ -174,6 +174,9 @@ namespace drawinglayer */ virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); + void process(const primitive2d::BasePrimitive2D& rCandidate); + + public: /// constructor/destructor explicit BaseProcessor2D(const geometry::ViewInformation2D& rViewInformation); |