Apache OpenOffice (AOO) Bugzilla – Issue 99770
vcl: ambiguous && || sequence
Last modified: 2009-04-14 13:00:16 UTC
Attached is a patch that addresses the last gcc 4.4 warnings in vcl. It keeps the existing logic in all cases, but should be reviewed to see if that's what was originally meant, e.g. the atktext.cxx && || looks suspicious and from the comments maybe should instead be ... if ( -2 == offset && (ATK_TEXT_BOUNDARY_LINE_START == boundary_type || ATK_TEXT_BOUNDARY_LINE_END == boundary_type) ) and the && || in source/window/decoview.cxx also looks a little suspicious as well.
Created attachment 60585 [details] patch that keeps things as they are
committed in CWS vcl100, thanks for the patch
target
And we're happy that the code in atktext.cxx is correct ?, I know this patch doesn't change the logic, but just like to be sure we're happy with that logic.
the decoview.cxx thingy is OK IMHO and from the comment in atktext.cxx I think, that, too, is what it should be: the "at end of line" position is either "linestart plus offset -2" or "line end"
I think the replacement code in the issue is correct, not the one in the patch: the way it is now, the code always returns the current line for any given index in the text if the boundary type is ATK_TEXT_BOUNDARY_LINE_END. This is not the expected behavior. Good catch actually, must have been confused by the extra brackets.
committed an according change. Thanks for having a second look.
back to FIXED.
please verify in CWS vcl100
all good
closed, seen in m46