summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive2d/textprimitive2d.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-10-30 09:51:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-31 12:10:52 +0100
commit11b15571475414ef853e21a6c96afa2ac81f848f (patch)
treee32da625489c121001e8436fb693b2a25a1e1b6e /drawinglayer/source/primitive2d/textprimitive2d.cxx
parentef085d09e0c019f78a3d35f759c8fe567856b615 (diff)
convert KernArray from sal_Int32 to double
which allows us to eliminate a bunch of rounding at various layers, and consequently maintain a lot more precision Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source/primitive2d/textprimitive2d.cxx')
-rw-r--r--drawinglayer/source/primitive2d/textprimitive2d.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index db9a6359ccf2..d08f729e3abf 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -353,22 +353,14 @@ void TextSimplePortionPrimitive2D::createTextLayouter(TextLayouterDevice& rTextL
std::unique_ptr<SalLayout>
TextSimplePortionPrimitive2D::createSalLayout(TextLayouterDevice& rTextLayouter) const
{
- // create integer DXArray. As mentioned above we can act in the
+ // As mentioned above we can act in the
// Text's local coordinate system without transformation at all
const ::std::vector<double>& rDXArray(getDXArray());
- KernArray aDXArray;
-
- if (!rDXArray.empty())
- {
- aDXArray.reserve(rDXArray.size());
- for (auto const& elem : rDXArray)
- aDXArray.push_back(basegfx::fround(elem));
- }
// create SalLayout. No need for a position, as mentioned text can work
// without transformations, so start point is always 0,0
return rTextLayouter.getSalLayout(getText(), getTextPosition(), getTextLength(),
- basegfx::B2DPoint(0.0, 0.0), aDXArray, getKashidaArray());
+ basegfx::B2DPoint(0.0, 0.0), rDXArray, getKashidaArray());
}
// provide unique ID