 Good afternoon. I'm going to talk about layers in ODF and about some aspects of the implementation in DeepRoffice. Most of you will likely know layers from other applications. There are mostly used to provide a Z-order for objects. Here is a screenshot from Paint.net. Those image processing applications provide the layers while the user is working on the document and most of them have an own file format to keep the layers while the user is working on the document. But when the final format is produced, these layers are merged in different ways. But the final formats like PNG or SVG do not know any kind of layers. Put this knowledge aside. Layers in ODF work other way. I will first show you how layers might be shown to the user. We have a look here. I must resize it a little bit so that you can see. I'm not sure that it is readable because it's so small. The layers are provided here with a layer tab where the layers which exist are listed. I think that's a little bit larger. Here I have layers. A layer circle. I have defined myself and layer triangle. I have defined two. This is LibreOffice. There are layers, layouts, controls and dimension lines. They are default layers and are always present. When you now click on an object, you will see in the status bar to which layer this object belongs. In LibreOffice, it is on the left side and in Apache, it is on the right side. But you get the information where it is. When I click on the triangle, I see here it is on layer triangle. This, when I now change the arrangement and put this triangle back, you will see that this has not changed anything to the layers. This means that layers are independent from that order. Looking at another topic. Here's another example. It has, in addition, some measure lines. They are grouped. I have a group triangle. It contains the triangle itself and the three measure lines. I have a group circle which contains a circle and a measure line. When I now set this layer to invisible, you see that not only one object changed, but all measure lines are invisible now. Conclusion. Layers have nothing to do with grouping. So, you know what is not. Now it's the question, what are layers? When you become layer to what a layer is, when you use a context menu of such a layer tab, and there you choose modify layer. Now you get a dialogue where you can set something. In the upper part, you can set a name, a title and a description. The essential part is the lower part where you find these three check boxes. You can set each layer to visible or not visible, printable or not printable, or you can lock a layer and protect it from editing. So, we can see a layer in somewhat bundle objects so that they behave simultaneously in regard to visibility, principality and protection independent of grouping and that order. That is what the user sees. Now let us have a look how that is stored in the ODF file. ODF has an element layer set to store the information. This element is pure container without any attribute. It holds the information of layers. We have a layer element. There are, can be, of course, a lot of layers in such a layer set. The layer element has some attributes and two child elements. The child element holds the title and the description that is not relevant here, but the attributes. There is a name attribute that is used to identify the layer and therefore it has to be unique inside this layer set. Then we have an attribute display. It can have values all, screen, principle and none. So it is a combination of the properties visible and printable from the user interface. We have a search attribute that corresponds to the locked attribute of the user interface. Where can such layer sets be placed? The ODF knows three places where it can be. It can be inside a page and the page is part of a drawing or a presentation. All the layer sets can be, if on such page has a layer set, then it is used for this page and only for this page. Another page could have a different layer set. Then we have the place that it can be in the master page. It would be used if for those pages would have assigned this master page and have no own layer set. The layer set can be placed in the master styles. That is a fallback and it is used if a page has no own layer set or no layer set via the master page. Why this is red? Because that is not implemented in LibroFace, but LibroFace has only implemented layer sets in a master style. It is one layer set for the whole draw file. It remains the question how the connection between layer set and objects are realized. And that is very simple. The object has an attribute layer where it references the layer with its name. An object can only have one layer and more important is the layer does not know which objects are assigned to him. In ODF it is really clear. It is different from what you might know, but it is understandable what happens in ODF. The origin of LibroFace and Apache Office is a star office. The development of that was 20 years ago. The source was opened before the first version of ODF was published. So we have many things which are a little bit different in LibroFace. I show you one thing what is possible in LibroFace. That is the same document you have seen already. Now I use a new window and then new window. I have to drag it a little bit and resize it so that I get both side by side. These are two views on the same document. That is that it is really the same document you can see when I draw a shape. That is not only here but at the same time in the other view. There are two views on one document. But layers behave different. When I here set this layer to invisible it is only in the view and in this view I still see the measure lines. That means that LibroFace does not treat the layers as property of the page or model but it treats it as a property of the view. That has a consequence in the way that LibroFace does not store the information it is visible into the layer element. But it has stored it as configuration item in the settings XMR. This part settings XMR need not be read by any other application. So other applications would not know the state of display or protection. Here is how it looks there. We have a config item about visible layers and here you see it is stored into a bit field and therefore for the XMR file it is base 64 encoded and the information is here. Each layer has associated one bit namely in the order it is in the layer set. The bit field has 245 bits available for the layer and the surplus bits are not relevant here in the file format but they are used for initialization inside the core. So what to do? The handling of the layers is deeply involved into the views. I have now found that LibroFace is not actually storing two views although the source from StarOffice is prepared to do such thing. So I have decided to take the information from the active view which is in the bit field we have seen and copy it to the layer set and the other way round when I get a file which has the information in the layer set I use it to initialize the view in LibroFace. So from LibroFace 62 on LibroFace can use the information in the in the layer set. It still writes the information in the settings that they are so that older versions can work as before but that's not the only problem. One example I have here listen of miss view we can look. ODF has an attribute background visible and what LibroFace does is it puts this information it makes a layer bit background and when this layer background is set to invisible it treats the objects as invisible as the filling as invisible. It's not the sense of ODF when you remember I've said it layers bundle objects but background is about filling what color my background had or gradients it had nothing to do with objects. So to come further with making LibroFace more conforming to ODF is to divide carefully between ODF layers and the internal use of layers for views. That is the state of my development and I have to admit I stuck a little bit in the in this part. Okay that brings me to the end of my presentation and to your comments and questions. You find the presentation with some additional remarks and examples on the foster sites. The problem is that we get documents which have such layers. We have one document exporter that is Inkscape. They are using global layers that's good this is the same as LibroFace but we have two carbon which produces layers in the way ODF has it and so we have to import it. That's already already two but that's not in 6.2 but it will be in in the next version then. After 10 years being in I I'm not sure that we possible. Okay yeah thanks for your attention and I hope you will have a nice time at foster.