summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-14 14:33:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-14 19:12:33 +0200
commite00225bc7744abd365f1cc7133d43026e9438f13 (patch)
tree906d069a000fc71e215946cdb4c57f43949df784 /sdext
parent1aaf5d44dceecc13a3bc8e08c13d0b2ba278c462 (diff)
elide some temporary OUStrings
Change-Id: I8539dd5d9490a14ebac0520486a8322ff86a6cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137081 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx25
1 files changed, 17 insertions, 8 deletions
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index dfdec02539db..51ef5f232d85 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -188,21 +188,30 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem,
bool bWasTransformed
)
{
- rProps[ "draw:z-index" ] = OUString::number( rElem.ZOrder );
- rProps[ "draw:style-name"] = rEmitContext.rStyles.getStyleName( rElem.StyleId );
+ static constexpr OUStringLiteral sDrawZIndex = u"draw:z-index";
+ static constexpr OUStringLiteral sDrawStyleName = u"draw:style-name";
+ static constexpr OUStringLiteral sDrawTextStyleName = u"draw:text-style-name";
+ static constexpr OUStringLiteral sSvgX = u"svg:x";
+ static constexpr OUStringLiteral sSvgY = u"svg:y";
+ static constexpr OUStringLiteral sSvgWidth = u"svg:width";
+ static constexpr OUStringLiteral sSvgHeight = u"svg:height";
+ static constexpr OUStringLiteral sDrawTransform = u"draw:transform";
+
+ rProps[ sDrawZIndex ] = OUString::number( rElem.ZOrder );
+ rProps[ sDrawStyleName ] = rEmitContext.rStyles.getStyleName( rElem.StyleId );
if (rElem.IsForText)
- rProps["draw:text-style-name"] = rEmitContext.rStyles.getStyleName(rElem.TextStyleId);
+ rProps[ sDrawTextStyleName ] = rEmitContext.rStyles.getStyleName(rElem.TextStyleId);
const GraphicsContext& rGC =
rEmitContext.rProcessor.getGraphicsContext( rElem.GCId );
if (bWasTransformed)
{
- rProps[ "svg:x" ] = convertPixelToUnitString(rElem.x);
- rProps[ "svg:y" ] = convertPixelToUnitString(rElem.y);
- rProps[ "svg:width" ] = convertPixelToUnitString(rElem.w);
- rProps[ "svg:height" ] = convertPixelToUnitString(rElem.h);
+ rProps[ sSvgX ] = convertPixelToUnitString(rElem.x);
+ rProps[ sSvgY ] = convertPixelToUnitString(rElem.y);
+ rProps[ sSvgWidth ] = convertPixelToUnitString(rElem.w);
+ rProps[ sSvgHeight ] = convertPixelToUnitString(rElem.h);
}
else
{
@@ -236,7 +245,7 @@ void DrawXmlEmitter::fillFrameProps( DrawElement& rElem,
aBuf.append(mat.get(1, 2));
aBuf.append(")");
- rProps["draw:transform"] = aBuf.makeStringAndClear();
+ rProps[ sDrawTransform ] = aBuf.makeStringAndClear();
}
}