List Info

Thread: insertnewbookmark




insertnewbookmark
user name
2006-09-25 12:34:26
Hi,

I can't get insertnewbookmark to work.
http://api.openoffice.org/do
cs/common/ref/com/sun/star/text/XBookmarkInsertTool.html

From the documentation it looks to me that I sould be able
to do:
ThisComponent.Text.InsertNewDocument(Cursor,
"TheBookMark")

What am I doing wrong?

-- 
Knut Olav Bøhmer
insertnewbookmark
user name
2006-09-25 13:28:13
Hi Knut,

> I can't get insertnewbookmark to work.
> http://api.openoffice.org/docs/common/ref/com/sun/st
ar/text/ 
> XBookmarkInsertTool.html
>
> From the documentation it looks to me that I sould be
able to do:
> ThisComponent.Text.InsertNewDocument(Cursor,
"TheBookMark")
>
> What am I doing wrong?

I couldn't find any service that pretends to implement the
Interface  
XBookmarkInsertTool, so I suppose it has never been
implemented.

So the following seems to be the way to go when you want to
insert a  
bookmark

xText = ThisComponent.getText()
xTextCursor = xText.createTextCursor()
aBookmark =
ThisComponent.createInstance("com.sun.star.text.Bookma
rk")
aBookmark.Name="myBookmark"	
xText.insertTextContent(xTextCursor, aBookmark, false)

Hope that helps

Regards

Stephan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )