summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-09-06 11:35:26 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-09-06 16:56:43 +0200
commit820363418f5c6833757e43daaa877d845c75f1d7 (patch)
treed6567ddfbf16e584b8a3686b9d794ce6ea580f1a /svgio
parenteee4b3f8e46b85b3bb4f7cbe83b8af552594be89 (diff)
tdf#157113: Add gap even if baseline is different
This was a workaround for https://bz.apache.org/ooo/show_bug.cgi?id=122524 but it's no longer needed since 5079e7937ef471a44dcf119dc6ae0a334d9c6adc "tdf#156251: Add gap between text elements when needed" Change-Id: I83af59a515d56af6b0e3cf3e351d3df52510a17d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156613 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit ae6f9f07df8565368d43c5014b8e1ac32acb51cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156597
Diffstat (limited to 'svgio')
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx2
-rw-r--r--svgio/source/svgreader/svgcharacternode.cxx11
2 files changed, 1 insertions, 12 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 624918559940..e59a92cffb97 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -1840,7 +1840,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156837)
// - Actual : 103
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "y", "94");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "height", "10");
- assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "3");
+ assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", " 3");
}
CPPUNIT_TEST_FIXTURE(Test, testTdf156271)
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index cb39d6dc542f..022ba42bda9f 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -514,17 +514,6 @@ namespace svgio::svgreader
if(pPreviousCharacterNode->mpParentLine != mpParentLine)
bAddGap = false;
- // With this option a baseline shift between two char parts ('words')
- // will not add a space 'gap' to the end of the (non-last) word. This
- // seems to be the standard behaviour, see last bugdoc attached #122524#
- const SvgStyleAttributes* pStyleLast = pPreviousCharacterNode->getSvgStyleAttributes();
- const SvgStyleAttributes* pStyleCurrent = getSvgStyleAttributes();
-
- if(pStyleLast && pStyleCurrent && pStyleLast->getBaselineShift() != pStyleCurrent->getBaselineShift())
- {
- bAddGap = false;
- }
-
// add in-between whitespace (single space) to last
// known character node
if(bAddGap)