Styles in Draw

    From The Document Foundation Wiki
    Other languages:

    This page is in work!

    Foreword

    This video shows how to edit and apply ″Styles in Draw″ with LibreOffice and links to this page here for more information and details.

    This description is based on the Draw Manual Chapter 4 - Changing Object Attributes.

    Link to the Video

    Link to the Video (in German [DE]):

    Formatvorlagen in Draw - LibreOffice This video is in work!

    Styles

    Styles combine different formatting in one package.

    In Draw, there are essentially only the Styles as Drawing Styles.

    The properties (line, area, color, etc.) for the drawing objects are defined in the Drawing Styles.

    You can then use these Drawing Styles again and again to transfer all these properties to an object with a simple assignment.

    This saves you work when formatting and ensures a uniform appearance.

    Styles / Drawing Styles

    LibreOffice Draw already contains a selection of Styles/Drawing Styles for drawing objects that are delivered with LibreOffice.

    Note pin.svg

    Note:
    As they are all derived from the universal Styles supplied, Drawing Styles also contain properties that do not apply to some objects for which they are intended. Such properties may simply be ignored.

    Where can I find the Styles/Drawing Styles?

    Figure 1: Topbar from Sidebar
    Figure 2: Sidebar Styles

    The Styles/Drawing Styles are located in the sidebar.

    The top bar contains the following selection (Figure 1):

    • Drawing Styles
    • Presentation Styles
    • Fill Format Mode
    • New Style from Selection
    • Update Style

    If the sidebar is not displayed, you can display them using the menus:

    • View ▸ Styles ( F11 )
    • Format ▸ Styles ▸ Manage Styles ( F11 )
    • View ▸ Sidebar ( Ctrl + F5 )

    and then select the "Styles" icon 242xx Draw Symbol Formatvorlagen.png in the right-hand tab bar.

    The Drawing Styles can be displayed in different ways.

    At the bottom of the sidebar there is a selection list for possible display variants:

    • All Styles
    • Hidden Styles
    • Applied Styles
    • Custom Styles
    • Hierarchical

    You can see a hierarchical representation in Figure 2.

    Drawing Styles preceded by a +-sign contain additional Styles.

    Click on the +-sign to see the Drawing Styles below.

    Assigning a Drawing Style to a drawing object

    Select a drawing object and then double-click on the desired Drawing Style.

    The Drawing Style is then assigned to the object and the object takes on the properties defined in the Drawing Style.

    The special features of the “Default Drawing Style"

    The “Default Drawing Style" is the predecessor of all other drawing styles and is at the top of the hierarchy.

    See “The Hierarchy of Styles”.

    If you insert drawing objects into the page in the workspace, they are always linked to the “Standard” drawing style.

    These objects are therefore displayed with the following color scheme by default (Figure 3 - before):

    Figure 3: Object before and after
    • Borders or lines in dark blue 1 (Hex: 3465A4)
    • Areas in light blue 2 (Hex: 729FCF)

    There is often a desire to display drawing objects differently when inserting them.

    To do this, change the standard Draw document template.

    Open Draw to obtain a blank page.

    Insert an object, for example a rectangle.

    The “Standard” drawing style is highlighted in the sidebar under Format styles.

    Right-click on the “Default Drawing Style“ drawing style.

    In the context menu, select “Edit Style...” to open the “Graphic Styles: Default Drawing Style“ dialog.

    You can now specify your desired colors in the “Line” and “Area” tab.

    In this example, set the line to “Black” and select the “None” button instead of “Color” for the area (Figure 3 - after).

    Note pin.svg

    Note:
    Please note, however, that these changes will affect all other Drawing Styles

    The newly inserted objects are displayed with a black border and the area without color.

    Note pin.svg

    Note:
    You can of course on this occasion adapt your own Drawing Styles or create new ones

    If you want to keep this setting for all future drawings in Draw, you must now remove the previously inserted object.

    Then select File ▸ Templates ▸ Save as Template... from the menu.

    In the “Save as Template” dialog that opens, enter a template name, for example “LineBlack-AreaWithout”.

    Select a Template Category in which the new document template is to be saved.

    Check the “Set as default template” box.

    The next time you open Draw, all objects are drawn with the settings Lines=black and Area=without.

    The Hierarchy of Styles

    Styles are always organized hierarchically - not only in Draw.

    The Default Drawing Style is at the top of the hierarchy.

    All Styles derived directly from it initially inherit the properties of Default Drawing Style.

    Properties in the derived Styles can be changed, but are then no longer linked to Default Drawing Style.

    LibreOffice delivers a hierarchy of Styles that you can supplement with your own Styles.

    Note pin.svg

    Note:
    You cannot delete the Styles supplied by LibreOffice, only those you have created yourself.

    The advantage of the hierarchy is that you can store generally valid properties at a higher level and more specific properties at a lower level, so that changes only need to be made in one place if required.

    A simple example: You would like all texts in your drawing to use the same font and size, so you first create a Style based on the Default Drawing Style, in which you enter the desired changes.

    As the Style should also apply to text fields that do not normally have an area color or border, set these two properties to None.

    You then want to use three colors for areas, so set up three more Styles under the Style you have just defined.

    For these, set the area color and, if necessary, the border.

    If it is a dark color, you might also choose a light font color.

    Changing a Drawing Style

    Selection menu

    You can change an existing Drawing Style.

    If you select them in the sidebar by right-clicking, a selection menu appears.

    Select Edit Style… from the menu.

    However, changing a Style supplied by LibreOffice has the possible disadvantage that a drawing object that you copy from another document will suddenly look different in your document.

    If the Drawing Style that was assigned to the copied object in the source document also exists in the target document, then it will be assigned to the copied document again, even if it may have completely different properties.

    It will therefore usually make sense to create a new Style with a sufficiently specific name to avoid such overlaps.

    Creating a new Drawing Style

    You can create a new Style by right-clicking on a Drawing Style in the sidebar and selecting New, to which the new Style should be hierarchically subordinate.

    Assign a new name, set the desired properties and confirm with OK.

    Here are the various tabs of the "Graphic Styles" dialog:

    Note pin.svg

    Note:
    The new Style is only saved in the document.

    Create/modify a Drawing Style from a selected object

    Instead of deriving a Drawing Style in the sidebar from another Drawing Style, you can also use an object that you have drawn as the basis for a new Drawing Style or for changing a Drawing Style.

    You can also use the object for a Style if the object has been changed with direct formatting.

    1. Select the drawing object that is to be the basis for the new Drawing Style.
    2. Select the Drawing Style on which the new Drawing Style is to be based, i.e. to which it is to be subordinate in the hierarchy.
    3. Select the "New Style from Selection" 242xx Draw Symbol NeueFormatvorlageAusAuswahl.png icon.
    4. In the following "New Style from Selection" dialog, give the new style a name and then save this Style with OK.

    The alternative via the Format ▸ Styles ▸ New Style from Selection menu above in step 4 unfortunately does not work and is reported as a bug: https://bugs.documentfoundation.org/show_bug.cgi?id=128787. A bug fix is planned for LibreOffice version 24.8.0.

    Note pin.svg

    Note:
    Caution: The "New Style from Selection" dialog also shows the existing "Custom styles for the current document" and you can also select an existing one there. You will then be asked once again whether you want to overwrite the style. If you say yes, it will actually be changed. However, this has the disadvantage that existing drawing objects that used this style sheet lose their relationship to it and are linked to the style sheet above it in the hierarchy. However, you can use this procedure if you are still in the design phase of the style and have tried out changes to the test object for this style using direct formatting, which are now to be transferred to the style. However, the procedure described above in "Changing on the basis of an object" is better.

    You can also change the assignment to the higher-level Style by selecting the desired Style in the "Inherit from" field in the Organiser tab.

    Or in the hierarchical view (see "The Hierarchy of Styles" above), move the selected Style under the Style to which it should be subordinate by holding down the mouse button.

    When you see a horizontal line in the correct position, release the mouse button.

    Changing a Style

    You have the following options:

    • Right-click on the desired Style in the list of Styles in the sidebar and select Edit Style… in the context menu.
    • Right-click on an object that uses this Style to open the context menu and select Edit Style…
    • Select an object that uses this Style and choose Format ▸ Styles ▸ Edit Style…

    Then make the desired changes in the "Graphic Styles" dialog and confirm the changes with OK.

    Changes based on an object

    If you have made a change to a drawing object based on a Style that you would like to transfer to the Style, select the object and then select the "Update Style" icon.

    Alternatively, you can select the object and then select Format ▸ Styles ▸ Update Selected Style.

    Even if you have inadvertently selected a different Style in the sidebar after selecting the object, the correct Style will be updated.

    Deleting a Drawing Style

    Note pin.svg

    Note:
    You can only delete user-defined Drawing Styles; the menu item does not appear for others.

    Figure 3: Confirmation dialog
    1. Select the Drawing Style to be deleted in the sidebar.
    2. Select the Delete… drop-down menu.
    3. If the Drawing Style is still being used for drawing objects, a "Confirmation" dialog appears with corresponding information so that you can cancel the deletion (Figure 3).
    4. If you have confirmed the deletion or there was no warning at all, the Style is deleted.

    The object is assigned to the parent Drawing Style.

    If you want to see which Drawing Styles are used, select "Applied Styles" in the selection list at the bottom of the sidebar.

    Direct formatting

    Direct formatting in Draw refers to the assignment of properties that were not created using Drawing Styles.

    An example is the sidebar under Properties, where you will find the areas Character, Paragraph, Area, Line, Effect, Shadow, Position and Size as well as Columns.

    However, you cannot specify some of the properties with Drawing Styles, such as Position and Size.

    For larger projects, however, it makes sense to use Drawing Styles as much as possible because they can save work as the project progresses.

    And you can be sure that the appearance of objects will be consistent with regard to the use of Drawing Styles.

    Saving Drawing Styles in a document template

    However, the concept of Drawing Styles becomes really powerful in conjunction with a document template.

    This then contains a number of Drawing Styles and is used as a starting point for creating new documents, which then immediately contain all the Drawing Styles contained therein.

    This means that you do not have to create new Drawing Styles that you have already created and you can use them immediately.

    Further Informations

    Documentation / Manuals

    Here you will find the Documentation / Manuals:

    Documentation / Manuals

    Any questions?

    For questions on this topic go to:

    Ask.LibreOffice

    Get Involved

    Join us today and help us to make it even better!

    Get Involved

    LibreOffice is Free Software and is made available free of charge.

    Your donation, which is purely optional, supports our worldwide community.

    If you like the software, please consider a Donation.