Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Section Range names truncated from underscore to end in MSO .XLSX | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | Rainer Bielefeld <rainerbielefeld_ooo_qa> | ||||||||||
Component: | open-import | Assignee: | AOO issues mailing list <issues> | ||||||||||
Status: | CONFIRMED --- | QA Contact: | |||||||||||
Severity: | Normal | ||||||||||||
Priority: | P3 | CC: | awf.aoo, elish, issues, j.nitschke, oliver.brinzing, rainerbielefeld_ooo_qa | ||||||||||
Version: | 4.0.0 | Keywords: | interop_OOXML, regression | ||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Windows 7 | ||||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | 4.1.0-dev | ||||||||||
Developer Difficulty: | --- | ||||||||||||
Attachments: |
|
Description
Rainer Bielefeld
2014-02-22 09:32:49 UTC
Already Reproducible with server installation of " AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 – Rev.1457606 ((2013-03-19))]" on German WIN7 Home Premium (64bit)", own separate user profile (c) Problem seems to be limited to XLSX import. Range Names are ok when I open .ods created from reporter#s sample with AOO 3.4.1 with AOO 4.1-dev it's not a defect, more a bad and confusing user experience imo There is a feature in xls/xlsx which allows one range name to have different meanings. Depending on what sheet you use the name, it can refer to different ranges. I tried to explain it in bug 124256, comment 7 AOO should show the name only once and select a different range depending which sheet is shown. or AOO lists all names but shows the user somehow on what sheet what range is valid, like in name define view but better. (if you don't know about the feature the name define view is still confusing) The name box is filled in ScPosWnd::FillRangeNames() (sc/source/ui/app/inputwin.cxx). That names are still what is listed in the XSLX file, without any underscore or anything else. The named ranges are imported in DefinedNames::importDefinedName(const AttbibuteList&) (in oox/source/xls/defnamesbuffer.cxx). So it seems a "crutch" what has been used in older OOo versions no longer is necessary? In old days identical names were not allowed for sections, still so for manual entries, but now identical names are allowed for import and work? @Rainer: I have not finished my analysis yet. Above comments are more a reminder for me that allow me to continue after the weekend. Looks like the commits for bug 120478 are responsible for this bug: the sheet id is now used internally to distinguish between the ranges. But the UI has not been adapted. It only sees the range names, not the sheet ids. Therefore the sheet id can not be used to look up the range. Created attachment 82787 [details]
Concept of a fix.
This patch outlines the idea for a fix: insert entries into the ScPosWnd (that is the implementing class of the Name Box control in the formula tool bar) that encode both the range name and the sheed id, much like before the regression was introduced. Don't change the range names in the ScRangeData structures.
@all: What would be the preferred name? Before the regression was introduced I think it was <range-name>_<sheet-id>. At the moment it is just <range-name>. We need a name that contains both (range-name and sheet-id). This issue was caused by commits for bug 120478. The navigator also shows the named ranges and seems to create their names with its own algorithm (also without the underscore and sheet id). What a mess. Created attachment 82812 [details] Better fix. A better fix that displays ranges as "<name> (<sheet>)" both in the name box and the navigator. Internally a different naming scheme "<name>_<sheet>" is used because that has worked before and should not interfere with other range or database names too much. It even works to change the range via the navigator and then have the name box updated (the reverse does not work due to missing functionality in the navigator). @Rainer: Comment 2 mentions that the named ranges work when imported from .ods files written by AOO 3.4.1. Can you attach such a file? Created attachment 82833 [details]
Additional changes.
A few changes missing from the last patch.
|