Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 将两个ODT文档与odf 1.3合并_Java_Libreoffice - Fatal编程技术网

Java 将两个ODT文档与odf 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.

我对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.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则无法插入文档,并且没有错误

替代品