Apache OpenOffice (AOO) Bugzilla – Issue 22195
Insertion of XAutoTextElement fails when selection contains table
Last modified: 2013-02-24 21:08:28 UTC
I have been using OpenOffice 1.0.3 for my self-defined mailmerge facility, which contains functionality for copying arbitrary blocks of text. This works as follows: XTextCursor selection = getText().createTextCursorByRange(beginTag); selection.gotoRange(endTag, true); xate = xatg.insertNewByName("NAE", "New AutoTextEntry", selection); xate.applyTo(endTag); With OpenOffice 1.1 a RuntimeException is raised when 'selection' contains a Text Table. This happens while executing 'insertNewByName': com.sun.star.uno.RuntimeException: at java.lang.reflect.Constructor.newInstance(Native Method) at com.sun.star.lib.uno.protocols.urp.Unmarshal.readThrowable (Unmarshal.java:315) at com.sun.star.lib.uno.protocols.urp.Unmarshal.readAny (Unmarshal.java:157) at com.sun.star.lib.uno.protocols.urp.Unmarshal.readObject (Unmarshal.java(Compiled Code)) at com.sun.star.lib.uno.protocols.urp.urp.readReply(urp.java(Compiled Code)) at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java(Inlined Compiled Code)) at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java(Compiled Code)) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.in voke(java_remote_bridge.java(Compiled Code)) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.ru n(java_remote_bridge.java:173)
forwarding to responsible developer
Please add a small but complete sample macro to reproduce the effect.
.
Have you tried the mailmerge functionality in a newer version than 1.1? Does it occurs there also? If not: Could this issue be closed? The last entry here is nearly a year old ... :(
Hi, Well, I see there is a newer version 1.3.0. But it results in the same stacktrace. In 1.0.3 it works fine. However, 1.0.3 doesn't produce MS Word documents as well (and producing that format is a customer requirement, I'm afraid). What I'm trying to do is simply copy arbitrary pieces of text including tables etc. From your fellow developers I hear it's quite difficult to program a copy feature, but I don't understand what made it so easy for the AutoTextElement in 1.0.3. I tried to do it element by element as some hints were given how to loop through the content tree in replies to other user questions. You can imagine that's quite messy .. XTextRanges get expanded to their containing paragraphs .. so contents get duplicated .. I think there should be a feature in the API to copy TextRanges to a different TextRange in the document. And I would like to give it a try, but actually I don't know what I'm up to and whether tt's possible at all. Greetz, Spenk
I have to retarget this task to 'OOo later'. Because of limited resources it isn't possible for a OOo 1.1.* release.
@thorstenziem: Will this issue be solved in the (hopefully) soon coming OOo-2.0 release?
just for the sake of my searches, does this issue have to be left as an unconfirmd invald? not new later or similar.
Hard to reproduce, no example given. I am also wondering if this is a dead issue! Can we resolve this? I am not setting any resolution, since I am not sure whether this issue can still be reproduced.
since there are many concerns about the state of this issue and we're not really maintaining 1.0.3 anymore, I will resolve this issue to INVALID. If anybody feels like reopening it and has good reasons to do so, go ahead.
The Issue you raised has been marked as 'Resolved' and not updated within the last 1 year+. I am therefore setting this issue to 'Verified' as the first step towards Closing it. If you feel this is incorrect, please re-open the issue and add any comments. Many thanks, Andrew Cleaning-up and Closing old Issues ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html
As per previous posting: Verified -> Closed. A Closed Issue is a Happy Issue (TM). Regards, Andrew