vcl/source/filter/ixbm/xbmread.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
New commits: commit cb04f8bf4f46c573edcf7be5c33d5f06d89eaff4 Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Sat Jan 19 22:50:16 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sun Jan 27 16:29:16 2019 +0100 Get data from full string, without tokenization Change-Id: I8cdaef18329543cbbe316b9499d6707d645a789d Reviewed-on: https://gerrit.libreoffice.org/66644 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index 844b325f5ede..6d88ec57a640 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -214,17 +214,21 @@ void XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat if (!aLine.isEmpty()) { sal_Int32 nIndex = 0; - while (nRow < nHeight) + const sal_Int32 nLen {aLine.getLength()}; + while (nRow<nHeight && nIndex<nLen) { - const OString aToken(aLine.getToken(0, ',', nIndex)); - const sal_Int32 nLen = aToken.getLength(); bool bProcessed = false; nBit = nDigits = nValue = 0; - for (sal_Int32 n = 0; n < nLen; ++n) + while (nIndex<nLen) { - const unsigned char cChar = aToken[n]; + const unsigned char cChar = aLine[nIndex]; + + ++nIndex; + if (cChar==',') // sequence completed, ',' already skipped for next loop + break; + const short nTable = pHexTable[ cChar ]; if( rtl::isAsciiHexDigit( cChar ) || !nTable ) @@ -252,9 +256,6 @@ void XBMReader::ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat nRow++; } } - - if (nIndex == -1) - break; } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits