Issue 96140 - oox: ambiguous && ||
Summary: oox: ambiguous && ||
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: DEV300m35
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: daniel.rentz
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks: 96084
  Show dependency tree
 
Reported: 2008-11-12 10:36 UTC by caolanm
Modified: 2013-08-07 15:14 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
makes current logic explicit (610 bytes, patch)
2008-11-12 10:37 UTC, caolanm
no flags Details | Diff
but perhaps this was what was intended (610 bytes, patch)
2008-11-12 10:37 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2008-11-12 10:36:41 UTC
in oox/source/xls/worksheethelper.cxx
we have
if( rCellData.mxCell.is() && (rCellData.mnXfId >= 0) || (rCellData.mnNumFmtId >=
0) )
which by precedence is 
if( (rCellData.mxCell.is() && (rCellData.mnXfId >= 0)) || (rCellData.mnNumFmtId
>= 0) )

(as attachment 1 [details] makes explicit)

but is that really what we want, superficially it looks like

if( rCellData.mxCell.is() && ((rCellData.mnXfId >= 0) || (rCellData.mnNumFmtId
>= 0) ))

might have been intended ? 

(as attachment 2 [details] would change it to be)
Comment 1 caolanm 2008-11-12 10:37:09 UTC
Created attachment 57924 [details]
makes current logic explicit
Comment 2 caolanm 2008-11-12 10:37:41 UTC
Created attachment 57925 [details]
but perhaps this was what was intended
Comment 3 daniel.rentz 2008-11-12 10:48:10 UTC
thanks for catching, the current implementation is wrong, oox.2.patch is right.
Comment 4 daniel.rentz 2008-11-12 10:48:44 UTC
will add this in dr67, targeted for OOo 3.1
Comment 5 daniel.rentz 2008-11-21 16:45:01 UTC
fixed in DEV300/dr67
Comment 6 daniel.rentz 2009-03-12 13:39:50 UTC
internal code fix, verified
Comment 7 caolanm 2009-05-03 21:56:11 UTC
closed, seen DEV300_m47