[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/koffice-change-tracking/libs/kotext/opendocument
From: Ganesh Paramasivam <ganesh () crystalfab ! com>
Date: 2010-12-24 11:41:21
Message-ID: 20101224114121.1F54EAC879 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1209052 by ganeshp:
Modifications in checkForBlockChange to handle blocks that have only one fragment
M +7 -2 KoTextWriter.cpp
--- branches/work/koffice-change-tracking/libs/kotext/opendocument/KoTextWriter.cpp #1209051:1209052
@@ -663,7 +663,13 @@
int KoTextWriter::Private::checkForBlockChange(const QTextBlock &block)
{
int changeId = 0;
- QTextBlock::iterator it;
+ QTextBlock::iterator it = block.begin();
+
+ if (it.atEnd()) {
+ //This is a single fragment block. So just return the change-id of the fragment
+ changeId = it.fragment().charFormat().intProperty(KoCharacterStyle::ChangeTrackerId);
+ }
+
for (it = block.begin(); !(it.atEnd()); ++it) {
QTextFragment currentFragment = it.fragment();
if (currentFragment.isValid()) {
@@ -1145,7 +1151,6 @@
if (endBlock.blockNumber() != block.blockNumber()) {
endBlockNumber = endBlock.blockNumber();
}
-
return endBlockNumber;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic