summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-08-17 16:04:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-18 21:17:19 +0200
commit2e74c1107bc8422ee7a819722f3f0a366127330f (patch)
tree8004b2354f82be22acb9fb4ca281366977213b14 /include/drawinglayer
parente0dcf1a55547b124be227b6326173aa62bc2dcf8 (diff)
use visitor callback to avoid container construction (tdf#105575)
Change-Id: I4dd3382ceca82f93664e66b32bcfa7c74eb58fdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120606 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/processor2d/baseprocessor2d.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/drawinglayer/processor2d/baseprocessor2d.hxx b/include/drawinglayer/processor2d/baseprocessor2d.hxx
index 1f0bd46efb62..4f1515109a77 100644
--- a/include/drawinglayer/processor2d/baseprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/baseprocessor2d.hxx
@@ -22,6 +22,7 @@
#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
@@ -150,7 +151,7 @@ namespace drawinglayer::processor2d
be helpful to add many for the purpose not interesting higher level primitives
to not force their decomposition to be created and/or parsed.
*/
- class DRAWINGLAYER_DLLPUBLIC BaseProcessor2D
+ class DRAWINGLAYER_DLLPUBLIC BaseProcessor2D : public drawinglayer::primitive2d::Primitive2DDecompositionVisitor
{
private:
/// The ViewInformation2D itself. It's private to isolate accesses to it
@@ -174,6 +175,10 @@ namespace drawinglayer::processor2d
void process(const primitive2d::BasePrimitive2D& rCandidate);
+ // Primitive2DDecompositionVisitor
+ virtual void append(const primitive2d::Primitive2DReference&) override final;
+ virtual void append(const primitive2d::Primitive2DContainer&) override final;
+ virtual void append(primitive2d::Primitive2DContainer&&) override final;
public:
/// constructor/destructor