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 /cui/source/dialogs/plfilter.cxx | |
parent | GetTokenCount on empty string is always 0 (diff) | |
download | core-bacfd2dc4cea1a5d87658ed8592116acd931e000.tar.gz core-bacfd2dc4cea1a5d87658ed8592116acd931e000.zip |
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 'cui/source/dialogs/plfilter.cxx')
-rw-r--r-- | cui/source/dialogs/plfilter.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cui/source/dialogs/plfilter.cxx b/cui/source/dialogs/plfilter.cxx index f1bd7f744377..bc4c4804a4c3 100644 --- a/cui/source/dialogs/plfilter.cxx +++ b/cui/source/dialogs/plfilter.cxx @@ -29,6 +29,7 @@ #include <set> #include <map> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <tools/debug.hxx> #include <vcl/stdtext.hxx> @@ -76,7 +77,7 @@ void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequenc StrSet& rTypes = aMap[ rDescr.Description ]; String aExtension( rDescr.Extension ); - for ( sal_uInt16 nCnt = aExtension.GetTokenCount( ';' ); nCnt--; ) + for ( sal_uInt16 nCnt = comphelper::string::getTokenCount(aExtension, ';'); nCnt--; ) { // no default plugins anymore String aExt( aExtension.GetToken( nCnt, ';' ) ); |