How to check Uno objects types with Basic macro ?
Thomas Krumbein
Thomas.Krumbein at documentfoundation.org
Thu Dec 21 08:13:27 UTC 2017
Hey Patrick,
to check, if a basic object is a document section, you can check, if the
object supports the according service.. for example:
if oObj.supportsService("com.sun.star.text.TextSection") then ' is a
text section
a little bit different is this, if you have a cursor-object and want to
know, if this is a test section. in this case you have to check, if the
object (textSection) is not empty.
regarding some literature:
try Andrew Pitonyak´s "Makro explainen" document - > find it here:
http://www.pitonyak.org/oo.php
the best free paper :)
In Germany you can use my book: "Makro Grundlagen
LibreOffice/OpenOffice" see www.tintal.de
Best regards
Thomas
Am 21.12.2017 um 08:19 schrieb Patrick Gelin:
> Hi,
>
> I'm using basic macros with LibreOffice 5.4.2.2. I would like to check that
> a basic Object is a document Section. I find out XTypeProvider interface
> <http://www.openoffice.org/api/docs/common/ref/com/sun/star/lang/XTypeProvider.html#getTypes>
> , but no exemples hjow to use it. I've never use UNO interface, so could
> anybody send me a OOo Basic snippet code to show how to do ?
>
> By the way, do you know a good book/PDF to download about UNO interface
> and/or IDL language ?
>
> Thank you !
> Patrick
>
>
>
> --
> Sent from: http://nabble.documentfoundation.org/Dev-f1639786.html
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
More information about the LibreOffice
mailing list