I am still having a running battle with getting the
actual height of a frame.

I thought I had a workaround, but it is buggy, or
probably I am doing something wrong.

If I never mess with the selection then it works. But
as soon as I start setting the selection, it stops
working.

It fails on goto range. I have tried passing goto
range every type of conceivable cursor or range, and I
always get com.sun.star.uno.RuntimeException: no text
selection.

Does anyone have any ideas?

What about a slightly different approach? For example,
if I make the textframe selected is there no way I can
get its height throught the dispatcher? The height is
there in the statusbar.

Thanks and have a good weekend!

#####################

XController xController =
connection.getTextDocument().getCurrentController();

XTextFrame returnVal = ( XTextFrame )
AnyConverter.toObject( XTextFrame.class,
connection.getTextDocument().getCurrentSelection() );

XTextViewCursorSupplier xViewCursorSupplier = (
XTextViewCursorSupplier ) UnoRuntime.queryInterface(
XTextViewCursorSupplier.class, xController );

//get the the  view cursor
XTextViewCursor xViewCursor =
xViewCursorSupplier.getViewCursor();

xViewCursor.gotoRange( xTextFrame.getAnchor(), false );

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to