f0633d
From a5d5aa022c2ae04e1d230050a773b3983a410cde Mon Sep 17 00:00:00 2001
f0633d
From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= <tamas.zolnai@collabora.com>
f0633d
Date: Tue, 24 Dec 2013 08:05:58 +0100
f0633d
Subject: [PATCH 086/109] DOCX import: close rPrChange properly.
f0633d
f0633d
Call endtrackchanges when rPrChange ends so the
f0633d
corresponding redline will be removed.
f0633d
f0633d
Conflicts:
f0633d
	sw/qa/extras/ooxmlimport/ooxmlimport.cxx
f0633d
Reviewed on:
f0633d
	https://gerrit.libreoffice.org/7194
f0633d
f0633d
Change-Id: I4091d7b54e0a74f3158cc979f210577a2dc29783
f0633d
---
f0633d
 sw/qa/extras/inc/swmodeltestbase.hxx                |   6 ++++++
f0633d
 sw/qa/extras/ooxmlimport/data/rprchange_closed.docx | Bin 0 -> 24695 bytes
f0633d
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx            |   9 +++++++++
f0633d
 writerfilter/source/ooxml/model.xml                 |   3 +++
f0633d
 4 files changed, 18 insertions(+)
f0633d
 create mode 100644 sw/qa/extras/ooxmlimport/data/rprchange_closed.docx
f0633d
f0633d
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
f0633d
index a9b2368..727580d 100644
f0633d
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
f0633d
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
f0633d
@@ -166,6 +166,12 @@ protected:
f0633d
         return data;
f0633d
     }
f0633d
 
f0633d
+    bool hasProperty(const uno::Reference<uno::XInterface>& obj, const OUString& name) const
f0633d
+    {
f0633d
+        uno::Reference<beans::XPropertySet> properties(obj, uno::UNO_QUERY_THROW);
f0633d
+        return properties->getPropertySetInfo()->hasPropertyByName(name);
f0633d
+    }
f0633d
+
f0633d
     /// Get number of paragraphs of the document.
f0633d
     int getParagraphs()
f0633d
     {
f0633d
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
f0633d
index 4fad4ba..d368dab 100644
f0633d
--- a/writerfilter/source/ooxml/model.xml
f0633d
+++ b/writerfilter/source/ooxml/model.xml
f0633d
@@ -22077,6 +22077,9 @@
f0633d
     </resource>
f0633d
     <resource name="CT_RPrChange" resource="Properties" tag="character">
f0633d
       <element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/>
f0633d
+      <action name="end" action="tokenproperty"/>
f0633d
+      <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/>
f0633d
+      <action name="end" action="clearProps"/>
f0633d
     </resource>
f0633d
     <resource name="CT_ParaRPrChange" resource="Properties" tag="character">
f0633d
       <element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/>
f0633d
-- 
f0633d
1.8.4.2
f0633d