From bacfd2dc4cea1a5d87658ed8592116acd931e000 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 2 Jan 2012 10:55:27 +0000 Subject: 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 --- rsc/source/rsc/rsc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rsc/source') 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, '.') ); -- cgit