[Libreoffice-commits] core.git: writerfilter/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Sat Oct 18 07:15:56 PDT 2014
writerfilter/qa/cppunittests/rtftok/data/pass/i74153.rtf | 8 ++++++++
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 +++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 6118ea49aee18a95ac124bbac695b3bb1b152c1d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sat Oct 18 16:04:49 2014 +0200
i#74153 RTF import: fix track changes vs superscript char prop
Since 9dbf817fe5c5253fba0831aefa17575ae0ba3af1 (handle scope of
w:pPrChange and w:rPrChange properly (bnc#821804), 2014-10-01), this
caused an assertion failure -> crash.
Change-Id: I680edf58854d0c9be6e77c44c1e6beb1e0442a49
diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/i74153.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/i74153.rtf
new file mode 100644
index 0000000..7e81865
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/pass/i74153.rtf
@@ -0,0 +1,8 @@
+{\rtf1
+{\*\revtbl
+{Unknown;}
+{TAMUS HSC Mac User;}
+}
+{\revised\super\revauth1\revdttm-1501115711 hello}
+\par
+}
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c7a5472..70dae1f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5671,8 +5671,13 @@ int RTFDocumentImpl::popState()
RTFSprms aTCSprms;
RTFValue::Pointer_t pValue(new RTFValue(0));
aTCSprms.set(NS_ooxml::LN_endtrackchange, pValue);
- writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(RTFSprms(), aTCSprms));
- Mapper().props(pProperties);
+ if (!m_aStates.top().pCurrentBuffer)
+ {
+ writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(RTFSprms(), aTCSprms));
+ Mapper().props(pProperties);
+ }
+ else
+ m_aStates.top().pCurrentBuffer->push_back(Buf_t(BUFFER_PROPS, RTFValue::Pointer_t(new RTFValue(RTFSprms(), aTCSprms))));
}
// This is the end of the doc, see if we need to close the last section.
More information about the Libreoffice-commits
mailing list