filter/source/svg/svgfontexport.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
New commits: commit 2dbd0acb88be751c05648167518dbc60ba75bceb Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Apr 9 19:08:07 2024 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Apr 9 21:50:37 2024 +0200 Simplify a bit Change-Id: I92def0e5731d231583b9b03e351bc46949045b4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165846 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 7e75d65e6bc2..014975b8d229 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -252,7 +252,6 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont ) void SVGFontExport::implEmbedGlyph( OutputDevice const & rOut, const OUString& rCellStr ) { tools::PolyPolygon aPolyPoly; - const sal_Unicode nSpace = ' '; if( !rOut.GetTextOutline( aPolyPoly, rCellStr ) ) return; @@ -261,14 +260,10 @@ void SVGFontExport::implEmbedGlyph( OutputDevice const & rOut, const OUString& r aPolyPoly.Scale( 1.0, -1.0 ); - if( !rOut.GetTextBoundRect( aBoundRect, rCellStr ) ) + if (rCellStr == " " || !rOut.GetTextBoundRect(aBoundRect, rCellStr)) aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( rCellStr ), 0 ) ); mrExport.AddAttribute( XML_NAMESPACE_NONE, "unicode", rCellStr ); - - if( rCellStr[ 0 ] == nSpace && rCellStr.getLength() == 1 ) - aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( rOut.GetTextWidth( OUString(' ') ), 0 ) ); - mrExport.AddAttribute( XML_NAMESPACE_NONE, "horiz-adv-x", OUString::number( aBoundRect.GetWidth() ) ); const OUString aPathString( SVGActionWriter::GetPathString( aPolyPoly, false ) );