On Fri, Apr 4, 2008 at 11:44 AM, Caolan McNamara <[EMAIL PROTECTED]> wrote:
>  >
>  > No,  you can ...
>  >
>  > - queryInterface the selection object for selection ranges
>  > (com.sun.star.text.TextRanges)
>  > - get the first selected range
>  > - get a cursor over the range
>  > - if the cursor is collapsed (cursor.isCollapsed() ) it means no text
>  > was selected, otherwise it means text was select
>
>  Hmm, I suspect that wouldn't give a correct answer to "is something
>  selected?" in the case of a spreadsheet or drawing XModel instead of a
>  text document, nor in the case of a text document if e.g. only a graphic
>  is selected.
>


yes, my response was only in the context of a Writer document, dont know
about spreadsheets.

Checking if a graphic object is selected is quite easy (though a
different use case).

you just query the selection object if it
supportsService("com.sun.star.text.TextGraphicObject") .....


ashok

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to