Draft document-rendering tiling API to be called from viewer apps

Stephan Bergmann sbergman at redhat.com
Wed Jun 6 05:39:51 PDT 2012


On 06/06/2012 01:43 PM, Tor Lillqvist wrote:
> Now I am having second thoughts, though, but still, a first, in
> progress, draft API is in UNOIDL form is in touch/idl.

I see no need for a DocumentRenderCallback service. 
XDocumentRenderCallback will be implemented by UNO objects specific to 
the various callers of XDocument.render; there is no reasonable generic 
implementation that could be offered as a service.  (Also, there is a 
subtle difference between an explicit zero-parameter constructor and an 
implicit default constructor for UNO services, relating to whether the 
constructor internally calls createInstanceWithContext or 
createInstanceWithArgumentsAndContext.)

> But, that's the *specification* and *use*. *Implementing* UNO services
> in C++, especially if you don't want to just copy-paste existing code
> as a start, and then modify,  without understanding what the parts you
> don't touch is exactly doing, is still nightmarish with loads of
> boilerplate-ish rubbish.

I would go the UNO approach nevertheless.  If you want to be able to 
call this from Java, don't underestimate the work you save by reusing 
UNO here.  Your impression might vary, but I would say this vastly 
compensates for the mild amount of boilerplate you need on the C++ 
implementation side.  (I might of course be routine-blinded, but in my 
eyes the necessary boilerplate boils down to not that much really.)

Stephan


More information about the LibreOffice mailing list