Vendors Name via UNO API / Basic Macros

Cor Nouws oolst at nouenoff.nl
Mon Nov 18 13:47:57 PST 2013


Hi Thomas, *,

Thomas Krumbein wrote (14-11-13 09:21)

> Because in LO 4.1 we have some API-changes, macros should now have a
> version-switch.
> There are different methods to get the internal version-number - that is
> not a problem.
>
> But: The version number itself is not suffcient because AOO 4.1.0 will
> start soon and this version-number is identical to LO 4.1.0.

For the DocumentInfo - that changed from 3.x to 4.x, I use the following:

   If HasUnoInterfaces(ThisComponent, 
"com.sun.star.document.XDocumentInfoSupplier") Then
    ' 3.x
      s = ThisComponent.Documentinfo.Keywords ' example
   Else
      s = ThisComponent.getDocumentProperties.Keywords(0)
    End If

I've not yet been looking into details to possibly distinct between pré 
and after 4.1.0 for the Date .


In general: Would be nice if for every API change there is something as 
I place above here, to check from e.g. the aivailable interface what to do.

(Sidenote: the change in page formatting, that a page style can have 
different headers/footers on the first page in use, which is very 
positive for MsWord interoperability, may give a challenge too in code 
that manages printing: the page format as such could be used to distinct 
between various trays to print to. But that cannot be done in the same 
way now for documents using that feature ;) )

Cheers,
Cor


-- 
  - Cor Nouws
  - http://nl.libreoffice.org
  - The Document Foundation Membership Committee Member


More information about the LibreOffice mailing list