summaryrefslogtreecommitdiff
path: root/unotools/source/misc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-08-22 00:08:04 +0100
committerMichael Meeks <michael.meeks@collabora.com>2014-08-22 16:22:13 +0100
commit46ac7d60dde9a09239709716efcfcf66dd0e0a85 (patch)
tree28aecc878cb912be387ac6985a4f3b25ecce9d00 /unotools/source/misc
parente2adbfc33c2cf9ad9844427f6c393da64bf48852 (diff)
font lookup - cleanup GetEnglishSearchName function signature.
Change-Id: I6e3ca358d88e0285fe6e07b0617f3078a5edb857
Diffstat (limited to 'unotools/source/misc')
-rw-r--r--unotools/source/misc/fontcvt.cxx10
-rw-r--r--unotools/source/misc/fontdefs.cxx11
2 files changed, 11 insertions, 10 deletions
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 1cb82c1202c3..f91ab9a83ea0 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1412,11 +1412,10 @@ static ConvertChar aImplStarSymbolCvt = { NULL, "StarBats", ImplStarSymbolToStar
const ConvertChar* ConvertChar::GetRecodeData( const OUString& rOrgFontName, const OUString& rMapFontName )
{
const ConvertChar* pCvt = NULL;
- OUString aOrgName( rOrgFontName );
- GetEnglishSearchFontName( aOrgName );
- OUString aMapName( rMapFontName );
+
// clean up and lowercase font name
- GetEnglishSearchFontName( aMapName );
+ OUString aOrgName( GetEnglishSearchFontName( rOrgFontName ) );
+ OUString aMapName( GetEnglishSearchFontName( rMapFontName ) );
if( aMapName == "starsymbol"
|| aMapName == "opensymbol" )
@@ -1457,8 +1456,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& rOrgName,
{
const ConvertChar* pCvt = NULL;
- OUString aName = rOrgName;
- GetEnglishSearchFontName( aName );
+ OUString aName = GetEnglishSearchFontName( rOrgName );
if ( nFlags & FONTTOSUBSFONT_IMPORT )
{
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index 4a45fce78951..3b6b72278079 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -320,8 +320,10 @@ static ImplLocalizedFontName aImplLocalizedNamesList[] =
{ NULL, NULL },
};
-void GetEnglishSearchFontName( OUString& rName )
+OUString GetEnglishSearchFontName( const OUString& rInName )
{
+ OUString rName( rInName );
+
bool bNeedTranslation = false;
sal_Int32 nLen = rName.getLength();
@@ -438,6 +440,8 @@ void GetEnglishSearchFontName( OUString& rName )
if( it != aDictionary.end() )
rName = OUString::createFromAscii ( it->second );
}
+
+ return rName;
}
OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex )
@@ -519,9 +523,8 @@ OUString GetSubsFontName( const OUString& rName, sal_uLong nFlags )
OUString aName;
sal_Int32 nIndex = 0;
- OUString aOrgName = GetNextFontToken( rName, nIndex );
- // clean up and lowercase font name
- GetEnglishSearchFontName( aOrgName );
+ OUString aOrgName = GetEnglishSearchFontName(
+ GetNextFontToken( rName, nIndex ) );
// #93662# do not try to replace StarSymbol with MS only font
if( nFlags == (SUBSFONT_MS|SUBSFONT_ONLYONE)