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

List:       kde-commits
Subject:    =?utf-8?q?=5Bcalligra/words-change=5Ftracking-ganeshp=5D_libs/ko?=
From:       Ganesh Paramasivam <ganesh () crystalfab ! com>
Date:       2011-03-08 9:00:32
Message-ID: 20110308090032.07F20A60BB () git ! kde ! org
[Download RAW message or body]

Git commit d15f7bb5e4dad05cfd850f40860e3beafd6cfa94 by Ganesh Paramasivam.
Committed on 08/03/2011 at 09:59.
Pushed by ganeshp into branch 'words-change_tracking-ganeshp'.

Bug-fixes in the saving of ODF 1.2 changes

M  +10   -1    libs/kotext/opendocument/KoTextWriter.cpp     

http://commits.kde.org/calligra/d15f7bb5e4dad05cfd850f40860e3beafd6cfa94

diff --git a/libs/kotext/opendocument/KoTextWriter.cpp b/libs/kotext/opendocument/KoTextWriter.cpp
index 6d8bff8..826156e 100644
--- a/libs/kotext/opendocument/KoTextWriter.cpp
+++ b/libs/kotext/opendocument/KoTextWriter.cpp
@@ -294,7 +294,7 @@ void KoTextWriter::Private::saveODF12Change(QTextCharFormat format)
     int changeId = format.property(KoCharacterStyle::ChangeTrackerId).toInt();
 
     //First we need to check if the eventual already opened change regions are still valid
-    foreach(int change, changeStack) {
+    while (int change = changeStack.top()) {
         if (!changeId || !changeTracker->isParent(change, changeId)) {
             writer->startElement("text:change-end", false);
             writer->addAttribute("text:change-id", changeTransTable.value(change));
@@ -939,6 +939,15 @@ void KoTextWriter::Private::saveParagraph(const QTextBlock &block, int from, int
         }
     }
     
+    if (changeTracker->saveFormat() == KoChangeTracker::ODF_1_2) {
+        while (int change = changeStack.top()) {
+            writer->startElement("text:change-end", false);
+            writer->addAttribute("text:change-id", changeTransTable.value(change));
+            writer->endElement();
+            changeStack.pop();
+        }   
+    }
+
     closeTagRegion(changeId);
 }
 

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

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