diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-13 11:14:25 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-13 23:09:53 +0200 |
commit | 1df7a1ac274db509f1a135b84a01ea51c4d0c1f9 (patch) | |
tree | 99bb8326500ebea6f22787646aa9dfa3d2982b09 /svgio/source | |
parent | 99f5bf03caa2538ca79b04e7fd017cebfb4c7a95 (diff) |
tdf#156269: dx and dy do not depend on x and y
Change-Id: I99be5aa45b333ec3825373c3a10be0e24d23cb29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154380
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svgcharacternode.cxx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 4ffc46a483db..e62d21528d96 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -645,23 +645,23 @@ namespace svgio::svgreader { maPosition.setX(pParent->getPosition().getX()); } + } + + const sal_uInt32 nSizeDx(rSvgTextPositions.getDx().size()); - const sal_uInt32 nSizeDx(rSvgTextPositions.getDx().size()); + if(nSizeDx) + { + // relative positions given, translate position derived from parent + maPosition.setX(maPosition.getX() + rSvgTextPositions.getDx()[0].solve(rInfoProvider, NumberType::xcoordinate)); - if(nSizeDx) + if(nSizeDx > 1) { - // relative positions given, translate position derived from parent - maPosition.setX(maPosition.getX() + rSvgTextPositions.getDx()[0].solve(rInfoProvider, NumberType::xcoordinate)); + // fill deltas to maX + maX.reserve(nSizeDx); - if(nSizeDx > 1) + for(sal_uInt32 a(1); a < nSizeDx; a++) { - // fill deltas to maX - maX.reserve(nSizeDx); - - for(sal_uInt32 a(1); a < nSizeDx; a++) - { - maX.push_back(rSvgTextPositions.getDx()[a].solve(rInfoProvider, NumberType::xcoordinate)); - } + maX.push_back(rSvgTextPositions.getDx()[a].solve(rInfoProvider, NumberType::xcoordinate)); } } } @@ -693,23 +693,23 @@ namespace svgio::svgreader { maPosition.setY(pParent->getPosition().getY()); } + } + + const sal_uInt32 nSizeDy(rSvgTextPositions.getDy().size()); - const sal_uInt32 nSizeDy(rSvgTextPositions.getDy().size()); + if(nSizeDy) + { + // relative positions given, translate position derived from parent + maPosition.setY(maPosition.getY() + rSvgTextPositions.getDy()[0].solve(rInfoProvider, NumberType::ycoordinate)); - if(nSizeDy) + if(nSizeDy > 1) { - // relative positions given, translate position derived from parent - maPosition.setY(maPosition.getY() + rSvgTextPositions.getDy()[0].solve(rInfoProvider, NumberType::ycoordinate)); + // fill deltas to maY + maY.reserve(nSizeDy); - if(nSizeDy > 1) + for(sal_uInt32 a(1); a < nSizeDy; a++) { - // fill deltas to maY - maY.reserve(nSizeDy); - - for(sal_uInt32 a(1); a < nSizeDy; a++) - { - maY.push_back(rSvgTextPositions.getDy()[a].solve(rInfoProvider, NumberType::ycoordinate)); - } + maY.push_back(rSvgTextPositions.getDy()[a].solve(rInfoProvider, NumberType::ycoordinate)); } } } |