Java 将两个ODT文档与odf 1.3合并
我对odf版本1.3有问题。 我使用OpenOffice API java在游标位置合并2个odt文档。 如果文档版本为1.2 odt,则没有问题,但如果我将版本设置为1.3,则不会合并Java 将两个ODT文档与odf 1.3合并,java,libreoffice,Java,Libreoffice,我对odf版本1.3有问题。 我使用OpenOffice API java在游标位置合并2个odt文档。 如果文档版本为1.2 odt,则没有问题,但如果我将版本设置为1.3,则不会合并 ... ... anotherDocumentPath = "file:///D:\tmp\C_test_obj_.odt"; XTextRange xStart = (com.sun.star.text.XTextRange) UnoRuntime.queryInterface(com.
...
...
anotherDocumentPath = "file:///D:\tmp\C_test_obj_.odt";
XTextRange xStart = (com.sun.star.text.XTextRange) UnoRuntime.queryInterface(com.sun.star.text.XTextRange.class, xfi);
XTextCursor cursor = xTextDocument.getText().createTextCursor();
cursor.gotoRange(xStart, false);
XDocumentInsertable insertable = (XDocumentInsertable) UnoRuntime.queryInterface(XDocumentInsertable.class, cursor);
insertable.insertDocumentFromURL(anotherDocumentPath, new PropertyValue[0]);
...
...
如果我选择版本1.2,它可以工作,而版本1.3则无法插入文档,并且没有错误
替代品