sw/source/filter/html/htmldrawreader.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 16 +++++++--------- sw/source/filter/html/swhtml.hxx | 1 - 4 files changed, 9 insertions(+), 12 deletions(-)
New commits: commit c440d1ef3d31d41c94a6d59372bbec16d9f5dc5d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Feb 9 10:19:47 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Feb 9 14:27:47 2023 +0000 use new baseclass member instead Change-Id: I8a1855f24370c250d0d9aecd583fa47ffaa03afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146686 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index b57b4e4b2cf0..4c5ea2dbcb9f 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -538,7 +538,7 @@ void SwHTMLParser::EndMarquee() static_cast<SdrTextObj*>(m_pMarquee.get())->SetText( m_aContents ); m_pMarquee->SetMergedItemSetAndBroadcast( m_pMarquee->GetMergedItemSet() ); - if (m_bFixMarqueeWidth && !m_bFuzzing) + if (m_bFixMarqueeWidth && !bFuzzing) { // adjust the size to the text static_cast<SdrTextObj*>(m_pMarquee.get())->FitFrameToTextSize(); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 840a80962293..daf90faff773 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -672,7 +672,7 @@ IMAGE_SETEVENT: bool bNeedWidth = (!bPercentWidth && !nWidth) || bRelWidthScale; bool bRelHeightScale = bPercentHeight && nHeight == SwFormatFrameSize::SYNCED; bool bNeedHeight = (!bPercentHeight && !nHeight) || bRelHeightScale; - if ((bNeedWidth || bNeedHeight) && !m_bFuzzing && allowAccessLink(*m_xDoc)) + if ((bNeedWidth || bNeedHeight) && !bFuzzing && allowAccessLink(*m_xDoc)) { GraphicDescriptor aDescriptor(aGraphicURL); if (aDescriptor.Detect(/*bExtendedInfo=*/true)) diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 99db72f38518..fbd5eadd1028 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -43,7 +43,6 @@ #include <svtools/htmltokn.h> #include <svtools/htmlkywd.hxx> #include <svtools/ctrltool.hxx> -#include <unotools/configmgr.hxx> #include <unotools/pathoptions.hxx> #include <vcl/svapp.hxx> #include <sfx2/event.hxx> @@ -310,7 +309,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_bBodySeen( false ), m_bReadingHeaderOrFooter( false ), m_bNotifyMacroEventRead( false ), - m_bFuzzing(utl::ConfigManager::IsFuzzing()), m_isInTableStructure(false), m_nTableDepth( 0 ), m_nFloatingFrames( 0 ), @@ -318,7 +316,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_pTempViewFrame(nullptr) { // If requested explicitly, then force ignoring of comments (don't create postits for them). - if (!m_bFuzzing) + if (!bFuzzing) { if (officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get()) m_bIgnoreHTMLComments = true; @@ -335,7 +333,7 @@ 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 - if (!m_bFuzzing) + 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; @@ -372,7 +370,7 @@ 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())); - if (!m_bFuzzing) + if (!bFuzzing) m_pCSS1Parser->SetIgnoreFontFamily( officecfg::Office::Common::Filter::HTML::Import::FontSetting::get() ); if( bReadUTF8 ) @@ -888,7 +886,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) } // adjust AutoLoad in DocumentProperties - if (!m_bFuzzing && IsNewDoc()) + if (!bFuzzing && IsNewDoc()) { SwDocShell *pDocShell(m_xDoc->GetDocShell()); OSL_ENSURE(pDocShell, "no SwDocShell"); @@ -1467,7 +1465,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) break; case HtmlTokenId::IFRAME_ON: - if (m_bFuzzing && m_nFloatingFrames > 64) + if (bFuzzing && m_nFloatingFrames > 64) SAL_WARN("sw.html", "Not importing any more FloatingFrames for fuzzing performance"); else { @@ -1831,7 +1829,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) EndPara(); } - if (m_bFuzzing && m_nListItems > 1024) + if (bFuzzing && m_nListItems > 1024) { SAL_WARN("sw.html", "skipping remaining bullet import for performance during fuzzing"); } @@ -4628,7 +4626,7 @@ void SwHTMLParser::SetTextCollAttrs( HTMLAttrContext *pContext ) short nFirstLineIndent = 0; // indentations auto nDepth = m_aContexts.size(); - if (m_bFuzzing && nDepth > 128) + if (bFuzzing && nDepth > 128) { SAL_WARN("sw.html", "Not applying any more text collection attributes to a deeply nested node for fuzzing performance"); nDepth = 0; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 1f37be2b45a3..629364bcc15e 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -473,7 +473,6 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener bool m_bBodySeen : 1; bool m_bReadingHeaderOrFooter : 1; bool m_bNotifyMacroEventRead : 1; - bool m_bFuzzing; bool m_isInTableStructure; int m_nTableDepth;