Issue 22195 - Insertion of XAutoTextElement fails when selection contains table
Summary: Insertion of XAutoTextElement fails when selection contains table
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: spenk
QA Contact: issues@api
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2003-11-06 11:42 UTC by spenk
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description spenk 2003-11-06 11:44:23 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)
Comment 1 ooo 2003-11-06 17:31:49 UTC
forwarding to responsible developer
Comment 2 ooo 2003-11-06 17:33:53 UTC
forwarding to responsible developer
Comment 3 thomas.lange 2003-11-11 11:09:46 UTC
Please add a small but complete sample macro to reproduce the effect.
Comment 4 thomas.lange 2003-11-11 11:10:11 UTC
.
Comment 5 thackert 2004-11-01 18:37:52 UTC
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 ... :(
Comment 6 spenk 2004-11-02 17:24:03 UTC
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
Comment 7 thorsten.ziehm 2004-11-10 16:08:27 UTC
I have to retarget this task to 'OOo later'. Because of limited resources it
isn't possible for a OOo 1.1.* release.
Comment 8 thackert 2005-06-26 10:23:59 UTC
@thorstenziem: Will this issue be solved in the (hopefully) soon coming OOo-2.0 release?
Comment 9 askoorb 2005-07-06 11:43:55 UTC
just for the sake of my searches, does this issue have to be left as an 
unconfirmd invald? not new later or similar.
Comment 10 christianjunker 2005-07-08 19:36:08 UTC
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.
Comment 11 christianjunker 2005-07-18 22:42:24 UTC
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.
Comment 12 ace_dent 2008-05-17 21:34:44 UTC
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
Comment 13 ace_dent 2008-05-17 23:38:02 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew