To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=96089
                 Issue #|96089
                 Summary|vcl: ambiguous && || sequence
               Component|gsl
                 Version|DEV300m35
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|pl
             Reported by|cmc





------- Additional comments from [EMAIL PROTECTED] Tue Nov 11 11:32:02 +0000 
2008 -------
X && Y || Z
binds operator precedence-wise as
(X && Y) || Z
not
X && (Y || Z)

so I am a little suspicious about...

vcl/source/window/menu.cxx
if ( ImplIsVisible( i ) && ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType
== MENUITEM_STRINGIMAGE ))
which means
if ( (ImplIsVisible( i ) && ( pData->eType == MENUITEM_IMAGE )) || (
pData->eType == MENUITEM_STRINGIMAGE ))
is that what we really mean, or do we mean
if ( ImplIsVisible( i ) && (( pData->eType == MENUITEM_IMAGE ) || ( pData->eType
== MENUITEM_STRINGIMAGE )))
seeing as both MENUITEMs refer to "image"s of one type of another ?

similarly in unx/gtk/gdi/salnativewidgets-gtk.cxx
there is a confusing sequence of && || where one of them (the menu) section is
slightly different to the other ones, which makes me suspicious that it might be
intended to be the same as the others.

If they're currently correct, then lets just stick some brackets around it to
confirm it, but if not then the following patch might be what was intended. Just
a guess though

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to