diff options
Diffstat (limited to 'vcl/ios')
-rw-r--r-- | vcl/ios/source/app/salinst.cxx | 27 | ||||
-rw-r--r-- | vcl/ios/source/gdi/salgdi.cxx | 6 |
2 files changed, 17 insertions, 16 deletions
diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx index b47c1688dd68..9e4c8c694316 100644 --- a/vcl/ios/source/app/salinst.cxx +++ b/vcl/ios/source/app/salinst.cxx @@ -189,35 +189,36 @@ void InitSalMain() oslFileError err2 = osl_getSystemPathFromFileURL(urlWorkDir.pData, &sysWorkDir); if (err2 == osl_File_E_None) { - ByteString aPath( getenv( "PATH" ) ); - ByteString aResPath( getenv( "STAR_RESOURCEPATH" ) ); - ByteString aCmdPath( OUStringToOString(OUString(sysWorkDir), RTL_TEXTENCODING_UTF8).getStr() ); - ByteString aTmpPath; + rtl::OString aPath( getenv( "PATH" ) ); + rtl::OString aResPath( getenv( "STAR_RESOURCEPATH" ) ); + rtl::OString aCmdPath( OUStringToOString(OUString(sysWorkDir), RTL_TEXTENCODING_UTF8).getStr() ); + rtl::OString aTmpPath; // Get absolute path of command's directory - if ( aCmdPath.Len() ) { + if ( !aCmdPath.isEmpty() ) + { DirEntry aCmdDirEntry( aCmdPath ); aCmdDirEntry.ToAbs(); aCmdPath = rtl::OUStringToOString( aCmdDirEntry.GetPath().GetFull(), RTL_TEXTENCODING_ASCII_US ); } // Assign to PATH environment variable - if ( aCmdPath.Len() ) + if ( !aCmdPath.isEmpty() ) { - aTmpPath = ByteString( "PATH=" ); + aTmpPath = rtl::OString( "PATH=" ); aTmpPath += aCmdPath; - if ( aPath.Len() ) + if ( !aPath.isEmpty() ) aTmpPath += rtl::OUStringToOString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ); aTmpPath += aPath; - putenv( (char*)aTmpPath.GetBuffer() ); + putenv( (char*)aTmpPath.getStr() ); } // Assign to STAR_RESOURCEPATH environment variable - if ( aCmdPath.Len() ) + if ( !aCmdPath.isEmpty() ) { - aTmpPath = ByteString( "STAR_RESOURCEPATH=" ); + aTmpPath = rtl::OString( "STAR_RESOURCEPATH=" ); aTmpPath += aCmdPath; - if ( aResPath.Len() ) + if ( !aResPath.isEmpty() ) aTmpPath += rtl::OUStringToOString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ); aTmpPath += aResPath; - putenv( (char*)aTmpPath.GetBuffer() ); + putenv( (char*)aTmpPath.getStr() ); } } } diff --git a/vcl/ios/source/gdi/salgdi.cxx b/vcl/ios/source/gdi/salgdi.cxx index 7f9e5b4bbc5b..e9a16ef581d1 100644 --- a/vcl/ios/source/gdi/salgdi.cxx +++ b/vcl/ios/source/gdi/salgdi.cxx @@ -1940,7 +1940,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) ) return sal_False; const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding(); - const ByteString aToFile( rtl::OUStringToOString( aSysPath, aThreadEncoding ) ); + const rtl::OString aToFile( rtl::OUStringToOString( aSysPath, aThreadEncoding ) ); // get the raw-bytes from the font to be subset ByteVector aBuffer; @@ -1958,7 +1958,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, // NOTE: assuming that all glyphids requested on Ios are fully translated // make the subsetter provide the requested subset - FILE* pOutFile = fopen( aToFile.GetBuffer(), "wb" ); + FILE* pOutFile = fopen( aToFile.getStr(), "wb" ); bool bRC = rInfo.CreateFontSubset( FontSubsetInfo::TYPE1_PFB, pOutFile, NULL, pGlyphIDs, pEncoding, nGlyphCount, pGlyphWidths ); fclose( pOutFile ); @@ -2056,7 +2056,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile, free( pGlyphMetrics ); // write subset into destination file - nRC = ::CreateTTFromTTGlyphs( pSftFont, aToFile.GetBuffer(), aShortIDs, + nRC = ::CreateTTFromTTGlyphs( pSftFont, aToFile.getStr(), aShortIDs, aTempEncs, nGlyphCount, 0, NULL, 0 ); ::CloseTTFont(pSftFont); return (nRC == SF_OK); |