26 lines
568 B
Python
26 lines
568 B
Python
import uno
|
|
import unohelper
|
|
from net.elmau.zaz.functions import XZAZFunctions
|
|
|
|
|
|
ID_EXTENSION = 'net.elmau.zaz.functions'
|
|
SERVICE = ('com.sun.star.sheet.AddIn',)
|
|
|
|
|
|
class ZAZFunctions(unohelper.Base, XZAZFunctions):
|
|
|
|
def __init__(self, ctx):
|
|
self.ctx = ctx
|
|
|
|
def zreverse(self, value):
|
|
result = value[::-1]
|
|
return result
|
|
|
|
def zeval(self, value):
|
|
result = eval(value)
|
|
return result
|
|
|
|
|
|
g_ImplementationHelper = unohelper.ImplementationHelper()
|
|
g_ImplementationHelper.addImplementation(ZAZFunctions, ID_EXTENSION, SERVICE)
|