【发布时间】:2018-05-20 12:41:20
【问题描述】:
我使用 Java 中的 UNO 来控制 LibreOffice (5.3)。
如何更改窗口标题栏中显示的文档名称?
到目前为止,我尝试使用XDocumentProperties,但它只在文档的嵌入属性中设置标题,而不是在窗口标题中:
// Sets only meta data, not the window title.
XDocumentPropertiesSupplier xDocumentPropertiesSupplier = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, openedDocument);
XDocumentProperties xDocumentProperties = xDocumentPropertiesSupplier.getDocumentProperties();
xDocumentProperties.setTitle(retrievedFile.name);
【问题讨论】:
-
欢迎来到 StackOverflow!一些示例代码和有关您计划如何使用它的声明会有所帮助。例如,代码流文档是否与我答案中的链接中的一样?此外,请说明您迄今为止尝试过的内容以及您研究过的任何文档的链接。
-
谁对此投了反对票:请添加评论说明如何改进问题。
-
@JimK 谢谢!正如你所解释的那样,我试图改进我的问题。
标签: java libreoffice uno