summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx12
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx6
3 files changed, 9 insertions, 11 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index c36c73658a08..11e903027122 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -239,7 +239,7 @@ void TextLayouterDevice::getTextOutlines(basegfx::B2DPolyPolygonVector& rB2DPoly
}
mrDevice.GetTextOutlines(rB2DPolyPolyVector, rText, nIndex, nIndex, nLength, 0,
- aIntegerDXArray.data());
+ { aIntegerDXArray.data(), aIntegerDXArray.size() });
}
else
{
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 16bf6a78b878..034e82e1f50e 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -286,9 +286,6 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
- std::vector<tools::Long>* pDXArray
- = !aTransformedDXArray.empty() ? &aTransformedDXArray : nullptr;
-
if (rTextCandidate.isFilled())
{
basegfx::B2DVector aOldFontScaling, aOldTranslate;
@@ -299,8 +296,8 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
tools::Long nWidthToFill = static_cast<tools::Long>(
rTextCandidate.getWidthToFill() * aFontScaling.getX() / aOldFontScaling.getX());
- tools::Long nWidth
- = mpOutputDevice->GetTextArray(rTextCandidate.getText(), pDXArray, 0, 1);
+ tools::Long nWidth = mpOutputDevice->GetTextArray(rTextCandidate.getText(),
+ &aTransformedDXArray, 0, 1);
tools::Long nChars = 2;
if (nWidth)
nChars = nWidthToFill / nWidth;
@@ -314,8 +311,9 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
if (!aTransformedDXArray.empty())
{
- mpOutputDevice->DrawTextArray(aStartPoint, aText,
- pDXArray ? pDXArray->data() : nullptr, nPos, nLen);
+ mpOutputDevice->DrawTextArray(
+ aStartPoint, aText, { aTransformedDXArray.data(), aTransformedDXArray.size() },
+ nPos, nLen);
}
else
{
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 042bd8a77037..78b178355fbd 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1828,15 +1828,15 @@ namespace wmfemfhelper
{
// prepare DXArray (if used)
std::vector< double > aDXArray;
- tools::Long* pDXArray = pA->GetDXArray();
+ const std::vector<tools::Long> & rDXArray = pA->GetDXArray();
- if(pDXArray)
+ if(!rDXArray.empty())
{
aDXArray.reserve(nTextLength);
for(sal_uInt32 a(0); a < nTextLength; a++)
{
- aDXArray.push_back(static_cast<double>(*(pDXArray + a)));
+ aDXArray.push_back(static_cast<double>(rDXArray[a]));
}
}