Page 1 of 1

Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 7:37 pm
by RoryOF
Will some kind person please point me to the UNO structure to hide/display Bookmark/Annotation anchors?

Rory

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 9:09 pm
by FJCC
Sorry Rory, I am not sure what you are after. It looks like the anchor of a bookmark is just a text range, which would be visible in the ordinary way but it doesn't stand our from its surroundings. The text range could be selected with ThisComponent.CurrentController.select().
I suspect I am missing something obvious in your request. Is there a menu item that does what you want?

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 9:16 pm
by RoryOF
There is a menu item /View /Comments which will display or hide comments. I'm hoping to find the UNO component for that' I've seen a very old use - is it in OO 2? in some macro code by Hager et alia to show/hide bookmarks; this works, but is a very old reference, which I suspect may be dropped shortly.

I'm working on an application which will use Bookmarks to link to a database and would like to be able to display or hide these anchors.

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 9:40 pm
by JeJe
Dispatch command Resource ID symbol Resource ID value Mode Label value
.uno:ShowAnnotations SID_SHOW_POSTIT 11098 MTA Show Comments
.uno:HideNote FID_HIDE_NOTE 26672 MTA Hide Comment
.uno:ShowNote FID_SHOW_NOTE 26671 MTA Show Comment
.uno:NoteVisible FID_NOTE_VISIBLE 26630 MTA Show Comment

https://wiki.documentfoundation.org/Dev ... chCommands

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 9:51 pm
by FJCC
The API property that corresponds to View -> Comments seems to be in the ViewSettings of the CurrentController.

Code: Select all

ThisComponent.CurrenctController.ViewSettings.ShowAnnotations = FALSE

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 9:55 pm
by RoryOF
Thanks, I'll play with these tomorrow and see how I get on.

Re: Hide Bookmark/Annotation anchors

Posted: Tue Mar 20, 2018 10:00 pm
by RoryOF
I have most of my subroutines working OK. I'll try the above suggestions and when I get that sorted I'll start to integrate the subroutines into the overall app.