[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Calligra] 3f3531f: Handle fully deleted elements within complex delet
From:       Ganesh Paramasivam <ganesh () crystalfab ! com>
Date:       2010-12-13 10:40:50
Message-ID: 20101213104050.A0DEAA60B0 () git ! kde ! org
[Download RAW message or body]

commit 3f3531f974b7c9b589917fc48918c8ca5d49420a
branch words-change_tracking-ganeshp
Author: Ganesh Paramasivam <ganesh@crystalfab.com>
Date:   Mon Dec 13 16:10:06 2010 +0530

    Handle fully deleted elements within complex delete merge range

diff --git a/libs/kotext/opendocument/KoTextWriter.cpp b/libs/kotext/opendocument/KoTextWriter.cpp
index 4ed9b2a..5c87da7 100644
--- a/libs/kotext/opendocument/KoTextWriter.cpp
+++ b/libs/kotext/opendocument/KoTextWriter.cpp
@@ -1187,7 +1187,13 @@ void KoTextWriter::Private::postProcessTagTypeChangeXml()
 void KoTextWriter::Private::generateFinalXml(QString &outputXml, const KoXmlElement &element)
 {
     QString firstChild = element.firstChild().toElement().localName();
-    QString secondChild = element.firstChild().nextSibling().toElement().localName();
+    KoXmlElement secondChildElement = element.firstChild().nextSibling().toElement();
+    QString secondChild;
+
+    do {
+        secondChild = secondChildElement.localName();
+        secondChildElement = secondChildElement.nextSibling().toElement();
+    } while (secondChild == "removed-content");
 
     if ((firstChild == "p") && (secondChild == "h")) {
         handleParagraphWithHeaderMerge(outputXml, element);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic