Bug 67248 - FILEOPEN Layer with reserved name vanishes when changing UI language
Summary: FILEOPEN Layer with reserved name vanishes when changing UI language
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks: Layers
  Show dependency treegraph
 
Reported: 2013-07-24 10:52 UTC by Rolf Eder
Modified: 2018-09-22 18:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
drawing to test (7.66 KB, application/vnd.oasis.opendocument.graphics)
2013-07-26 22:50 UTC, Cor Nouws
Details
layer.odg (18.31 KB, application/vnd.oasis.opendocument.graphics)
2014-01-17 17:48 UTC, pierre-yves samyn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eder 2013-07-24 10:52:12 UTC
Create a new drawing in LibO with UI in default English (USA).
Insert a layer named "Hintergrund".
Save the drawing.
Change the UI language to German (Germany).
Restart LibO and open the drawing.
The layer "Hintergrund" is missing.

The same happens when you insert a layer "Background" in the German UI and then switch to English.

The contents of the vanished layer are moved to the default layer "Layout".

It is in general not possible to insert a layer "Background" in UI English or "Hintergrund" in UI German. A MsgBox opens: "The name chosen already exists. Please enter another name."

These layer names are reserved in their respective language. Switching the UI language bypasses this function.

This may be considered as a bug in multi language environments and complex drawings with many layers. Beware the special names ...
Comment 1 Cor Nouws 2013-07-26 22:50:41 UTC
Created attachment 83072 [details]
drawing to test

Hi Dolf,

thanks for the report.
I started the attached in Dutch, with layer "NieuweLaag" added.
Opening when changed the UI language to English, works fine...
So I cannot confirm this (in 4.0.4.2)
Comment 2 pierre-yves samyn 2014-01-17 17:48:26 UTC
Hello

I reproduce on windows 7/64 with Versie: 4.2.0.2 
Build ID: cd65d6220c5694ee7012d7863bcde3455c9e3c30

I have created custom layers in the attached layer.odg:
- Achtergrond
- Arrière-plan
- Background
- Hintergrund

"Achtergrond" can be created with UI english but will not be visible in UI Dutch.
Same with the others: "Arrière-plan" & French, "Hintergrund" & German.

Regards
Pierre-Yves
Comment 3 pierre-yves samyn 2014-01-17 17:48:54 UTC
Created attachment 92299 [details]
layer.odg
Comment 4 Joel Madero 2015-05-02 15:43:23 UTC Comment hidden (obsolete)
Comment 5 pierre-yves samyn 2015-05-07 14:02:11 UTC
Hi

Still reproduced on windows 7 & Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale : fr_FR

Regards
Pierre-Yves
Comment 6 Rolf Eder 2015-05-08 06:30:54 UTC
Bug is still present in LibO 4.4.2.2, OS X 10.10.3 :-(
Comment 7 Rolf Eder 2015-05-08 07:02:10 UTC
Tested with LibO 3.3: Bug is present there too. Set version to "Inherited From OOo".
Comment 8 QA Administrators 2017-09-01 11:19:17 UTC Comment hidden (obsolete)
Comment 9 Rolf Eder 2017-09-01 11:44:11 UTC
Bug is still present in 5.4.1.2 on macOS :-(
Comment 10 Regina Henschel 2017-10-25 15:12:56 UTC
A solution might be to divide between an internal name/identifier and the name used by the user. Such distinction already exists in other contexts.
Idea 1: Use a new attribute "draw:display-name" of the element <draw:layer>.
Idea 2: Add an xml:id attribute to each <draw:layer> and change the references to the <draw:layer> elements to use not the draw:name but the xml:id.

A different solution might be to get rid of the special handling of "layout", "controls", "measurelines", "background" and "backgroundobjects" layers. Such special handling is not provided in the spec.

This is connected with the problem, how to use layers in documents, which are produced by foreign applications, e.g bug 101218.
Comment 11 Regina Henschel 2018-04-08 09:13:27 UTC
On Hackfest Hamburg, April 2018, we have decided to start a project for improving handling of layers and internal structure. In case you start to work on this issue get in contact with Regina (rb.henschel@t-online.de) or Armin (Armin.Le.Grand@me.com).

We have agreed on the plan, to introduce a new property "display-name", so that the layer-name shown to the user is independent from the internal name. Because it is a large project, a quick fix is unlikely.
Comment 12 Regina Henschel 2018-09-17 15:25:03 UTC
Work has started in https://gerrit.libreoffice.org/#/c/60507/.
Comment 13 Commit Notification 2018-09-21 09:33:50 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a9ec212c1b545d745285f0ab3119a80713b1d1f2

tdf#67248 Use localized layer name only for display in UI

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2018-09-22 17:38:57 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=47f84e024344d9a50e44dda4f947945e8fc643b5

tdf#67248 unittest for: Use localized layer name only ...

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.