Description: It appears to be impossible to create layers in draw with certain names. For instance, if you try to create a layer named "background", LibO says that a Layer with that name already exists even if it does not appear in the bottom bar with the layers. If there are some "reserved" names this would better be documented. Steps to Reproduce: 1. Open Draw 2. Try to create a layer named "background" Actual Results: LibO tells you that a layer with that name already exists Expected Results: LibO should let you create a background layer or tell you that the name "background" is reserved. Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: DrawingDocument [Information guessed from browser] OS: Linux (All) OS is 64bit: yes
The following five names have an internal usage and cannot be set by the user: layout, background, backgroundobjects, controls, measurelines The naming on the tabs is different and depends on language. The internal name is visible in the Modify dialog. 'layout', 'controls', 'measurelines' layers are visible in normal view. 'backgroundobjects' layer is visible in master view. 'background' layer is never visible and is not intended to be directly used by the user. 'measureline' layer is special as a dimension-line shape is automatically placed on layer 'measureline'. 'controls' layer is special as a form control shape is automatically placed on 'controls' layer and objects on 'controls' layer are always rendered in front of objects on other layers.
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/48e0b7962fdcfd46f8754ffa6c15dc149719f523 tdf#153204 Draw reserved layer names
Improving the documentation to include info about the reserved names is already fine, thanks! However, there is still something that I do not fully understand. If the naming system has two names for each layer, a user facing name that is internationalized (the "TAB" names) and an internal name, why isn't it possible to let users create layers with whatever TAB name they want? The only important thing seems not to have conflicts at the internal name level. For instance, if the user wants to define a layer with the tab name set to "background" why not allowing it by mapping it to an internal name different from the reserved keyword "background"?
(In reply to Callegar from comment #3) > Improving the documentation to include info about the reserved names is > already fine, thanks! > > However, there is still something that I do not fully understand. > > If the naming system has two names for each layer, a user facing name that > is internationalized (the "TAB" names) and an internal name, why isn't it > possible to let users create layers with whatever TAB name they want? The > only important thing seems not to have conflicts at the internal name level. > > For instance, if the user wants to define a layer with the tab name set to > "background" why not allowing it by mapping it to an internal name different > from the reserved keyword "background"? It is not implemented that way and changing the implementation is a lot of work without real benefit. You can easily workaround the problem by using an additional character e.g. an underscore or a space. User defined layers are not mapped to internal ones but are total new layers. The five special names were made fixed to ease their use in the code and decouple them from the used UI language.
Thanks for the explanation