Change default font for OLE object (draw)

Dear Community,

I have a problem. I want to style my documents consistently (eg all the same font).

When I insert a draw OLE draw object in a writer textdocument (via insert -> object -> OLE Object -> create new -> LibreOffice 7.0 Draw) the default font in the OLE object is Liberation Sans. But I want it to beLibertinus Sans.
I already created a new standard template for draw documents with Libertinus Sans as the standard font, but unfortunately this doesn’t seem to be applied to newly created OLE draw objects.

Thank you in advance!
Samuel

You didn’t mention the type of OLE object you inserted.

I experimented with a Calc spreadsheet. It initially comes as it is formatted.

  • right-click on it and Edit

  • select the cells you want to change

  • apply the target style or create a new on

    CAUTION! this will also change the formatting in the original document!

The spreadsheet is now styled differently from the original.

To summarize: edit your OLE object and apply a style.

EDIT 2020-02-09

In any LO component, when you Insert>Object>OLE Object any “LO 7.0 xxx”, you create a new embedded document formatted according to the default template for this type of document. Therefore, the defaults you have set in Writer do not apply.

To have consistent styles between the Writer container and the embedded OLE object, either customise the default template for the other component or when editing the OLE object change the styles. The styles shown in the right style pane are those of the selected object. If you change them, this will be done only for the OLE object, which might be preferable if you don’t want to mess up the default template in case the defaults are different between OLE objects in Writer and autonomous spreadsheets, drawings or whatever.

However I question the insertion of a drawing as an OLE object. This may be justified for spreadsheets which are susceptible to be updated, but generally a drawing is frozen. You’ll have less trouble if you selecting the part of the drawing you need (so that you can have several drawing in a Draw page and keep the Draw document as a store) and paste it into the Writer document. It then lie in a frame which you can anchor in various ways and position it at will.

If you eventually modify the drawing, you just replace it in Writer.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

If I didn’t answer properly your question, do not use “Add answer” but edit your original question to enhance the details of your question (answers are reserved for solutions to a problem on this Q&A site).

Thank you for reply. I guess my question was not clear enough.
I want to insert a draw OLE-object in a writer document via Insert -> Object -> OLE-Object and then create new -> LibreOffice 7.0 draw.
Then the newly created draw document is not styled like the standard draw template.
I edited the question accordingly.

Thanks again for your fast reply.
I would love to change the default template of the LibreOffice Draw component. But I don’t know how to do it. A bit of googling yesterday just brought up that I have to create a new template and mark the new template as the default.
I did this an newly created draw documents (via file -> new) have the correct font. But an inserted OLE draw object has still the old font.

You must change the styles. Unfortunately, styles in Draw are less elaborate than those of Writer and much less strictly organised.

From what I see, any object, even text boxes, are initially styled Default Drawing Style. It seems you must customise this style to make sure your defaults are in effect on all created objects. Draw deviates from Writer in the other “base” style definition. Graphic and Text are not dependent on Default Drawing Style. Consequently, you should also change the font face in these style so that you have no spurious unwanted font face in your documents. All other styles inherit from Default Drawing Style, Graphic* or Text* (unless you create a new independent style).

Remember also that changing the default template will not apply to existing documents.

Thank you again for your fast response.

I did already what you told me. I have a template (marked as standard template) in draw. In this template all styles are changed to have the correct font. If I create a new draw document (via file -> new), every textbox or drawing object has the correct font.

But unfortunately this does not apply to a newly created OLE-Object.

So I guess there are different types of standard templates? One for newly created documents (via file -> new) and another internal for newly created OLE-draw-documents.
Is there a way to change this “internal” document-template?

I don’t think there are two templates. I rather imagine that creating directly an OLE object doesn’t use any template (or perhaps the “system” one). Consequently, I suggest you create your drawing with Draw and then either paste a selection into Writer (no OLE object but a standard Graphics frame) or you embed Create from file.

If my hypothesis about “system” template is right, see in Tools>Options, LibreOffice>Paths the location of the “system” templates directory and store your template there.

A foolproof question: did you save your template with File>Templates>Save as Template? (Surely yes if you succeeded in making it the default template) Is its extension .otg?

Okay.

I still don’t get ist. I looked up the different places, shown in Tools>Options, LibreOffice>Paths. But I can’t find the default draw template which is apparently used as fallback if an OLE-Object is created.

To your foolproof question: Yes I did.

I guess the way you described to create the object in draw itself and copy it to writer is maybe the best.