Reformatting a text document via UNO

Miklos Vajna vmiklos at
Wed Nov 27 05:27:19 PST 2013

Hi Pavel,

On Wed, Nov 27, 2013 at 01:45:11PM +0100, Pavel Laštovička <pavel.lastovicka at> wrote:
> is there a way to reformat parts or whole text document e.g. from a
> Basic macro? Without inserting / changing a text content to force
> formatting.

It's possible to create a text range that covers the whole document,
then you can set properties on it, if you mean something like paragraph
or text portion formatting.

> I am thinking about a macro changing a compatibility option called
> by user during document editing.

Here is an example how you can set such compatibility options using UNO:

This is C++, but you can do the same from a macro as well.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <>

More information about the LibreOffice mailing list