Probably macro will be unsafe, but I don’t know how to get Navigator as object by some better way
Sub getHyperlinksFromNavigator
dim navigatorName$, tk as object, n%, topwindow as object, o as object, i%, oLink as object, document as object, dispatcher as object
document=ThisComponent.CurrentController.Frame
dispatcher=createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name="Navigator"
args1(0).Value=true
dispatcher.executeDispatch(document, ".uno:Navigator", "", 0, args1() ) 'show Navigator window (from macro recorder)
rem source: https://forum.openoffice.org//en/forum/viewtopic.php?f=20&t=98738
Globalscope.BasicLibraries.loadLibrary("Tools")
navigatorName=GetRegistryKeyContent("org.openoffice.Office.UI.Sidebar/Content/PanelList/SwNavigatorPanel").Title
tk=Stardesktop.CurrentFrame.ComponentWindow.Toolkit
for n=0 to tk.TopWindowCount -1 'iterate all windows
topwindow=tk.getTopWindow(n)
if topwindow.AccessibleContext.AccessibleName=navigatorName then 'window is Navigator
o=topwindow.AccessibleContext.getAccessibleChild(0).AccessibleContext.getAccessibleChild(0).AccessibleContext.getAccessibleChild(0).AccessibleContext.getAccessibleChild(0).AccessibleContext.getAccessibleChild(1).AccessibleContext.getAccessibleChild(0).getAccessibleChild(7) 'object with hyperlinks from Navigator - I know it is wacky :-(
for i=0 to o.AccessibleChildCount-1
oLink=o.getAccessibleChild(i) 'hyperlink
msgbox oLink.Text
next i
exit sub
end if
next n
End Sub