Kaydet (Commit) f068f1ae authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Bail out on first hit. No need to go through the whole set.

Change-Id: I044432a1d4e63f49731c24e4eb62525386818620
üst 83c4ebbe
...@@ -886,7 +886,6 @@ sal_Bool ScContentTree::NoteStringsChanged() ...@@ -886,7 +886,6 @@ sal_Bool ScContentTree::NoteStringsChanged()
SvTreeListEntry* pEntry = FirstChild( pParent ); SvTreeListEntry* pEntry = FirstChild( pParent );
bool bEqual = true;
std::vector<sc::NoteEntry> aEntries; std::vector<sc::NoteEntry> aEntries;
pDoc->GetAllNoteEntries(aEntries); pDoc->GetAllNoteEntries(aEntries);
std::vector<sc::NoteEntry>::const_iterator it = aEntries.begin(), itEnd = aEntries.end(); std::vector<sc::NoteEntry>::const_iterator it = aEntries.begin(), itEnd = aEntries.end();
...@@ -894,20 +893,18 @@ sal_Bool ScContentTree::NoteStringsChanged() ...@@ -894,20 +893,18 @@ sal_Bool ScContentTree::NoteStringsChanged()
{ {
const ScPostIt* pNote = it->mpNote; const ScPostIt* pNote = it->mpNote;
if (!pEntry) if (!pEntry)
bEqual = false; return true;
else
{
if (lcl_NoteString(*pNote) != GetEntryText(pEntry))
bEqual = false;
pEntry = NextSibling(pEntry); if (lcl_NoteString(*pNote) != GetEntryText(pEntry))
} return true;
pEntry = NextSibling(pEntry);
} }
if ( pEntry ) if ( pEntry )
bEqual = false; // kommt noch was return true;
return !bEqual; return false;
} }
sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType ) sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment