diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-27 10:46:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-27 12:38:32 +0200 |
commit | 256107622c252afdce35d1c77fe70eb4e4bc57ce (patch) | |
tree | 07fadc5f1cddc59e386a0820b9dc44996d476cf0 /sw/source/filter | |
parent | 93139c011411b0e48c5fc8d39fe9203f55c7ff0a (diff) |
sw HTML import: add an option to ignore comments by default
No function change, default behavior is still mapping them to postits.
Change-Id: I55041452909e9f0b83d6c5d113af3067b3c0afdb
Reviewed-on: https://gerrit.libreoffice.org/73021
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 3a165f897102..b0e9c2ce64a9 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -116,6 +116,7 @@ #include <sfx2/viewfrm.hxx> #include <svx/svdobj.hxx> +#include <officecfg/Office/Writer.hxx> #include <swerror.h> #include <hints.hxx> @@ -312,6 +313,10 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_nTableDepth( 0 ), m_pTempViewFrame(nullptr) { + // If requested explicitly, then force ignoring of comments (don't create postits for them). + if (officecfg::Office::Writer::Filter::Import::HTML::IgnoreComments::get()) + m_bIgnoreHTMLComments = true; + m_nEventId = nullptr; m_bUpperSpace = m_bViewCreated = m_bChkJumpMark = false; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 0d6a60932518..2f10550fef93 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -448,7 +448,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient bool m_bSelect : 1; bool m_bInFootEndNoteAnchor : 1; bool m_bInFootEndNoteSymbol : 1; - bool const m_bIgnoreHTMLComments : 1; + bool m_bIgnoreHTMLComments : 1; bool m_bRemoveHidden : 1; // the filter implementation might set the hidden flag bool m_bBodySeen : 1; |