OOoBeans死了吗? - 我有什么选择?

发布于 2024-10-06 07:40:25 字数 1845 浏览 0 评论 0原文

最近我开始探索 Officebean 库,换句话说,我尝试运行一个简单的 OOoBean 示例。 不幸的是我什么也没做。

首先,我尝试构建一个带有 JPanel 和内部 bean 的 Swing JFrame,但窗口内没有显示任何内容。

public class OpenOfficeGUI extends JFrame
{
    private OOoBean ooBeanObj = null;
    private OfficeConnection ooConnection = null;

    public OpenOfficeGUI()
    {
        init();
    }

    private void init()
    {
        JPanel panel = new JPanel();
        JButton myButton = new JButton("Arsch");
        ooBeanObj = new OOoBean();

        myButton.setSize(100, 32);

        panel.setSize(800, 500);
        panel.setLocation(5, 5);
        panel.setBackground(new Color(125, 125, 125));
        panel.add(ooBeanObj);
        panel.add(myButton);
        panel.setLayout(null);
        this.add(panel);

        this.setSize(800, 600);
        this.setLocation(0, 0);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
}

我的第二次尝试是 SWT 应用程序,显示在 eclipsezone.com (http://www.eclipsezone .com/eclipse/forums/t48966.html)。我让这个东西运行,但在启动时出现“com.sun.star.comp.beans.NoConnectionException”。

我的第三次也是最后一次尝试是 OpenOffice Wiki 中的 OOoBeanViewer。因此我找到了 博客文章似乎解决了上面的ConnectionException,但它也没有运行并且出现相同的异常。

我还尝试通过执行以下命令在“监听”模式下手动启动 OpenOffice: soffice.exe -bean -accept=pipe,name=login.name_Office;urp;StarOffice.NamingService

最后我没有得到任何进展,并注意到几乎没有关于的最新信息OpenOffice Bean。 Officebean.jar 中的许多方法也已被弃用。

所以我的问题是:

  1. OpenOfficeBean 死了吗?
  2. 您对如何运行简单的 OpenOffice Java 集成有什么建议吗?
  3. OpenOffice SDK 是在 Java Swing 应用程序中嵌入 OpenOffice 的替代方案吗?
  4. 您知道有关 bean 或 SDK 的某种持续信息源吗?
  5. LibreOffice 是否有同等的可能性?

谢谢

recently I've started to explore the Officebean Library, in other words I've tried to get an simple OOoBean example running.
Unfortunately I didn't get anything going.

First of all I've tried to build a Swing JFrame with a JPanel and the bean inside, but nothing was shown inside the window.

public class OpenOfficeGUI extends JFrame
{
    private OOoBean ooBeanObj = null;
    private OfficeConnection ooConnection = null;

    public OpenOfficeGUI()
    {
        init();
    }

    private void init()
    {
        JPanel panel = new JPanel();
        JButton myButton = new JButton("Arsch");
        ooBeanObj = new OOoBean();

        myButton.setSize(100, 32);

        panel.setSize(800, 500);
        panel.setLocation(5, 5);
        panel.setBackground(new Color(125, 125, 125));
        panel.add(ooBeanObj);
        panel.add(myButton);
        panel.setLayout(null);
        this.add(panel);

        this.setSize(800, 600);
        this.setLocation(0, 0);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }
}

My second attempt was an SWT application, shown at eclipsezone.com (http://www.eclipsezone.com/eclipse/forums/t48966.html). I get this thing running, but at the startup an "com.sun.star.comp.beans.NoConnectionException" occurs.

My third and last try was the OOoBeanViewer form the OpenOffice Wiki. Therefor I've found a blog post which seems to adress the above ConnectionException, but it doesn't run either and the same Exception appears.

I also tried to manually start OpenOffice in the "listening" mode, by executing the command:
soffice.exe -bean -accept=pipe,name=login.name_Office;urp;StarOffice.NamingService

In the end I didn't get anything going and noticed that there are nearly no up to date information about the OpenOffice Bean. Also many of the methods in the Officebean.jar are deprecated.

So my questions are:

  1. is OpenOfficeBean dead?
  2. do you have any advice how I can get a simple OpenOffice Java integration running?
  3. is the OpenOffice SDK an alternative to embed OpenOffice in a Java Swing app?
  4. do you know some kind of ongoing information source about the bean or the SDK?
  5. is there an equivalent possibility for LibreOffice?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

万水千山粽是情ミ 2024-10-13 07:40:25

在做了一些进一步的研究之后,我可以对我自己的问题给出一些答案:

  1. OpenOffice Bean 似乎已经死了。我找到的最后一个版本是 2006 年的,我认为 OO SDK 的最新发展没有得到解决。此外,bean 不是很大(1500 LOC),因此从头开始重写它是有意义的。
  2. 我通过执行两个步骤来运行我的应用程序。首先,我更改了代码并手动连接到正在运行的 OO 实例 (ooBeanObj.startOOoConnection ("uno:socket,host=localhost,port=2002;urp;StarOffice.ServiceManager");) 。第二个更改是使用套接字 (soffice -bean -accept=socket,host=0,port=2002;urp;) 而不是管道。但我不知道为什么需要进行此更改。
  3. SDK 不是替代方案,因为它是 OO bean 的基础。可以使用 SDK 的方法来增强或重写 bean。
  4. OpenOffice.org API 项目 似乎是搜索信息的最佳场所,尽管并非所有信息都如此或建议是最新的。
  5. 目前,OpenOffice bean 仍然可以连接到 LibreOffice 实例(使用 LO v.3.3.0 RC1 进行测试)。

再见,
理查德

After doing some further research I can give some answers to my own questions:

  1. OpenOffice Bean seems to be pretty dead. The last version I've found is from 2006 and in my opinion the latest developments of the OO SDK are not addressed. Furthermore the bean isn't very large (1500 LOC) so it would make sense to rewrite it from scratch.
  2. I got my app running by executing two steps. At first I changed the code and did a manual connect to a running OO instance (ooBeanObj.startOOoConnection ("uno:socket,host=localhost,port=2002;urp;StarOffice.ServiceManager");). The second change was to use a socket (soffice -bean -accept=socket,host=0,port=2002;urp;) instead of pipe. But I've got no idea why this change is required.
  3. The SDK isn't an alternative, because it is the basis for the OO bean. It would be possible to enhance or rewrite the bean, using the methods of the SDK.
  4. The OpenOffice.org API Project seems to be the best place to search for information, although not every peace of information or advice is up-to-date.
  5. At the moment OpenOffice bean can still connect to a LibreOffice instance (tested with LO v.3.3.0 RC1).

Bye,
Richard

回忆追雨的时光 2024-10-13 07:40:25

我最近一直在使用 NOA,它的功能与 OOOBean 相同,但似乎是最新的。它使我能够相当轻松地将 writer 嵌入到 JPanel 中。它还在幕后管理本机 openoffice 应用程序的发现和创建。 NOA - 良好的开放式办公室访问

I've been using NOA recently which does the same thing as OOOBean but seems up to date. It has allowed me to embed writer in a JPanel fairly easily. It also manages the discovery and creation of the native openoffice app behind the scenes. NOA - nice open office access

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文