Reformatting a text document via UNO

Miklos Vajna vmiklos at collabora.co.uk
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 blue-point.cz> 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:

http://opengrok.libreoffice.org/xref/core/writerfilter/source/filter/ImportFilter.cxx#267

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

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131127/9ea48c61/attachment.pgp>


More information about the LibreOffice mailing list