diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-06 17:24:13 +0100 |
commit | fc0d57b7aff84f4bdca0a1f201527c265d5f0cf5 (patch) | |
tree | 49a72b76d2d2a92af6371748c19277778159b86d /vcl/generic | |
parent | e36dae401fc8963c9a92cb2c11d9b650b943c6d3 (diff) |
Revert "use the new OUString::fromUtf8 method"
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
Diffstat (limited to 'vcl/generic')
-rw-r--r-- | vcl/generic/fontmanager/fontconfig.cxx | 8 | ||||
-rw-r--r-- | vcl/generic/fontmanager/helper.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index 73fb00e5d44f..1a9dd396fe4c 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -577,7 +577,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int, continue; } - int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OUString::fromUtf8( OString( (sal_Char*)family ) ), true ); + int nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, OStringToOUString( OString( (sal_Char*)family ), RTL_TEXTENCODING_UTF8 ), true ); PrintFont* pUpdate = aFonts.front(); std::list<PrintFont*>::const_iterator second_font = aFonts.begin(); ++second_font; @@ -630,7 +630,7 @@ void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int, pUpdate->m_eItalic = convertSlant(slant); if( eStyleRes == FcResultMatch ) { - pUpdate->m_aStyleName = OUString::fromUtf8( OString( (sal_Char*)style ) ); + pUpdate->m_aStyleName = OStringToOUString( OString( (sal_Char*)style ), RTL_TEXTENCODING_UTF8 ); } // update font cache @@ -877,7 +877,7 @@ namespace const char* pScriptCode = uscript_getShortName(eScript); if (pScriptCode) aBuf.append('-').append(pScriptCode); - return LanguageTag(OUString::fromUtf8(aBuf.makeStringAndClear())); + return LanguageTag(OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); } #if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT) @@ -1056,7 +1056,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi rWrapper.m_aFontNameToLocalized.find(sFamily); if (aI != rWrapper.m_aFontNameToLocalized.end()) sFamily = aI->second; - rPattern.maSearchName = OUString::fromUtf8( sFamily ); + rPattern.maSearchName = OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); bRet = true; } } diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx index da8e2a55a477..3a313190ea80 100644 --- a/vcl/generic/fontmanager/helper.cxx +++ b/vcl/generic/fontmanager/helper.cxx @@ -163,7 +163,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub #ifdef SYSTEM_PPD_DIR if( pSubDir && rtl_str_compare( pSubDir, PRINTER_PPDDIR ) == 0 ) { - rPathList.push_back( OUString::fromUtf8( OString( SYSTEM_PPD_DIR ) ) ); + rPathList.push_back( OStringToOUString( OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) ); } #endif |