[Libreoffice-commits] core.git: sw/qa writerfilter/source
Zolnai Tamás
tamas.zolnai at collabora.com
Mon Dec 23 23:44:10 PST 2013
sw/qa/extras/ooxmlimport/data/rprchange_closed.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 ++++++++
writerfilter/source/ooxml/model.xml | 3 +++
3 files changed, 11 insertions(+)
New commits:
commit 75e7d6f12e914b63e66968890533b2a56d0b1a7e
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Tue Dec 24 08:05:58 2013 +0100
DOCX import: close rPrChange properly.
Call endtrackchanges when rPrChange ends so the
corresponding redline will be removed.
Change-Id: I4091d7b54e0a74f3158cc979f210577a2dc29783
diff --git a/sw/qa/extras/ooxmlimport/data/rprchange_closed.docx b/sw/qa/extras/ooxmlimport/data/rprchange_closed.docx
new file mode 100644
index 0000000..ff53871
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/rprchange_closed.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 9198cc6..e91de29 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1652,6 +1652,14 @@ DECLARE_OOXMLIMPORT_TEST(testFdo72560, "fdo72560.docx")
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( xParaRightLTR, "WritingMode" ));
CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( xParaRightLTR, "ParaAdjust" ));
}
+
+DECLARE_OOXMLIMPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx")
+{
+ // Redline defined by rPrChanged wasn't removed.
+ // First paragraph has an rPrChange element, make sure it doesn't appear in the second paragraph.
+ CPPUNIT_ASSERT_EQUAL(false, hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 4eec1ed..bf556ae 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22152,6 +22152,9 @@
</resource>
<resource name="CT_RPrChange" resource="Properties" tag="character">
<element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/>
+ <action name="end" action="tokenproperty"/>
+ <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/>
+ <action name="end" action="clearProps"/>
</resource>
<resource name="CT_ParaRPrChange" resource="Properties" tag="character">
<element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/>
More information about the Libreoffice-commits
mailing list