UNO(Universal Network Objects)
Tips
Other
Text
[ Text ]
Sub Main
name_html="C:/OOo_test/test2/test_html"
dim args2(1) as new com.sun.star.beans.PropertyValue
dim Dummy()
args1(2).Name="FilterOption"
oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Dummy())
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
args2(0).Name="FileName"
args2(0).Value="file:///" & name_html
args2(1).Name="Filteroption"
args2(1).Value="text"
dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args2())
oDoc.Close(false)
End Sub
Sub Main
Dim FileNo As Integer
Dim CurrentLine As String
Dim outdata as String
Dim TxtFile,oTxtF As String
TxtFile="c:\OOo_test\test.txt"
oTxtF=ConvertToUrl(TxtFile)
fileNo=Freefile
Open oTxtF For Input As FileNo
Do While not eof(FileNo)
' Read line
Line Input #FileNo, CurrentLine
If CurrentLine <>"" then
outdata = outdata & CurrentLine & Chr(13)
end if
Loop
Close #fileNo
Msgbox(outdata)
End Sub
Global sPath As String
Global sDoc As Object
Sub Main
'現在のfile名の絶対Path
sDoc = ThisComponent
sUrl = sDoc.getLocation()
sPath = ConvertFromURL(sUrl) ':msgbox(spath)
'現ファイル名を取得
GlobalScope.BasicLibraries.LoadLibrary("Tools")
nUrl = ThisComponent.getURL
nFile=FileNameOutOfPath(nUrl) ':msgbox(nFile)
oNum=Len(spath)-Len(nFile)
'現在のフォルダまでのPath
osPath=Left(sPath,oNum) ': msgbox osPath
'
Cfolder="C:\OOo_test"
ofname="8test_html.html"
fText=Left(ofname,InStr(1,ofname,".")-1)
'batコマンド実行
bat_file=osPath & "Type1.bat" &" "& Cfolder & " " & ofname & " " & fText & ".txt" & " " & osPath
msgbox bat_file
Shell(bat_file)
'TextファイルOpen
Dim args1(1) as new com.sun.star.beans.PropertyValue
Textfile=ConvertToUrl(Cfolder & "\" & fText & ".txt")
wait 1000
args1(0).Name="Hidden"
args1(0).value=false
args1(1).Name="Readonly"
args1(1).Value=false
oDoc = StarDesktop.loadComponentFromURL(Textfile, "_blank", 0, args1())
oDoc.close(false)
End Sub
Sub oTextFileMacro
Dim oPath as String
Dim oFileName as String
Dim oFileNumber as Integer
Dim oFullFileName as String
Dim oPntData as String
Dim oJp() as String
Dim oEn() as String
oJp = Array("日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日")
oEn = Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
'
oPath = "c:\temp\"
oFileName = "oTextMacro.txt"
'
oPntData = "----- [ Text Fileへの出力 ] -----" & Chr$(10) & Chr$(10)
for i = 0 to UBound(oEn)
oPntData = oPntData & i & ") " & oEn(i) & Chr$(9) & oJp(i) & Chr$(10)
next i
' Text Fileへの出力
oFileNumber = FreeFile()
oFullFileName = oPath & oFileName
Open oFullFileName for Append as oFileNumber
print #oFileNumber, oPntData ' Data Into File
Close #oFileNumber
'
msgbox "Success"
End Sub
'
' << File Open時のMode >>
'[ For Append ]
'Text Fileの書き出し位置 : End
'同名Fileがある時 : Open
'指定Fileが無い時 : Create
'Data Read 可否 : Yes
'Data Write 可否 : Yes
'Comment : Sequential Access
'Mode CheckのReturn : 8
'
'[ For Imput ]
'Text Fileの書き出し位置 : Start
'同名Fileがある時 : Open
'指定Fileが無い時 : Error
'Data Read 可否 : Yes
'Data Write 可否 : No
'Comment : Sequential Access
'Mode CheckのReturn : 1
'
'[ For Output ]
'Text Fileの書き出し位置 : Start
'同名Fileがある時 : Delete
'指定Fileが無い時 : Create
'Data Read 可否 : Yes
'Data Write 可否 : Yes
'Comment : Sequential Access
'Mode CheckのReturn : 2
'
'[ For Binart ]
'Text Fileの書き出し位置 : Start
'同名Fileがある時 : Delet
'指定Fileが無い時 : Create
'Data Read 可否 : Yes
'Data Write 可否 : Yes
'Comment : Random Access
'Mode CheckのReturn : 16
'[ For random ]
'Text Fileの書き出し位置 : Start
'同名Fileがある時 : Delete
'指定Fileが無い時 : Create
'Data Read 可否 : Yes
'Data Write 可否 : Yes
'Comment : Random Access
'Mode CheckのReturn : 4
[ Read / Write ]
Sub oOpenFileReadSFA
Dim oSimpleFileAccess as Object
Dim oFile as String
Dim oOpenFileRead as Object
Dim oOFRTypes(100) as Long
Dim oOFRID(100) as Long
Dim oOFRPos as Long
Dim oOFRLen as Long
oSimpleFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")
oFile = "C:\temp\oTextMacro.txt"
If oSimpleFileAccess.Exists(oFile) then
oOpenFileRead = oSimpleFileAccess.openFileRead(oFile)
'oA = oOpenFileRead.dbg_methods : msgbox(oA) : 'Exit Sub
'oB = oOpenFileRead.dbg_properties : msgbox(oB) : 'Exit Sub
'
oOFRTypes = oOpenFileRead.Types
oOFRID = oOpenFileRead.ImplementationID
oOFRPos = oOpenFileRead.Position
oOFRLen = oOpenFileRead.Length
'
oDisp = "File Name : " & oFile & Chr$(10)
oDisp = oDisp & "<< OpenFileRead >>" & Chr$(10)
oDisp = oDisp & "[ Types数 ] = " & UBound(oOFRTypes) & Chr$(10)
oDisp = oDisp & "[ ImplementationID数 ] = " & UBound(oOFRID) & Chr$(10)
oDisp = oDisp & "[ Position ] = " & oOFRPos & Chr$(10)
oDisp = oDisp & "[ Length ] = " & oOFRLen & " bytes"
MsgBox( oDisp, 0, "OpenFileRead")
'
oOpenFileRead.closeInput()
else
MsgBox( oFile & " は存在しません", 0, "Caution !!")
Exit Sub
End If
End Sub
'[ Note ]
'「1」=1, 「,」=1, 「2」=2,「坂本龍馬」=8, 「ア」=1,「a」=1,「A」=1,「a」=2,「A」=2
'1+1*6+2+8+1+1+1+2+2+2(改行1回) ⇒ 26 bytes
Sub oOpenFileWriteSFA
Dim oSimpleFileAccess as object
Dim oFile as String
Dim oOpenFileWrite as Object
Dim oOFWTypes(100) as Long
Dim oOFWID(100) as Long
Dim oOFWPos as Long
Dim oOFWLen as Long
oSimpleFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")
oFile = "C:\temp\test.csv"
If oSimpleFileAccess.Exists(oFile) then
oOpenFileWrite = oSimpleFileAccess.openFileWrite(oFile)
'oA = oOpenFileRead.dbg_methods : msgbox(oA) : 'Exit Sub
'oB = oOpenFileWrite.dbg_properties : msgbox(oB) : 'Exit Sub
oOFWTypes = oOpenFileWrite.Types
oOFWID = oOpenFileWrite.ImplementationID
oOFWPos = oOpenFileWrite.Position
oOFWLen = oOpenFileWrite.Length
oDisp = "File Name : " & oFile & Chr$(10)
oDisp = oDisp & "<< OpenFile Write >>" & Chr$(10)
oDisp = oDisp & "[ Types数 ] = " & UBound(oOFWTypes) & Chr$(10)
oDisp = oDisp & "[ ImplementationID数 ] = " & UBound(oOFWID) & Chr$(10)
oDisp = oDisp & "[ Position ] = " & oOFWPos & Chr$(10)
oDisp = oDisp & "[ Length ] = " & oOFWLen & " bytes"
MsgBox( oDisp, 0, "OpenFileWrite")
'
oOpenFileWrite.closeOutput()
' oOpenFileWrite.closeInput() ' closeInput()でも動作する
else
MsgBox( oFile & " は存在しません", 0, "Caution !!")
Exit Sub
End If
End Sub
Sub oOpenFileReadWriteSFA
Dim oSimpleFileAccess as Object
Dim oFile as String
Dim oOpenFileReadWrite as Object
Dim oOFRWTypes(100) as Long
Dim oOFRWID(100) as Long
Dim oOFRWPos as Long
Dim oOFRWLen as Long
oSimpleFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")
oFile = "C:\temp\test.csv"
If oSimpleFileAccess.Exists(oFile) then
oOpenFileReadWrite = oSimpleFileAccess.openFileReadWrite(oFile)
oOFRWTypes = oOpenFileReadWrite.Types
oOFRWID = oOpenFileReadWrite.ImplementationID
oOFRWPos = oOpenFileReadWrite.Position
oOFRWLen = oOpenFileReadWrite.Length
oDisp = "File Name : " & oFile & Chr$(10)
oDisp = oDisp & "<< OpenFileReadWrite >>" & Chr$(10)
oDisp = oDisp & "[ Types数 ] = " & UBound(oOFRWTypes) & Chr$(10)
oDisp = oDisp & "[ ImplementationID数 ] = " & UBound(oOFRWID) & Chr$(10)
oDisp = oDisp & "[ Position ] = " & oOFRWPos & Chr$(10)
oDisp = oDisp & "[ Length ] = " & oOFRWLen & " bytes"
MsgBox( oDisp, 0, "OpenFileReadWrite")
'
oOpenFileReadWrite.closeInput()
' oOpenFileReadWrite.closeoutput() ' closeoutput()でも動作する。
else
MsgBox( oFile & " は存在しません", 0, "Caution !!")
Exit Sub
End If
End Sub
XML
Sub NetDom()
Dim oDocBuilder as Object
Dim oDom as Object
Dim oFile as String, oURL as String
Dim oDmElmt as Object
Dim oTopItem as String
Dim oChdNode1 as Object, oChdNode2 as Object
Dim oNodeItem1 as Object, oNodeItem2 as Object
oFile = "c:\temp\PythonMacroTest.xml"
oURL = ConvertToUrl( oFile )
oDocBuilder = createUnoService("com.sun.star.xml.dom.DocumentBuilder")
oDom = oDocBuilder.parseURI(oURL)
oDom.normalize()
'
oDmElmt = oDom.getDocumentElement()
oTopItem = oDmElmt.TagName
oDisp = oTopItem & Chr$(10)
'
oChdNode1 = oDmElmt.getChildNodes()
for i = 0 to oChdNode1.getLength() -1
oNodeItem1 = oChdNode1.item(i) ' item : method / not property
if oNodeItem1.HasChildNodes() = true then
oDisp = oDisp & Chr$(9) & oNodeItem1.LocalName & Chr$(10)
oChdNode2 = oNodeItem1.getChildNodes()
for k = 0 to oChdNode2.getLength() -1
oNodeItem2 = oChdNode2.item(k)
if oNodeItem2.HasChildNodes() = true then
oDisp = oDisp & Chr$(9) & Chr$(9) & oNodeItem2.LocalName & Chr$(10)
end if
next k
end if
next i
msgbox oDisp,0,"Node Name of XML"
End Sub
Library / Module
Sub Library()
Dim oLibry as Object
Dim oSrc as String
oLibry = GlobalScope.basicLibraries.getByName("Standard")
oSrc = oLibry.getByName("Module1")
msgbox oSrc,0,"Module Source"
End Sub
Sub Library()
Dim oLibry as Object
Dim oDisp as String
oLibry = GlobalScope.basicLibraries.getElementNames()
oDisp = "[ Library List ]" & Chr(10)
for i = 0 to UBound(oLibry)
oDisp = oDisp & oLibry(i) & Chr(10)
next i
msgbox oDisp,0,"Library List"
End Sub
Sub LibraryModule()
Dim oBLibrys as Object
Dim oLibry as Object
Dim oLibName as String
Dim oMdle() as String
oBLibrys = GlobalScope.basicLibraries
oLibName = "Gimmicks"
'
oDisp = "[ Module List ]" & Chr$(10)
if oBLibrys.hasByName(oLibName) then
oMdle = oBLibrys.getByName(oLibName).getElementNames()
for i = 0 to UBound(oMdle)
oDisp = oDisp & oMdle(i) & Chr$(10)
next i
else
oDisp = oDisp & " Library : " & oLibName & " does not exist."
end if
msgbox oDisp,0,"Module List"
End Sub
Sub Library()
Dim oLibry as Object
Dim oLibName as String
Dim oMdleName as String
oLibry = GlobalScope.basicLibraries
oLibName = "Gimmicks"
oMdleName = "AutoText"
'
oDisp = "[ Library and Moduleの有無Check ]" & Chr$(10)
if oLibry.hasByName(oLibName) then
if oLibry.getByName(oLibName).hasByName(oMdleName) then
oDisp = oDisp & Chr$(9) & oMdleName & " of " & oLibName & " exists."
else
oDisp = oDisp & Chr$(9) & oMdleName & " of " & oLibName & " does not exist."
end if
else
oDisp = oDisp & " Library : " & oLibName & " does not exist."
end if
msgbox oDisp,0,"Library / Modueの有無"
End Sub
・UNO(Universal Network Objects)
Type PersonType
FirstName As String
LastName As String
End Type
Sub oPerson
Dim oP As PersonType
oP.FirstName = "坂本"
oP.LastName = "竜馬"
oMe = createObject("PersonType")
oMe.FirstName = "OpenOffice.org"
oMe.LastName = "Macro"
msgbox(oP.FirstName & oP.LastName & chr$(10) & oMe.FirstName & " " & oMe.LastName)
End Sub
Type PersonType
FirstName As String
LastName As String
End Type
Sub oCObj
Dim oP(0) As new com.sun.star.beans.PropertyValue
Dim oProp(0)
oPS = createObject("com.sun.star.beans.PropertyValue")
oProp(0) = createObject("com.sun.star.beans.PropertyValue")
oProp(0).Name = "FirstName"
oProp(0).Value = "織田"
oP(0).Name = "LastName"
oP(0).Value = "信長"
oPS.Name = "FirstName"
oPS.Value = "野茂"
oTy1 = TypeName(oProp)
oTy2 = TypeName(oP)
oTy3 = TypeName(oPS)
oUSt1 = IsUnoStruct(oProp)
oUSt2 = IsUnoStruct(oP)
oUSt3 = IsUnoStruct(oPS)
msgbox(oProp(0).Value & "Type oProp(0) : " & oTy1 & "Is UNO ? : " & oUSt1 & Chr$(10) & oP(0).Name & "Type oP(0) : " & _
oTy2 & "Is UNO ? : " & oUSt2 & Chr$(10) & oPS.Value & "Type oPS : " & oTy3 & "Is UNO ? : " & oUSt3 )
Dim oPU(0) As Object
On Error GoTo eM
oPU(0).Name = "LastName"
oPU(0).Value = "英雄"
oTy4 = TypeName(oPU)
oUSt4 = IsUnoStruct(oPU)
eM:
Print Error
End Sub
Sub GnUnoInterface()
Dim oDoc as Object, oSheet as Object
Dim oChk as Boolean
oDoc = ThisComponent
oSheet = oDoc.getSheets().getByName("sheet1")
oChk = HasUnoInterfaces( oSheet, "com.sun.star.sheet.XSpreadsheet" )
msgbox oChk,0,"Interface"
End Sub
Sub oFileAccess_Type
Dim oFA
Dim oName, oURL, oText As String
Dim oManager
oName ="C:\Temp\Witer_Macro.odt"
oURL = ConvertToUrl(oName)
oManager = GetProcessServiceManager()
oFA = oManager.CreateInstance("com.sun.star.ucb.SimpleFileAccess")
oFTy = oFA.getContentType(oURL)
Print oFTy
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
sNum = UBound(uService)
MsgBox("SupportされているUNO module Service数は " & Chr$(10) & sNum & "です。")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,5) ': print otmp
If otmp = "sheet" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,5) ': print otmp
If otmp = "beans" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "ucb" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "configuration" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "text" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "drawing" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "presentation" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "formula" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "linguistic" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "comp.Writer" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "comp.document" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "comp.Calc" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "comp.Chart" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "comp.Draw" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "comp.Impress" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "comp.sd" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "comp.Math" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "comp.oox" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "comp.embed" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,15) ': print otmp
If otmp = "comp.deployment" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "lang" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "i18n" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "awt.Uno" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "awt.Dialog" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "awt.Display" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "awt.grid" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "awt.Image" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "awt.Layout" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "awt.Pointer" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "awt.Printer" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "awt.Property" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "awt.Tab" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "awt.Toolkit" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "awt.tree" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "awt.XProgress" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "awt.Menu" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,2) ': print otmp
If otmp = "ui" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i = 0 to UBound(uService)
otmp = mid(uService(i),14,5) ': print otmp
If otmp = "frame" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "accessibility" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "animations" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "bridge" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "chart2" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "config." then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "configuration" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "connection" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "datatransfer" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "deploy" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "form.binding" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,14) ': print otmp
If otmp = "form.component" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "form.control" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "form.Form" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,15) ': print otmp
If otmp = "form.inspection" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,11) ': print otmp
If otmp = "form.Master" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,13) ': print otmp
If otmp = "form.Property" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,12) ': print otmp
If otmp = "form.runtime" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "form.ui" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "gallery" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "graphic" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub UnoHandler()
Dim oPreSrvMng as Object
Dim oUnoAvailSrv() as String
Dim oDisp as String
oPreSrvMng = GetProcessServiceManager()
oUnoAvailSrv = oPreSrvMng.AvailableServiceNames
oDisp = "[ UNO Service / Handler ]"
for i = 0 to UBound(oUnoAvailSrv)
if InStr(1, oUnoAvailSrv(i), "Handler") then
oDisp = oDisp & Chr$(10) & oUnoAvailSrv(i)
end if
next i
msgbox(oDisp, 0,"UNO Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "help" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,10) ': print otmp
If otmp = "inspection" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,2) ': print otmp
If otmp = "io" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "java" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "loader" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "logging" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "migration" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "mozilla" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "office" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,14) ': print otmp
If otmp = "oooimprovement" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "packages" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "plugin" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "rdf" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "reflect" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "registry" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,9) ': print otmp
If otmp = "rendering" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "report" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "resource" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "scanner" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "script" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "sdb" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "sdbc" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,8) ': print otmp
If otmp = "security" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,5) ': print otmp
If otmp = "setup" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,5) ': print otmp
If otmp = "style" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "task" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,2) ': print otmp
If otmp = "ui" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "uri" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,4) ': print otmp
If otmp = "util" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "uui" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,7) ': print otmp
If otmp = "wizards" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,6) ': print otmp
If otmp = "xforms" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
for i =0 to UBound(uService)
otmp = mid(uService(i),14,3) ': print otmp
If otmp = "xml" then
oDisp = oDisp & uService(i) & Chr$(10)
End If
next i
msgbox(oDisp,0,"Uno Service")
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
Dim oUno(1500)
Dim oDummy()
Dim oArray(0) As new com.sun.star.beans.PropertyValue
On Error Goto oBad
oManager = GetProcessServiceManager()
uService = oManager.GetAvailableServiceNames()
sNum = UBound(uService)
for i = 0 to sNum
oUno(i) = uService(i)
next i
oFile = "c:\temp\oUno.ods"
oURL = convertToUrl(oFile)
oDoc=StarDesktop.loadComponentFromUrl(oURL, "_blank", 0, oDummy())
for i = 0 to sNum
oDoc.Sheets(0).getCellByPosition(0,i).String= oUno(i)
next i
oArray(0).Name = "Overwrite"
oArray(0).Value = true
oDoc.StoreAsURL(oURL,oArray())
oDoc.dispose
MsgBox("Finish" ,0,"Uno service 一覧")
Exit Sub
oBad:
mErr = Error
eline = Erl
msgbox("Line : " & eline & Chr$(10) & mErr & Chr$(10) &" : i = " & i, 0,"Error Message" )
oDoc.dispose
End Sub
Sub oHowmanyServiceSupported
Dim oManager
Dim uService
Dim oUno(1500)
Dim oDummy()
Dim oArray(0) As new com.sun.star.beans.PropertyValue
On Error Goto oBad
sName = "c:\temp\oAuthor.ods"
sURL = ConvertToUrl(sName)
oDoc = StarDesktop.loadComponentFromURL(sURL, "_blank", 0, oDummy)
Wait(10)
'uSurvice = oDoc.GetAvailableServiceNames()
uService=oDoc.getAvailableServiceNames()
msgbox(uService(0))
'sNum = UBound(uService)
sNum=UBound(uService)
for i = 0 to sNum
oUno(i) = uService(i)
next i
oFile = "c:\temp\oUno.ods"
oURL = convertToUrl(oFile)
oDoc1=StarDesktop.loadComponentFromUrl(oURL, "_blank", 0, oDummy())
for i = 0 to sNum
oDoc.Sheets(0).getCellByPosition(1,i).String= oUno(i)
next i
oArray(0).Name = "Overwrite"
oArray(0).Value = true
oDoc1.StoreAsURL(oURL,oArray())
oDoc1.dispose
oDoc.dispose
MsgBox("Finish" ,0,"Uno service 一覧")
Exit Sub
oBad:
mErr = Error
eline = Erl
msgbox("Line : " & eline & Chr$(10) & mErr & Chr$(10) &" : i = " & i, 0,"Error Message" )
oDoc.dispose
oDoc1.dispose
End Sub
Sub oInspect_TextTable
Dim oDoc
Dim oIspt
dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Dummy())
oInspt = oDoc.getTextTables()
Print IsObject(oInspt)
Print IsNull(oInspt)
Print IsEmpty(oInspt)
Print IsArray(oInspt)
Print IsUnoStruct(oInspt)
Print TypeName(oInspt)
MsgBox oInspt.dbg_methods
oDoc.dispose
End Sub
Sub oXServiceInfo
Dim oDoc
Dim oUnoType As New com.sun.star.beans.PropertyValue
dim Dummy()
On Error Goto oErr
oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Dummy())
vObj = ThisComponent
'Check UNO Structure?
Print "Is oUnoType UNO Structure? : " + IsUnoStruct(oUnoType)
Print "Is ThisComponent UNO Structure? : " + IsUnoStruct(ThisComponent)
'Check UNO Interface?
Print "Is oUnoType UNO Interfaces? : " + HasUnoInterfaces(oUnoType, "com.sun.star.uno.XInterface")
Print "Is ThisComponent UNO Interfaces? : " + HasUnoInterfaces(ThisComponent, "com.sun.star.uno.XInterface")
'Check Active Object?
Print "Is oUnoType Active Object? : " + EqualUnoObjects(vObj, oUnoType)
Print "Is ThisComponent Active Object? : " + EqualUnoObjects(vObj, ThisComponent)
'XService Info
Print "getImplementaionName of THisComponent : " + oDoc.getImplementationName()
oDocType = oDoc.SupportsService("com.sun.star.sheet.SpreadsheetDocument")
msgbox(oDocType)
If oDoc.SupportsService("com.sun.star.sheet.SpreadsheetDocument") then
oDocType = "Calc"
ElseIf oDoc.SupportsService("com.sun.star.drawing.DrawingDocument") then
oDocType = "Draw"
ElseIf oDoc.SupportsService("com.sun.star.presentation.PresentationDocument") then
oDocType = "Impress"
ElseIf oDoc.SupportsService("com.sun.star.formula.FormulaProperties") then
oDocType = "Math"
ElseIf oDoc.SupportsService("com.sun.star.text.TextDocument") then
oDocType = "Writer"
End If
Print oDocType
oDoc.dispose
oErr:
If Err <> 0 then
oDocType="Unknown Type Document"
End If
On Error Goto 0 'Turn off error handling after checking for a error
End Sub
Sub odbg
Dim oDoc
Dim oIspt
dim Dummy()
oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Dummy())
oInspt = oDoc.getTextTables()
MsgBox oInspt.dbg_properties
MsgBox oInspt.dbg_methods
MsgBox oInspt.dbg_supportedInterfaces
oDoc.dispose
End Sub
Sub oAvailableStyle
Dim oDoc
Dim oSFamily As Variant
Dim oSNames As Variant
oDoc =ThisComponent
oSFamily = oDoc.StyleFamilies
oFNames = oSFamily.getElementNames()
for n = LBound(oFNames) to UBound(oFNames)
s=""
aStyles = oSFamily.getByName(oFNames(n))
aSN= aStyles.getElementNames()
for i = LBound(aSN) to UBound(aSN)
s = S & i & " : " & aSN(i) & Chr$(13)
If ((i + 1) mod 35 = 0) then
Msgbox(s, 0, oFNames(n))
s=""
End If
next i
If Len(s) > 0 then
Msgbox(s, 0, oFNames(n))
End If
next n
End Sub
[ Writer ]
・Charactor
・Paragraph
・Page
・Numbering
・Frame
[ Calc ]
・Cell
・Page
[ Draw ]
・Graphics
・Cell
・Table
・Standard
[ Impress ]
・Graphics
・Cell
・Table
・Standard
Sub oCurrentDoc
On Error Resume Next 'OOo以外のfileは無視する。
Dim oComp As Object
Dim oDocume As Object
Dim oDoc As Object
Dim oInfo As String
GlobalScope.BasicLibraries.LoadLibrary("Tools")
oComp = StarDesktop.getComponents() 'com.sun.star.container.XEnumerationAccess
If NOT oComp.hasElements() then
Print "There are no components"
Exit Sub
End If
oEnumerate = oComp.createEnumeration() 'com.sun.star.container.XEnumeration
Do while oEnumerate.hasMoreElements()
aDoc = oEnumerate.nextElement()
oInfo = oInfo & getDocumentType(aDoc) & " "
oInfo = oInfo & FileNameOutOfPath(aDoc.getURL())
oInfo = oInfo & Chr$(10)
Loop
MsgBox(oInfo, 0, "Current Open Components")
End Sub
Sub oDocLib
Dim oLibs
Dim bLibs
Dim oDia
Dim oMod
Dim oNumDia
Dim oNumMod
Dim oDs
Dim oMs
oLibs = DialogLibraries.getElementNames()
oDs = "*** Dialog Libraries ***" & Chr$(10)
For i = LBound(oLibs) to UBound(oLibs)
oDia = DialogLibraries.getByName(oLibs(i))
oNumDia = UBound(oDia.getElementNames())+1
oDs = oDs & "Libs [" & oLibs(i) & "] has " & oNumDia & " dialogs"
next i
bLibs = BasicLibraries.getElementNames()
oMs = "*** Basic Libraries ***" & Chr$(10)
For i = i = LBound(bLibs) to UBound(bLibs)
oMod = BasicLibraries.getByName(bLibs(i))
oNumMod = UBound(oMod.getElementNames())+1
oMs = oMs & "Libs [" & oLibs(i) & "] has " & oNumMod & " modules"
next i
Msgbox(oDs & Chr$(10) & oMs, 0, "Dialog and Basic libraries in the current document")
End Sub
Sub oUnoValue
Dim oUv1,oUv2,oUv3
oUv1 = CreateUnoValue("unsigned long", 10)
oUv2 = CreateUnoValue("string", "Hello. This is UNO Value")
oUv3 = CreateUnoValue("byte", 10) '10 ⇒ 0 to 255
oUv4 = CreateUnoValue("[]byte", Array(3,2,1))
Print IsEmpty(oUv1) & IsEmpty(oUv2) & IsEmpty(oUv3) & IsEmpty(oUv4)
Print IsNull(oUv1) & IsNull(oUv2) & IsNull(oUv3) & IsNull(oUv4)
Print IsMissing(oUv1) & IsMissing(oUv2) & IsMissing(oUv3) & IsMissing(oUv4)
Print TypeName(oUv1) + TypeName(oUv2) + TypeName(oUv3) + TypeName(oUv4)
Print IsUnoStruct(oUv1) & IsUnoStruct(oUv2) & IsUnoStruct(oUv3) & IsUnoStruct(oUv4)
Print IsUnoStruct(oUv1) + IsUnoStruct(oUv2) + IsUnoStruct(oUv3) + IsUnoStruct(oUv4)
End Sub
Sub oFindObj
Dim oDoc
Dim oTest
oTest = FindObject("ThisComponent")
If oTest IS oDoc then
Msgbox("oDocはCurrent Objectです。")
else
Msgbox("oDocはCurrent Objectではありません。")
End If
Rem Load the Gimmicks library
GlobalScope.BasicLibraries.LoadLibrary("Gimmicks")
oDoc = FindObject("Gimmicks")
oTest = FindPropertyObject(oDoc, "Userfields")
End Sub
Tips
ProprtyValeのName及びValueの形式はCodeを見る必要がある。
OnlinでOpenOffice.orgのCode内を検索する為のTool「 {OpenGrok 」 にて調べる。
URL : {OpenGrok
Uno Commandとそれについての情報Uno関係は「 sdi 」 に記載されています。
[ Sample1 ]
Application : Writer
調査対象 : Uno:SendOutlineToStarImpress の場合
1)Full Search欄に「SendOutlineToStarImpress」を入力、「search」click
2)今回はWriterなので、検索結果から「 swriter.sdi 」を選択
3)File中のCodeから「 SendOutlineToStarImpress 」を検索
4)結果から、「()」が空白なので、「com.sun.star.PropertyValue」にて
指定できる項目は無い事が分かる。
Application : Writer
調査対象 : Uno:GoUp の場合
上記1)~3)は同じ。
しかし、()内が以下の様に記されている。
(Sfx Int16 Item Count FN_PARAM_MOVE_COUNT,Sfx Bool Item Select FN_PARAM_MOVE_SELECTION)
Arg値
Name : Count / Valueの型 : Int16
Name : Select / Valueの型 : Boolean
である事が分かる。
その他「browsable and searchable source tree 」から探す事もできる。
Other
Sub GnOther()
Dim oDoc as Object, oCtrl as Object, oFrame as Object
Dim oDispatcher as Object
Dim oProp(0) as new com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oCtrl = oDoc.getCurrentController()
oFrame = oCtrl.Frame
oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDispatcher.executeDispatch(oFrame, ".uno:About", "", 0, oProp())
'
msgbox "Success"
End Sub
Option Compatible
Global
Private
Sub oFile_Routines
oFree=FreeFile()
'oMkDir = MkDir("c:\temp\OOoMacro") 'Windows
'oMkDir = MkDir("/home/OOoMacro") 'Linux
'oRmDir = RmDir("c:\temp\OOoMacro") 'Windows
'oRmDir = RmDir("/home/OOoMacro") 'Linux
'Kill("C:\Temp\Maco_test.txt")
'FileCopy("C:\Temp\OOo_test.txt", "C:\Temp\Macro_test.txt") 'File Copy
'FileCopy("C:\temp","C:\Test") 'Directory Copy
'Name "C:\temp\OOo_test.txt" As "C:\Temp\Macro_test.txt" 'Rename a file
'Name "C:\temp" As "C:\temp_test" 'Rename a directory
'Name "C:\temp\OOo_test.txt" As "C:\OOo_test.txt" 'Move the file
'Name "C:\temp" As "C:\OOo_temp" 'Move the directory
'EOF
'Get #1
'Put #1
'Input #
'Line Input #
'Loc()
'LOF()
'Reset
'Seek #
'Write #
'FileAttr()
'[ File Attributes ]
'1 : Read-Only
'2 : Hidden
'4 : System
'8 : Volume
'16 : Directory
'32 : Archive bit(file changed since last backed up)
End Sub
Sub oResolutionDisplay
Dim oDisplayAccess
Dim oDisplay
Dim oScreen
oDisplayAccess = CreateUnoService("com.sun.star.awt.DisplayAccess")
oDisplay = oDisplayAccess.getByIndex(0)
oScreen = oDisplay.ScreenArea
oDx = oScreen.Width
oDy = oScreen.Height
msgbox( "Width :" & oDx & "pixcel" & Chr$(10) & "Height :" & oDy & "pixcel", , "画面解像度")
End Sub
Sub oIIF
Dim oAge As Variant
oA_age=20
oB_age=18
oComp_age = IIF(oA_age >= oB_age, "A is older than B", "B is older than A")
msgbox oComp_age
Wait(3000) 'milliseconds
msgbox("3秒待ったでしょ?")
End Sub
Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( Long )
Declare Function CharUpper Lib "user32.dll" Alias "CharUpperA" ( ByVal lpsz As String) As String
Sub oDeclare
Dim nBeepLen As Long
strIn = "i Have Upper and Lower"
strOut = CharUpper(strIn)
Msgbox(strIn & "から" & strOut &"に変換しました。")
nBeepLen =5000
MymessageBeep(nBeepLen)
FreeLibrary("user32.dll")
MsgBox("音が鳴ったでしょ?")
End Sub
Sub MouseListener_mouseReleased( oEvent As com.sun.star.awt.MouseEvent )
Dim blnShift As Boolean
Dim blnCtrl As Boolean
Dim blnAlt As Boolean
Dim strMsg As String
With oEvent
Select Case .Buttons
Case com.sun.star.awt.MouseButton.LEFT
strMsg = "Left Button" & chr(13)
Case com.sun.star.awt.MouseButton.RIGHT
strMsg = "Right Button" & chr(13)
End Select
blnShift = ((.Modifiers And com.sun.star.awt.KeyModifier.SHIFT)= com.sun.star.awt.KeyModifier.SHIFT)
blnCtrl = ((.Modifiers And com.sun.star.awt.KeyModifier.MOD1)= com.sun.star.awt.KeyModifier.MOD1)
blnAlt = ((.Modifiers And com.sun.star.awt.KeyModifier.MOD2)= com.sun.star.awt.KeyModifier.MOD2)
strMsg = strMsg & "Shift(" & CStr(blnShift) & ")" & chr(13) & _
"Ctrl(" & CStr(blnCtrl) & ")" & chr(13) & _
"Alt (" & CStr(blnAlt) & ")"
MsgBox strMsg
End With
End Sub
'~~~~~~~~~~~~~~~~~~~~~~
'blnShift = ((.Modifiers And com.sun.star.awt.KeyModifier.SHIFT)= com.sun.star.awt.KeyModifier.SHIFT)
' ↓下記でもOKです
'blnShift = CBool(.Modifiers And com.sun.star.awt.KeyModifier.SHIFT)
'[ .Buttons ] [ .Modifires ] は以下のイベントリスナーのどれも共通です。
'== Dialog Control ==
'com.sun.star.awt.XMouseListener
'com.sun.star.awt.XMouseMotionListener
'== Sheet ==
'com.sun.star.awt.XMouseClickHandler
'com.sun.star.awt.XEnhancedMouseClickHandler
'== Key Board ==
'com.sun.star.awt.XKeyListener
'(注意点)
'XEnhancedMouseClickHandler には、Modifiers の値が常にゼロで返るというバグのあることが判りました。
つまり、XEnhancedMouseClickHandlerでは Shift/Ctrl/Alt の識別が不可能です。 ( Issue 91439 )
'
'XMouseClickHandler では、oEvent.Source からクリックしたオブジェクトを取得する事ができません
(Source インターフェースはありますが、オブジェクトが設定されません)。
したがって、クリックセルを取得するには Selectionを利用するしか方法がありませんが、pressed 時点では
未だクリックセルにSelection が移動していません(クリック前の選択セルのまま)。
releasedで処理するようにしなければなりません。
尚、[左+Alt] [右+Shift/Ctrl/Alt]ではセルが選択されませんので『 Selection でクリックセルを取得』という
方法が取れません。
'
'XEnhancedMouseClickHandler では oEvent.Target でクリックしたセルが取得できます
( pressed/released 共にクリック前の選択セルではなくクリックしたセルが取得できます)。