diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-04 21:33:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-05 08:40:52 +0100 |
commit | 8206a8ef2fbf2de9cca6fb360707fb9b50e6a92c (patch) | |
tree | a136ae666879ee64209ce269d6d57defe460ea39 /svx/inc/sdr | |
parent | 422b407290fe082adea9067835521da8c067743d (diff) |
use visitor in ViewObjectContact::createPrimitive2DSequence
to reduce intermediate object creation
Change-Id: I03d34d15e88f82027f865868aca08503e38fd6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126372
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/inc/sdr')
7 files changed, 15 insertions, 13 deletions
diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx index 9c0e09e4c036..591ed6504155 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx @@ -33,7 +33,7 @@ namespace sdr::contact { // also override the 2d method to deliver a 2d object with embedded 3d and the 3d transformation which is able to // answer the get2DRange question accordingly - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact); diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx index 27ddbd21842f..cc1b2e7c345e 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofe3dscene.hxx @@ -28,7 +28,7 @@ namespace sdr::contact class ViewObjectContactOfE3dScene final : public ViewObjectContactOfSdrObj { // 2d primitive creator - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: // basic constructor. diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx index b2286568c93f..74e616a45bc1 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx @@ -29,7 +29,7 @@ namespace sdr::contact class ViewObjectContactOfGraphic final : public ViewObjectContactOfSdrObj { // This method is responsible for creating the graphical visualisation data - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfGraphic(ObjectContact& rObjectContact, ViewContact& rViewContact); diff --git a/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx index 16e168c41235..b651e083ec3c 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofpageobj.hxx @@ -37,8 +37,9 @@ private: // This method is responsible for creating the graphical visualisation data which is // stored/cached in the local primitive. // This method will not handle included hierarchies and not check geometric visibility. - virtual drawinglayer::primitive2d::Primitive2DContainer - createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence( + const DisplayInfo& rDisplayInfo, + drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact); diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx index 8afd0c2cc76d..2279f9b45954 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofsdrole2obj.hxx @@ -29,8 +29,9 @@ namespace sdr::contact class ViewObjectContactOfSdrOle2Obj final : public ViewObjectContactOfSdrObj { // This method is responsible for creating the graphical visualisation data - virtual drawinglayer::primitive2d::Primitive2DContainer - createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence( + const DisplayInfo& rDisplayInfo, + drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact); diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx index 7e04604f7328..a6fa46d43072 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofsdrpage.hxx @@ -45,7 +45,7 @@ namespace sdr::contact { class ViewObjectContactOfPageBackground final : public ViewObjectContactOfPageSubObject { - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfPageBackground(ObjectContact& rObjectContact, ViewContact& rViewContact); @@ -73,7 +73,7 @@ namespace sdr::contact { class ViewObjectContactOfPageFill final : public ViewObjectContactOfPageSubObject { - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfPageFill(ObjectContact& rObjectContact, ViewContact& rViewContact); @@ -135,7 +135,7 @@ namespace sdr::contact { class ViewObjectContactOfPageGrid final : public ViewObjectContactOfPageSubObject { - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfPageGrid(ObjectContact& rObjectContact, ViewContact& rViewContact); @@ -149,7 +149,7 @@ namespace sdr::contact { class ViewObjectContactOfPageHelplines final : public ViewObjectContactOfPageSubObject { - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; public: ViewObjectContactOfPageHelplines(ObjectContact& rObjectContact, ViewContact& rViewContact); diff --git a/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx index 2c708ec733c7..d7dc8ffdda03 100644 --- a/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx +++ b/svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -91,7 +91,7 @@ namespace sdr::contact { virtual ~ViewObjectContactOfUnoControl() override; // support for Primitive2D - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; // visibility check virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const override; @@ -113,7 +113,7 @@ namespace sdr::contact { UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& ) = delete; UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ) = delete; - virtual drawinglayer::primitive2d::Primitive2DContainer createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const override; + virtual void createPrimitive2DSequence(const DisplayInfo& rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; }; |