引言
我有一个带有GUI的坞容器,在其中我通过LibreOffice Calc注册了宏。使用docker容器提供的GUI,我可以通过命令行成功地运行宏。但是,当我在Kubernetes Pod中加载映像时,当我试图运行它时,宏将无限期地挂起。
以下是宏:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC ***** Sub FitToPage Dim document As Object, pageStyles As Object document = ThisComponent pageStyles = document.StyleFamilies.getByName("PageStyles") For i = 0 To Document.Sheets.Count - 1 Dim sheet As Object, Style As Object sheet = document.Sheets(i) style = pageStyles.getByName(sheet.PageStyle) style.ScaleToPagesX = 1 style.ScaleToPagesY = 999