Packaging and testing the component

The next lines will show you how to export your component into a LibreOffice package. There is quite nothing to do apart from following these small steps:

Then we will suppose that the package is deployed on the LibreOffice installation and we will test it using the following OooBasic macro.

Sub testHelloworld
    oHelloworld = createUnoService( "my.company.helloworld.Helloworld" )
    oHelloworld.LadyName = "Robinson"
    print oHelloworld.sayHello( false )
    print oHelloworld.sayHello( True )
End Sub

This macro should open two message windows with “Hello Mrs. Robinson” and “A third is 0.3333333”. Your first UNO component is now running, enjoy doing others.