diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-12 18:53:09 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-09-09 21:07:47 +0200 |
commit | e37992d8c00db08b2dbc64c1fccb0b12aa4d6e9f (patch) | |
tree | cd44bc493cf07931b0f6b0a732801a53e0209be4 /sc | |
parent | c0266d67bbc79ba78cbd58f7051458253c8e5196 (diff) |
Avoid getTokenCount and use indexed getToken
Change-Id: I2ad3e6bf35f53e83ccc570f8660a090e340ffa59
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/pagedlg/areasdlg.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 276303375b08..02815f104654 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -19,7 +19,6 @@ #include <rangelst.hxx> -#include <comphelper/string.hxx> #include <sfx2/dispatch.hxx> #include <svl/stritem.hxx> #include <vcl/weld.hxx> @@ -356,16 +355,18 @@ bool ScPrintAreasDlg::Impl_CheckRefStrings() ScAddress aAddr; ScRange aRange; - sal_Int32 nSepCount = comphelper::string::getTokenCount(aStrPrintArea, sep); - for ( sal_Int32 i = 0; i < nSepCount && bPrintAreaOk; ++i ) + for ( sal_Int32 nIdx = 0; nIdx >= 0; ) { - OUString aOne = aStrPrintArea.getToken(i, sep); + const OUString aOne = aStrPrintArea.getToken(0, sep, nIdx); ScRefFlags nResult = aRange.Parse( aOne, pDoc, eConv ); if ((nResult & nValidRange) != nValidRange) { ScRefFlags nAddrResult = aAddr.Parse( aOne, pDoc, eConv ); if ((nAddrResult & nValidAddr) != nValidAddr) + { bPrintAreaOk = false; + break; + } } } } |