Hi Stephan, >mmm ... XModel is no XSelectionSupplier and so won't have >a current >Selection. From the XModel you can get the >currentController and this >will support a XSelectionSupplier ... pseudo code might be
Actually I got XModel.getCurrentSelection() from P389 and P391 of Developer's Guide, in section 6.1.3. >If you for example marked a "normal" text in your document >than the >above code should give you a SwXTextRanges object. So you >could continue >with >XIndexAccess xIA = (XIndexAccess) >UnoRuntime.queryInterface(XIndexAccess.class, o); >XTextRange theFirst = (XTextRange) >UnoRuntime.queryInterface(XTextRange.class, xIA.getByIndex (0)); >Hope that helps This really helps! Thank you! Regards, Yu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
