How do styles work in Draw?

  • The draw guide is not clear in that sense or perhaps I have found a bug.
  1. I have created a templateX without user styles and saved it in the LibreOffice templates directory.
  2. I have created a document1 based on that template and drawn a Rectangle2 (Default drawing style)
  3. I have saved and closed the document and modified the Default drawing style in the templateX.
  4. When opening document1 it asks me for consent to update styles and I answer Yes
  5. Rectangle2 in document should change based on the modified style in the template but it does not change.

Can someone explain the styles in draw?
Version: 26.2.4.2 (X86_64)
Build ID: 0229ac93fcf0d7cbc6376066c6f35021cef002dc
CPU threads: 8; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: threaded

(Now as a comment as intended.)

Do you talk of the folder templates in your user profile?
Did you import it with the template manager?
Please attach the template to ease experimenting for volunteers.
(Draw templates aren’t used very often, IMO.)

I know templates in Draw aren’t used often, but they exist and I’m trying to learn how they work.

Yes, in my user profile. (Saving in the user profile templates directory is not necessary to import it )

The template has been create with the default Draw template. only the Default drawing style hs been modified.
Template11.otg (15,5 KB)

Works fine for me under 26.2.4.2, Fedora 44 (Linux 7.0), Plasma dzsktop (Qt-based, VCL: kf6)

Have you done that manually?

Templates should only be managed with File → Templates → Manage Templates so that all the background ancillary data is set up correctly. If you drop a template into the template folder, it will indeed be listed but won’t behave like a full-fledged template.It is the same difference as double-clicking on a template (to create an Untitled document which is not internally linked to the template) and File → New → Templates.

Check File → Properties, General tab to see if your document is linked to a template.

  • There is no difference between managing it with the template manager or copying it directly, as long as LibreOffice is restarted
    (I have quite a bit of experience with Writer templates and haven’t had any problems copying templates manually.)

The document is connected to the template and the template is installed correctly since

  • I can create documents from the template (File > New > Templates)

  • When I change styles in the template and open the document connected to the template it asks me if I want to update the styles

  • STYLES ARE NOT UPDATED IN THE DOCUMENT

I can confirm it fails in 26.2.4.2, it also fails with 7.6.7.2 and with
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 26200); UI render: Skia/Raster; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

I tried using Template Changer in 26.2.4.2 and although it added extra user-styles, it did not change the Default Drawing Style to match the template. Definitely looks like a bug although surprisingly I couldn’t find an existing report.

On the Template Changer extension page, you can read:
“Due to a problem in LibO (Bug 163157) this works only for writer documents.”

It definitely seems to be a Draw and Impress (and probably Calc) bug.

  • The problem also appears in

Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: ed67bd2bdcfa8e5b272773ff166eae1158f1bef6
CPU threads: 8;
OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

So that is the relevant LibreOffice bug for this question too, tdf#163157
.
BTW a user style did get added to the document when I changed templates using Template Changer

I tested with LibO V25.8.7.3 with my own files and can confirm the malfunction.
Allowance for updating styles is asked for, but after permission the updating isn’t done.
The template was correctl imported usiung the template manager, and editing was also done this way.
@bantoniof : Create a bug report.

Just upgraded to V26.2.4.2.
Issue unchanged.

Could it be a Windows-specific issue? Though I don’t see why.

My configuration is somehow non-standard. I don’t like hidden directories. Consequently, I created a “Templates” directory in my home folder and registered it as a user dir in Tools → Options, LO → Paths. My custom templates go there and I can manage them without fiddling with LO-internal dirs.

Is this a reason to behave differently from what you experience?

I’m no longer sure about anything.
Just after my mentioned upgrade I tried to apply a different icon to the LibO element in my Win taskbar as I had done earlier - and failed.
The taskbar icon gives access to the dialog for the proceeding - but doesn’t apply the new setting.
The desktop link does - and can then be “copy-moved” to the taskbar.
= = =
Anyway, AI will have to learn a lot before it can compete with humans in a match about creating such issues.

Theoretically, the directories (in this case templates) included in Tools > Options > paths should work like those assigned by LibreOffice both at the user profile and internal level.

  • In my case, updating predefined styles in a Draw document (due to template modification) does not work as expected.
    I have verified that the user styles are updated.
    That is to say:
  • When changing the Default drawing style in the template, it is not updated in the document based in the template
  • When changing a custom style (My drawing style) it is updated in the document based in the template

Well, there is a bug and it should be reported.
Till it’s fixed you have a workaround:
In the tremplate you actually want to use create a new drawing style derived from the Default Drawing Style, possibly without any changes, and name it, say, DDS. You may also move the other predefined drawing styles to the heritage tree starting with DDS.
Now all these styles are custom styles and you must simply no longer use the original Default Drawing Style to get all the styles updated after changes as you like it.

1 Like