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 --- oox/source/ole/axcontrol.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index d6a0c620407e..791920d52119 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -55,6 +55,7 @@ #include #include #include +#include #include #include "oox/helper/attributelist.hxx" #include "oox/helper/binaryinputstream.hxx" @@ -2519,7 +2520,7 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm ) std::vector< sal_Int16 > selectedIndices; // Ultra hacky parser for the info - sal_Int32 nTokenCount = data.GetTokenCount( '\n' ); + sal_Int32 nTokenCount = comphelper::string::getTokenCount(data, '\n'); for ( sal_Int32 nToken = 0; nToken < nTokenCount; ++nToken ) { @@ -2532,7 +2533,7 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm ) // skip first and last lines, no data there else if ( nToken < nTokenCount - 1) { - if ( sLine.GetTokenCount( '>' ) ) + if ( comphelper::string::getTokenCount(sLine, '>') ) { String displayValue = sLine.GetToken( 1, '>' ); if ( displayValue.Len() ) -- cgit