diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2015-11-09 17:50:33 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-11-29 00:44:14 +0100 |
commit | 7963ef5999940021f3661b1101d7df3c00051d18 (patch) | |
tree | 59da8ce4318cbef46325ebc1a0cd9c16acff587d | |
parent | fc53041c0387388f1275abf7beefea4d80d5ee3b (diff) |
tdf#95356: unit test about text decorations for svg export
1) Fixed the trailing space issue in text decoration attribute value.
2) Changed the SVG export suite in order to make it more reusable for
other tests.
3) Added a unit test for testing that text decorations are exported
correctly.
Reviewed-on: https://gerrit.libreoffice.org/19870
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 50506421f29d09fa4c44c46c3d60208a64a1c450)
Conflicts:
sd/qa/unit/SVGExportTests.cxx
Change-Id: I2bd71974242a0007726fbdd5ef5637a9ec62fd47
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 66113083f7cc..9fd1f6eab869 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -811,13 +811,17 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer ) if( eCurFontUnderline != eParFontUnderline ) { if( eCurFontUnderline != UNDERLINE_NONE ) - sTextDecoration = "underline "; + sTextDecoration = "underline"; bIsDecorationChanged = true; } if( eCurFontStrikeout != eParFontStrikeout ) { if( eCurFontStrikeout != STRIKEOUT_NONE ) - sTextDecoration += "line-through "; + { + if( !sTextDecoration.isEmpty() ) + sTextDecoration += " "; + sTextDecoration += "line-through"; + } bIsDecorationChanged = true; } |