summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibreOļ¬ƒciant <LibreOfficiant@sfr.fr>2019-04-24 08:28:24 +0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2019-04-26 15:33:08 +0200
commit4ee8b6f4751bd71333c93756474148cfa7afc750 (patch)
tree2fd66069c0da40cae6c8a2ae56ac03443917f3c9
parentf52790876dae6ffe59fd71bf5f59df33678f0b5a (diff)
added hasUnoInterfaces()
Change-Id: I41e521c34c4dbf161b0bd4316da75d6db7ec4314 Reviewed-on: https://gerrit.libreoffice.org/71214 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r--source/text/sbasic/python/python_programming.xhp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/text/sbasic/python/python_programming.xhp b/source/text/sbasic/python/python_programming.xhp
index 5b3998ef60..888ed96b4a 100644
--- a/source/text/sbasic/python/python_programming.xhp
+++ b/source/text/sbasic/python/python_programming.xhp
@@ -243,6 +243,12 @@
</tablerow>
<tablerow>
<tablecell>
+ <paragraph role="tablecontent" localize="false" id="N0292">def hasUnoInterfaces(obj, *interfaces):</paragraph>
+ <paragraph role="tablecontent" localize="false" id="N0293">return set(interfaces).issubset(t.typeName for t in obj.Types)</paragraph>
+ <!-- Credits:
+ [Python]Equivalent 'supportsService' by Hubert Lambert
+ @ https://forum.openoffice.org/fr/forum/viewtopic.php?f=8&t=56597
+ -->
</tablecell>
<tablecell>
<paragraph role="tablecontent" localize="false" id="N0294">HasUnoInterfaces()</paragraph>