TheServiceDocumenter: extension to core ...

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Wed Nov 4 16:26:59 PST 2015


Hi,

I finally managed to finished TheServiceDocumenter thing presented with:

 http://people.canonical.com/~bjoern/presentations/extension2core.odp
 https://www.youtube.com/watch?v=WBNG6bVZPzw

If you build master with --enable-compiler-plugins on clang 3.7.0 or later[1]
it should create a set of html stubs in $(WORKDIR)/ServiceImplementions. These
have the names of UNO implementations and just do an immediate meta refresh to
the matching C++ core documentation on http://docs.libreoffice.org.

This means e.g. running this StarBasic macro:

> TheServiceDocumenter = GetDefaultContext().getValueByName("/singletons/com.sun.star.util.theServiceDocumenter")
> MsgBox(TheServiceDocumenter.Dbg_Methods)
> TheServiceDocumenter.CoreBaseUrl="http://people.canonical.com/~bjoern/implref/5.1/"
> TheServiceDocumenter.showCoreDocs(ThisComponent)

Shows the C++ documentation of whatever kind of document is currently active --
and would do the same with whatever UNO object you have in StarBasic, Python,
whatever.

This works because I copied the docs generated during the compile to
http://people.canonical.com/~bjoern/implref/5.1/. Of course, it would be better
to have that deployed directly on TDF infra, e.g. on docs.libreoffice.org.

@Miklos: IIRC you populate/update docs.libreoffice.org, do you think you can
update this along with the other generated docs during your next run?

There are still some few UNO implementations where this doesnt work yet[2],
but I assume it already being hugely helpful as is -- we can fix the rest
incrementally (I might even file some EasyHacks about this).

Finally, a big, big "Thank you!" to Stephan, who wrote ~all the tricky parts of
the ASTVisitor after I told him about my cunning plan early on ...

Best,

Bjoern


[1] https://wiki.documentfoundation.org/Development/Building_LibreOffice_with_Clang
    https://wiki.documentfoundation.org/Development/Clang_plugins

[2] Implementations in anonymous namespaces for example (but we also seem to
    miss doxygen docs for those anyway currently it seems), also some weird
    getImplementationName() functions that either need to be fixed or the plugin
    needs to learn about them. Also the "TheServiceDocumenter" likely should be
    a global var in StarBasic now.


More information about the LibreOffice mailing list