[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sw/qa writerfilter/source
Zolnai Tamás
tamas.zolnai at collabora.com
Tue Dec 24 06:18:13 PST 2013
sw/qa/extras/ooxmlimport/data/rprchange_closed.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 +++++++++
writerfilter/source/ooxml/model.xml | 3 +++
3 files changed, 12 insertions(+)
New commits:
commit 903e342844bdc923c8270eed7d26e3faee9f1870
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.
(cherry picked from commit 75e7d6f12e914b63e66968890533b2a56d0b1a7e)
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
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 2eaa994..c5ccc89 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -140,6 +140,7 @@ public:
void testDefaultSectBreakCols();
void testFdo66474();
void testBnc780044Spacing();
+ void testRPrChangeClosed();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -244,6 +245,7 @@ void Test::run()
{"default-sect-break-cols.docx", &Test::testDefaultSectBreakCols},
{"fdo66474.docx", &Test::testFdo66474},
{"bnc780044_spacing.docx", &Test::testBnc780044Spacing},
+ {"rprchange_closed.docx",&Test::testRPrChangeClosed},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1701,6 +1703,13 @@ void Test::testBnc780044Spacing()
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
}
+void Test::testRPrChangeClosed()
+{
+ // 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"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 4fad4ba..d368dab 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22077,6 +22077,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