Apache OpenOffice (AOO) Bugzilla – Issue 113185
sw: && || ambiguity in docftn.cxx
Last modified: 2017-05-20 10:22:19 UTC
in sw/source/core/doc/docftn we have... BOOL bExtra = !bNumChg && rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType()|| rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix(); by precedence this is... BOOL bExtra = ( !bNumChg && rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType() ) || rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix(); but there's a small possibility we might have meant BOOL bExtra = !bNumChg && ( rInfo.aFmt.GetNumberingType() != GetEndNoteInfo().aFmt.GetNumberingType() || rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix() || rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix() );
Created attachment 70644 [details] version 1, keep logic silence gcc warnings
Created attachment 70645 [details] version 2, change logic, small possibility that is what was intended
.
after some digging around i think that the bExtra variable is an optimization to prevent calling an expensive update function. thus the conditional is indeed buggy, and the second fix is the right one. i've added a bit of comment for future maintainers. fixed in cws sw34bf01 http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/f5a2e2bba058
please verify
verified