diff options
author | Andras Timar <atimar@suse.com> | 2013-03-25 09:21:50 -0700 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-03-25 09:23:44 -0700 |
commit | 7540bc8e105e114d4aecb1ed3f3044e5ce8a6fc6 (patch) | |
tree | ae663040a2d2553ec5ed19e3771d2ddc2937511b /rsc/source | |
parent | Fix warning: unknown log area 'chart2' [loplugin] (diff) | |
download | core-7540bc8e105e114d4aecb1ed3f3044e5ce8a6fc6.tar.gz core-7540bc8e105e114d4aecb1ed3f3044e5ce8a6fc6.zip |
replace DirEntry to osl::FileBase in a few cases in rsc
Change-Id: Ic0d9fee77891dae03c121f4b48ee9da89730d1aa
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 74892184c296..997ded9e878f 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -59,7 +59,6 @@ #include <vector> #include <algorithm> - using ::rtl::OUString; using ::rtl::OString; using ::rtl::OStringBuffer; @@ -167,11 +166,13 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) ; if( *pEqual ) { - const rtl::OString aSPath( pEqual + 1 ); - DirEntry aSDir(rtl::OStringToOUString(aSPath, RTL_TEXTENCODING_ASCII_US)); + OUString aSPath = OStringToOUString( OString( pEqual + 1 ), RTL_TEXTENCODING_ASCII_US ); + // replace forward slash to backslash on Windows + osl::FileBase::getFileURLFromSystemPath( aSPath, aSPath ); + osl::FileBase::getSystemPathFromFileURL( aSPath, aSPath ); m_aReplacements.push_back( std::pair< OString, OString >( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), - rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) ); + rtl::OUStringToOString(aSPath, RTL_TEXTENCODING_ASCII_US) ) ); } } else if( !rsc_stricmp( (*ppStr) + 1, "PreLoad" ) ) @@ -199,7 +200,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) nCommands |= INCLUDE_FLAG; rtl::OStringBuffer aBuffer(aPath); if (aBuffer.getLength()) - aBuffer.append(rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US)); + aBuffer.append(SAL_PATHSEPARATOR); aBuffer.append((*ppStr) + 2); aPath = aBuffer.makeStringAndClear(); } @@ -216,14 +217,16 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) // ignore empty -lip= arguments that we get lots of these days if (!aSysSearchDir.isEmpty()) { - DirEntry aSysDir(rtl::OStringToOUString(aSysSearchDir, RTL_TEXTENCODING_ASCII_US)); + OUString aSysDir = OStringToOUString(aSysSearchDir, RTL_TEXTENCODING_ASCII_US); + // replace forward slash to backslash on Windows + osl::FileBase::getFileURLFromSystemPath( aSysDir, aSysDir ); + osl::FileBase::getSystemPathFromFileURL( aSysDir, aSysDir ); m_aOutputFiles.back().aSysSearchDirs.push_back( - rtl::OUStringToOString(aSysDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ); + rtl::OUStringToOString(aSysDir, RTL_TEXTENCODING_ASCII_US) ); rtl::OString aLangSearchPath = m_aOutputFiles.back().aLangSearchPath; if( !aLangSearchPath.isEmpty() ) { - aLangSearchPath = aLangSearchPath + - rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US); + aLangSearchPath = aLangSearchPath + OString( SAL_PATHSEPARATOR ); } aLangSearchPath = aLangSearchPath + aSysSearchDir; @@ -847,8 +850,8 @@ ERRTYPE RscCompiler::Link() pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() ); // Schreibe Datei - sal_Char cSearchDelim = rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US)[0]; - sal_Char cAccessDelim = rtl::OUStringToOString(DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US)[0]; + sal_Char cSearchDelim = SAL_PATHSEPARATOR; + sal_Char cAccessDelim = SAL_PATHDELIMITER; pTC->ChangeLanguage( it->aLangName ); pTC->SetSourceCharSet( RTL_TEXTENCODING_UTF8 ); pTC->ClearSysNames(); |