diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-25 10:07:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-25 14:19:02 +0100 |
commit | 4ce70ccc2d62769b138144de7798bf839ddd00f2 (patch) | |
tree | f43d4aac494bcf5b5bf5ee02ac86ca1b4dda06d2 | |
parent | 9928fd7fc600efa620ad7c3b78c0b0051a4fa930 (diff) |
TODO: get rid of this in another incompatible build with SW project
Change-Id: Ic3fb0c8eb37317d55bcdc6abc7ff9843ba11fac6
-rw-r--r-- | oox/source/export/drawingml.cxx | 3 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerwordglue.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8num.cxx | 3 | ||||
-rw-r--r-- | unotools/inc/unotools/fontdefs.hxx | 11 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 11 |
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 ) |