Skip to content

Instantly share code, notes, and snippets.

# LibreOffice macro script
import uno
def changeFontsWithin(object_list, to_font, to_weight=None):
for i in range(object_list.getCount()):
shape = object_list.getByIndex(i)
the_type = shape.getShapeType()
assert(shape.supportsService(the_type))
if shape.supportsService('com.sun.star.drawing.TextProperties'):
if to_font: