问题标签 [openoffice-writer]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
3428 浏览

plugins - Word 文档的优秀代码片段工具或插件?

有谁知道一个好的工具或插件可以让 Microsoft Word 或 OpenOffice Writer 以干净的方式将代码片段添加到文档中?

我不确定这样的插件是否存在,因此将我重定向到可以帮助我的任何其他工具将不胜感激。

0 投票
1 回答
1513 浏览

c# - How do you set the text direction for a TextTable Cell in OpenOffice?

I want to set the text direction for some cells in a TextTable so that they are vertical (i.e., the text is landscape instead of portrait). You can do this in Writer by selecting the cell(s), and going to: Table - Text Properties - Text Flow - Text Direction

However, I cannot figure out how to do this through the API. I tried using CharRotation, but it does not behave the right way. CharRotation simply takes the text, and rotates it (without adjusting any formatting). The text I am dealing with is formatted by tab stops, and does not behave correctly when rotated this way.

0 投票
1 回答
1034 浏览

openoffice.org - OpenOffice Writer 中的调色板

如何在OpenOffice Writer中加载另一个调色板(*.soc 文件)?

0 投票
1 回答
1945 浏览

java - OpenOffice API - 表格的 OptimalWidth 选项(所有列)

我正在研究通过 UNO 与 OpenOffice(swriter) 交互的 Java API。对于 TextTable,我很难设置 TableColumn 的“OptimalWidth”属性。

我尝试了以下代码,似乎 getColumns() 方法无法将我带到 TableColumn 的属性,并且只允许您插入和删除列。

谁能帮助我或给我设置表格的 OptimalWidth 属性的任何提示?非常感谢您!

0 投票
2 回答
2551 浏览

c# - 从 C# .NET 与 Open Office 合并邮件

我需要能够从 C# .net 中的 ASP.NET Web 表单邮件合并到 Open Office。我可以连接 OpenOffice 并打开一个文件,但这就是目前事情停止的地方。我有一个邮件合并项目表,需要为我系统上的每个客户端插入一个文档,但我在 Internet 上找不到任何可以帮助我执行邮件合并甚至如何设置邮件合并的内容。

如果有人可以向我展示一个使用 C# 将数据库表中的名字和姓氏合并到 Open Office 邮件合并表单中的简单示例,我将不胜感激。

0 投票
1 回答
1959 浏览

c# - 如何使用 C# 在 OpenOffice.org uno 中创建 XTextTable?

OOoForum.org 上的讨论

在 python 中,使用 pyuno,我可以这样做:

这似乎在 C# 中不起作用。这是我的测试代码(我意识到我可能不需要所有那些 using 语句,但我正在改编别人的代码):

大部分似乎都可以正常工作,但是当它到达这一行时:

我收到运行时错误:

显然,这一行:

实际上并没有将 table 设置为任何东西。

这里发生了什么?

0 投票
1 回答
706 浏览

openoffice.org - 如何将复选框导出到 OpenOffice 中的 .doc 文档?

我通过java API使用OpenOffice,让他打开.odt文件,填写一些值并保存为.doc和.pdf。.doc 中没有复选框。

我基本上是在寻找错误 45347的解决方法

自己纠正错误不是一种选择,因为检查 openoffice 代码需要超过 10 小时(各种 Go 的东西),而且我从未设法对其进行编译。

谢谢,

尼科。

0 投票
1 回答
1050 浏览

c# - 如何使用 C# 在 OpenOffice.org uno 中设置 XTextTable 的属性?

OOoForum.org 上的讨论

在 python 中,我可以这样做:

在 C# 中,我找不到设置属性的方法。XTableTable 只有几个可用的方法,而且它们似乎都没有做这样的事情。如何在 C# 中设置属性?

0 投票
2 回答
2526 浏览

c# - 在 OpenOffice 中,如何检查我的 XComponentContext 是否已关闭?

我有一个在 OOo Writer 中生成三个不同模板文档的小应用程序。单击三个“生成”按钮之一时,这是执行代码的一部分(在 C# 中):

以下步骤会导致崩溃:

  1. 用户生成文档。
  2. 用户关闭文档(关闭 OOo)。
  3. 用户尝试生成另一个文档。

抛出此异常:

在尝试生成另一个图表之前,如何检查以确保连接仍然打开?如果它已关闭,我该如何重新连接?

编辑:更具体地说,这是完整的错误消息:

如果我摆脱了这条线if (componentContext == null)(即,总是尝试连接,即使我们已经连接了),我会得到一个伴随这条消息的堆栈跟踪:

0 投票
3 回答
7930 浏览

pdf - OpenOffice PDF 导出库

我正在寻找一个库,它允许我将文本和图形输出呈现到 PDF 文档中。(开罗当然是一个选择。)我想知道 OpenOffice 如何编写 PDF 文件,看看我是否可以使用同一个库。OpenOffice 使用什么库进行 PDF 导出?

编辑:我正在寻找 C 或 C++ 库。