diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-09-13 10:58:53 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-09-13 11:05:28 +0200 |
commit | 77ca5fec1ff78508f892afe25953f8c31da202df (patch) | |
tree | 78222260d2cc0b4f6d7451f3c3f297e7cf99dde7 /sc | |
parent | 865c9fbbfd683dc212e94513ffe3e3b86d231828 (diff) |
Avoid getTokenCount in ScViewFunc::SetPrintRanges
Change-Id: I1eba76ba0fdfc79de7e8f78f9bb5b0e932d343f4
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index c085289ea2b1..8aa822e0a3d4 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -18,7 +18,6 @@ */ #include "scitems.hxx" -#include <comphelper/string.hxx> #include <editeng/eeitem.hxx> #include <sfx2/app.hxx> @@ -923,13 +922,14 @@ void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint, if ( !pPrint->isEmpty() ) { const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); - sal_uInt16 nTCount = comphelper::string::getTokenCount(*pPrint, sep); - for (sal_uInt16 i=0; i<nTCount; i++) + sal_Int32 nPos = 0; + do { - OUString aToken = pPrint->getToken(i, sep); + const OUString aToken = pPrint->getToken(0, sep, nPos); if ( aRange.ParseAny( aToken, &rDoc, aDetails ) & SCA_VALID ) rDoc.AddPrintRange( nTab, aRange ); } + while (nPos >= 0); } } else // NULL = use selection (print range is always set), use empty string to delete all ranges |