[Libreoffice-commits] core.git: drawinglayer/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 8 20:21:17 UTC 2021
drawinglayer/source/primitive2d/Tools.cxx | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
New commits:
commit c07f4a7d04eb44020045859d305f4510ae9acfc4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 8 20:20:55 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 8 22:20:41 2021 +0200
no need to call expand() here
we can just return the value directly
Change-Id: Ia4a79ebe668dd426edbe95baee8d8cf91d4bc3f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/drawinglayer/source/primitive2d/Tools.cxx b/drawinglayer/source/primitive2d/Tools.cxx
index 45b2a993b3a7..7be666a2cbd0 100644
--- a/drawinglayer/source/primitive2d/Tools.cxx
+++ b/drawinglayer/source/primitive2d/Tools.cxx
@@ -32,16 +32,12 @@ basegfx::B2DRange
getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate,
const geometry::ViewInformation2D& aViewInformation)
{
- basegfx::B2DRange aRetval;
+ if (!rCandidate)
+ return basegfx::B2DRange();
- if (rCandidate.is())
- {
- // get C++ implementation base
- const BasePrimitive2D* pCandidate(static_cast<BasePrimitive2D*>(rCandidate.get()));
- aRetval.expand(pCandidate->getB2DRange(aViewInformation));
- }
-
- return aRetval;
+ // get C++ implementation base
+ const BasePrimitive2D* pCandidate(static_cast<BasePrimitive2D*>(rCandidate.get()));
+ return pCandidate->getB2DRange(aViewInformation);
}
bool arePrimitive2DReferencesEqual(const Primitive2DReference& rxA, const Primitive2DReference& rxB)
More information about the Libreoffice-commits
mailing list