Set the default text box font in LibreOffice Draw

Hello LibreOffice friends

I’m revising a 40 page draw document that I imported from a pdf file.

I’d like all of my new text boxes to use Ariel 9. Can I set the default font for all new text boxes please? If so, how?

Using LibreOffice 6.4.6 on a Mac.

Thanks
Arthur

Draw has styles.
Create a new style (named ‘myTextBox’ e.g.) based on(inheriting from) Text/A4 (e.g.) with the settings you want.

For each page only containing TextBox shapes you may now use Ctrl+A to select all of them, and assign the new style by doubleclicking on its name in the Stylist (Sidebar / Style).

If you need to treat shapes of different shape type differently, I think you will need a lot of patience for the manual selection or a macro to distinguish the objects for you.

[Edit about 1h later]
If you know how to place a Basic module, and how to adapt the two hard coded strings “myTextBox” and “A” for optional parameters to your needs, you may use the following module to automate your job:

REM  *****  BASIC  *****

Sub applyShapeStyle(Optional pStyleN As String, Optional pShapeType, Optional pMode)
If IsMissing(pStyleN) Then pStyleN = "myTextBox"
If IsMissing(pShapeType) Then pShapeType = "com.sun.star.drawing.TextShape"
If IsMissing(pMode) Then pMode = "A"
doc = ThisComponent
cSel = doc.CurrentSelection
Select Case pMode
  Case "A"
    drawPages = doc.DrawPages
    u = drawPages.Count - 1
    For j = 0 To u
      j_page = drawPages(j)
      applyShapeStyleToCollection(pStyleN, pShapeType, j_page)
    Next j
  Case "P"
    dp = cSel(0).Parent
    applyShapeStyleToCollection(pStyleN, pShapeType, dp)
  Case "S"
    applyShapeStyleToCollection(pStyleN, pShapeType, cSel)
End Select
End Sub

Sub applyShapeStyleToCollection(pStyleN, pShapeType, pCollection)
nextStyle = ThisComponent.StyleFamilies.getByName("graphics").getByName(pStyleN)
u = pCollection.Count - 1
For j = 0 To u
  j_sh = pCollection(j)
  With j_sh
    If .ShapeType = pShapeType Then .Style = nextStyle
  End With
Next j
End Sub  

[/Edit]

Thanks Lupp, that’s helpful! New text boxes still have the wrong font, but I can change them to the right one just by selecting the “My Text” style.
Arthur

The somehow annoying fact is that all the TextBoxes created by Draw when opening a pdf get assigned the root style Default Drawing Style.
Firstly this style has a technical flaw (imo): It has set the traditional blue color for its Area, but at the same time the None for the kind of filling.
Secondly any setting for text attributes you make for this style will afflict all shapes set to the same style (or probably to a style inheriting such attributes from it).
If this is without unwanted implications for you, you can simply change the text attributes of the mentioned root style to your neds, and everything should be as you like it.New style or macro not needed then.
But: Why do you want to use that terrible font?

Thanks again Lupp. Your comment about Default Drawing Style is interesting. I wouldn’t risk changing it, since so many objects use it.

Any changes to the Default Drawing Style of an open Draw document (created from a .pdf e.g.) would neither afflict your ordinary Draw template nor LibO Draw’s internal (hard-coded) defaults.