From 013ec10d4e89e86cbd53a88058defb7e97ebaa49 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 22 Oct 2014 22:35:01 +0200 Subject: i#84172 RTF import: handle nested groups inside redlines The problem was that in case we had {\revised foo {bar}}, then we only started a redline before "foo", but we ended it twice: during handling of both "}". Make sure that the end of the redline is only handled by the second one. Change-Id: I41ab8b486e8615d3479fa0fadd6016476859b4b2 --- writerfilter/qa/cppunittests/rtftok/data/pass/i84172.rtf | 11 +++++++++++ writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 writerfilter/qa/cppunittests/rtftok/data/pass/i84172.rtf (limited to 'writerfilter') diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/i84172.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/i84172.rtf new file mode 100644 index 000000000000..ce6616e5e6a5 --- /dev/null +++ b/writerfilter/qa/cppunittests/rtftok/data/pass/i84172.rtf @@ -0,0 +1,11 @@ +{\rtf1 +{\*\revtbl +{Unknown;} +} +\par \pard\plain +{ +{\revised\revauth1\revdttm-1497631607 foo +{bar} +} +} +} diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index d01f85c1d733..9bdeee8dc2d4 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -4877,6 +4877,11 @@ int RTFDocumentImpl::pushState() break; } + // If this is true, then ooxml:endtrackchange will be generated. Make sure + // we don't generate more ooxml:endtrackchange than ooxml:trackchange: new + // state does not inherit this flag. + m_aStates.top().bStartedTrackchange = false; + return 0; } -- cgit