[Libreoffice-commits] core.git: filter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Mar 14 21:50:45 UTC 2019


 filter/source/svg/svgfontexport.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 5cb819f3ceff626fcb1f10bf3eec35d5b2cceadb
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Mar 13 23:45:08 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Thu Mar 14 22:50:16 2019 +0100

    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 at yahoo.com>

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";


More information about the Libreoffice-commits mailing list