Issue 72190 - XL style sheet name parsing for ScAddress
Summary: XL style sheet name parsing for ScAddress
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: recent-trunk
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: ooo
QA Contact: issues@sc
URL:
Keywords:
: 73703 (view as issue list)
Depends on: 20857
Blocks:
  Show dependency tree
 
Reported: 2006-12-01 18:39 UTC by jodygoldberg
Modified: 2013-08-07 15:15 UTC (History)
2 users (show)

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


Attachments
Use the current table from the result parm rather than reseting to table 0 (1.24 KB, patch)
2006-12-01 18:40 UTC, jodygoldberg
no flags Details | Diff
xls export (2.65 KB, patch)
2006-12-01 18:40 UTC, jodygoldberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description jodygoldberg 2006-12-01 18:39:21 UTC
Attached is a minor update to the r1c1 patch.  The pieces are small enough that
I'll file both patches in one issue.

1) corrects a problem in the XL sheet name parsing
For addresses with no sheet name qualifiers  'A1' vs 'Sheet!A1' the code always
returned the 1st table (all of our tests happened to be from sheet1 :-)  The
interface was not exactly clear that it expects the current table to be passed
in via the result parameter.  This raises some issues for the Details argument
that I added.  We may be able to do without it's address field, but it will take
another code audit to do it.   Is it worth it ?

2) adds xls export
As part of the lobotomization of the r1c1 patch to get it to go in without
visible change I left out xls import/export.  On futher reflection the xls
export is safe and moves r1c1 that much closer to being turn key when a UI is
available.
Comment 1 jodygoldberg 2006-12-01 18:40:05 UTC
Created attachment 41056 [details]
Use the current table from the result parm rather than reseting to table 0
Comment 2 jodygoldberg 2006-12-01 18:40:27 UTC
Created attachment 41057 [details]
xls export
Comment 3 frank 2006-12-01 21:15:37 UTC
Hi Eike,

please have a look at this one.

Frank
Comment 4 ooo 2006-12-04 13:35:54 UTC
Accepted.

Jody, regarding the Details address field: if we really don't need it anywhere
it may be worth getting rid of it, it would save at least one initialization of
an ScAddress (== 3 PODs) upon each call. The audit shouldn't be that much, or do
I underestimate?

Btw, for porting reasons please don't reintroduce ULONG GetLen(), use sal_Size
instead.

Thanks
  Eike
Comment 5 jodygoldberg 2006-12-04 14:02:04 UTC
The audit replicates the initial r1c1 audit.  It's unclear if it buys us much in
that the inout address still needs to initialized, and right now we're only
guaranteed that the table is set.  I'll take a stab at it and see.

DR : could you have a look at the REFMODE xls export ?
Comment 6 daniel.rentz 2006-12-04 14:31:09 UTC
More easy: use XclExpBoolRecord from xerecord.hxx:

---

class XclRefmode : public XclExpBoolRecord
{
public:
          XclRefmode( ScDocument& rDoc );
};

---

XclRefmode::XclRefmode( ScDocument& rDoc ) :
   XclExpBoolRecord( 0x000F, rDoc.GetAddressConvention() !=
ScAddress::CONV_XL_R1C1 ) )
{
}

---
Comment 7 ooo 2007-01-04 18:21:48 UTC
In CWS dr52:

sc/source/core/tool/address.cxx  1.6.62.1

sc/source/filter/excel/excdoc.cxx  1.65.124.1
sc/source/filter/inc/xcl97dum.hxx  1.9.134.1
sc/source/filter/inc/xcl97rec.hxx  1.46.134.1
sc/source/filter/xcl97/xcl97dum.cxx  1.19.126.1
sc/source/filter/xcl97/xcl97rec.cxx  1.83.62.1
Comment 8 ooo 2007-01-10 11:26:49 UTC
No changes for QA. Verified presence in CWS build.
Comment 9 ooo 2007-01-21 20:35:01 UTC
*** Issue 73703 has been marked as a duplicate of this issue. ***
Comment 10 ooo 2007-01-30 14:56:24 UTC
Present in m2, closing.