summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorLaurent Godard <lgodard.libre@laposte.net>2013-09-11 09:06:24 +0200
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-23 10:44:20 -0400
commit759bdbbc348d320994813a9de1a7927b795580a3 (patch)
tree897cb53c217866ce6b365f76943390e3e6368529 /sc/source/filter/excel
parentae88290f87acf693fed02140ca384ec15589616b (diff)
Re-implement cell note storage using mdds::multi_type_vector.
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/excdoc.cxx38
1 files changed, 29 insertions, 9 deletions
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index e2c050a75523..32db2e80c81f 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -417,15 +417,35 @@ void ExcTable::FillAsTable( SCTAB nCodeNameIdx )
mxCellTable.reset( new XclExpCellTable( GetRoot() ) );
//export cell notes
- ScNotes::iterator itr = rDoc.GetNotes(mnScTab)->begin();
- ScNotes::iterator itrEnd = rDoc.GetNotes(mnScTab)->end();
- for (; itr != itrEnd; ++itr)
- {
- // notes
- const ScPostIt* pScNote = itr->second;
- ScAddress aScPos( itr->first.first, itr->first.second, mnScTab );
- mxNoteList->AppendNewRecord( new XclExpNote( GetRoot(), aScPos, pScNote, OUString() ) );
- }
+ for (SCCOL nCol=0; nCol<MAXCOLCOUNT; nCol++)
+ {
+ if ( rDoc.HasColNotes(nCol, mnScTab) )
+ {
+ sc::CellNoteStoreType& maCellNotes = rDoc.GetColNotes(nCol, mnScTab);
+
+ sc::CellNoteStoreType::const_iterator itBlk = maCellNotes.begin(), itBlkEnd = maCellNotes.end();
+ sc::cellnote_block::const_iterator itData, itDataEnd;
+
+ for(;itBlk != itBlkEnd; ++itBlk)
+ {
+ if (itBlk->data)
+ {
+ SCROW nRow = itBlk->position;
+ itData = sc::cellnote_block::begin(*itBlk->data);
+ itDataEnd = sc::cellnote_block::end(*itBlk->data);
+ for (; itData != itDataEnd; ++itData, ++nRow)
+ {
+ ScPostIt* pScNote = *itData;
+ if (pScNote)
+ {
+ ScAddress aScPos( nCol, nRow, mnScTab );
+ mxNoteList->AppendNewRecord( new XclExpNote( GetRoot(), aScPos, pScNote, OUString() ) );
+ }
+ }
+ }
+ }
+ }
+ }
if( GetOutput() != EXC_OUTPUT_BINARY )
{