[Libreoffice-commits] core.git: svtools/source
Pavel Klevakin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 19 12:48:21 UTC 2020
svtools/source/svhtml/parhtml.cxx | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
New commits:
commit 9429dacc7ff93f99dd84532357020669df33a0c5
Author: Pavel Klevakin <klev.paul at gmail.com>
AuthorDate: Fri Apr 17 17:41:05 2020 +0300
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Apr 19 14:47:48 2020 +0200
tdf#131951: automatically increase buffer size
This will reduce number of string concatenations
and therefore reading time of large data chunks.
Change-Id: I6d59ba60270511edf03a604aef06dab0a1de2478
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92456
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index eb6b22a84f17..be0b8fed24d6 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -593,11 +593,6 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak )
// Space is protected because it's not a delimiter between
// options.
sTmpBuffer.append( '\\' );
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
}
if( IsParserWorking() )
{
@@ -634,11 +629,6 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak )
{
// mark within tags
sTmpBuffer.append( '\\' );
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
}
sTmpBuffer.append( '\\' );
break;
@@ -761,11 +751,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak )
// All remaining characters make their way into the text.
sTmpBuffer.appendUtf32( nNextCh );
}
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
+
nNextCh = GetNextChar();
if( ( sal_Unicode(EOF) == nNextCh && rInput.eof() ) ||
!IsParserWorking() )
@@ -779,12 +765,6 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak )
}
}
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
-
if( bContinue && bNextCh )
nNextCh = GetNextChar();
}
More information about the Libreoffice-commits
mailing list