summaryrefslogtreecommitdiff
path: root/vcl/ios/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-18 22:50:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-19 13:38:46 +0000
commit1a302e716a9e6b8a8cc2cae2777cfe227ff2b95c (patch)
tree55a64a7d36e5c0ff4d3e7cdc7aae1dd7416c94b9 /vcl/ios/source
parentc251139ca22e10f21cf5e4f23df2a1d10fc3925f (diff)
risk converting ByteString to rtl::OString for OSes I don't have
Diffstat (limited to 'vcl/ios/source')
-rw-r--r--vcl/ios/source/app/salinst.cxx27
-rw-r--r--vcl/ios/source/gdi/salgdi.cxx6
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);