Apache OpenOffice (AOO) Bugzilla – Issue 96164
sd: ambiguous && ||
Last modified: 2009-04-09 07:44:30 UTC
in sd/source/ui/app/sdmod1.cxx we have if( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem ) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem ) ) { by operator precedence this equates to if( (pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem )) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem ) ) { which is surely not the intent. I assume we want if ( pSet && ( SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem ) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) || SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem ) ) ) which is what the attached patch does
Created attachment 57947 [details] patch to use probable intention
Reassigned. Please handle. Thanks.
thanks for the patch, applied in cws impress166 for OOo 3.1
the patch has been applied properly -> verified
seen in OOO310_m9 and DEV300_m45