Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Mon, Aug 15, 2011 at 05:16:17PM +0200, Lubos Lunak <l.lunak@suse.cz> wrote:
 I'm implementing .docx OOXML support for writing math formulas. As this is 
something that could be used not only by Writer but also by other components, 
I want to implement the writing of the formula in Starmath. And even if I 
didn't want, Sm* classes (which implement and store the formulas) are in 
starmath/ , and sw-starmath do not link against each other.

 So, the question is, how do I call from sw to starmath without linking them 
together? I checked how the binary .doc filter does it, and it goes via ~10 
calls deep [1] that call some UNO interfaces and store the result in some 
private stream or whatever. But I find that needlessly complicated, as I 
already have a pointer to SmModel and SmDocShell (I can get it the same way 
the .doc code does) and just need to call their method, passing the XML 
serializer object as an argument, that's it.

 The best I've come up with creating let's say 
offapi/com/sun/star/starmath/WriteMath.idl with the function, make SmModel 
inherit from that and cast&call using it in sw. But I have not much idea 
about UNO, so I don't know what the stuff under offapi/ actually really is 
about. Is this a good solution or does somebody know something better?

That looks fine, that's how the rest of writerfilter can live without
the Sw* classes. Did you check if the existing uno api is enough for
you? See the output of 'git ls-files starmath|grep uno'. If yes, then
you don't have to mess with offapi. :)

Attachment: pgpKx1B9TgSvM.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.