Hello!

I have a document with a selection-bookmark in it. when I use the following
code more than one time, my document's bookmark contains "This is my text" -
exactly one time - as expected:

XTextRange myBookmark = getBookmarkTextRange("BMname");
myBookmark.setString("This is my text");


Now I want to insert an AutoText (that contains a graphic) instead of a
String.
When I execute the following code 10 times my doc contains 10 graphics - as
not expected:


XTextRange myBookmark = getBookmarkTextRange("BMname");
XAutoTextEntry lXAutoTextEntry = (XAutoTextEntry)
UnoRuntime.queryInterface(XAutoTextEntry.class,
xGroup.getByName(autoTextName));
lXAutoTextEntry.applyTo(myBookmark);

It seems that the autoText uses myBookmark.getStart() instead of
myBookmark.getTheWholeBookmark()...

so is it possible to insert my AutoText exactly like the function
setString() does it?

David
-- 
View this message in context: 
http://www.nabble.com/use-AutoText-in-Selection-Bookmarks-tp24515638p24515638.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to