XTextRange xStart = (.XTextRange) UnoRuntime.queryInterface(Ĭom. Using OpenOffice may save your business money, but if your company has. XInterface xfi = (XInterface) xSearchable.findFirst(xsd) OpenOffice is a free, open-source alternative to Microsofts Office software suite. XSearchDescriptor xsd = (XSearchDescriptor) xSearchable.createSearchDescriptor() XSearchable xSearchable = (XSearchable) UnoRuntime.queryInterface(XSearchable.class, xTextDocument) XTextDocument xTextDocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, model) ("The current page number is " + curPage.getPage()) gets the page cursor and assigns the text view cursor to the page I know it can be done using a combination of possibly the below tString("zzzzz") XTextViewCursor curTextView = supTextViewCursor.getViewCursor() XTextViewCursorSupplier.class, xController) (XTextViewCursorSupplier) UnoRuntime.queryInterface( XTextViewCursorSupplier supTextViewCursor = XController xController = OODocument.getCurrentDocument().getXFrame().getController() I can then use the below getPageNumber method to return the page number and print that page on headed paper.Īny help much appreciated public int getNumberOfPages() Once it searches for string and finds string can it then(even hidden) move the cursor to that string. ![]() If anyone can assist with a method that searches for a string in an open office writer document using the UNO API with Java it would be very helpful.
0 Comments
Leave a Reply. |