summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-07 09:07:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-02-07 11:27:01 +0100
commit10cc0f3d2ddaa5d7f6ee18042dacfc67c1be96af (patch)
treef9784755b22e42b741669a816ec4c21b5dc0cceb /svx
parent093d174f959f8f9524d288c2a593f3a764a8a73c (diff)
simplify some Primitive2DContainer accesses
Change-Id: I217489db2f66049dfb0908f2f2a07a2f585302ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/animation/animationstate.cxx5
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx3
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx3
3 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/sdr/animation/animationstate.cxx b/svx/source/sdr/animation/animationstate.cxx
index 074f2082e460..375bccaf0975 100644
--- a/svx/source/sdr/animation/animationstate.cxx
+++ b/svx/source/sdr/animation/animationstate.cxx
@@ -34,11 +34,8 @@ namespace sdr::animation
if(!maAnimatedPrimitives.empty())
{
- const sal_Int32 nCount(maAnimatedPrimitives.size());
-
- for(sal_Int32 a(0); a < nCount; a++)
+ for(const drawinglayer::primitive2d::Primitive2DReference & xRef : maAnimatedPrimitives)
{
- const drawinglayer::primitive2d::Primitive2DReference xRef(maAnimatedPrimitives[a]);
const drawinglayer::primitive2d::AnimatedSwitchPrimitive2D* pCandidate = static_cast< const drawinglayer::primitive2d::AnimatedSwitchPrimitive2D* >(xRef.get());
const drawinglayer::animation::AnimationEntry& rAnimEntry = pCandidate->getAnimationEntry();
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index a0eddbbb6204..3fe9de6fb7ba 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -319,8 +319,7 @@ namespace
rInfo.mrFont.DoOnCapitals(aDoDrawPortionInfo);
// transfer collected primitives from maTextPortionPrimitives to a new container
- drawinglayer::primitive2d::Primitive2DContainer aContainer;
- aContainer.swap(maTextPortionPrimitives);
+ drawinglayer::primitive2d::Primitive2DContainer aContainer = std::move(maTextPortionPrimitives);
// Take any decoration for the whole formatted portion and keep it to get continuous over/under/strike-through
if (pNewPrimitive->getPrimitive2DID() == PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D)
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 7537625b2a26..0918528ce310 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -593,9 +593,8 @@ namespace
rOutlineAttribute.getLineAttribute(),
rOutlineAttribute.getStrokeAttribute(),
aStrokePrimitives);
- const sal_uInt32 nStrokeCount(aStrokePrimitives.size());
- if(nStrokeCount)
+ if(!aStrokePrimitives.empty())
{
if(rOutlineAttribute.getTransparence())
{