CreateUnoService Function

ProcessServiceManager এর সাথে একটি Uno সার্ভিস দ্রুত সম্পন্ন করে।

সিনট্যাক্স:

oService = CreateUnoService( Uno service name )

For a list of available services, go to: https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star.html

উদাহরণ:

oIntrospection = CreateUnoService( "com.sun.star.beans.Introspection" )

নিম্নোক্ত কোড একটি ফাইল খোলার ডায়ালগ খুলতে একটি পরিসেবা ব্যবহার করে:উ

Sub Main

    fName = FileOpenDialog ("Please select a file")

    print "file chosen: "+fName

End Sub

 

Function FileOpenDialog(title As String) As String

    filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")

    filepicker.Title = title

    filepicker.execute()

    files = filepicker.getFiles()

    FileOpenDialog=files(0)

End Function