[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - officecfg/registry sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 3 11:48:03 UTC 2019
officecfg/registry/schema/org/openoffice/Office/Writer.xcs | 12 ++++++++++++
sw/source/filter/html/swhtml.cxx | 6 +++++-
2 files changed, 17 insertions(+), 1 deletion(-)
New commits:
commit d2de8aec8fa928c37cef9798535dc6b150205a91
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon May 27 10:46:40 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jun 3 13:47:29 2019 +0200
sw HTML import: add an option to ignore comments by default
No function change, default behavior is still mapping them to postits.
(cherry picked from commit 256107622c252afdce35d1c77fe70eb4e4bc57ce)
Conflicts:
sw/source/filter/html/swhtml.cxx
Change-Id: I55041452909e9f0b83d6c5d113af3067b3c0afdb
Reviewed-on: https://gerrit.libreoffice.org/73083
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 7a21b5bbd344..855bbe13cb07 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -5848,6 +5848,18 @@
<value>true</value>
</prop>
</group>
+ <group oor:name="HTML">
+ <info>
+ <desc>Contains settings for importing HTML.</desc>
+ </info>
+ <prop oor:name="IgnoreComments" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Specifies whether HTML comments should be ignored or imported as postits / annotations.</desc>
+ <label>Ignore HTML comments</label>
+ </info>
+ <value>false</value>
+ </prop>
+ </group>
</group>
</group>
<group oor:name="Numbering">
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 07ea0ca88639..cfacf93d1a67 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -109,6 +109,7 @@
#include <SwAppletImpl.hxx>
#include <sfx2/viewfrm.hxx>
+#include <officecfg/Office/Writer.hxx>
#include <strings.hrc>
#include <swerror.h>
@@ -301,6 +302,10 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_isInTableStructure(false),
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;
commit 509d7aa8493a3c98cbfb75ed86cc39ca8fc03079
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 28 09:23:25 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jun 3 13:47:20 2019 +0200
Revert "[cp] sw HTML import: ignore comments unconditionally"
This reverts commit f6d2125bf3511701d261b83bbfc50785b707d026. No need to
hardcode this, we'll have a proper option instead.
Change-Id: I9778c19715d52bfa066585791b2002e9837e1d14
Reviewed-on: https://gerrit.libreoffice.org/73082
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index c052d0d55740..07ea0ca88639 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -301,7 +301,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_isInTableStructure(false),
m_pTempViewFrame(nullptr)
{
- m_bIgnoreHTMLComments = true;
m_nEventId = nullptr;
m_bUpperSpace = m_bViewCreated = m_bChkJumpMark = false;
More information about the Libreoffice-commits
mailing list