diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-02 10:55:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:19 +0000 |
commit | bacfd2dc4cea1a5d87658ed8592116acd931e000 (patch) | |
tree | d22172a33fdd13a440b6882a28c23ea2d639bbad /rsc | |
parent | 6281eb0e0792da0194c07da18296e94dd944b8e5 (diff) |
add a comphelper::string::getTokenCount
suitable for conversion from [Byte]String::GetTokenCount
converted low-hanging variants to rtl::O[UString]::getToken loops
added unit test
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 93dc64e823a8..fc80beac2444 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -74,6 +74,7 @@ using ::rtl::OString; using ::rtl::OStringBuffer; using ::rtl::OStringToOUString; using comphelper::string::getToken; +using comphelper::string::getTokenCount; /*************** F o r w a r d s *****************************************/ /*************** G l o b a l e V a r i a b l e n **********************/ @@ -1154,7 +1155,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, while( aIStm.ReadLine( aLine ) ) { - if( ( aLine.GetTokenCount( '=' ) == 2 ) && + if( ( getTokenCount(aLine, '=') == 2 ) && ( getToken(aLine, 0, '=').indexOf("File") != -1 ) ) { rtl::OString aBaseFileName( getToken(getToken(aLine, 1, '"'), 0, '.') ); |