diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /vcl/generic | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'vcl/generic')
-rw-r--r-- | vcl/generic/app/gendisp.cxx | 1 | ||||
-rw-r--r-- | vcl/generic/fontmanager/fontcache.cxx | 19 | ||||
-rw-r--r-- | vcl/generic/fontmanager/fontconfig.cxx | 31 | ||||
-rw-r--r-- | vcl/generic/fontmanager/fontmanager.cxx | 68 | ||||
-rw-r--r-- | vcl/generic/fontmanager/fontsubst.cxx | 14 | ||||
-rw-r--r-- | vcl/generic/fontmanager/helper.cxx | 9 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 10 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.hxx | 14 | ||||
-rw-r--r-- | vcl/generic/glyphs/glyphcache.cxx | 4 | ||||
-rw-r--r-- | vcl/generic/glyphs/graphite_serverfont.cxx | 14 | ||||
-rw-r--r-- | vcl/generic/print/common_gfx.cxx | 8 | ||||
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 59 | ||||
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 28 | ||||
-rw-r--r-- | vcl/generic/print/glyphset.cxx | 4 | ||||
-rw-r--r-- | vcl/generic/print/glyphset.hxx | 20 | ||||
-rw-r--r-- | vcl/generic/print/printerjob.cxx | 74 | ||||
-rw-r--r-- | vcl/generic/print/psputil.cxx | 6 | ||||
-rw-r--r-- | vcl/generic/print/psputil.hxx | 4 | ||||
-rw-r--r-- | vcl/generic/print/text_gfx.cxx | 20 |
19 files changed, 187 insertions, 220 deletions
diff --git a/vcl/generic/app/gendisp.cxx b/vcl/generic/app/gendisp.cxx index f6d1e2e8c759..fffb5aac2d20 100644 --- a/vcl/generic/app/gendisp.cxx +++ b/vcl/generic/app/gendisp.cxx @@ -21,7 +21,6 @@ #include <generic/gendisp.hxx> #include <generic/geninst.h> -using ::rtl::OUString; SalGenericDisplay::SalGenericDisplay() { diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx index 863ee708f480..b2a2af528af6 100644 --- a/vcl/generic/fontmanager/fontcache.cxx +++ b/vcl/generic/fontmanager/fontcache.cxx @@ -45,9 +45,6 @@ using namespace std; using namespace psp; using namespace utl; -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OUStringToOString; /* * FontCache constructor @@ -103,7 +100,7 @@ void FontCache::flush() if( ! (aStream.IsOpen() && aStream.IsWritable()) ) { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontCache::flush: opening cache file %s failed\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); + fprintf( stderr, "FontCache::flush: opening cache file %s failed\n", OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); #endif return; } @@ -118,8 +115,8 @@ void FontCache::flush() { const FontDirMap& rDir( dir_it->second.m_aEntries ); - rtl::OString aDirectory(rManager.getDirectory(dir_it->first)); - rtl::OStringBuffer aLine("FontCacheDirectory:"); + OString aDirectory(rManager.getDirectory(dir_it->first)); + OStringBuffer aLine("FontCacheDirectory:"); aLine.append(dir_it->second.m_nTimestamp); aLine.append(':'); aLine.append(aDirectory); @@ -226,7 +223,7 @@ void FontCache::flush() } aStream.WriteLine(aLine.makeStringAndClear()); } - aStream.WriteLine(rtl::OString()); + aStream.WriteLine(OString()); } } m_bDoFlush = false; @@ -245,7 +242,7 @@ void FontCache::read() if( ! aStream.IsOpen() ) { #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "FontCache::read: opening cache file %s failed\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); + fprintf( stderr, "FontCache::read: opening cache file %s failed\n", OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); #endif return; } @@ -256,7 +253,7 @@ void FontCache::read() if ( !(aLine == CACHE_MAGIC) ) { #if OSL_DEBUG_LEVEL >1 - fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); + fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() ); #endif return; } @@ -278,7 +275,7 @@ void FontCache::read() sal_Int32 nTEnd = aLine.indexOf( ':', nSearchIndex ); if( nTEnd != -1 ) { - rtl::OString aTimeStamp = aLine.copy( nSearchIndex, nTEnd - nSearchIndex ); + OString aTimeStamp = aLine.copy( nSearchIndex, nTEnd - nSearchIndex ); nTimestamp = aTimeStamp.toInt64(); aDir = aLine.copy( nTEnd+1 ); } @@ -452,7 +449,7 @@ void FontCache::read() { if( pFont->m_bUserOverride ) { - rtl::OStringBuffer aFilePath(rManager.getDirectory(nDir)); + OStringBuffer aFilePath(rManager.getDirectory(nDir)); aFilePath.append('/').append(aFile); struct stat aStat; if( stat( aFilePath.getStr(), &aStat ) || diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index 33aff6a36d3c..dc8dfa7976e1 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -94,9 +94,6 @@ using namespace psp; #include <algorithm> using namespace osl; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; namespace { @@ -124,8 +121,8 @@ public: FcResult LocalizedElementFromPattern(FcPattern* pPattern, FcChar8 **family, const char *elementtype, const char *elementlangtype); //to-do, make private and add some cleanish accessor methods - boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aFontNameToLocalized; - boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash > m_aLocalizedToCanonical; + boost::unordered_map< OString, OString, OStringHash > m_aFontNameToLocalized; + boost::unordered_map< OString, OString, OStringHash > m_aLocalizedToCanonical; private: void cacheLocalizedFontNames(const FcChar8 *origfontname, const FcChar8 *bestfontname, const std::vector< lang_and_element > &lang_and_elements); @@ -297,10 +294,10 @@ namespace /* FIXME-BCP47: once fontconfig supports language tags this * language-territory stuff needs to be changed! */ SAL_INFO_IF( !rLangTag.isIsoLocale(), "i18n", "localizedsorter::bestname - not an ISO locale"); - rtl::OString sLangMatch(rtl::OUStringToOString(rLangTag.getLanguage().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8)); - rtl::OString sFullMatch = sLangMatch; + OString sLangMatch(OUStringToOString(rLangTag.getLanguage().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8)); + OString sFullMatch = sLangMatch; sFullMatch += OString('-'); - sFullMatch += rtl::OUStringToOString(rLangTag.getCountry().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8); + sFullMatch += OUStringToOString(rLangTag.getCountry().toAsciiLowerCase(), RTL_TEXTENCODING_UTF8); std::vector<lang_and_element>::const_iterator aEnd = elements.end(); bool alreadyclosematch = false; @@ -504,7 +501,7 @@ static void lcl_FcFontSetRemove(FcFontSet* pFSet, int i) memmove(pFSet->fonts + i, pFSet->fonts + i + 1, nTail*sizeof(FcPattern*)); } -void PrintFontManager::countFontconfigFonts( boost::unordered_map<rtl::OString, int, rtl::OStringHash>& o_rVisitedPaths ) +void PrintFontManager::countFontconfigFonts( boost::unordered_map<OString, int, OStringHash>& o_rVisitedPaths ) { #if OSL_DEBUG_LEVEL > 1 int nFonts = 0; @@ -696,7 +693,7 @@ void PrintFontManager::deinitFontconfig() FontCfgWrapper::release(); } -bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName ) +bool PrintFontManager::addFontconfigDir( const OString& rDirName ) { // workaround for a stability problems in older FC versions // when handling application specifc fonts @@ -714,7 +711,7 @@ bool PrintFontManager::addFontconfigDir( const rtl::OString& rDirName ) return false; // load dir-specific fc-config file too if available - const rtl::OString aConfFileName = rDirName + "/fc_local.conf"; + const OString aConfFileName = rDirName + "/fc_local.conf"; FILE* pCfgFile = fopen( aConfFileName.getStr(), "rb" ); if( pCfgFile ) { @@ -921,7 +918,7 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport) return 0; } -bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& rMissingCodes ) +bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes ) { bool bRet = false; @@ -933,7 +930,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r // Prefer scalable fonts FcPatternAddBool(pPattern, FC_SCALABLE, FcTrue); - const rtl::OString aTargetName = rtl::OUStringToOString( rPattern.maTargetName, RTL_TEXTENCODING_UTF8 ); + const OString aTargetName = OUStringToOString( rPattern.maTargetName, RTL_TEXTENCODING_UTF8 ); const FcChar8* pTargetNameUtf8 = (FcChar8*)aTargetName.getStr(); FcPatternAddString(pPattern, FC_FAMILY, pTargetNameUtf8); @@ -1021,11 +1018,11 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r if( eFamilyRes == FcResultMatch ) { OString sFamily((sal_Char*)family); - boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = + boost::unordered_map< OString, OString, OStringHash >::const_iterator aI = rWrapper.m_aFontNameToLocalized.find(sFamily); if (aI != rWrapper.m_aFontNameToLocalized.end()) sFamily = aI->second; - rPattern.maSearchName = rtl::OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); + rPattern.maSearchName = OStringToOUString( sFamily, RTL_TEXTENCODING_UTF8 ); bRet = true; } } @@ -1150,7 +1147,7 @@ ImplFontOptions* PrintFontManager::getFontOptions( OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); - boost::unordered_map< rtl::OString, rtl::OString, rtl::OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); + boost::unordered_map< OString, OString, OStringHash >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); if (aI != rWrapper.m_aLocalizedToCanonical.end()) sFamily = aI->second; if( !sFamily.isEmpty() ) @@ -1220,7 +1217,7 @@ bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star // populate pattern with font characteristics const LanguageTag aLangTag(rLocale); - const rtl::OString aLangAttrib = mapToFontConfigLangTag(aLangTag); + const OString aLangAttrib = mapToFontConfigLangTag(aLangTag); if (!aLangAttrib.isEmpty()) FcPatternAddString(pPattern, FC_LANG, (FcChar8*)aLangAttrib.getStr()); diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 8a1a5e1ea6b5..e86fceb11ce2 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -87,14 +87,6 @@ using namespace com::sun::star::beans; using namespace com::sun::star::lang; using ::comphelper::string::getToken; -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OStringHash; -using ::rtl::OStringBuffer; -using ::rtl::OUStringBuffer; -using ::rtl::OUStringHash; -using ::rtl::OStringToOUString; -using ::rtl::OUStringToOString; /* * static helpers @@ -120,7 +112,7 @@ inline sal_uInt32 getUInt32BE( const sal_uInt8*& pBuffer ) // ------------------------------------------------------------------------- -static FontWeight parseWeight( const rtl::OString& rWeight ) +static FontWeight parseWeight( const OString& rWeight ) { FontWeight eWeight = WEIGHT_DONTKNOW; if (rWeight.indexOf("bold") != -1) @@ -237,7 +229,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr { bool bSuccess = false; - rtl::OString aFile( PrintFontManager::get().getFontFile( this ) ); + OString aFile( PrintFontManager::get().getFontFile( this ) ); TrueTypeFont* pTTFont = NULL; @@ -611,7 +603,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider, m_eItalic = ITALIC_NONE; // weight - rtl::OString aWeight( pInfo->gfi->weight ); + OString aWeight( pInfo->gfi->weight ); m_eWeight = parseWeight( aWeight.toAsciiLowerCase() ); // pitch @@ -810,7 +802,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider, continue; } - rtl::OStringBuffer aTranslate; + OStringBuffer aTranslate; if( pChar->code & 0xff000000 ) aTranslate.append((char)(pChar->code >> 24)); if( pChar->code & 0xffff0000 ) @@ -818,7 +810,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider, if( pChar->code & 0xffffff00 ) aTranslate.append((char)((pChar->code & 0x0000ff00) >> 8 )); aTranslate.append((char)(pChar->code & 0xff)); - rtl::OUString aUni(rtl::OStringToOUString(aTranslate.makeStringAndClear(), m_aEncoding)); + OUString aUni(OStringToOUString(aTranslate.makeStringAndClear(), m_aEncoding)); pUnicodes[i] = aUni.toChar(); } else @@ -990,8 +982,8 @@ PrintFontManager::PrintFontManager() { for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAdobeCodes ); i++ ) { - m_aUnicodeToAdobename.insert( ::boost::unordered_multimap< sal_Unicode, ::rtl::OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); - m_aAdobenameToUnicode.insert( ::boost::unordered_multimap< ::rtl::OString, sal_Unicode, ::rtl::OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); + m_aUnicodeToAdobename.insert( ::boost::unordered_multimap< sal_Unicode, OString >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].pAdobename ) ); + m_aAdobenameToUnicode.insert( ::boost::unordered_multimap< OString, sal_Unicode, OStringHash >::value_type( aAdobeCodes[i].pAdobename, aAdobeCodes[i].aUnicode ) ); if( aAdobeCodes[i].aAdobeStandardCode ) { m_aUnicodeToAdobecode.insert( ::boost::unordered_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); @@ -1043,7 +1035,7 @@ int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate // ------------------------------------------------------------------------- -std::vector<fontID> PrintFontManager::addFontFile( const ::rtl::OString& rFileName ) +std::vector<fontID> PrintFontManager::addFontFile( const OString& rFileName ) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INetURLObject::FSYS_DETECT ); @@ -1103,7 +1095,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, :: } if (eFormat == UNKNOWN) { - rtl::OString aExt( rFontFile.copy( rFontFile.lastIndexOf( '.' )+1 ) ); + OString aExt( rFontFile.copy( rFontFile.lastIndexOf( '.' )+1 ) ); if( aExt.equalsIgnoreAsciiCase("pfb") || aExt.equalsIgnoreAsciiCase("pfa") ) eFormat = TYPE1; else if( aExt.equalsIgnoreAsciiCase("afm")) @@ -1124,7 +1116,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, :: for( unsigned int i = 0; i < SAL_N_ELEMENTS(pSuffix); i++ ) { - rtl::OString aName = rtl::OStringBuffer( + OString aName = OStringBuffer( rFontFile.copy(0, rFontFile.getLength() - 4)). append(pSuffix[i]).makeStringAndClear(); @@ -1470,7 +1462,7 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const { bool bSuccess = false; rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - rtl::OString aFile = getFontFile( pFont ); + OString aFile = getFontFile( pFont ); TrueTypeFont* pTTFont = NULL; TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); @@ -1524,8 +1516,8 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const SAL_WARN_IF( !aInfo.psname, "vcl", "No PostScript name in font:" << aFile.getStr() ); - rtl::OUString sPSName = aInfo.psname ? - rtl::OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding) : + OUString sPSName = aInfo.psname ? + OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding) : m_pAtoms->getString(ATOM_FAMILYNAME, pFont->m_nFamilyName); // poor font does not have a postscript name pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, sPSName, sal_True ); @@ -1685,13 +1677,13 @@ void PrintFontManager::initialize() // part one - look for downloadable fonts rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - const ::rtl::OUString &rSalPrivatePath = psp::getFontPath(); + const OUString &rSalPrivatePath = psp::getFontPath(); // search for the fonts in SAL_PRIVATE_FONTPATH first; those are // the fonts installed with the office if( !rSalPrivatePath.isEmpty() ) { - OString aPath = rtl::OUStringToOString( rSalPrivatePath, aEncoding ); + OString aPath = OUStringToOString( rSalPrivatePath, aEncoding ); const bool bAreFCSubstitutionsEnabled = AreFCSubstitutionsEnabled(); sal_Int32 nIndex = 0; do @@ -1819,7 +1811,7 @@ void PrintFontManager::initialize() while( ! readdir_r( pDIR, (struct dirent*)aDirEntBuffer, &pDirEntry ) && pDirEntry ) { - rtl::OStringBuffer aFile(aDir); + OStringBuffer aFile(aDir); aFile.append('/').append(pDirEntry->d_name); struct stat aStat; if( ! stat( aFile.getStr(), &aStat ) @@ -1868,7 +1860,7 @@ void PrintFontManager::initialize() m_aFamilyTypes.find( font_it->second->m_nFamilyName ); if (it != m_aFamilyTypes.end()) continue; - const ::rtl::OUString& rFamily = + const OUString& rFamily = m_pAtoms->getString( ATOM_FAMILYNAME, font_it->second->m_nFamilyName); FontFamily eType = matchFamilyName( rFamily ); m_aFamilyTypes[ font_it->second->m_nFamilyName ] = eType; @@ -2213,7 +2205,7 @@ int PrintFontManager::getFontFaceNumber( fontID nFontID ) const // ------------------------------------------------------------------------- -FontFamily PrintFontManager::matchFamilyName( const ::rtl::OUString& rFamily ) const +FontFamily PrintFontManager::matchFamilyName( const OUString& rFamily ) const { typedef struct { const char* mpName; @@ -2251,7 +2243,7 @@ FontFamily PrintFontManager::matchFamilyName( const ::rtl::OUString& rFamily ) c { InitializeClass( "zapfchancery", FAMILY_SCRIPT ) } }; - rtl::OString aFamily = rtl::OUStringToOString( rFamily, RTL_TEXTENCODING_ASCII_US ); + OString aFamily = OUStringToOString( rFamily, RTL_TEXTENCODING_ASCII_US ); sal_uInt32 nLower = 0; sal_uInt32 nUpper = SAL_N_ELEMENTS(pFamilyMatch); @@ -2336,7 +2328,7 @@ OString PrintFontManager::getFontFile( PrintFont* pFont ) const // ------------------------------------------------------------------------- -const ::rtl::OUString& PrintFontManager::getPSName( fontID nFontID ) const +const OUString& PrintFontManager::getPSName( fontID nFontID ) const { PrintFont* pFont = getFont( nFontID ); if( pFont && pFont->m_nPSName == 0 ) @@ -2442,7 +2434,7 @@ bool PrintFontManager::isFontDownloadingAllowedForPrinting( fontID nFont ) const if( pTTFontFile->m_nTypeFlags & TYPEFLAG_INVALID ) { TrueTypeFont* pTTFont = NULL; - rtl::OString aFile = getFontFile( pFont ); + OString aFile = getFontFile( pFont ); if( OpenTTFontFile( aFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK ) { // get type flags @@ -2616,7 +2608,7 @@ bool PrintFontManager::createFontSubset( // prepare system name for read access for subset source file // TODO: since this file is usually already mmapped there is no need to open it again - const rtl::OString aFromFile = getFontFile( pFont ); + const OString aFromFile = getFontFile( pFont ); TrueTypeFont* pTTFont = NULL; // TODO: rename to SfntFont TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); @@ -2628,7 +2620,7 @@ bool PrintFontManager::createFontSubset( if( osl_File_E_None != osl_getSystemPathFromFileURL( rOutFile.pData, &aSysPath.pData ) ) return false; const rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - const rtl::OString aToFile( OUStringToOString( aSysPath, aEncoding ) ); + const OString aToFile( OUStringToOString( aSysPath, aEncoding ) ); // do CFF subsetting if possible int nCffLength = 0; @@ -2713,7 +2705,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont, { TrueTypeFont* pTTFont = NULL; TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont); - rtl::OString aFromFile = getFontFile( pFont ); + OString aFromFile = getFontFile( pFont ); if( OpenTTFontFile( aFromFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK ) return; int nGlyphs = GetTTGlyphCount( pTTFont ); @@ -2791,7 +2783,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont, // ------------------------------------------------------------------------- -const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, rtl::OString >** pNonEncoded ) const +const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, OString >** pNonEncoded ) const { PrintFont* pFont = getFont( nFont ); if( !pFont || @@ -2812,8 +2804,8 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const { - std::pair< boost::unordered_multimap< sal_Unicode, rtl::OString >::const_iterator, - boost::unordered_multimap< sal_Unicode, rtl::OString >::const_iterator > range + std::pair< boost::unordered_multimap< sal_Unicode, OString >::const_iterator, + boost::unordered_multimap< sal_Unicode, OString >::const_iterator > range = m_aUnicodeToAdobename.equal_range( aChar ); std::list< OString > aRet; @@ -2831,10 +2823,10 @@ std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aCha } // ------------------------------------------------------------------------- -std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const rtl::OString& rName ) const +std::list< sal_Unicode > PrintFontManager::getUnicodeFromAdobeName( const OString& rName ) const { - std::pair< boost::unordered_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator, - boost::unordered_multimap< rtl::OString, sal_Unicode, rtl::OStringHash >::const_iterator > range + std::pair< boost::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator, + boost::unordered_multimap< OString, sal_Unicode, OStringHash >::const_iterator > range = m_aAdobenameToUnicode.equal_range( rName ); std::list< sal_Unicode > aRet; diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx index a339ca9ff037..94dcda14e75a 100644 --- a/vcl/generic/fontmanager/fontsubst.cxx +++ b/vcl/generic/fontmanager/fontsubst.cxx @@ -60,7 +60,7 @@ class FcGlyphFallbackSubstititution { // TODO: add a cache public: - bool FindFontSubstitute( FontSelectPattern&, rtl::OUString& rMissingCodes ) const; + bool FindFontSubstitute( FontSelectPattern&, OUString& rMissingCodes ) const; }; int SalGenericInstance::FetchFontSubstitutionFlags() @@ -116,7 +116,7 @@ void SalGenericInstance::RegisterFontSubstitutors( ImplDevFontList* pList ) // ----------------------------------------------------------------------- -static FontSelectPattern GetFcSubstitute(const FontSelectPattern &rFontSelData, rtl::OUString& rMissingCodes ) +static FontSelectPattern GetFcSubstitute(const FontSelectPattern &rFontSelData, OUString& rMissingCodes ) { FontSelectPattern aSubstituted(rFontSelData); psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); @@ -193,9 +193,9 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); #ifdef DEBUG - const rtl::OString aOrigName(rtl::OUStringToOString(rFontSelData.maTargetName, + const OString aOrigName(OUStringToOString(rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8)); - const rtl::OString aSubstName(rtl::OUStringToOString(aOut.maSearchName, + const OString aSubstName(OUStringToOString(aOut.maSearchName, RTL_TEXTENCODING_UTF8)); printf( "FcPreMatchSubstititution \"%s\" bipw=%d%d%d%d -> ", aOrigName.getStr(), rFontSelData.GetWeight(), rFontSelData.GetSlant(), @@ -223,7 +223,7 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa // ----------------------------------------------------------------------- bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFontSelData, - rtl::OUString& rMissingCodes ) const + OUString& rMissingCodes ) const { // We dont' actually want to talk to Fontconfig at all for symbol fonts if( rFontSelData.IsSymbolFont() ) @@ -244,9 +244,9 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFont const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); #ifdef DEBUG - const rtl::OString aOrigName(rtl::OUStringToOString(rFontSelData.maTargetName, + const OString aOrigName(OUStringToOString(rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8)); - const rtl::OString aSubstName(rtl::OUStringToOString(aOut.maSearchName, + const OString aSubstName(OUStringToOString(aOut.maSearchName, RTL_TEXTENCODING_UTF8)); printf( "FcGFSubstititution \"%s\" bipw=%d%d%d%d ->", aOrigName.getStr(), rFontSelData.GetWeight(), rFontSelData.GetSlant(), diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx index 7b1a5713da12..33db29819c79 100644 --- a/vcl/generic/fontmanager/helper.cxx +++ b/vcl/generic/fontmanager/helper.cxx @@ -32,11 +32,6 @@ #include "rtl/bootstrap.hxx" using ::rtl::Bootstrap; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; -using ::rtl::OStringToOUString; -using ::rtl::OUStringToOString; namespace psp { @@ -166,7 +161,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( rtl::OStringToOUString( rtl::OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) ); + rPathList.push_back( OStringToOUString( OString( SYSTEM_PPD_DIR ), RTL_TEXTENCODING_UTF8 ) ); } #endif @@ -360,7 +355,7 @@ void psp::normPath( OString& rPath ) // double slashes and slash at end are probably // removed by realpath anyway, but since this runs // on many different platforms let's play it safe - rtl::OString aPath = rPath.replaceAll("//", "/"); + OString aPath = rPath.replaceAll("//", "/"); if( !aPath.isEmpty() && aPath[aPath.getLength()-1] == '/' ) aPath = aPath.copy(0, aPath.getLength()-1); diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 17e089ff6642..09a00dba182e 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -156,7 +156,7 @@ static int nDefaultPrioAntiAlias = 1; // FreetypeManager // ======================================================================= -FtFontFile::FtFontFile( const ::rtl::OString& rNativeFileName ) +FtFontFile::FtFontFile( const OString& rNativeFileName ) : maNativeFileName( rNativeFileName ), mpFileMap( NULL ), mnFileSize( 0 ), @@ -184,7 +184,7 @@ FtFontFile::FtFontFile( const ::rtl::OString& rNativeFileName ) // ----------------------------------------------------------------------- -FtFontFile* FtFontFile::FindFontFile( const ::rtl::OString& rNativeFileName ) +FtFontFile* FtFontFile::FindFontFile( const OString& rNativeFileName ) { // font file already known? (e.g. for ttc, synthetic, aliased fonts) const char* pFileName = rNativeFileName.getStr(); @@ -299,7 +299,7 @@ const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, siz // ======================================================================= FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes, - const ::rtl::OString& rNativeFileName, int nFaceNum, sal_IntPtr nFontId, int nSynthetic, + const OString& rNativeFileName, int nFaceNum, sal_IntPtr nFontId, int nSynthetic, const ExtraKernInfo* pExtraKernInfo ) : maFaceFT( NULL ), @@ -568,7 +568,7 @@ FreetypeManager::~FreetypeManager() // ----------------------------------------------------------------------- -void FreetypeManager::AddFontFile( const rtl::OString& rNormalizedName, +void FreetypeManager::AddFontFile( const OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes& rDevFontAttr, const ExtraKernInfo* pExtraKernInfo ) { @@ -885,7 +885,7 @@ boost::shared_ptr<ImplFontOptions> ServerFont::GetFontOptions() const return mpFontOptions; } -const ::rtl::OString* ServerFont::GetFontFileName() const +const OString* ServerFont::GetFontFileName() const { return mpFontInfo->GetFontFileName(); } diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx index dea75b3b2332..2c31bb424449 100644 --- a/vcl/generic/glyphs/gcach_ftyp.hxx +++ b/vcl/generic/glyphs/gcach_ftyp.hxx @@ -37,20 +37,20 @@ class GraphiteFaceWrapper; class FtFontFile { public: - static FtFontFile* FindFontFile( const ::rtl::OString& rNativeFileName ); + static FtFontFile* FindFontFile( const OString& rNativeFileName ); bool Map(); void Unmap(); const unsigned char* GetBuffer() const { return mpFileMap; } int GetFileSize() const { return mnFileSize; } - const ::rtl::OString* GetFileName() const { return &maNativeFileName; } + const OString* GetFileName() const { return &maNativeFileName; } int GetLangBoost() const { return mnLangBoost; } private: - FtFontFile( const ::rtl::OString& rNativeFileName ); + FtFontFile( const OString& rNativeFileName ); - const ::rtl::OString maNativeFileName; + const OString maNativeFileName; const unsigned char* mpFileMap; int mnFileSize; int mnRefCount; @@ -64,7 +64,7 @@ class FtFontInfo { public: FtFontInfo( const ImplDevFontAttributes&, - const ::rtl::OString& rNativeFileName, + const OString& rNativeFileName, int nFaceNum, sal_IntPtr nFontId, int nSynthetic, const ExtraKernInfo* ); ~FtFontInfo(); @@ -77,7 +77,7 @@ public: #endif void ReleaseFaceFT( FT_FaceRec_* ); - const ::rtl::OString* GetFontFileName() const { return mpFontFile->GetFileName(); } + const OString* GetFontFileName() const { return mpFontFile->GetFileName(); } int GetFaceNum() const { return mnFaceNum; } int GetSynthetic() const { return mnSynthetic; } sal_IntPtr GetFontId() const { return mnFontId; } @@ -148,7 +148,7 @@ public: FreetypeManager(); ~FreetypeManager(); - void AddFontFile( const rtl::OString& rNormalizedName, + void AddFontFile( const OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&, const ExtraKernInfo* ); void AnnounceFonts( ImplDevFontList* ) const; diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx index 3ceb72442516..fa3659a3990f 100644 --- a/vcl/generic/glyphs/glyphcache.cxx +++ b/vcl/generic/glyphs/glyphcache.cxx @@ -89,7 +89,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData if (rFontSelData.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX) != -1) { - rtl::OString aFeatName = rtl::OUStringToOString( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); + OString aFeatName = OUStringToOString( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); nFontId ^= aFeatName.hashCode(); } #endif @@ -163,7 +163,7 @@ GlyphCache& GlyphCache::GetInstance() // ----------------------------------------------------------------------- -void GlyphCache::AddFontFile( const rtl::OString& rNormalizedName, int nFaceNum, +void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes& rDFA, const ExtraKernInfo* pExtraKern ) { if( mpFtManager ) diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx index 2e3739c063b3..42d98ad287d5 100644 --- a/vcl/generic/glyphs/graphite_serverfont.cxx +++ b/vcl/generic/glyphs/graphite_serverfont.cxx @@ -63,13 +63,13 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro rServerFont.GetGraphiteFace()->addFont(rServerFont.GetFontSelData().mnHeight, pFont); } maImpl.SetFont(pFont); - rtl::OString aLang(""); + OString aLang(""); if (rServerFont.GetFontSelData().meLanguage != LANGUAGE_DONTKNOW) { - aLang = rtl::OUStringToOString( LanguageTag( rServerFont.GetFontSelData().meLanguage ).getBcp47(), + aLang = OUStringToOString( LanguageTag( rServerFont.GetFontSelData().meLanguage ).getBcp47(), RTL_TEXTENCODING_UTF8 ); } - rtl::OString name = rtl::OUStringToOString( + OString name = OUStringToOString( rServerFont.GetFontSelData().maTargetName, RTL_TEXTENCODING_UTF8 ); #ifdef DEBUG printf("GraphiteServerFontLayout %lx %s size %d %f\n", (long unsigned int)this, name.getStr(), @@ -79,17 +79,17 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro sal_Int32 nFeat = name.indexOf(grutils::GrFeatureParser::FEAT_PREFIX) + 1; if (nFeat > 0) { - rtl::OString aFeat = name.copy(nFeat, name.getLength() - nFeat); + OString aFeat = name.copy(nFeat, name.getLength() - nFeat); mpFeatures = new grutils::GrFeatureParser( rServerFont.GetGraphiteFace()->face(), aFeat, aLang); #ifdef DEBUG if (mpFeatures) printf("GraphiteServerFontLayout %s/%s/%s %x language %d features %d errors\n", - rtl::OUStringToOString( rServerFont.GetFontSelData().GetFamilyName(), + OUStringToOString( rServerFont.GetFontSelData().GetFamilyName(), RTL_TEXTENCODING_UTF8 ).getStr(), - rtl::OUStringToOString( rServerFont.GetFontSelData().maTargetName, + OUStringToOString( rServerFont.GetFontSelData().maTargetName, RTL_TEXTENCODING_UTF8 ).getStr(), - rtl::OUStringToOString( rServerFont.GetFontSelData().maSearchName, + OUStringToOString( rServerFont.GetFontSelData().maSearchName, RTL_TEXTENCODING_UTF8 ).getStr(), rServerFont.GetFontSelData().meLanguage, (int)mpFeatures->numFeatures(), mpFeatures->parseErrors()); diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index c460558f641d..260fbc951cd5 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -788,7 +788,7 @@ PrinterGfx::PSSetFont () && rCurrent.maEncoding <= RTL_TEXTENCODING_USER_END) ) { - rtl::OString aReencodedFont = + OString aReencodedFont = psp::GlyphSet::GetReencodedFontName (rCurrent.maEncoding, rCurrent.maFont); @@ -1163,9 +1163,9 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize // first search the BoundingBox of the EPS data SvMemoryStream aStream( pPtr, nSize, STREAM_READ ); aStream.Seek( STREAM_SEEK_TO_BEGIN ); - rtl::OString aLine; + OString aLine; - rtl::OString aDocTitle; + OString aDocTitle; double fLeft = 0, fRight = 0, fTop = 0, fBottom = 0; bool bEndComments = false; while( ! aStream.IsEof() @@ -1179,7 +1179,7 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize char cChar = aLine[1]; if( cChar == '%' ) { - if( aLine.matchIgnoreAsciiCase( rtl::OString( "%%BoundingBox:") ) ) + if( aLine.matchIgnoreAsciiCase( OString( "%%BoundingBox:") ) ) { aLine = WhitespaceToSpace( aLine.getToken(1, ':') ); if( !aLine.isEmpty() && aLine.indexOf( "atend" ) == -1 ) diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 583587002361..9ffb69cdcaa3 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -60,9 +60,6 @@ using namespace psp; using namespace com::sun::star; -using ::rtl::OUString; -using ::rtl::OUStringHash; -using ::rtl::OUStringToOString; /* * static helpers @@ -79,19 +76,19 @@ typedef int(*faxFunction)(OUString&); static faxFunction pFaxNrFunction = NULL; } -static rtl::OUString getPdfDir( const PrinterInfo& rInfo ) +static OUString getPdfDir( const PrinterInfo& rInfo ) { - rtl::OUString aDir; + OUString aDir; sal_Int32 nIndex = 0; while( nIndex != -1 ) { - rtl::OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); if( aToken.startsWith( "pdf=" ) ) { sal_Int32 nPos = 0; aDir = aToken.getToken( 1, '=', nPos ); if( aDir.isEmpty() && getenv( "HOME" ) ) - aDir = rtl::OUString( getenv( "HOME" ), strlen( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); + aDir = OUString( getenv( "HOME" ), strlen( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); break; } } @@ -227,14 +224,14 @@ static bool passFileToCommandLine( const OUString& rFilename, const OUString& rC bool bSuccess = false; rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - rtl::OString aCmdLine(rtl::OUStringToOString(rCommandLine, aEncoding)); - rtl::OString aFilename(rtl::OUStringToOString(rFilename, aEncoding)); + OString aCmdLine(OUStringToOString(rCommandLine, aEncoding)); + OString aFilename(OUStringToOString(rFilename, aEncoding)); bool bPipe = aCmdLine.indexOf( "(TMP)" ) != -1 ? false : true; // setup command line for exec if( ! bPipe ) - aCmdLine = aCmdLine.replaceAll(rtl::OString("(TMP)"), aFilename); + aCmdLine = aCmdLine.replaceAll(OString("(TMP)"), aFilename); #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "%s commandline: \"%s\"\n", @@ -362,7 +359,7 @@ static bool sendAFax( const OUString& rFaxNumber, const OUString& rFileName, con bSuccess = false; // clean up temp file - unlink(rtl::OUStringToOString(rFileName, osl_getThreadTextEncoding()).getStr()); + unlink(OUStringToOString(rFileName, osl_getThreadTextEncoding()).getStr()); return bSuccess; #else @@ -465,7 +462,7 @@ void SalGenericInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) sal_Int32 nIndex = 0; while( nIndex != -1 ) { - rtl::OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); + OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) ); if( aToken.match( "pdf=" ) ) { pInfo->maLocation = getPdfDir( rInfo ); @@ -487,7 +484,7 @@ void SalGenericInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) mbPrinterInit = true; } -rtl::OUString SalGenericInstance::GetDefaultPrinter() +OUString SalGenericInstance::GetDefaultPrinter() { mbPrinterInit = true; PrinterInfoManager& rManager( PrinterInfoManager::get() ); @@ -642,7 +639,7 @@ sal_Bool PspSalInfoPrinter::SetData( TenMuToPt( pJobSetup->mnPaperWidth ), TenMuToPt( pJobSetup->mnPaperHeight ) ); else - aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); + aPaper = OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1); pKey = aData.m_pParser->getKey( OUString("PageSize") ); pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL; @@ -779,7 +776,7 @@ sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) return pKey ? pKey->countValues() : 0; } -rtl::OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin ) +OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin ) { JobData aData; JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); @@ -879,9 +876,9 @@ PspSalPrinter::~PspSalPrinter() { } -static rtl::OUString getTmpName() +static OUString getTmpName() { - rtl::OUString aTmp, aSys; + OUString aTmp, aSys; osl_createTempFile( NULL, NULL, &aTmp.pData ); osl_getSystemPathFromFileURL( aTmp.pData, &aSys.pData ); @@ -889,9 +886,9 @@ static rtl::OUString getTmpName() } sal_Bool PspSalPrinter::StartJob( - const rtl::OUString* pFileName, - const rtl::OUString& rJobName, - const rtl::OUString& rAppName, + const OUString* pFileName, + const OUString& rJobName, + const OUString& rAppName, sal_uLong nCopies, bool bCollate, bool bDirect, @@ -902,8 +899,8 @@ sal_Bool PspSalPrinter::StartJob( m_bFax = false; m_bPdf = false; - m_aFileName = pFileName ? *pFileName : rtl::OUString(); - m_aTmpFile = rtl::OUString(); + m_aFileName = pFileName ? *pFileName : OUString(); + m_aTmpFile = OUString(); m_nCopies = nCopies; m_bCollate = bCollate; @@ -930,7 +927,7 @@ sal_Bool PspSalPrinter::StartJob( m_aTmpFile = getTmpName(); nMode = S_IRUSR | S_IWUSR; - ::boost::unordered_map< OUString, OUString, ::rtl::OUStringHash >::const_iterator it; + ::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it; it = pJobSetup->maValueMap.find( OUString("FAX#") ); if( it != pJobSetup->maValueMap.end() ) m_aFaxNr = it->second; @@ -948,7 +945,7 @@ sal_Bool PspSalPrinter::StartJob( if( m_aFileName.isEmpty() ) { - rtl::OUStringBuffer aFileName( getPdfDir( rInfo ) ); + OUStringBuffer aFileName( getPdfDir( rInfo ) ); aFileName.append( '/' ); aFileName.append( rJobName ); aFileName.appendAscii( ".pdf" ); @@ -1061,18 +1058,18 @@ struct PDFNewJobParameters struct PDFPrintFile { - rtl::OUString maTmpURL; + OUString maTmpURL; PDFNewJobParameters maParameters; - PDFPrintFile( const rtl::OUString& i_rURL, const PDFNewJobParameters& i_rNewParameters ) + PDFPrintFile( const OUString& i_rURL, const PDFNewJobParameters& i_rNewParameters ) : maTmpURL( i_rURL ) , maParameters( i_rNewParameters ) {} }; -sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::OUString& i_rJobName, const rtl::OUString& i_rAppName, +sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& i_rAppName, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) { - OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" ); + OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" ); // mark for endjob m_bIsPDFWriterJob = true; // reset IsLastPage @@ -1174,7 +1171,7 @@ sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::O { // this is not a file URL, but it should // form it into a osl friendly file URL - rtl::OUString aTmp; + OUString aTmp; osl_getFileURLFromSystemPath( aPDFUrl.pData, &aTmp.pData ); aPDFUrl = aTmp; } @@ -1270,7 +1267,7 @@ sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::O break; } } while( nBytesRead == buffer.size() ); - rtl::OUStringBuffer aBuf( i_rJobName.getLength() + 8 ); + OUStringBuffer aBuf( i_rJobName.getLength() + 8 ); aBuf.append( i_rJobName ); if( i > 0 || nCurJob > 0 ) { @@ -1295,7 +1292,7 @@ sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::O for( size_t i = 0; i < aPDFFiles.size(); i++ ) { osl_removeFile( aPDFFiles[i].maTmpURL.pData ); - OSL_TRACE( "removed print PDF file %s", rtl::OUStringToOString( aPDFFiles[i].maTmpURL, RTL_TEXTENCODING_UTF8 ).getStr() ); + OSL_TRACE( "removed print PDF file %s", OUStringToOString( aPDFFiles[i].maTmpURL, RTL_TEXTENCODING_UTF8 ).getStr() ); } } diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 98601f034410..a26a844a19c4 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -57,8 +57,6 @@ using namespace psp; -using ::rtl::OUString; -using ::rtl::OString; // ----- Implementation of PrinterBmp by means of SalBitmap/BitmapBuffer --------------- @@ -279,7 +277,7 @@ GenPspGraphics::GenPspGraphics() } void GenPspGraphics::Init( psp::JobData* pJob, psp::PrinterGfx* pGfx, - rtl::OUString* pPhone, bool bSwallow, + OUString* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter ) { m_pJobData = pJob; @@ -700,7 +698,7 @@ private: bool mbVertical; bool mbArtItalic; bool mbArtBold; - rtl::OUString maText; + OUString maText; int mnMinCharPos; }; @@ -887,7 +885,7 @@ void GenPspGraphics::SetTextColor( SalColor nSalColor ) m_pPrinterGfx->SetTextColor (aColor); } -bool GenPspGraphics::AddTempDevFont( ImplDevFontList*, const rtl::OUString&,const rtl::OUString& ) +bool GenPspGraphics::AddTempDevFont( ImplDevFontList*, const OUString&,const OUString& ) { return false; } @@ -918,7 +916,7 @@ void GenPspGraphics::GetDevFontSubstList( OutputDevice* pOutDev ) const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName ); if( rInfo.m_bPerformFontSubstitution ) { - for( boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) + for( boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it = rInfo.m_aFontSubstitutes.begin(); it != rInfo.m_aFontSubstitutes.end(); ++it ) pOutDev->ImplAddDevFontSubstitute( it->first, it->second, FONT_SUBSTITUTE_ALWAYS ); } } @@ -1040,7 +1038,7 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe //-------------------------------------------------------------------------- sal_Bool GenPspGraphics::CreateFontSubset( - const rtl::OUString& rToFile, + const OUString& rToFile, const PhysicalFontFace* pFont, sal_Int32* pGlyphIDs, sal_uInt8* pEncoding, @@ -1171,8 +1169,8 @@ ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPri #if OSL_DEBUG_LEVEL > 2 if( bHasMapNames ) { - rtl::OString aOrigName(rtl::OUStringToOString(aDFA.GetFamilyName(), osl_getThreadTextEncoding())); - rtl::OString aAliasNames(rtl::OUStringToOString(aDFA.GetAliasNames(), osl_getThreadTextEncoding())); + OString aOrigName(OUStringToOString(aDFA.GetFamilyName(), osl_getThreadTextEncoding())); + OString aAliasNames(OUStringToOString(aDFA.GetAliasNames(), osl_getThreadTextEncoding())); SAL_INFO( "vcl.fonts", "using alias names " << aAliasNames.getStr() << " for font family " << aOrigName.getStr() ); } #endif @@ -1235,7 +1233,7 @@ void GenPspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastP pFontList->Add( pFD ); } -bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNewText, sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop ) +bool GenPspGraphics::filterText( const OUString& rOrig, OUString& rNewText, sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop ) { if( ! m_pPhoneNr ) return false; @@ -1253,7 +1251,7 @@ bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNew sal_Int32 nPos; sal_Int32 nStart = 0; sal_Int32 nStop = rLen; - rtl::OUString aPhone = rOrig.copy( nIndex, rLen ); + OUString aPhone = rOrig.copy( nIndex, rLen ); if( ! m_bPhoneCollectionActive ) { @@ -1282,7 +1280,7 @@ bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNew m_aPhoneCollection += aPhone.copy( nTokenStart, nTokenStop - nTokenStart ); if( ! m_bPhoneCollectionActive ) { - rtl::OUStringBuffer aPhoneNr; + OUStringBuffer aPhoneNr; aPhoneNr.append( "<Fax#>" ); aPhoneNr.append( m_aPhoneCollection ); aPhoneNr.append( "</Fax#>" ); @@ -1303,7 +1301,7 @@ bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNew rCutStart = nStart+nIndex; rCutStop = nStop+nIndex; if (rCutStart != rCutStop) - rNewText = ( rCutStart ? rOrig.copy( 0, rCutStart ) : rtl::OUString() ) + rOrig.copy( rCutStop ); + rNewText = ( rCutStart ? rOrig.copy( 0, rCutStart ) : OUString() ) + rOrig.copy( rCutStop ); } return bRet && m_bSwallowFaxNo; @@ -1391,8 +1389,8 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs *pDataLen = aStat.st_size; #else // FIXME: test me ! ... - rtl::OUString aURL; - if( !osl::File::getFileURLFromSystemPath( rtl::OStringToOUString( aSysPath, osl_getThreadTextEncoding() ), aURL ) ) + OUString aURL; + if( !osl::File::getFileURLFromSystemPath( OStringToOUString( aSysPath, osl_getThreadTextEncoding() ), aURL ) ) return NULL; osl::File aFile( aURL ); if( aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock ) != osl::File::E_None ) diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx index d5635e7e4d5b..d22d2c89e56d 100644 --- a/vcl/generic/print/glyphset.cxx +++ b/vcl/generic/print/glyphset.cxx @@ -43,10 +43,6 @@ using namespace vcl; using namespace psp; -using ::rtl::OUString; -using ::rtl::OString; -using ::rtl::OStringBuffer; -using ::rtl::OUStringToOString; GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical) : mnFontID (nFontID), diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx index f469d9b2a3af..a062bb829b1b 100644 --- a/vcl/generic/print/glyphset.hxx +++ b/vcl/generic/print/glyphset.hxx @@ -42,7 +42,7 @@ private: sal_Int32 mnFontID; sal_Bool mbVertical; - rtl::OString maBaseName; + OString maBaseName; fonttype::type meBaseType; rtl_TextEncoding mnBaseEncoding; bool mbUseFontEncoding; @@ -55,12 +55,12 @@ private: char_list_t maCharList; glyph_list_t maGlyphList; - rtl::OString GetGlyphSetName (sal_Int32 nGlyphSetID); - rtl::OString GetCharSetName (sal_Int32 nGlyphSetID); + OString GetGlyphSetName (sal_Int32 nGlyphSetID); + OString GetCharSetName (sal_Int32 nGlyphSetID); sal_Int32 GetGlyphSetEncoding (sal_Int32 nGlyphSetID); - rtl::OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID); + OString GetGlyphSetEncodingName (sal_Int32 nGlyphSetID); - rtl::OString GetReencodedFontName (sal_Int32 nGlyphSetID); + OString GetReencodedFontName (sal_Int32 nGlyphSetID); void PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID); @@ -96,12 +96,12 @@ public: sal_Int32 GetFontID (); fonttype::type GetFontType (); - static rtl::OString + static OString GetReencodedFontName (rtl_TextEncoding nEnc, - const rtl::OString &rFontName); - static rtl::OString + const OString &rFontName); + static OString GetGlyphSetEncodingName (rtl_TextEncoding nEnc, - const rtl::OString &rFontName); + const OString &rFontName); sal_Bool IsVertical (); void DrawText (PrinterGfx &rGfx, const Point& rPoint, @@ -115,7 +115,7 @@ public: const sal_Int32* pDeltaArray, sal_Bool bUseGlyphs=sal_True); sal_Bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx); - sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< rtl::OString >& rSuppliedFonts ); + sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< OString >& rSuppliedFonts ); }; diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx index 2d7ada98857c..5d61ff90a9bf 100644 --- a/vcl/generic/print/printerjob.cxx +++ b/vcl/generic/print/printerjob.cxx @@ -47,10 +47,6 @@ using namespace psp; -using ::rtl::OUString; -using ::rtl::OUStringToOString; -using ::rtl::OString; -using ::rtl::OStringBuffer; // forward declaration @@ -94,16 +90,16 @@ AppendPS (FILE* pDst, osl::File* pSrc, sal_uChar* pBuffer, */ osl::File* -PrinterJob::CreateSpoolFile (const rtl::OUString& rName, const rtl::OUString& rExtension) +PrinterJob::CreateSpoolFile (const OUString& rName, const OUString& rExtension) { osl::File* pFile = NULL; - rtl::OUString aFile = rName + rExtension; - rtl::OUString aFileURL; + OUString aFile = rName + rExtension; + OUString aFileURL; osl::File::RC nError = osl::File::getFileURLFromSystemPath( aFile, aFileURL ); if (nError != osl::File::E_None) return NULL; - aFileURL = maSpoolDirName + rtl::OUString("/") + aFileURL; + aFileURL = maSpoolDirName + OUString("/") + aFileURL; pFile = new osl::File (aFileURL); nError = pFile->open (osl_File_OpenFlag_Read | osl_File_OpenFlag_Write | osl_File_OpenFlag_Create); @@ -194,9 +190,9 @@ PrinterJob::PrinterJob () : /* remove all our temporary files, uses external program "rm", since osl functionality is inadequate */ void -removeSpoolDir (const rtl::OUString& rSpoolDir) +removeSpoolDir (const OUString& rSpoolDir) { - rtl::OUString aSysPath; + OUString aSysPath; if( osl::File::E_None != osl::File::getSystemPathFromFileURL( rSpoolDir, aSysPath ) ) { // Conversion did not work, as this is quite a dangerous action, @@ -204,8 +200,8 @@ removeSpoolDir (const rtl::OUString& rSpoolDir) OSL_FAIL( "psprint: couldn't remove spool directory" ); return; } - rtl::OString aSysPathByte = - rtl::OUStringToOString (aSysPath, osl_getThreadTextEncoding()); + OString aSysPathByte = + OUStringToOString (aSysPath, osl_getThreadTextEncoding()); sal_Char pSystem [128]; sal_Int32 nChar = 0; @@ -218,23 +214,23 @@ removeSpoolDir (const rtl::OUString& rSpoolDir) /* creates a spool directory with a "pidgin random" value based on current system time */ -rtl::OUString +OUString createSpoolDir () { TimeValue aCur; osl_getSystemTime( &aCur ); sal_Int32 nRand = aCur.Seconds ^ (aCur.Nanosec/1000); - rtl::OUString aTmpDir; + OUString aTmpDir; osl_getTempDirURL( &aTmpDir.pData ); do { - rtl::OUStringBuffer aDir( aTmpDir.getLength() + 16 ); + OUStringBuffer aDir( aTmpDir.getLength() + 16 ); aDir.append( aTmpDir ); aDir.appendAscii( "/psp" ); aDir.append(nRand); - rtl::OUString aResult = aDir.makeStringAndClear(); + OUString aResult = aDir.makeStringAndClear(); if( osl::Directory::create( aResult ) == osl::FileBase::E_None ) { osl::File::setAttributes( aResult, @@ -245,7 +241,7 @@ createSpoolDir () } nRand++; } while( nRand ); - return rtl::OUString(); + return OUString(); } PrinterJob::~PrinterJob () @@ -293,7 +289,7 @@ static void WriteLocalTimePS( osl::File *rFile ) WritePS( rFile, "Unknown-Time" ); } -static bool isAscii( const rtl::OUString& rStr ) +static bool isAscii( const OUString& rStr ) { sal_Int32 nLen = rStr.getLength(); for( sal_Int32 i = 0; i < nLen; i++ ) @@ -304,10 +300,10 @@ static bool isAscii( const rtl::OUString& rStr ) sal_Bool PrinterJob::StartJob ( - const rtl::OUString& rFileName, + const OUString& rFileName, int nMode, - const rtl::OUString& rJobName, - const rtl::OUString& rAppName, + const OUString& rJobName, + const OUString& rAppName, const JobData& rSetupData, PrinterGfx* pGraphics, bool bIsQuickJob @@ -325,9 +321,9 @@ PrinterJob::StartJob ( maSpoolDirName = createSpoolDir (); maJobTitle = rJobName; - rtl::OUString aExt(".ps"); - mpJobHeader = CreateSpoolFile (rtl::OUString("psp_head"), aExt); - mpJobTrailer = CreateSpoolFile (rtl::OUString("psp_tail"), aExt); + OUString aExt(".ps"); + mpJobHeader = CreateSpoolFile (OUString("psp_head"), aExt); + mpJobTrailer = CreateSpoolFile (OUString("psp_tail"), aExt); if( ! (mpJobHeader && mpJobTrailer) ) // existing files are removed in destructor return sal_False; @@ -336,7 +332,7 @@ PrinterJob::StartJob ( "%!PS-Adobe-3.0\n" "%%BoundingBox: (atend)\n" ); - rtl::OUString aFilterWS; + OUString aFilterWS; // Creator (this application) aFilterWS = WhitespaceToSpace( rAppName, sal_False ); @@ -346,7 +342,7 @@ PrinterJob::StartJob ( // For (user name) osl::Security aSecurity; - rtl::OUString aUserName; + OUString aUserName; if( aSecurity.getUserName( aUserName ) ) { WritePS (mpJobHeader, "%%For: ("); @@ -369,7 +365,7 @@ PrinterJob::StartJob ( * else omit %%Title */ aFilterWS = WhitespaceToSpace( rJobName, sal_False ); - rtl::OUString aTitle( aFilterWS ); + OUString aTitle( aFilterWS ); if( ! isAscii( aTitle ) ) { sal_Int32 nIndex = 0; @@ -377,7 +373,7 @@ PrinterJob::StartJob ( aTitle = rFileName.getToken( 0, '/', nIndex ); aTitle = WhitespaceToSpace( aTitle, sal_False ); if( ! isAscii( aTitle ) ) - aTitle = rtl::OUString(); + aTitle = OUString(); } maJobTitle = aFilterWS; @@ -429,7 +425,7 @@ PrinterJob::EndJob () return sal_False; // write document trailer according to Document Structuring Conventions (DSC) - rtl::OStringBuffer aTrailer(512); + OStringBuffer aTrailer(512); aTrailer.append( "%%Trailer\n" ); aTrailer.append( "%%BoundingBox: 0 0 " ); aTrailer.append( (sal_Int32)mnMaxWidthPt ); @@ -454,7 +450,7 @@ PrinterJob::EndJob () sal_Bool bSpoolToFile = !maFileName.isEmpty(); if (bSpoolToFile) { - const rtl::OString aFileName = rtl::OUStringToOString (maFileName, + const OString aFileName = OUStringToOString (maFileName, osl_getThreadTextEncoding()); if( mnFileMode ) { @@ -556,7 +552,7 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup) { int nRes = rJobSetup.m_aContext.getRenderResolution (); - rtl::OUString aPaper; + OUString aPaper; int nWidth, nHeight; rJobSetup.m_aContext.getPageSize (aPaper, nWidth, nHeight); @@ -590,11 +586,11 @@ PrinterJob::StartPage (const JobData& rJobSetup) { InitPaperSize (rJobSetup); - rtl::OUString aPageNo = rtl::OUString::valueOf ((sal_Int32)maPageList.size()+1); // sequential page number must start with 1 - rtl::OUString aExt = aPageNo + rtl::OUString(".ps"); + OUString aPageNo = OUString::valueOf ((sal_Int32)maPageList.size()+1); // sequential page number must start with 1 + OUString aExt = aPageNo + OUString(".ps"); - osl::File* pPageHeader = CreateSpoolFile ( rtl::OUString("psp_pghead"), aExt); - osl::File* pPageBody = CreateSpoolFile ( rtl::OUString("psp_pgbody"), aExt); + osl::File* pPageHeader = CreateSpoolFile ( OUString("psp_pghead"), aExt); + osl::File* pPageBody = CreateSpoolFile ( OUString("psp_pgbody"), aExt); maHeaderList.push_back (pPageHeader); maPageList.push_back (pPageBody); @@ -975,15 +971,15 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob ) WritePS (pFile, "%%BeginSetup\n%\n"); // download fonts - std::list< rtl::OString > aFonts[2]; + std::list< OString > aFonts[2]; m_pGraphics->writeResources( pFile, aFonts[0], aFonts[1] ); for( int i = 0; i < 2; i++ ) { if( !aFonts[i].empty() ) { - std::list< rtl::OString >::const_iterator it = aFonts[i].begin(); - rtl::OStringBuffer aLine( 256 ); + std::list< OString >::const_iterator it = aFonts[i].begin(); + OStringBuffer aLine( 256 ); if( i == 0 ) aLine.append( "%%DocumentSuppliedResources: font " ); else @@ -1009,7 +1005,7 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob ) if( ! bExternalDialog && rJob.m_nCopies > 1 ) { // setup code - rtl::OStringBuffer aLine("/#copies "); + OStringBuffer aLine("/#copies "); aLine.append(static_cast<sal_Int32>(rJob.m_nCopies)); aLine.append(" def\n"); sal_uInt64 nWritten = 0; diff --git a/vcl/generic/print/psputil.cxx b/vcl/generic/print/psputil.cxx index e2d3ca4b1a89..81da3844c5f0 100644 --- a/vcl/generic/print/psputil.cxx +++ b/vcl/generic/print/psputil.cxx @@ -158,7 +158,7 @@ WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength) } sal_Bool -WritePS (osl::File* pFile, const rtl::OString &rString) +WritePS (osl::File* pFile, const OString &rString) { sal_uInt64 nInLength = rString.getLength(); sal_uInt64 nOutLength = 0; @@ -170,9 +170,9 @@ WritePS (osl::File* pFile, const rtl::OString &rString) } sal_Bool -WritePS (osl::File* pFile, const rtl::OUString &rString) +WritePS (osl::File* pFile, const OUString &rString) { - return WritePS (pFile, rtl::OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US)); + return WritePS (pFile, OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US)); } /* diff --git a/vcl/generic/print/psputil.hxx b/vcl/generic/print/psputil.hxx index 9187931e8f4c..55e3d3b4c129 100644 --- a/vcl/generic/print/psputil.hxx +++ b/vcl/generic/print/psputil.hxx @@ -43,8 +43,8 @@ sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst); sal_Bool WritePS (osl::File* pFile, const sal_Char* pString); sal_Bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength); -sal_Bool WritePS (osl::File* pFile, const rtl::OString &rString); -sal_Bool WritePS (osl::File* pFile, const rtl::OUString &rString); +sal_Bool WritePS (osl::File* pFile, const OString &rString); +sal_Bool WritePS (osl::File* pFile, const OUString &rString); class ConverterFactory { diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx index 633b7421b612..841a9db7a355 100644 --- a/vcl/generic/print/text_gfx.cxx +++ b/vcl/generic/print/text_gfx.cxx @@ -118,7 +118,7 @@ PrinterGfx::SetFont( // font and encoding will be set by drawText again immediately // before PSShowText mnFontID = nFontID; - maVirtualStatus.maFont = rtl::OString(); + maVirtualStatus.maFont = OString(); maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW; maVirtualStatus.mnTextHeight = nHeight; maVirtualStatus.mnTextWidth = nWidth; @@ -531,13 +531,13 @@ PrinterGfx::LicenseWarning(const Point& rPoint, const sal_Unicode* pStr, // they are installed on displays and printers, but get not embedded in // print files or documents because they are not licensed for use outside // the company. - rtl::OString aMessage( "The font " ); - aMessage += rtl::OUStringToOString( mrFontMgr.getPSName(mnFontID), + OString aMessage( "The font " ); + aMessage += OUStringToOString( mrFontMgr.getPSName(mnFontID), RTL_TEXTENCODING_ASCII_US ); aMessage += " could not be downloaded\nbecause its license does not allow for that"; PSComment( aMessage.getStr() ); - rtl::OString aFontName = rtl::OUStringToOString( + OString aFontName = OUStringToOString( mrFontMgr.getPSName(mnFontID), RTL_TEXTENCODING_ASCII_US); PSSetFont (aFontName, RTL_TEXTENCODING_ISO_8859_1); @@ -706,21 +706,21 @@ PrinterGfx::OnEndJob () } void -PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ) +PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFonts, std::list< OString >& rNeededFonts ) { // write all type 1 fonts std::list< sal_Int32 >::iterator aFont; // already in the document header ? for (aFont = maPS1Font.begin(); aFont != maPS1Font.end(); ++aFont) { - const rtl::OString& rSysPath (mrFontMgr.getFontFileSysPath(*aFont) ); - rtl::OUString aUNCPath; + const OString& rSysPath (mrFontMgr.getFontFileSysPath(*aFont) ); + OUString aUNCPath; osl::File::getFileURLFromSystemPath (OStringToOUString (rSysPath, osl_getThreadTextEncoding()), aUNCPath); osl::File aFontFile (aUNCPath); // provide the pfb or pfa font as a (pfa-)font resource - rtl::OString aPostScriptName = - rtl::OUStringToOString ( mrFontMgr.getPSName(*aFont), + OString aPostScriptName = + OUStringToOString ( mrFontMgr.getPSName(*aFont), RTL_TEXTENCODING_ASCII_US ); WritePS (pFile, "%%BeginResource: font "); @@ -763,7 +763,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppli aIter->PSUploadEncoding (pFile, *this); if( aIter->GetFontType() == fonttype::Builtin ) rNeededFonts.push_back( - rtl::OUStringToOString( + OUStringToOString( mrFontMgr.getPSName( aIter->GetFontID() ), RTL_TEXTENCODING_ASCII_US ) ); } |