Setting internal page hyperlink using macro

Currently trying to create a macro that will take the selected text or selected shape collection and set a hyperlink to an internal page referenced by an input box pop-up. The issue is that for the life of me I can’t figure out where LibreOffice is storing the link references in the object properties.

I’ve set the links manually and dug through the development tools listing but I think I’m missing where it’s being stored/what exactly is going on with the linking process.

Reason for the macro is that I have a ton of internal referencing to do and it’s just something that would save me time in the long run avoiding having going in and out of the hyperlink menu.

EDIT: I’m an idiot and found where to change it. I am still thoroughly confused as to what LibreOffice is doing behind the scenes since the Hyperlink attribute for the shape doesn’t get changed when doing it through the menus.