summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2016-12-03 23:06:23 +0800
committerMichael Stahl <mstahl@redhat.com>2016-12-08 15:33:49 +0000
commit7f47d68c4310b8bae09286a81036a6fa669a1705 (patch)
tree0af5eab11f37cf831c635f5235e1593ced9b074a /writerfilter
parente9f36845f350a6f75657a75662ea53986615a0ee (diff)
tdf#103651 check isForwardEvents() for symbols in comments
Every time a comment is referred, the whole comment stream is parsed but only the referred comment is extracted. But the symbol is always processed so it is added to all the comments. Change-Id: I3264de2d011ff188ef64f6500ae426cde0106c16 Reviewed-on: https://gerrit.libreoffice.org/31584 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 3caf89200c8fa7b38d6c340b666ca6cc8c2eb766) Reviewed-on: https://gerrit.libreoffice.org/31759
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.hxx1
-rw-r--r--writerfilter/source/ooxml/model.xml2
3 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 17ce14fbf9fe..0715e0ed828f 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -553,6 +553,12 @@ void OOXMLFastContextHandler::tab()
mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uTab), 1);
}
+void OOXMLFastContextHandler::symbol()
+{
+ if (isForwardEvents())
+ sendPropertiesWithId(NS_ooxml::LN_EG_RunInnerContent_sym);
+}
+
void OOXMLFastContextHandler::cr()
{
if (isForwardEvents())
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index d761b46e2598..d0df17fcb30d 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -156,6 +156,7 @@ public:
void ftnednsep();
void pgNum();
void tab();
+ void symbol();
void cr();
void noBreakHyphen();
void softHyphen();
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 3040eb90738f..24a020b1bc58 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -17866,7 +17866,7 @@
<resource name="CT_Sym" resource="Properties">
<attribute name="font" tokenid="ooxml:CT_Sym_font"/>
<attribute name="char" tokenid="ooxml:CT_Sym_char"/>
- <action name="end" tokenid="ooxml:EG_RunInnerContent_sym" action="sendPropertiesWithId" sendtokenid="ooxml:EG_RunInnerContent_sym"/>
+ <action name="end" action="symbol"/>
</resource>
<resource name="CT_Text" resource="Stream">
<attribute name="xml:space" tokenid="ooxml:CT_Text_space"/>