summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/svhtml/parhtml.cxx14
-rw-r--r--svtools/source/svrtf/parrtf.cxx16
2 files changed, 4 insertions, 26 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 3f50197e85b7..67f5a87862ad 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -925,12 +925,6 @@ HtmlTokenId HTMLParser::GetNextRawToken()
while( '-' == nNextCh && IsParserWorking() )
{
bTwoMinus = true;
-
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
sTmpBuffer.appendUtf32( nNextCh );
nNextCh = GetNextChar();
}
@@ -983,8 +977,7 @@ HtmlTokenId HTMLParser::GetNextRawToken()
break;
}
- if( (!bContinue && !sTmpBuffer.isEmpty()) ||
- MAX_LEN == sTmpBuffer.getLength() )
+ if( !bContinue && !sTmpBuffer.isEmpty() )
{
aToken += sTmpBuffer;
sTmpBuffer.setLength(0);
@@ -1063,11 +1056,6 @@ HtmlTokenId HTMLParser::GetNextToken_()
OUStringBuffer sTmpBuffer;
do {
sTmpBuffer.appendUtf32( nNextCh );
- if( MAX_LEN == sTmpBuffer.getLength() )
- {
- aToken += sTmpBuffer;
- sTmpBuffer.setLength(0);
- }
nNextCh = GetNextChar();
} while( '>' != nNextCh && '/' != nNextCh && !rtl::isAsciiWhiteSpace( nNextCh ) &&
IsParserWorking() && !rInput.eof() );
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 349ca2e37bb6..a7e3f64f226e 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -98,22 +98,12 @@ int SvRTFParser::GetNextToken_()
{
aToken = "\\";
{
- OUStringBuffer aStrBuffer;
- aStrBuffer.setLength( MAX_TOKEN_LEN );
- sal_Int32 nStrLen = 0;
+ OUStringBuffer aStrBuffer( MAX_TOKEN_LEN );
do {
- aStrBuffer[nStrLen++] = nNextCh;
- if( MAX_TOKEN_LEN == nStrLen )
- {
- aToken += aStrBuffer;
- nStrLen = 0;
- }
+ aStrBuffer.appendUtf32(nNextCh);
nNextCh = GetNextChar();
} while( RTF_ISALPHA( nNextCh ) );
- if( nStrLen )
- {
- aToken += aStrBuffer;
- }
+ aToken += aStrBuffer;
}
// minus before numeric parameters