Issue 120478 - Name Scope enhancement for spreadsheet
Summary: Name Scope enhancement for spreadsheet
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: zhaoshzh
QA Contact:
URL:
Keywords:
: 116599 (view as issue list)
Depends on:
Blocks:
 
Reported: 2012-08-07 07:10 UTC by zhaoshzh
Modified: 2017-05-20 10:35 UTC (History)
10 users (show)

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


Attachments
Document with named range per sheet generated with LO (9.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-08-08 08:44 UTC, Regina Henschel
no flags Details
patch for calc name range (74.57 KB, patch)
2012-08-21 02:04 UTC, zhaoshzh
no flags Details | Diff
the part 2 of the patch for calc name range (840.11 KB, patch)
2012-08-21 02:10 UTC, zhaoshzh
no flags Details | Diff
remove some comments,and remove unused code (68.71 KB, patch)
2012-08-30 08:56 UTC, zhaoshzh
no flags Details | Diff
rollback the types.rdb (839.63 KB, patch)
2012-09-06 01:18 UTC, zhaoshzh
aoo.zhaoshzh: review?
Details | Diff
extend the old API,and Do not modify it. (36.22 KB, patch)
2012-09-06 01:19 UTC, zhaoshzh
no flags Details | Diff
update patch for the interoperability of original API (24.93 KB, patch)
2012-09-06 05:18 UTC, zhaoshzh
no flags Details | Diff
clear binfilter (30.06 KB, patch)
2012-09-07 02:00 UTC, zhaoshzh
aoo.zhaoshzh: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description zhaoshzh 2012-08-07 07:10:01 UTC
MS Excel can support worksheet scope defined name. Excel 2007 can define duplicate name for different sheet, while Excel 2003 can not in its UI. 

When AOO loading a xlsx file which has duplicated defined name, AOO will only change the name. But any other place which uses the defined name is not changed, which will cause problems.

This enhancement will support loading worksheet scope defined name from xlsx/xls file.

Limitation:
1)Do not support create worksheet scope defined name from GUI.
2)Can not save worksheet scope defined name to ods( Need modify ODF standard)
Comment 1 Regina Henschel 2012-08-07 09:23:41 UTC
That feature already exists in LibreOffice, with UI. So it might be useful to look how it is done there, especially in relation to file format.
Comment 2 zhaoshzh 2012-08-08 02:36:46 UTC
this enchancement will be completed in 2 steps.
Currently just focus on the interoperability of MS defined name.
And not modify the ODF file format.

if MS office defined range names with a sheet or a work book,import it in Aoo,
make the name of work book in the original,but with a flag of global name,for example,the name is "Name_1",it will be "Name_1" as before in the define name dialog.
make the name of work sheet to the original,but with a flag of sheet name,for 
example,the name is "Name_1",it will be "Name_1 (sheet 1)" in the define name 
dialog if the name is defined in the sheet 1.
Comment 3 Wang Lei 2012-08-08 07:11:31 UTC
This enhancement will be completed in 2 steps.
In step 1, we want to just focus on the interoperability of MS Excel range based defined name. 
When user open a Excel file which has range based defined name, the duplicated range name will be kept. AOO will use sheet scoped name in prior to workbook scoped name when do calculation. And some indicator is shown in name define dialog.
In step 1 we will not modify the ODF file format. When save Excel xls/xlsx file with sheet scoped defined name to ods file, AOO will rename sheet scoped defined name as "sheet_name" plus "defined name", like SheetName_DefinedName.

In step 2, we want to support create worksheet scope defined name from GUI. We will refer the file format from LibreOffice if their implementation is in ODF standard or ODF standard candidate.
Comment 4 Regina Henschel 2012-08-08 08:44:07 UTC
Created attachment 78880 [details]
Document with named range per sheet generated with LO

The ODF 1.2 spec contains already the possibility to define names with scope of a single sheet. There is no need for any change or addition in specification, see section 9.4.11 <table:named-expressions> in part 1.

Interoperability with LibreOfffice is important too.

I think, first reading and writing ODF should be solved and then import and export filter.
Comment 5 Regina Henschel 2012-08-08 09:33:45 UTC
The bug 118037 is related.
Comment 6 Wang Lei 2012-08-17 05:24:36 UTC
Confirm it as an enhancement request
Comment 7 zhaoshzh 2012-08-21 02:04:35 UTC
Created attachment 79011 [details]
patch for calc name range

