Hide Bookmark/Annotation anchors

Keyboard macros or custom scripts

Hide Bookmark/Annotation anchors

Postby RoryOF » Tue Mar 20, 2018 7:37 pm

Will some kind person please point me to the UNO structure to hide/display Bookmark/Annotation anchors?

Rory
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28188
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Hide Bookmark/Annotation anchors

Postby FJCC » Tue Mar 20, 2018 9:09 pm

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?
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7017
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Hide Bookmark/Annotation anchors

Postby RoryOF » Tue Mar 20, 2018 9:16 pm

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28188
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Hide Bookmark/Annotation anchors

Postby JeJe » Tue Mar 20, 2018 9:40 pm

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
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 392
Joined: Wed Mar 09, 2016 2:40 pm

Re: Hide Bookmark/Annotation anchors

Postby FJCC » Tue Mar 20, 2018 9:51 pm

The API property that corresponds to View -> Comments seems to be in the ViewSettings of the CurrentController.
Code: Select all   Expand viewCollapse view
ThisComponent.CurrenctController.ViewSettings.ShowAnnotations = FALSE
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7017
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Hide Bookmark/Annotation anchors

Postby RoryOF » Tue Mar 20, 2018 9:55 pm

Thanks, I'll play with these tomorrow and see how I get on.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28188
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Hide Bookmark/Annotation anchors

Postby RoryOF » Tue Mar 20, 2018 10:00 pm

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.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28188
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 5 guests