[Libreoffice] How to add new commands for Math

Michael Meeks michael.meeks at novell.com
Fri Jun 10 06:37:00 PDT 2011


Hi there,

On Fri, 2011-06-10 at 08:56 -0300, Rodolfo wrote:
> Hi. I'm new here at LibO development.

	Welcome ! :-) fantastic to have you.

> I have interest on improve the Math component of LibreOffice by adding
> some new commands into it: things like a wide inverted breve for
> description of an arc between points A and B.

	Sounds exciting.

> In order to do so, I've been looking & changing files with WideVec in
> starmath module (files like starmath.h, commands.src, parse.cxx, etc).
> Not successfully, though. My "wideibreve" attribute command isn't even
> recognized as a command: its texts appears normally.

	Oh - that sucks; any chance you can send a patch so we can have a read
through / play here ? [ always good to talk code ].

> I know it's kinda vague, but any guides what I should do for add any
> new command? And how to put it into the toolbox?

	I just had a poke; UI stuff is in .src files - in this case
starmath/source/toolbox.src - you would need to add a new magic number
in a .hrc file for that button (I guess), and then the src files are
associated with source files via those #define magic names. so eg. git
grep for RID_XCDOTY.

	Having said that - in this case, there seems to be some magic, whereby
the toolboxitem identifier, is also the identifier of another string
that is a command ;-)

	Looks like you'd just want to add a new entry for each of those &
bingo :-)

	Are you on IRC ? poke me mmeeks on #libreoffice-dev on freenode for
something more interactive.

	Hope that helps !

		Michael.

-- 
 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot




More information about the LibreOffice mailing list