this is the patch for calc name range enchancement.
the patch includes 2 part:
one is the c++ code,the other is types.rdb.
and the offapi\type_reference\types.rdb is added in next attachment.
Comment 8 zhaoshzh 2012-08-21 02:10:47 UTC
Created attachment 79012 [details]
the part 2 of the patch for calc name range

the part 2 of the patch for calc name range,
because the file size limitation,I zipped the attachement.
if merge it to code base,should unzip it at first.
Comment 9 Oliver Brinzing 2012-08-21 07:34:43 UTC
.
Comment 10 zhaoshzh 2012-08-30 08:56:47 UTC
Created attachment 79238 [details]
remove some comments,and remove unused code

remove some comments,and remove unused code,this is the final first part.
Comment 11 SVN Robot 2012-08-31 08:11:34 UTC
"leiw" committed SVN revision 1379349 into trunk:
#i120478 Enhancement request: support sheet scoped named ranges in Calc
Comment 12 Wang Lei 2012-08-31 08:15:10 UTC
The description of this enhancement is 

http://wiki.openoffice.org/wiki/Calc/Features/Calc_name_range_enchancement%28step1%29
Comment 13 Ariel Constenla-Haile 2012-09-03 02:18:00 UTC
Reopening.

a) you missed to change the binfilter module. See revision 1379914 where I added a dummy implementation so that the build boot can build without breaking.

b) You make API changes to published interfaces, this is a NO-GO
Comment 14 Terry Yang 2012-09-04 14:53:00 UTC
Open bug 120804 as a test plan for this enhancement.
Please help review it.
Comment 15 zhaoshzh 2012-09-06 01:18:15 UTC
Created attachment 79304 [details]
rollback the types.rdb
Comment 16 zhaoshzh 2012-09-06 01:19:40 UTC
Created attachment 79305 [details]
extend the old API,and Do not modify it.

extend the old API,and Do not modify it.
Comment 17 zhaoshzh 2012-09-06 05:18:21 UTC
Created attachment 79307 [details]
update patch for the interoperability of original API
Comment 18 zhaoshzh 2012-09-07 02:00:01 UTC
Created attachment 79326 [details]
clear binfilter
Comment 19 SVN Robot 2012-09-07 02:50:47 UTC
"leiw" committed SVN revision 1381844 into trunk:
#i120478 Enhancement request: support sheet scoped named ranges in CalcSome m...
Comment 20 Wang Lei 2012-09-07 02:52:58 UTC
Some modification in revision 1381844
1)Adding two new interface instead of adding new member functions to existed interface
2)roll back types.rdb
3)roll back temp fix for binfilter
Comment 21 Terry Yang 2012-09-07 06:07:08 UTC
*** Issue 116599 has been marked as a duplicate of this issue. ***
Comment 22 binguo 2012-11-13 06:51:41 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366, pass.
Comment 23 binguo 2012-11-13 06:52:45 UTC
close it.
Comment 24 Ariel Constenla-Haile 2013-03-02 11:24:14 UTC
Reopening.

The interfaces added, XNamedRange2 and XNamedRanges2, can be merged with XNameRange and XNamedRanges, respectively, now that trunk is 4.0 this incompatible change is allowed.

Please add documentation, it is completely missing in the new API.
Comment 25 hanya 2013-06-26 15:10:47 UTC
If XNamedRange2 and XNamedRanges2 are not merged into existing interfaces for AOO4, 
it seems next chance is AOO5.
Comment 26 Ariel Constenla-Haile 2013-07-25 20:09:28 UTC
The commits for this bug might be the root cause of Bug 122840
Someone in the know please take a look.
Comment 27 Andre 2014-03-03 13:00:55 UTC
Bug 124293 seems to be another feature broken by the commits for this issue.
Comment 28 Andre 2014-03-03 13:06:34 UTC
I guess it is missing step 2 (GUI) that breaks bug 124293.
Comment 29 Andre 2014-03-03 13:15:33 UTC
I am not sure why this bug is still open.  The opportunity for unification of the new interfaces came and went.  The problems caused by the changes are either fixed or covered by other bugs.

Are there still reasons not to close this bug and deal with the aftermath with other issues?
Comment 30 Andre 2014-03-10 09:27:43 UTC
Setting status back to fixed.  I agree that the commits for this bug introduced a lot of regression and where not complete but think that it is better to deal with the consequences with individual bugs.