XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, model);
XController xController = xModel.getCurrentController();
XTextViewCursorSupplier xTextVCS = (XTextViewCursorSupplier) UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
XTextViewCursor xTextVC = xTextVCS.getViewCursor();
XPageCursor xPC = (XPageCursor) UnoRuntime.queryInterface(XPageCursor.class, xTextVC);
xPC.jumpToLastPage();
return xPC.getPage();
}
/* Possible Values for "OptionString" are: "LoadCellStyles", "LoadTextStyles", "LoadFrameStyles",
"LoadPageStyles", "LoadNumberingStyles", "OverwriteStyles" */