sc/source/ui/navipi/content.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 4a5ad5be12a3b4afa9a05b677a953e7f18f91c4b Author: Laurent Godard <[email protected]> Date: Wed Sep 25 17:04:23 2013 +0200 a new way to iterate over notes of a column - hope less time consumming Change-Id: I38a1927bd40167cfe2becfb7bc47ec9454f559eb diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index b9591f4..58634c4 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -947,12 +947,12 @@ sal_Bool ScContentTree::NoteStringsChanged() if ( pDoc->HasColNotes(nCol, nTab) ) { sc::CellNoteStoreType& maCellNotes = pDoc->GetColNotes(nCol, nTab); - for (SCROW nRow=0; nRow < MAXROWCOUNT; nRow++) // TODO : notes suboptimal ? + sc::CellNoteStoreType::const_iterator it = maCellNotes.begin(), itEnd = maCellNotes.end(); + for (; it != itEnd; ++it) { - sc::CellNoteStoreType::position_type aPos = maCellNotes.position(nRow); - sc::CellNoteStoreType::iterator it = aPos.first; if (it->type == sc::element_type_cellnote) { + SCROW nRow = it->position; ScPostIt* pNote = maCellNotes.get<ScPostIt*>(nRow); if (pNote) { @@ -962,7 +962,6 @@ sal_Bool ScContentTree::NoteStringsChanged() { if ( lcl_NoteString( *pNote ) != GetEntryText(pEntry) ) bEqual = false; - pEntry = NextSibling( pEntry ); } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
