[ooo-build-commit] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Sep 30 12:36:22 PDT 2010


 sw/source/core/doc/docftn.cxx |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 5ad2e1a56da50873516f7ae886eabff97ba4f30f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 30 20:36:15 2010 +0100

    #i113185#: SwDoc::SetEndNoteInfo(): fix conditional

diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 9af5431..65b55f1 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -333,10 +333,15 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
         }
 
         BOOL bNumChg  = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
-        BOOL bExtra   = !bNumChg &&
-                            rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()||
-                            rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() ||
-                            rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix();
+        // this seems to be an optimization: UpdateAllFtn() is only called
+        // if the offset changes; if the offset is the same,
+        // but type/prefix/suffix changes, just set new numbers.
+        bool const bExtra = !bNumChg &&
+                (   (rInfo.aFmt.GetNumberingType() !=
+                        GetEndNoteInfo().aFmt.GetNumberingType())
+                ||  (rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix())
+                ||  (rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix())
+                );
         BOOL bFtnDesc = rInfo.GetPageDesc( *this ) !=
                             GetEndNoteInfo().GetPageDesc( *this );
         SwCharFmt *pOldChrFmt = GetEndNoteInfo().GetCharFmt( *this ),


More information about the ooo-build-commit mailing list