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


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

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.