[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 2 20:38:33 UTC 2021
sw/source/filter/html/swhtml.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit dcf61567600251aa239010ad287e1551a181431a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 2 20:25:09 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 2 22:37:58 2021 +0200
more ofz#36727
Change-Id: Idaf189a6d78e06fb4c4615819b06ff1b3c8d57cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119909
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index d1ee86c60814..b79c0d5071ce 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -291,6 +291,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_bSetModEnabled( false ),
m_bInFloatingFrame( false ),
m_bInField( false ),
+ m_bKeepUnknown( false ),
m_bCallNextToken( false ),
m_bIgnoreRawData( false ),
m_bLBEntrySelected ( false ),
@@ -316,8 +317,12 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
{
const bool bFuzzing = utl::ConfigManager::IsFuzzing();
// If requested explicitly, then force ignoring of comments (don't create postits for them).
- if (!bFuzzing && officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get())
- m_bIgnoreHTMLComments = true;
+ if (!bFuzzing)
+ {
+ if (officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get())
+ m_bIgnoreHTMLComments = true;
+ m_bKeepUnknown = officecfg::Office::Common::Filter::HTML::Import::UnknownTag::get();
+ }
m_nEventId = nullptr;
m_bUpperSpace = m_bViewCreated = m_bChkJumpMark = false;
@@ -345,8 +350,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_aFontHeights[4] = m_aFontHeights[5] = m_aFontHeights[6] = 12 * 20;
}
- m_bKeepUnknown = officecfg::Office::Common::Filter::HTML::Import::UnknownTag::get();
-
if(bReadNewDoc)
{
//CJK has different defaults, so a different object should be used for this
@@ -368,7 +371,8 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, true);
m_pCSS1Parser.reset(new SwCSS1Parser(m_xDoc.get(), *this, m_aFontHeights, m_sBaseURL, IsNewDoc()));
- m_pCSS1Parser->SetIgnoreFontFamily( officecfg::Office::Common::Filter::HTML::Import::FontSetting::get() );
+ if (!bFuzzing)
+ m_pCSS1Parser->SetIgnoreFontFamily( officecfg::Office::Common::Filter::HTML::Import::FontSetting::get() );
if( bReadUTF8 )
{
More information about the Libreoffice-commits
mailing list