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 /oox | |
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 'oox')
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/table/CellAddress.hpp> #include <com/sun/star/table/CellRangeAddress.hpp> +#include <comphelper/string.hxx> #include <rtl/tencinfo.h> #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() ) |