Update Home
parent
db6f1d3069
commit
c4a43265a8
32
Home.md
32
Home.md
|
@ -35,6 +35,38 @@ Barcodes provided
|
|||
|
||||
## By code
|
||||
|
||||
* Python
|
||||
|
||||
```
|
||||
import uno
|
||||
|
||||
CTX = uno.getComponentContext()
|
||||
SM = CTX.getServiceManager()
|
||||
|
||||
def create_instance(name, with_context=False):
|
||||
if with_context:
|
||||
instance = SM.createInstanceWithContext(name, CTX)
|
||||
else:
|
||||
instance = SM.createInstance(name)
|
||||
return instance
|
||||
|
||||
def main():
|
||||
from com.sun.star.beans import NamedValue
|
||||
zaz = create_instance("net.elmau.zaz.BarCode")
|
||||
|
||||
args = (
|
||||
NamedValue('Type', 'qrcode'),
|
||||
NamedValue('Data', 'libreoffice.org'),
|
||||
)
|
||||
path = zaz.execute(args)
|
||||
print(path)
|
||||
|
||||
return
|
||||
```
|
||||
|
||||
|
||||
* Basic
|
||||
|
||||
```vb
|
||||
Sub Main()
|
||||
|
||||
|
|
Loading…
Reference in New Issue