summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-29 18:14:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-30 08:30:06 +0200
commit181cc77117b8d90c6dab63a17e8a690736ef62a0 (patch)
tree0da7bf9f842fa57079f93ba4c83931486512b7c6
parent4c2c375d5f1c18540011d65b290afc440895458f (diff)
move data out of impTextBreakupHandler
instead of copying Change-Id: I3f851b877ece609547eed6f772b2b8df57aeae96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 2d86f21dab1d..7fb0efa38986 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -145,7 +145,7 @@ namespace
mrOutliner.SetDrawBulletHdl(Link<DrawBulletInfo*,void>());
}
- drawinglayer::primitive2d::Primitive2DContainer const & getPrimitive2DSequence();
+ drawinglayer::primitive2d::Primitive2DContainer extractPrimitive2DSequence();
};
void impTextBreakupHandler::impCreateTextPortionPrimitive(const DrawPortionInfo& rInfo)
@@ -643,7 +643,7 @@ namespace
}
}
- drawinglayer::primitive2d::Primitive2DContainer const & impTextBreakupHandler::getPrimitive2DSequence()
+ drawinglayer::primitive2d::Primitive2DContainer impTextBreakupHandler::extractPrimitive2DSequence()
{
if(!maTextPortionPrimitives.empty())
{
@@ -657,7 +657,7 @@ namespace
impFlushLinePrimitivesToParagraphPrimitives(mrOutliner.GetParagraphCount() - 1);
}
- return maParagraphPrimitives;
+ return std::move(maParagraphPrimitives);
}
} // end of anonymous namespace
@@ -712,7 +712,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
rOutliner.Clear();
rOutliner.setVisualizedPage(nullptr);
- rTarget = aConverter.getPrimitive2DSequence();
+ rTarget = aConverter.extractPrimitive2DSequence();
}
void SdrTextObj::impDecomposeAutoFitTextPrimitive(
@@ -851,7 +851,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
rOutliner.setVisualizedPage(nullptr);
rOutliner.SetControlWord(nOriginalControlWord);
- rTarget = aConverter.getPrimitive2DSequence();
+ rTarget = aConverter.extractPrimitive2DSequence();
}
// Resolves: fdo#35779 set background color of this shape as the editeng background if there
@@ -1147,7 +1147,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
rOutliner.Clear();
rOutliner.setVisualizedPage(nullptr);
- rTarget = aConverter.getPrimitive2DSequence();
+ rTarget = aConverter.extractPrimitive2DSequence();
}
void SdrTextObj::impDecomposeStretchTextPrimitive(
@@ -1226,7 +1226,7 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
rOutliner.Clear();
rOutliner.setVisualizedPage(nullptr);
- rTarget = aConverter.getPrimitive2DSequence();
+ rTarget = aConverter.extractPrimitive2DSequence();
}
@@ -1656,7 +1656,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
rOutliner.setVisualizedPage(nullptr);
rOutliner.SetControlWord(nOriginalControlWord);
- rTarget = aConverter.getPrimitive2DSequence();
+ rTarget = aConverter.extractPrimitive2DSequence();
}
// Direct decomposer for text visualization when you already have a prepared
@@ -1670,7 +1670,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitiveDirect(
{
impTextBreakupHandler aConverter(rOutliner);
aConverter.decomposeBlockTextPrimitive(rNewTransformA, rNewTransformB, rClipRange);
- rTarget.append(aConverter.getPrimitive2DSequence());
+ rTarget.append(aConverter.extractPrimitive2DSequence());
}
double SdrTextObj::GetCameraZRotation() const