copy part of text from api

Zorg zorg at probesys.com
Sat Apr 13 13:28:00 UTC 2024


Hello

Hope some can help us here

Here is the  problem


We are developing our software using the uno api python 
(https://github.com/Probesys/lotemplate)

We try to copy a text in a odt file and paste it without loosing the 
format of the text and without using the clipboard

We know how to paste html

https://github.com/Probesys/lotemplate/blob/master/lotemplate/classes.py 
(line 165-185)

but we don't know how we can't copy a selected text without loosing format

Actually we use .insertString

https://github.com/Probesys/lotemplate/blob/master/lotemplate/Statement/ForStatement.py 
(line 286)


I know it's possible to do it  using 
com.sun.star.datatransfer.clipboard.SystemClipboard

But in that case we must embed a Xserver inside the docker container 
what we want to avoid

So if anyone wants to give us a solution or a hint on how to do this

thanks

Zorg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240413/0f36d64b/attachment.htm>


More information about the LibreOffice mailing list