OpenOffice Impress プレゼンテーションでスライドを操作する OOo SDK を使用して Java アプリケーションを構築しています。単一のスライドを含むオブジェクトを取得する方法を知っています。現在、プレゼンテーションから別のプレゼンテーションにスライドをコピーする方法を探しています。
これは、ファイルを開いてスライドを選択するために私が行うことです(短縮):
String filename = "file://....odp";
int offset = 2;
XComponent xSourceComponent = xComponentLoader.loadComponentFromURL(filename, "_blank", 0, loadProps);
XComponent xTargetComponent = xComponentLoader.loadComponentFromURL("private:factory/simpress", "_blank", 0, loadProps);
XDrawPages xDrawPages = ((XDrawPagesSupplier)UnoRuntime.queryInterface(
XDrawPagesSupplier.class, xSourceComponent)).getDrawPages();
XPresentationPage xPage = (XPresentationPage)UnoRuntime.queryInterface(XPresentationPage.class,
xDrawPages.getByIndex(offset));
私はこのような転送可能なオブジェクトを取得しようとしました:
XTransferable t = (XTransferable)UnoRuntime.queryInterface(
XTransferable.class, xPage);
しかし、それはサポートされていないようです。誰でもこれを行う方法を知っていますか?