summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx8
-rw-r--r--vcl/source/gdi/CommonSalLayout.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx13
3 files changed, 7 insertions, 16 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index a7a02272219d..60ea081ed423 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -774,15 +774,15 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
pSegment = pPdfPageObject->getPathSegment(1);
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, pSegment->getType());
aPoint = pSegment->getPoint();
- CPPUNIT_ASSERT_DOUBLES_EQUAL(275.074, aPoint.getX(), 0.0005);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(267.590, aPoint.getY(), 0.0005);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(275.216, aPoint.getX(), 0.0005);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(267.732, aPoint.getY(), 0.0005);
CPPUNIT_ASSERT(!pSegment->isClosed());
pSegment = pPdfPageObject->getPathSegment(2);
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, pSegment->getType());
aPoint = pSegment->getPoint();
- CPPUNIT_ASSERT_DOUBLES_EQUAL(287.490, aPoint.getX(), 0.0005);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(251.801, aPoint.getY(), 0.0005);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(287.660, aPoint.getX(), 0.0005);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(251.914, aPoint.getY(), 0.0005);
CPPUNIT_ASSERT(!pSegment->isClosed());
pSegment = pPdfPageObject->getPathSegment(3);
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index f4472726fcfe..5cac0ebdb6b0 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -845,7 +845,7 @@ void GenericSalLayout::ApplyDXArray(const double* pDXArray, const sal_Bool* pKas
aPos.adjustX(-nClusterWidth + pGlyphIter->origWidth());
while (nCopies--)
{
- GlyphItem aKashida(nCharPos, 0, nKashidaIndex, aPos, nFlags, nKashidaWidth, 0, 0);
+ GlyphItem aKashida(nCharPos, 0, nKashidaIndex, aPos, nFlags, 0, 0, 0);
pGlyphIter = m_GlyphItems.insert(pGlyphIter, aKashida);
aPos.adjustX(nKashidaWidth - nOverlap);
++pGlyphIter;
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 85ad838615d9..1ed2a37ad71b 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -269,19 +269,10 @@ DeviceCoordinate GenericSalLayout::GetTextWidth() const
if (!m_GlyphItems.IsValid())
return 0;
- // initialize the extent
- DeviceCoordinate nMinPos = 0;
- DeviceCoordinate nMaxPos = 0;
-
+ DeviceCoordinate nWidth = 0;
for (auto const& aGlyphItem : m_GlyphItems)
- {
- // update the text extent with the glyph extent
- DeviceCoordinate nXPos = aGlyphItem.linearPos().getX() - aGlyphItem.xOffset();
- nMinPos = std::min(nMinPos, nXPos);
- nMaxPos = std::max(nMaxPos, nXPos + aGlyphItem.newWidth());
- }
+ nWidth += aGlyphItem.newWidth();
- DeviceCoordinate nWidth = nMaxPos - nMinPos;
return nWidth;
}