Separator in xcu extension toolbar

Dear Community,

Could anyone lead me to an extension with sources or an example of a working xcu configuration with toolbar separator.

I based my work on the TexMaths extension. I manage to change it to my need, but I don’t manage to add separators in my new toolbar.

I also manage to add commands in the Standard toolbar, like in the HelloWorld extension, but I don’t manage to add separator here also. I’m sure it’s just a question of “vocabulary”. I tested a lot. So I think the easier would just be an example.

Best regards,

It looks like you may find the relevant information in the LibreOffice Developer’s Guide.



One of the usage examples in the LibreOffice source code (file Addons.xcu)

<node oor:name="m06" oor:op="replace">
    <prop oor:name="URL" oor:type="xs:string">
        <value>private:separator</value>
    </prop>
</node>

Check out the attached version of the HelloWorld extension (change the file extension to .oxt). It adds two HelloWorld buttons with a separator between them.
helloworld.ods (18.6 KB)

sepHelloWorld

There is a LibreOffice extension for extension compiling, named BasicAddonBuilderLO7. It allows you to add a separator to a toolbar or menu. Find out which entry in the Addons.xcu file will refer to the separator.

HTH

That’s exactly what I did. But I finally understood that icon/command are ordered by name. My separator’s name were ‘separator1’, ‘separator2’… and my commands ‘command1’,‘command2’… So the separators were at the end where they are not shown even if present.

This is not intuitive, but it’s written in the doc. It’s a shame GPT didn’t catch it.

Regards,