Difference between revisions of "ES/Manuales/GuiaAOO/TemasAvanzados/Macros/Python/Apendices"
From Apache OpenOffice Wiki
(+cat) |
m |
||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE: Apéndices}} | ||
== Obtener lista de filtros soportados por AOO == | == Obtener lista de filtros soportados por AOO == | ||
<source lang=python> | <source lang=python> | ||
Line 14: | Line 15: | ||
return | return | ||
</source> | </source> | ||
− | [[Category:ES/Python]] | + | |
+ | |||
+ | {{ES/Foro|macros}} | ||
+ | |||
+ | [[Category:ES]][[Category:Manuales]][[Category:ES/Python]] |
Latest revision as of 15:43, 9 May 2013
Obtener lista de filtros soportados por AOO
def obtener_filtros(): ctx = uno.getComponentContext() sm = ctx.getServiceManager() desktop = sm.createInstanceWithContext('com.sun.star.frame.Desktop', ctx) ff = sm.createInstance('com.sun.star.document.FilterFactory') filtros = ff.getElementNames() ruta = 'private:factory/swriter' doc = desktop.loadComponentFromURL(ruta, '_blank', 0, ()) doc.getText().setString('\n'.join(filtros)) return
Si tienes dudas acerca de lo aquí explicado, tienes algún problema con AOO, o quieres ampliar la información, no dudes en dirigirte al Foro Oficial en español de Apache OpenOffice para Macros y API UNO |