diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-07 09:07:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-07 11:27:01 +0100 |
commit | 10cc0f3d2ddaa5d7f6ee18042dacfc67c1be96af (patch) | |
tree | f9784755b22e42b741669a816ec4c21b5dc0cceb /svx/source/svdraw | |
parent | 093d174f959f8f9524d288c2a593f3a764a8a73c (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/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextpathdecomposition.cxx | 3 |
2 files changed, 2 insertions, 4 deletions
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()) { |