[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-02 15:08:30
Message-ID: 20101202150830.74614AC8A4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1202858 by ganeshp:
Check if a list contains a block that is the end-block of a tagTypeChange and if so \
call the closeTagTypeChangeRegion
M +17 -2 KoTextWriter.cpp
--- branches/work/koffice-change-tracking/libs/kotext/opendocument/KoTextWriter.cpp \
#1202857:1202858 @@ -840,7 +840,6 @@
QTextBlock& KoTextWriter::Private::saveList(QTextBlock &block, QHash<QTextList *, \
QString> &listStyles, int level) {
- Q_UNUSED(level);
QTextList *textList, *topLevelTextList;
topLevelTextList = textList = block.textList();
@@ -853,6 +852,17 @@
KoList *list = textDocument.list(block);
int topListLevel = KoList::level(block);
+ bool closeTagChangeRegion = false;
+ if ((level == 1) && (tagTypeChangeRegionOpened)) {
+ QTextBlock listBlock = block;
+ do {
+ if (listBlock.blockNumber() == tagTypeChangeEndBlockNumber) {
+ closeTagChangeRegion = true;
+ }
+ listBlock = listBlock.next();
+ } while(textDocument.list(listBlock) == list);
+ }
+
bool listStarted = false;
int listChangeId = 0;
if (!headingLevel && !numberedParagraphLevel) {
@@ -947,6 +957,11 @@
closeChangeRegion();
writer->endElement();
}
+
+ if (closeTagChangeRegion) {
+ closeTagTypeChangeRegion();
+ }
+
return block;
}
@@ -983,7 +998,7 @@
continue;
}
- if (!tagTypeChangeRegionOpened && !cursor.currentTable() && \
!cursor.currentFrame() && !cursor.currentList()) { + if \
(!tagTypeChangeRegionOpened && !cursor.currentTable() && !cursor.currentList()) { \
tagTypeChangeEndBlockNumber = checkForTagTypeChanges(block); if \
(tagTypeChangeEndBlockNumber != -1) { tagTypeChangeRegionOpened = true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic