Issue 95450 - Import of XLS with omitted parameters in function ADDRESS is broken
Summary: Import of XLS with omitted parameters in function ADDRESS is broken
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: programming (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2008-10-26 09:32 UTC by rice72
Modified: 2013-08-07 15:14 UTC (History)
2 users (show)

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


Attachments
patch 1. (1.55 KB, text/plain)
2009-01-08 07:38 UTC, lvyue
no flags Details
Excel test case file (19.00 KB, application/vnd.ms-excel)
2009-01-13 23:18 UTC, ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description rice72 2008-10-26 09:32:29 UTC
if I insert this formula on "foglio1" I obtain an error:

=INDIRIZZO(1;1;;;"Foglio2")

but If I explict the default values it works correctly.

Compatibility issue: in M$/Excel 97 it works without the defaults.

Translation note: "INDIRIZZO" is the Italian translation of "ADDRESS"
Comment 1 Stefan Weigel 2008-11-02 22:07:18 UTC
In MS Excel =ADDRESS(1;1;;1;"Sheet1") is a valid formula. The third parameter
defaults to 1. However, when importing an XLS file or when entering this formula
in OOo Calc 3.0 this results in an error value.

Importing the same XLS file in OOo 2.4.1 worked fine. --> regression

Not duplicate but connatural are issue 95381 and issue 95742.
Comment 2 ooo 2008-11-06 14:03:43 UTC
Consider support of omitted parameters in ADDRESS.
Comment 3 lvyue 2009-01-08 07:38:37 UTC
Created attachment 59231 [details]
patch 1.
Comment 4 ooo 2009-01-13 23:15:40 UTC
I simplified that by using the method GetDoubleWithDefault(), the
resulting patch is:

Index: interpr1.cxx
===================================================================
--- interpr1.cxx        (revision 265913)
+++ interpr1.cxx        (working copy)
@@ -6146,7 +6146,7 @@ void ScInterpreter::ScAddressFunc()
     USHORT  nFlags = SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE;   // default
     if( nParamCount >= 3 )
     {
-        USHORT n = (USHORT) ::rtl::math::approxFloor(GetDouble());
+        USHORT n = (USHORT) ::rtl::math::approxFloor( GetDoubleWithDefault( 1.0));
         switch ( n )
         {
             default :


However, the missing parameter needs to be supported in export to
ODF11/PODF file format as well (RewriteMissingToPof, ScMissingContext,
AddMissing), but the source changed significantly with CWSs odff05 and
frmdlg that got integrated to m39, which isn't ready yet. Adding that to
a CWS based on m38 would clash upon integration and would had to be
rewritten, so we'll have to wait for m39 getting ready.
Comment 5 ooo 2009-01-13 23:18:49 UTC
Created attachment 59371 [details]
Excel test case file
Comment 6 ooo 2009-01-23 17:03:15 UTC
In cws calcperf03:

revision 266841
formula/source/core/api/token.cxx
sc/source/core/tool/interpr1.cxx

Of course both, ODF11/PODF and ODF12/ODFF, file formats need the missing
parameter replacement to be written so older releases can read it correctly.
Comment 7 ooo 2009-01-25 21:08:07 UTC
Reassigning to QA for verification.
Comment 8 ooo 2009-01-25 21:19:54 UTC
Reassigning I said..
Comment 9 oc 2009-02-06 15:40:55 UTC
verified in internal build cws_calcperf03
Comment 10 vladimir_hitekschool 2009-04-10 01:40:36 UTC
Issue 95450 has been fixed in master version OOo-dev 3.1 .0 (OOO310m9 
Build:9396) for Windows XP and can be closed.
Comment 11 oleghitekschool 2009-04-12 21:04:48 UTC
The Issue checked and closed by HitekSchool interns, Group 1 - as part of an 
Issue Hunting Party.