summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-03-20 12:29:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-26 17:16:47 +0100
commit5b2cd79aded5081ca8a4bc20fb851573ce890092 (patch)
treec261ca5de7e605692362f668f0a4262cec31f359 /include/drawinglayer
parentfc1b2a0ab2ecddaeead680aee80a49109082a47b (diff)
loplugin:finalmethods
create a plugin that finds methods we can mark as final because they are not override in subclasses. Which is useful both as documentation (telling you that you don't need to worry about subclasses changing the implementation under you), and for performance, letting the compiler elide virtual calls in many cases. Apply the results to a subset of stuff in /include Change-Id: I7b5cc893ec2f343bc356bfc338e4cf531ffba1e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx6
-rw-r--r--include/drawinglayer/primitive2d/groupprimitive2d.hxx2
-rw-r--r--include/drawinglayer/primitive2d/primitivetools2d.hxx6
-rw-r--r--include/drawinglayer/primitive3d/baseprimitive3d.hxx4
-rw-r--r--include/drawinglayer/primitive3d/polygonprimitive3d.hxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index 62442d18a652..42f4de30fd91 100644
--- a/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -91,13 +91,13 @@ namespace drawinglayer::primitive2d
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
/// compare operator
- virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const override final;
/// get range
- virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override final;
/// provide unique ID
- virtual sal_uInt32 getPrimitive2DID() const override;
+ virtual sal_uInt32 getPrimitive2DID() const override final;
};
} // end of namespace drawinglayer::primitive2d
diff --git a/include/drawinglayer/primitive2d/groupprimitive2d.hxx b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
index b34bef834f03..1c55a5814743 100644
--- a/include/drawinglayer/primitive2d/groupprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/groupprimitive2d.hxx
@@ -85,7 +85,7 @@ namespace drawinglayer::primitive2d
virtual sal_uInt32 getPrimitive2DID() const override;
// XAccounting
- virtual sal_Int64 estimateUsage() override;
+ virtual sal_Int64 estimateUsage() override final;
};
} // end of namespace drawinglayer::primitive2d
diff --git a/include/drawinglayer/primitive2d/primitivetools2d.hxx b/include/drawinglayer/primitive2d/primitivetools2d.hxx
index 97e4f770e389..9ecf5445d7c3 100644
--- a/include/drawinglayer/primitive2d/primitivetools2d.hxx
+++ b/include/drawinglayer/primitive2d/primitivetools2d.hxx
@@ -83,7 +83,7 @@ namespace drawinglayer::primitive2d
const basegfx::B2DRange& getViewport() const { return maViewport; }
/// Override standard getDecomposition to be view-dependent here
- virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override final;
};
/** ViewTransformationDependentPrimitive2D class
@@ -112,7 +112,7 @@ namespace drawinglayer::primitive2d
const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; }
/// Override standard getDecomposition to be view-dependent here
- virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override final;
};
/** ObjectAndViewTransformationDependentPrimitive2D class
@@ -144,7 +144,7 @@ namespace drawinglayer::primitive2d
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
/// Override standard getDecomposition to be view-dependent here
- virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
+ virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override final;
};
} // end of namespace drawinglayer::primitive2d
diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
index 4a636835b51c..0731aa61b642 100644
--- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -129,12 +129,12 @@ namespace drawinglayer::primitive3d
/** The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It
will get the ViewInformation from the ViewParameters for that purpose
*/
- virtual css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive3D > > SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override;
+ virtual css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive3D > > SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override final;
/** the getRange default implementation will use getDecomposition to create the range information from merging
getRange results from the single local decomposition primitives.
*/
- virtual css::geometry::RealRectangle3D SAL_CALL getRange( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override;
+ virtual css::geometry::RealRectangle3D SAL_CALL getRange( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override final;
};
} // end of namespace drawinglayer::primitive2d
diff --git a/include/drawinglayer/primitive3d/polygonprimitive3d.hxx b/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
index a414cd27d472..5d4e0fb1bcc0 100644
--- a/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/polygonprimitive3d.hxx
@@ -62,7 +62,7 @@ namespace drawinglayer::primitive3d
virtual bool operator==(const BasePrimitive3D& rPrimitive) const override;
/// get range
- virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override;
+ virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const override final;
/// provide unique ID
DeclPrimitive3DIDBlock()