SVG support in LO Writer

I’m using SVG for my figures in LibreOffice Writer. Mostly it’s working really well, but I’ve come across a few limitations. There are two I’d particularly love to find solutions for: importing macros and importing bitmaps. The two lines below work when viewing svg files in Image Viewer but when I import the images into my LO .odt document the elements don’t show up.

use href=“defs.txt#widget” x=“20” y=“20”
image href=“screenshot.png” x=“100” y=“100” height=“100” width=“100”

The first is so I can have a library of macros that all my figures use without having to copy and maintain big chunks of svg code into each figure I create.

The second is for doing screen grab markup (I’m writing user manuals). I can only get bitmaps to show up by dumping the base64 pixel data directly into the svg image. That isn’t viable for large images.

Any suggestions would be greatly appreciated.

OS: Ubuntu 22.04.1 LTS
LO: 7.3.7.2/LibreOffice Community
Format: .odt

Whenever you find any limitation, just file a bug report with samples.

While I’m not sure, if I like the idea of pictures chain-loading other files my first steps would be to try an absolute path, then using an URL with file: (even, if all your files are in the same folder as your .odt)
.
Concerning security I’d also assume to have the chain-loaded parts in trusted-locations could be necessary. Depends what else can be done in svg-macros…
.
If playing around with path or url does not help, please follow the advice of @mikekaganski to provide some sample-files and put them in a bug-report. Cited from the “manual” of this site:

Feature requests should go directly to Bugzilla as Enhancements

Thanks for the feedback. Yes, I get the security concerns. As I understand it that’s why eps images are not supported, because postscript is a powerful language. As far as I know svg is much more limited in what it can potentially do.

Anyway, yes I’ve tried all the obvious variations, as you mention. I was hoping maybe someone could tell me “If you use this svg tag like this it should work…”

I’ll look at filing a feature request. Does anyone know if the svg support is a thing that’s likely to be worked on in the near future? I’m a big fan of svg for generating vector graphics but I don’t know how widely it is used.