Sry for my haste to post my problem here, m8s.
It was my fault that causes the problem.
XTextViewCursorSupplier works fine :)
- Solution:
The big problem was that I was working on old data. So m_aController
which I were using was not up-to-date, i just got it once on the
constructor of my class.
When I get m_aController again one step before following Code then
everything works fine:
(XFrame xFrame; // given)
// I need to get the XController here again with
m_aController = xFrame.getXFrame().getController();
XTextViewCursorSupplier xViewCursorSupplier = (XTextViewCursorSupplier)
UnoRuntime.queryInterface(XTextViewCursorSupplier.class,
m_aController);
XTextViewCursor XTextViewCursorSupplier =
xViewCursorSupplier.getViewCursor();
I hope I help someone out with a similiar problem with this.
Greetings.
Spencer schrieb:
Hello m8s,
its following code we are talking about (Iam using OpenOffice org 3.0
and OpenOffice API 3.0):
- Problem
Call of xViewCursorSupplier.getViewCursor() throws this exception on
some conditions:
>Exception occurred in target VM:
com.sun.star.uno.RuntimeException:
at com.sun.star.bridges.jni_uno.JNI_proxy.dispatch_call(Native Method)
at com.sun.star.bridges.jni_uno.JNI_proxy.invoke(JNI_proxy.java:178)
at $Proxy35.getViewCursor(Unknown Source)
at
ast.structure.ElementController.jumpToLastTable(ElementController.java:1167)
at ast.BesserWissA.dispatch(BesserWissA.java:389)
<
- Code:
XTextViewCursorSupplier xViewCursorSupplier = (XTextViewCursorSupplier)
UnoRuntime.queryInterface(XTextViewCursorSupplier.class,
m_aController);
XTextViewCursor XTextViewCursorSupplier =
xViewCursorSupplier.getViewCursor();
- Study:
On "simple documents" like a new document it works correctly.
On large documents (tested with 2 documents which are linked further on)
the call of "xViewCursorSupplier.getViewCursor()" throws an exception.
Links:
- http://rapidshare.com/files/239651448/MyDoc.odt
(Ive prepared this document myself, causes the exception)
- dialog_specification_and_guidelines_2001.odt, guildline for OOo
(I dont know if iam allowed to upload it to rapidshare, but upper
file causes exactly same exception)
Greets
Ali Ayhan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]