Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | ODFF: Make COUNT ignore error results | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | ooo | ||||||||||||
Component: | programming | Assignee: | oc | ||||||||||||
Status: | CLOSED FIXED | QA Contact: | issues@sc <issues> | ||||||||||||
Severity: | Trivial | ||||||||||||||
Priority: | P3 | CC: | issues, lvyue | ||||||||||||
Version: | recent-trunk | Keywords: | ms_interoperability | ||||||||||||
Target Milestone: | --- | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
URL: | http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula | ||||||||||||||
Issue Type: | PATCH | Latest Confirmation in: | --- | ||||||||||||
Developer Difficulty: | --- | ||||||||||||||
Issue Depends on: | |||||||||||||||
Issue Blocks: | 72764 | ||||||||||||||
Attachments: |
|
Description
ooo
2008-03-03 13:22:47 UTC
Hi Yue! This issue looks like a good next candidate for you to work on, I guess. Thanks Eike Created attachment 51891 [details]
A patch
Hi Yue, Almost.. for the case svSingleRef the patch unconditionally casts pCell to ScFornulaCell* to call pFCell->GetErrCode(). That would be illegal if the cell wasn't of type ScFormulaCell. Obtain the cell type first using pCell->GetCellType() and check for CELLTYPE_FORMULA and only if so do the cast and obtain the error code. I also would not extract the ifCOUNT case from the switch to introduce another if(eFunc==ifCOUNT) but handle the formula cell case inside the switch(eFunc){case ifCOUNT}, decrementing nCount again in case it was a formula cell with error result. That would save one comparison for all other functions not being ifCOUNT. Might sound like nitpicking but ... The error case is an exceptional case, so generally nCount would only be incremented. For the case svDoubleRef, as now ifCOUNT is handled explicitly in switch(eFunc), the default case there can be removed, that only handled the then remaining ifCOUNT case. Thanks Eike Created attachment 51960 [details]
Another patch
Created attachment 51961 [details]
patch3
Hi, Eike, The patch2 is not complete, I forgot the part of CASE_OCERRFUNC macro. So, please check patch3. :) Thanks Yue Created attachment 52093 [details]
patch4 of i86643
Created attachment 52225 [details]
patch 5. Reset nGlobalError, and handle all errors.
In cws odff03: sc/source/core/tool/interpr1.cxx 1.56.20.2 sc/source/core/tool/interpr4.cxx 1.55.20.1 Reassigning to QA for verification. verified in internal build cws_odff3 Verified under DEV300m28 under Linux - Closing - Sophie Verified under Dev300_m28 under XP. *** Issue 51068 has been marked as a duplicate of this issue. *** |