To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=47706


User ab changed the following:

                  What    |Old value                 |New value
================================================================================
                    Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
                Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [EMAIL PROTECTED] Fri Apr 22 02:54:58 -0700 
2005 -------
This problem was caused by an invalid cast of a constant to an enum in
/sw/source/core/bastyp/calc.cxx / SwCalc::Term():

SbxOperator eSbxOper = (SbxOperator)USHRT_MAX;

The value of eSbxOper after executing this statement is not defined. For
Linux/gcc the value becomes 31 (probably due to the number of enum elements),
for Windows / msvc USHRT_MAX obviously is accepted as value.

That's why later the following if clause does not work correctly for Linux:

if( USHRT_MAX != (USHORT)eSbxOper )

eSbxOper never can be USHRT_MAX, so this check if the value has been changed, 
fails. Afterwards SbxValue::Compute() is called with an invalid SbxOperator 
enum value. That causes an sbx error to be set. This error comes up the next 
time the Basic interpreter gets control.

Fixed by using an USHORT variable to prepare the enum value and cast to the 
enum type later.



---------------------------------------------------------------------
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