libreoffice

Function not allowed within a procedure

我怕爱的太早我们不能终老 提交于 2019-12-12 05:01:31
问题 I have an assignment to write a macro in LibreOffice that will code a message using XOR operation. I get the problem: Function not allowed within a procedure. when I try to run the macro. This is the code: REM ***** BASIC ***** Sub Main end Sub function izracunajHash(geslo, zacetni_hash) zacetni_hash = 17520 hash = zacetni_hash mask = &H00FFFFFF dolzina = len(geslo) If dolzina > 0 Then for f=1 to dolzina step +1 podniz = mid(geslo,dolzina,1) char = Asc(podniz) hash = 33*hash + char hash =

Using pyUno to write text into Libre/OpenOffice Writer

风流意气都作罢 提交于 2019-12-12 04:38:02
问题 I am trying to export some text from Python into a Libre/OpenOffice Writer document which I created according to these instructions. For example, using cursor.setPropertyValue("CharHeight", 20) cursor.setPropertyValue("CharWeight", 150) document.Text.insertString(cursor, "This Is Heading One", 0) I can make a line of text look like a heading, but it's just text and not an actual heading. What property values do I have to modify to generate a heading line that's picked up for the TOC? In

LibreOffice Draw -add hyperlinks based on query table

ぃ、小莉子 提交于 2019-12-12 02:59:57
问题 I am using draw to mark up a pdf format index map. So in grid 99, the text hyperlinks to map99.pdf There are 1000's of grid cells - is there a way for a (macro) to scan for text in a sheet that is like Text in File | Link to add 99|file:///c:/maps/map99.pdf 100|file:///c:/maps/map100.pdf and add links to the relevant file whenever the text is found (99,100 etc). I don't use libre much but happy to implement any programatic solution. 回答1: Ok, after using xray to drill through enumerated

Insert several images at once using macro scripting in LibreOffice

本小妞迷上赌 提交于 2019-12-12 02:13:58
问题 I am writing a macro for LibreOffice Writer in Python. I need to insert several images in one document, one after another with minimal space inbetween them. The folowing code inserts all the images in the same area and all of them are overlapped. I need to advance the cursor below the inserted image everytime a new image is inserted. I have tried the cursor.gotoEnd(), cursor.goDown() and other such methods but none seem to work. How do I make this work? def InsertAll(): desktop =

R can't manage “General” formatted cells when reading libreoffice generated xls

江枫思渺然 提交于 2019-12-12 02:05:45
问题 I switched to libreoffice for my spreadsheets, but I noticed an error when importing an xls file modified with libreoffice inside R using the gdata package's read.xls() function. If a column is formatted as General, then once in R the cells display General instead of the right value. To fix it I need to format every column to the proper format (number, text, etc), which i'd prefer to avoid since general better manage formatting (eg. automatically display the right number of significant digits

fine tuning a goto bookmark libreoffice macro

柔情痞子 提交于 2019-12-11 17:04:47
问题 I have a libreoffice macro to go to a certain bookmark ("qui") sub vai_qui ViewCursor = ThisComponent.CurrentController.getviewCursor() Bookmark = ThisComponent.Bookmarks.getByName("qui").Anchor ViewCursor.gotorange(Bookmark, False) end sub The problems are two: this is a libreoffice macro, and so it runs also with Calc and Base, and I'd like to avoid error messages in Calc and Base; With this macro the cursor go to the bookmark, but the focus of Writer is not on the cursor: I prefer to avoid

Use LibreOffice / OpenOffice to convert docx to pdf

会有一股神秘感。 提交于 2019-12-11 14:52:57
问题 i want to use LibreOffice / OpenOffice commande line to convert docx file to pdf file, but i'm struggling to use these tool, Is there anyone who knows how to use LibreOffice / OpenOffice commande line ?. Please, If there's any suggestion, do not hesitate. Thank You ! 回答1: This may work. soffice --convert-to pdf some.docx --headless (I've only tried it with .odt files myself, but fingers crossed.) 来源: https://stackoverflow.com/questions/55709687/use-libreoffice-openoffice-to-convert-docx-to

shared library issue with the system function in R

谁说胖子不能爱 提交于 2019-12-11 05:49:32
问题 I work on ubuntu 16.04 (inside a docker container). libroffice is installed and work fine. I can use it with command line: root@07ff3fbcb3cd:/# libreoffice --version LibreOffice 5.2.4.2.1 20m0(Build:2) root@07ff3fbcb3cd:/# libreoffice --headless --convert-to pdf --outdir . rapport.docx convert /rapport.docx -> /rapport.pdf using filter : writer_pdf_Export root@07ff3fbcb3cd:/# But if I try to do the same in R: R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R

How do I write a python macro in libreoffice writer to send a receive data

谁都会走 提交于 2019-12-11 04:48:52
问题 I am working in libreoffice writer and need to send a request to another program that I know to be listening on a TCP port, which will return data that needs to be inserted into the current Writer document. The macro needs to allow the data to be inserted as normal open text or into a cell within a table in which the cursor is presently positioned. The UNO documentation is spectacularly unclear and difficult to navigate. 回答1: def fs2ClientdataDoc(*args): #get the doc from the scripting

Good usage of native functions in LibreOffice Basic?

ぃ、小莉子 提交于 2019-12-11 02:47:43
问题 I've read here that we can use a pretty complicated syntax in order to have access to LibreOffice functions in the Basic macro editor, rather than writing functions in a sheet and get the data back. Are there current best practices related to this problem, i.e. obtain a result without writing a formula to a sheet ? 来源: https://stackoverflow.com/questions/30195024/good-usage-of-native-functions-in-libreoffice-basic