summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/export/drawingml.cxx3
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx3
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx3
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx7
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx3
-rw-r--r--unotools/inc/unotools/fontdefs.hxx11
-rw-r--r--unotools/source/misc/fontdefs.cxx11
7 files changed, 12 insertions, 29 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b6e67c8b2663..aae83ab0f669 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1449,7 +1449,8 @@ static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, Str
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index a22081ea0234..5f9a08c222cf 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -768,7 +768,8 @@ static void lcl_SubstituteBullet(rtl::OUString& rNumStr, rtl_TextEncoding& rChrS
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 97038a72856d..69114a4c8f67 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -631,7 +631,8 @@ namespace sw
bool IsStarSymbol(const rtl::OUString &rFontName)
{
- rtl::OUString sFamilyNm(GetFontToken(rFontName, 0));
+ xub_StrLen nIndex = 0;
+ rtl::OUString sFamilyNm(GetNextFontToken(rFontName, nIndex));
return (sFamilyNm.equalsIgnoreAsciiCase("starsymbol") ||
sFamilyNm.equalsIgnoreAsciiCase("opensymbol"));
}
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index f731c5df0b77..8816e7b61bc8 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -458,10 +458,11 @@ namespace sw
FontMapExport::FontMapExport(const String &rFamilyName)
{
- msPrimary = GetFontToken(rFamilyName, 0);
+ xub_StrLen nIndex = 0;
+ msPrimary = GetNextFontToken(rFamilyName, nIndex);
msSecondary = myImplHelpers::FindBestMSSubstituteFont(msPrimary);
- if (!msSecondary.Len())
- msSecondary = GetFontToken(rFamilyName, 1);
+ if (!msSecondary.Len() && nIndex != STRING_NOTFOUND)
+ msSecondary = GetNextFontToken(rFamilyName, nIndex);
}
bool ItemSort::operator()(sal_uInt16 nA, sal_uInt16 nB) const
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index bbcf2449c2f3..52a50cb975bb 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -724,7 +724,8 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx
index 84c38577ab07..df79a0f26eb2 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -39,17 +39,6 @@ namespace utl {
UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, sal_uLong nFlags );
-// -----------------
-// - FontTokenName -
-// -----------------
-
-UNOTOOLS_DLLPUBLIC String GetFontToken( const String& rName, xub_StrLen nToken, xub_StrLen& rIndex );
-inline String GetFontToken( const String& rName, xub_StrLen nToken )
-{
- xub_StrLen nTempIndex = 0;
- return GetFontToken( rName, nToken, nTempIndex );
-}
-
UNOTOOLS_DLLPUBLIC void AddTokenFontName( String& rName, const String& rNewToken );
struct UNOTOOLS_DLLPUBLIC FontNameHash { int operator()(const String&) const; };
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index ed5aa94ad81b..445ea23b37bc 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -477,17 +477,6 @@ String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex )
return String( rTokenStr, nTokenStart, nTokenLen );
}
-// TODO: get rid of this in another incompatible build with SW project.
-// SW's WW8 and RTF filters still use this (from fontcvt.hxx)
-String GetFontToken( const String& rTokenStr, xub_StrLen nToken, xub_StrLen& rIndex )
-{
- // skip nToken Tokens
- for( xub_StrLen i = 0; (i < nToken) && (rIndex != STRING_NOTFOUND); ++i )
- GetNextFontToken( rTokenStr, rIndex );
-
- return GetNextFontToken( rTokenStr, rIndex );
-}
-
// =======================================================================
static bool ImplIsFontToken( const String& rName, const String& rToken )