diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-03-13 23:45:08 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-03-14 22:50:16 +0100 |
commit | 5cb819f3ceff626fcb1f10bf3eec35d5b2cceadb (patch) | |
tree | fee27eeecf1adae2026ad941bcd7201a3be8d699 /filter | |
parent | e7a864ea3d62c6a11048da75e014cf2a9eff601f (diff) |
Avoid using index for single getToken() call
Change-Id: I155996a0504e39b11afd1b2e0f2472f6c1830a1e
Reviewed-on: https://gerrit.libreoffice.org/69245
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/svg/svgfontexport.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index ebadd052a8d6..203655f4281b 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -49,7 +49,6 @@ SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont FontWeight eWeight( WEIGHT_NORMAL ); FontItalic eItalic( ITALIC_NONE ); const OUString& aFontName( rFont.GetFamilyName() ); - sal_Int32 nNextTokenPos( 0 ); switch( rFont.GetWeight() ) { @@ -66,7 +65,7 @@ SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont if( rFont.GetItalic() != ITALIC_NONE ) eItalic = ITALIC_NORMAL; - return( maGlyphTree[ aFontName.getToken( 0, ';', nNextTokenPos ) ][ eWeight ][ eItalic ] ); + return( maGlyphTree[ aFontName.getToken( 0, ';' ) ][ eWeight ][ eItalic ] ); } @@ -307,8 +306,7 @@ void SVGFontExport::EmbedFonts() OUString SVGFontExport::GetMappedFontName( const OUString& rFontName ) const { - sal_Int32 nNextTokenPos( 0 ); - OUString aRet( rFontName.getToken( 0, ';', nNextTokenPos ) ); + OUString aRet( rFontName.getToken( 0, ';' ) ); if( mnCurFontId ) aRet += " embedded"; |