[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/koffice-essen/filters/kspread/excel/sidewinder
From: Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date: 2010-11-24 9:05:33
Message-ID: 20101124090533.8D859AC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1200199 by mkruisselbrink:
fix handling of notes/comments. The existing assert was not only incorrect, but also \
should not have been there as invalid user-input should never trigger assertions. \
Also actually making use of the NoteObject object makes it work more correct.
M +7 -10 worksheetsubstreamhandler.cpp
--- branches/work/koffice-essen/filters/kspread/excel/sidewinder/worksheetsubstreamhandler.cpp \
#1200198:1200199 @@ -62,9 +62,6 @@
// the number of NoteObject's in this worksheet
int noteCount;
- // list of textobjects as received via TxO records
- std::vector<QString> textObjects;
-
// The last drawing object we got.
MSO::OfficeArtDgContainer* lastDrawingObject;
MSO::OfficeArtSpgrContainer* lastGroupObject;
@@ -734,9 +731,12 @@
{
if (!record) return;
- std::cout << "WorksheetSubStreamHandler::handleTxO size=" << \
d->textObjects.size()+1 << " text=" << record->m_text << std::endl;
- d->textObjects.push_back(record->m_text);
-
+ if (d->sharedObjects.rbegin() != d->sharedObjects.rend()) {
+ NoteObject* no = \
dynamic_cast<NoteObject*>(d->sharedObjects.rbegin()->second); + if (no) {
+ no->setNote(record->m_text);
+ }
+ }
if (d->lastOfficeArtObject) {
d->lastOfficeArtObject->setText(*record);
d->lastOfficeArtObject = 0;
@@ -753,10 +753,7 @@
const unsigned long id = record->idObj();
NoteObject *obj = dynamic_cast<NoteObject*>(d->sharedObjects[id]);
if (obj) {
- int offset = d->noteMap[id] - 1;
- Q_ASSERT(offset>=0 && uint(offset)<d->textObjects.size());
- cell->setNote(d->textObjects[offset]);
- //cell->setNote(obj->note());
+ cell->setNote(obj->note());
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic