diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-02 19:30:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-02 22:00:07 +0200 |
commit | 8753431292376540eeb25d3980960632dd5fd78b (patch) | |
tree | f143830151974cb7c57ebd12602a8c0d75e84b6f /sw/source/filter/html | |
parent | 7f0e8d54c159290f0d62f269cc386480422e883f (diff) |
ofz#36727 Abrt
Change-Id: I3bc881846174f5a206c191cdeea8344809080e43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index ffed09c38cca..d1ee86c60814 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -314,8 +314,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_nTableDepth( 0 ), m_pTempViewFrame(nullptr) { + const bool bFuzzing = utl::ConfigManager::IsFuzzing(); // If requested explicitly, then force ignoring of comments (don't create postits for them). - if (!utl::ConfigManager::IsFuzzing() && officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get()) + if (!bFuzzing && officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get()) m_bIgnoreHTMLComments = true; m_nEventId = nullptr; @@ -328,13 +329,21 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, memset(m_xAttrTab.get(), 0, sizeof(HTMLAttrTable)); // Read the font sizes 1-7 from the INI file - m_aFontHeights[0] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::get() * 20; - m_aFontHeights[1] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::get() * 20; - m_aFontHeights[2] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::get() * 20; - m_aFontHeights[3] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::get() * 20; - m_aFontHeights[4] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::get() * 20; - m_aFontHeights[5] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::get() * 20; - m_aFontHeights[6] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_7::get() * 20; + if (!bFuzzing) + { + m_aFontHeights[0] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_1::get() * 20; + m_aFontHeights[1] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_2::get() * 20; + m_aFontHeights[2] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_3::get() * 20; + m_aFontHeights[3] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_4::get() * 20; + m_aFontHeights[4] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_5::get() * 20; + m_aFontHeights[5] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_6::get() * 20; + m_aFontHeights[6] = officecfg::Office::Common::Filter::HTML::Import::FontSize::Size_7::get() * 20; + } + else + { + m_aFontHeights[0] = m_aFontHeights[1] = m_aFontHeights[2] = m_aFontHeights[3] = + m_aFontHeights[4] = m_aFontHeights[5] = m_aFontHeights[6] = 12 * 20; + } m_bKeepUnknown = officecfg::Office::Common::Filter::HTML::Import::UnknownTag::get(); |