summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/svhtml/parhtml.cxx6
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx6
2 files changed, 7 insertions, 5 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index d9f64c4541d9..e38afaa8ec2b 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1058,6 +1058,7 @@ HtmlTokenId HTMLParser::GetNextToken_()
sTmpBuffer.appendUtf32( nNextCh );
nNextCh = GetNextChar();
} while( '>' != nNextCh && '/' != nNextCh && !rtl::isAsciiWhiteSpace( nNextCh ) &&
+ !linguistic::IsControlChar(nNextCh) &&
IsParserWorking() && !rInput.eof() );
if( !sTmpBuffer.isEmpty() )
@@ -1135,8 +1136,11 @@ HtmlTokenId HTMLParser::GetNextToken_()
if( !bDone )
sTmpBuffer.appendUtf32(nNextCh);
}
- else
+ else if (!linguistic::IsControlChar(nNextCh)
+ || nNextCh == '\r' || nNextCh == '\n' || nNextCh == '\t')
+ {
sTmpBuffer.appendUtf32(nNextCh);
+ }
if( !bDone )
nNextCh = GetNextChar();
}
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 0b2b7b8647f6..7948768e4352 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -559,10 +559,8 @@ namespace sw
}
case CH_TXT_ATR_FIELDSTART:
{
- if (auto const pFieldMark = rIDMA.getFieldmarkAt(SwPosition(rTextNode, i)))
- startedFields.emplace(pFieldMark, false, 0, 0);
- else
- SAL_WARN("sw.core", "CH_TXT_ATR_FIELDSTART field mark missing");
+ auto const pFieldMark(rIDMA.getFieldmarkAt(SwPosition(rTextNode, i)));
+ startedFields.emplace(pFieldMark, false, 0, 0);
break;
}
case CH_TXT_ATR_FIELDSEP: