Re: How to access UNO_CONSTANTS definitions via OLE/COM? (Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-06-17 Thread Rony G. Flatscher (Apache)

Hi Andrew,

thank you *very* much indeed!

Your code gives much help already to save me a lot of research, so kudos to you! (E.g. from your 
code it is clear that one can use the same code for fetching constant and enum values, which is 
already very helpful per se!)


Will experiment a little bit before proceeding with the nutshell OLE/COM samples. Some abilities are 
not directly available in the context, if a script is run outside of AOO using OLE/COM such as 
GetDefaultContext(), however it is possible to fetch it from the service manager with 
serviceManager.DefaultContext(). Or it would not be possible to reference the enum values for the 
TypeClass in such a handy manner. However, it is very feasible to get at that information (and 
others) one way or the other.


Again, thank you very much!

---rony


On 17.06.2022 15:31, Andrew Pitonyak wrote:

This is how I get the manager using Basic:

Get the type description manager from the default context; see section 10.4 
Context, which also shows how to enumerate all of the singleton objects 
available.
Function GetTypeDescriptionManager()
   Dim sTDMName$  ' Name of the type description manager.
   sTDMName = "/singletons/com.sun.star.reflection.theTypeDescriptionManager"
   GetTypeDescriptionManager() = GetDefaultContext().getValueByName(sTDMName)
End Function

The following method enumerates all “things” in the com.sun.star.awt module.

Sub EnumerateTypesTest
   Dim oTDM      ' Type Description Manager.
   Dim oTDE      ' Type Description Enumerations.
   Dim oTD       ' One Type Description.
   Dim typeArray ' Types for which descriptions are returned.
   Dim s$        ' Utility string variable.
   
   REM All supported types.

   typeArray = Array(com.sun.star.uno.TypeClass.VOID, _
      com.sun.star.uno.TypeClass.CHAR, _
      com.sun.star.uno.TypeClass.BOOLEAN, _
      com.sun.star.uno.TypeClass.BYTE, _
      com.sun.star.uno.TypeClass.SHORT, _
      com.sun.star.uno.TypeClass.UNSIGNED_SHORT, _
      com.sun.star.uno.TypeClass.LONG, _
      com.sun.star.uno.TypeClass.UNSIGNED_LONG, _
      com.sun.star.uno.TypeClass.HYPER, _
      com.sun.star.uno.TypeClass.UNSIGNED_HYPER, _
      com.sun.star.uno.TypeClass.FLOAT, _
      com.sun.star.uno.TypeClass.DOUBLE, _
      com.sun.star.uno.TypeClass.STRING, _
      com.sun.star.uno.TypeClass.TYPE, _
      com.sun.star.uno.TypeClass.ANY, _
      com.sun.star.uno.TypeClass.ENUM, _
      com.sun.star.uno.TypeClass.TYPEDEF, _
      com.sun.star.uno.TypeClass.STRUCT, _
      com.sun.star.uno.TypeClass.UNION, _
      com.sun.star.uno.TypeClass.EXCEPTION, _
      com.sun.star.uno.TypeClass.SEQUENCE, _
      com.sun.star.uno.TypeClass.ARRAY, _
      com.sun.star.uno.TypeClass.INTERFACE, _
      com.sun.star.uno.TypeClass.SERVICE, _
      com.sun.star.uno.TypeClass.MODULE, _
      com.sun.star.uno.TypeClass.INTERFACE_METHOD, _
      com.sun.star.uno.TypeClass.INTERFACE_ATTRIBUTE, _
      com.sun.star.uno.TypeClass.UNKNOWN, _
      com.sun.star.uno.TypeClass.PROPERTY, _
      com.sun.star.uno.TypeClass.CONSTANT, _
      com.sun.star.uno.TypeClass.CONSTANTS, _
      com.sun.star.uno.TypeClass.SINGLETON)

   oTDM = GetTypeDescriptionManager()

   Dim sBaseName$ : sBaseName = "com.sun.star.awt"
   
   ' Change com.sun.star.reflection.TypeDescriptionSearchDepth.ONE

   ' to com.sun.star.reflection.TypeDescriptionSearchDepth.INFINITE
   ' to traverse more than a single level.
   oTDE = oTDM.createTypeDescriptionEnumeration(sBaseName, _
              typeArray, _
              com.sun.star.reflection.TypeDescriptionSearchDepth.ONE)
   
   While oTDE.hasMoreElements()

     oTD = oTDE.nextTypeDescription()
     s$ = s & oTD.Name & CHR$(10)
   Wend
   MsgBox s
End Sub

To get the information on a specific fully qualified type, use the following 
macro (adapted from an example by Bernard Marcelly):

Function GetOOoConst(constString)
   Dim sTDMName$
   Dim oTDM
   
   sTDMName = "/singletons/com.sun.star.reflection.theTypeDescriptionManager"

   oTDM = GetDefaultContext().getValueByName(sTDMName)
   
   If oTDM.hasByHierarchicalName(constString) Then

     GetOOoConst = oTDM.getByHierarchicalName(constString)
   Else
     MsgBox "Unrecognized name : " & constString, 16, "OOo API constant or enum"
   End If
End Function

The method is usable to obtain constant and enumeration values from a text 
string

Print GetOOoConst("com.sun.star.awt.FontSlant.ITALIC")

This can also return an object that describes the type. This can be used to 
enumerate the values and the strings.

Sub EnumerateEnumerations(sName$)
   Dim oTD       ' One Type Description.
   Dim oTDE      ' Element enumeration
   Dim s$        ' Utility string variable.
   Dim sNames
   Dim lValues
   Dim i As Long
   Dim iCount As Integer
   


   oTD = GetOOoConst(sName)
   If IsNull(oTD) OR IsEmpty(oTD) Then
     Exit Sub
   End If
   
   If HasUnoInterfaces(oTD, "com.sun.star.reflection.XEnumTypeDescription") Then
   
     'MsgBox Join( oTD.getEnumNames(), 

Re: How to access UNO_CONSTANTS definitions via OLE/COM? (Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-06-17 Thread Andrew Pitonyak

This is how I get the manager using Basic: 

Get the type description manager from the default context; see section 10.4 
Context, which also shows how to enumerate all of the singleton objects 
available.
Function GetTypeDescriptionManager()
  Dim sTDMName$  ' Name of the type description manager.
  sTDMName = "/singletons/com.sun.star.reflection.theTypeDescriptionManager"
  GetTypeDescriptionManager() = GetDefaultContext().getValueByName(sTDMName) 
End Function

The following method enumerates all “things” in the com.sun.star.awt module.

Sub EnumerateTypesTest
  Dim oTDM      ' Type Description Manager.
  Dim oTDE      ' Type Description Enumerations.
  Dim oTD       ' One Type Description.
  Dim typeArray ' Types for which descriptions are returned.
  Dim s$        ' Utility string variable.
  
  REM All supported types.
  typeArray = Array(com.sun.star.uno.TypeClass.VOID, _
     com.sun.star.uno.TypeClass.CHAR, _
     com.sun.star.uno.TypeClass.BOOLEAN, _
     com.sun.star.uno.TypeClass.BYTE, _
     com.sun.star.uno.TypeClass.SHORT, _
     com.sun.star.uno.TypeClass.UNSIGNED_SHORT, _
     com.sun.star.uno.TypeClass.LONG, _
     com.sun.star.uno.TypeClass.UNSIGNED_LONG, _
     com.sun.star.uno.TypeClass.HYPER, _
     com.sun.star.uno.TypeClass.UNSIGNED_HYPER, _
     com.sun.star.uno.TypeClass.FLOAT, _
     com.sun.star.uno.TypeClass.DOUBLE, _
     com.sun.star.uno.TypeClass.STRING, _
     com.sun.star.uno.TypeClass.TYPE, _
     com.sun.star.uno.TypeClass.ANY, _
     com.sun.star.uno.TypeClass.ENUM, _
     com.sun.star.uno.TypeClass.TYPEDEF, _
     com.sun.star.uno.TypeClass.STRUCT, _
     com.sun.star.uno.TypeClass.UNION, _
     com.sun.star.uno.TypeClass.EXCEPTION, _
     com.sun.star.uno.TypeClass.SEQUENCE, _
     com.sun.star.uno.TypeClass.ARRAY, _
     com.sun.star.uno.TypeClass.INTERFACE, _
     com.sun.star.uno.TypeClass.SERVICE, _
     com.sun.star.uno.TypeClass.MODULE, _
     com.sun.star.uno.TypeClass.INTERFACE_METHOD, _
     com.sun.star.uno.TypeClass.INTERFACE_ATTRIBUTE, _
     com.sun.star.uno.TypeClass.UNKNOWN, _
     com.sun.star.uno.TypeClass.PROPERTY, _
     com.sun.star.uno.TypeClass.CONSTANT, _
     com.sun.star.uno.TypeClass.CONSTANTS, _
     com.sun.star.uno.TypeClass.SINGLETON)

  oTDM = GetTypeDescriptionManager()

  Dim sBaseName$ : sBaseName = "com.sun.star.awt"
  
  ' Change com.sun.star.reflection.TypeDescriptionSearchDepth.ONE
  ' to com.sun.star.reflection.TypeDescriptionSearchDepth.INFINITE
  ' to traverse more than a single level.
  oTDE = oTDM.createTypeDescriptionEnumeration(sBaseName, _
             typeArray, _
             com.sun.star.reflection.TypeDescriptionSearchDepth.ONE)
  
  While oTDE.hasMoreElements()
    oTD = oTDE.nextTypeDescription()
    s$ = s & oTD.Name & CHR$(10)
  Wend
  MsgBox s
End Sub

To get the information on a specific fully qualified type, use the following 
macro (adapted from an example by Bernard Marcelly):

Function GetOOoConst(constString)
  Dim sTDMName$
  Dim oTDM
  
  sTDMName = "/singletons/com.sun.star.reflection.theTypeDescriptionManager"
  oTDM = GetDefaultContext().getValueByName(sTDMName) 
  
  If oTDM.hasByHierarchicalName(constString) Then 
    GetOOoConst = oTDM.getByHierarchicalName(constString) 
  Else 
    MsgBox "Unrecognized name : " & constString, 16, "OOo API constant or enum" 
  End If 
End Function

The method is usable to obtain constant and enumeration values from a text 
string

Print GetOOoConst("com.sun.star.awt.FontSlant.ITALIC")

This can also return an object that describes the type. This can be used to 
enumerate the values and the strings.

Sub EnumerateEnumerations(sName$)
  Dim oTD       ' One Type Description.
  Dim oTDE      ' Element enumeration
  Dim s$        ' Utility string variable.
  Dim sNames
  Dim lValues
  Dim i As Long
  Dim iCount As Integer
  

  oTD = GetOOoConst(sName)
  If IsNull(oTD) OR IsEmpty(oTD) Then
    Exit Sub
  End If
  
  If HasUnoInterfaces(oTD, "com.sun.star.reflection.XEnumTypeDescription") Then
  
    'MsgBox Join( oTD.getEnumNames(), CHR$(10))
    sNames = oTD.getEnumNames()
    lValues = otd.getEnumValues()
    For i = LBound(sNames) To UBound(sNames)
      iCount = iCount + 1
      If (iCount > 40) Then
        MsgBox(s)
        s = ""
      End If
      s = s & lValues(i) & CHR$(9) & sNames(i) & CHR$(10)
    Next
  ElseIf HasUnoInterfaces(oTD, 
"com.sun.star.reflection.XConstantsTypeDescription") Then
    lValues = oTD.getConstants()
    For i = LBound(lValues) To UBound(lValues)
      iCount = iCount + 1
      If (iCount > 40) Then
        MsgBox(s)
        s = ""
      End If
      s = s & lValues(i).getConstantValue() & CHR$(9) & lValues(i).getName() & 
CHR$(10)
    Next
  Else
    'Inspect oTD
    MsgBox "Unsupported type " & sName
    Exit Sub
  End If
  MsgBox s
End Sub

This can be used to see enumerations.

EnumerateEnumerations("com.sun.star.awt.FontSlant")  

This can be used to see constant groups.

EnumerateEnumerations("com.sun.star.awt.FontWeight")  


Re: How to access UNO_CONSTANTS definitions via OLE/COM? (Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-06-17 Thread Rony G. Flatscher (Apache)
OK, it is possible using "/singletons/com.sun.star.reflection.theTypeDescriptionManager". (Will have 
to look further into it to maybe use it also for UNO_ENUM and the like.)


---rony


On 17.06.2022 12:46, Rony G. Flatscher wrote:

In the process of creating a few nutshell examples using OLE/COM.

One open problem is how to get to the UNO_CONSTANTS via the OLE/COM bridge. Here a snippet and its 
output (the tilde is the message operator in ooRexx and could be replaced by a dot for JScript and 
the like; .nil is the singleton object with the string value "The NIL object" to represent null):


   factory    = .OLEObject~new('com.sun.star.ServiceManager')
   coreReflection = 
factory~createInstance("com.sun.star.reflection.CoreReflection")

   clzName="com.sun.star.table.CellHoriJustify"
   say clzName":" "(UNO_ENUM)"
   type=coreReflection~forName(clzName)
   say "type:" type "type~getName:" type~getname "(forName)"
   do f over type~getFields   -- iterate over all fields
   say f~getName":" f~get(.nil)   -- show name and get the value
   end
   say
   type=coreReflection~getType(clzName)
   say "type:" type "type~getName:" type~getname "(getType)"

   say "-"~copies(79)
   say
   clzName="com.sun.star.awt.FontWeight"
   say clzName":" "(UNO_CONSTANTS)"
   type=coreReflection~forName(clzName)
   say "type:" type "(forName)"
   say
   type=coreReflection~getType(clzName)
   say "type:" type "type~getName:" type~getname "(getType)"

The output is:

   com.sun.star.table.CellHoriJustify: (UNO_ENUM)
   type: an OLEObject type~getName: com.sun.star.table.CellHoriJustify (forName)
   STANDARD: 0
   LEFT: 1
   CENTER: 2
   RIGHT: 3
   BLOCK: 4
   REPEAT: 5

   type: an OLEObject type~getName: string (getType)
---

   com.sun.star.awt.FontWeight: (UNO_CONSTANTS)
   type: The NIL object (forName)

   type: an OLEObject type~getName: string (getType)

So using CoreReflection does not allow one to reflect UNO_CONSTANTS (forName() 
returns null).

Using getType() will return "string" for both, UNO_ENUM and UNO_CONSTANTS.

---

Would anyone have an idea how to use OLE/COM to get at the fields and values for UNO_CONSTANTS 
like FontWeight (getting the UNO_CONSTANT value for BOLD other than manually via 
)?


---rony

P.S.: In the process of creating OLE/COM nutshell examples for scalc, swriter and simpress. 



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



How to access UNO_CONSTANTS definitions via OLE/COM? (Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-06-17 Thread Rony G. Flatscher

In the process of creating a few nutshell examples using OLE/COM.

One open problem is how to get to the UNO_CONSTANTS via the OLE/COM bridge. Here a snippet and its 
output (the tilde is the message operator in ooRexx and could be replaced by a dot for JScript and 
the like; .nil is the singleton object with the string value "The NIL object" to represent null):


   factory= .OLEObject~new('com.sun.star.ServiceManager')
   coreReflection = 
factory~createInstance("com.sun.star.reflection.CoreReflection")

   clzName="com.sun.star.table.CellHoriJustify"
   say clzName":" "(UNO_ENUM)"
   type=coreReflection~forName(clzName)
   say "type:" type "type~getName:" type~getname "(forName)"
   do f over type~getFields   -- iterate over all fields
   say f~getName":" f~get(.nil)   -- show name and get the value
   end
   say
   type=coreReflection~getType(clzName)
   say "type:" type "type~getName:" type~getname "(getType)"

   say "-"~copies(79)
   say
   clzName="com.sun.star.awt.FontWeight"
   say clzName":" "(UNO_CONSTANTS)"
   type=coreReflection~forName(clzName)
   say "type:" type "(forName)"
   say
   type=coreReflection~getType(clzName)
   say "type:" type "type~getName:" type~getname "(getType)"

The output is:

   com.sun.star.table.CellHoriJustify: (UNO_ENUM)
   type: an OLEObject type~getName: com.sun.star.table.CellHoriJustify (forName)
   STANDARD: 0
   LEFT: 1
   CENTER: 2
   RIGHT: 3
   BLOCK: 4
   REPEAT: 5

   type: an OLEObject type~getName: string (getType)
   
---

   com.sun.star.awt.FontWeight: (UNO_CONSTANTS)
   type: The NIL object (forName)

   type: an OLEObject type~getName: string (getType)

So using CoreReflection does not allow one to reflect UNO_CONSTANTS (forName() 
returns null).

Using getType() will return "string" for both, UNO_ENUM and UNO_CONSTANTS.

---

Would anyone have an idea how to use OLE/COM to get at the fields and values for UNO_CONSTANTS like 
FontWeight (getting the UNO_CONSTANT value for BOLD other than manually via 
)?


---rony

P.S.: In the process of creating OLE/COM nutshell examples for scalc, swriter 
and simpress.



Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-05-10 Thread Rony G. Flatscher (Apache)

Hi Carl,

On 07.05.2022 19:40, Carl Marcum wrote:

Hi Rony,

On 5/5/22 6:31 AM, Rony G. Flatscher (Apache) wrote:

Curious about the Windows version of AOO and its support via OLE/COM:

 * What are the ProgIds to use to automate AOO? Found the following ones with "office", "star" in 
them:


   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex office
   #  415/2226: ProgId: [Dropbox.OfficeAddIn]
   #  815/2226: ProgId: [Lync.UCOfficeIntegration]
   #  918/2226: ProgId: [Microsoft.Office.List.OLEDB]
   # 1193/2226: ProgId: [OcOffice.FormRegionContext]
   # 1194/2226: ProgId: [OcOffice.OcForms]
   # 1195/2226: ProgId: [OcOffice.OneNoteHelper]
   # 1196/2226: ProgId: [Office.awsdc]
   # 1197/2226: ProgId: [Office.LocalSyncClient]
   # 1198/2226: ProgId: [OfficeCompatible.Application.x86]
   # 1199/2226: ProgId: [OfficeTheme]
   # 1278/2226: ProgId: [PDFMaker.OfficeAddin]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]
   # 1928/2226: ProgId: [TFCOfficeShim.Connect]
   # 1929/2226: ProgId: [TFCOfficeShim.ControlHost.14]
   # 1930/2226: ProgId: [TFCOfficeShim.GetAddIn]

   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex star
   #  175/2226: ProgId: [bhWM2Core.ctlServerStartscreen]
   #  179/2226: ProgId: [bhWM2Core.ctlStartscreen]
   #  319/2226: ProgId: [com.sun.star.ServiceManager]
   #  772/2226: ProgId: [JavaWebStart.isInstalled]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]

   Trying to get at the published interfaces for e.g. 
"soffice.StarWriterDocument.6" does not
   return any published methods, properties, events and constants as is the 
case with MS Office. So
   wondering whether there are other ProgIDs for AOO on Windows registered that 
one should use
   instead? (Usually there are version independent ProgIDs which seems to not 
be the case here.)

 * Is there an AOO typelib available that would supply the published interfaces 
usable via OLE? If
   so what would be the name and how would one install them?

---rony




This may not be what you're looking for but I found this about an OLE bridge 
[1].
From the spec...
"The bridge is automatically used when someone access the Office through the COM mechanism. This 
is done by creating the service manager component, that has the ProgId 
"com.sun.star.ServiceManager". The service manager can then be used to create additional UNO 
services. There is no explicit mapping from COM to UNO or vice versa necessary. All objects which 
have been obtained directly or indirectly from the service manager are already COM objects. "


[1] https://www.openoffice.org/udk/common/man/spec/ole_bridge.html

Best regards,
Carl



After reading through the documentation it is clear that (as impressive as the COM/UNO integration 
is!) no type information gets published via OLE, cf. 
:


   9 Limitations of the dispatch objects

   The dispatch objects provided by the bridge do not support type information.
   IDispatch::GetTypeInfoCount and IDispatch::GetTypeInfo return E_NOTIMPL. 
Moreover there are no
   COM type libraries available and the dispatch objects do not implement 
IProvideClassInfo as well.

   IDispatch::GetIDsOfName has to be called for every name separately. That 
this one cannot query
   the ids for several names at a time.

   IDispatch::Invoke does not support named arguments nor the pExcepInfo and 
puArgErr parameter.

---

Not sure whether attachments get stripped on this mailing list or not. But if the attachments get 
through you will see how an OLE/COM object that publishes its interfaces can get exploited to create 
on-the-fly documentation that is meant for helping programmers. The documentation in this case is 
for the MS Internet Explorer (but Excel, Word, PowerPoint, Outlook, AutoCAD, etc. would work as 
well). It would have been great if the same would have been possible for AOO!


Again, thank you for researching and your link that is very interesting!

Best regards

---rony



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-05-09 Thread Rony G. Flatscher (Apache)

Hi Carl,

On 07.05.2022 19:40, Carl Marcum wrote:

On 5/5/22 6:31 AM, Rony G. Flatscher (Apache) wrote:

Curious about the Windows version of AOO and its support via OLE/COM:

 * What are the ProgIds to use to automate AOO? Found the following ones with "office", "star" in 
them:


... cut ...

   Trying to get at the published interfaces for e.g. 
"soffice.StarWriterDocument.6" does not

   return any published methods, properties, events and constants as is the 
case with MS Office. So
   wondering whether there are other ProgIDs for AOO on Windows registered that 
one should use
   instead? (Usually there are version independent ProgIDs which seems to not 
be the case here.)

 * Is there an AOO typelib available that would supply the published interfaces 
usable via OLE? If
   so what would be the name and how would one install them?

... cut ..

This may not be what you're looking for but I found this about an OLE bridge 
[1].
From the spec...
"The bridge is automatically used when someone access the Office through the COM mechanism. This 
is done by creating the service manager component, that has the ProgId 
"com.sun.star.ServiceManager". The service manager can then be used to create additional UNO 
services. There is no explicit mapping from COM to UNO or vice versa necessary. All objects which 
have been obtained directly or indirectly from the service manager are already COM objects. "


[1] https://www.openoffice.org/udk/common/man/spec/ole_bridge.html


Thank you very  much for these pointers, will have to digest them, which will 
take a while ...

Best regards

---rony



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Windows version: ProgIDs and typelibs for OLE/COM ?

2022-05-07 Thread Carl Marcum

Hi Rony,

On 5/5/22 6:31 AM, Rony G. Flatscher (Apache) wrote:

Curious about the Windows version of AOO and its support via OLE/COM:

 * What are the ProgIds to use to automate AOO? Found the following 
ones with "office", "star" in them:


   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex office
   #  415/2226: ProgId: [Dropbox.OfficeAddIn]
   #  815/2226: ProgId: [Lync.UCOfficeIntegration]
   #  918/2226: ProgId: [Microsoft.Office.List.OLEDB]
   # 1193/2226: ProgId: [OcOffice.FormRegionContext]
   # 1194/2226: ProgId: [OcOffice.OcForms]
   # 1195/2226: ProgId: [OcOffice.OneNoteHelper]
   # 1196/2226: ProgId: [Office.awsdc]
   # 1197/2226: ProgId: [Office.LocalSyncClient]
   # 1198/2226: ProgId: [OfficeCompatible.Application.x86]
   # 1199/2226: ProgId: [OfficeTheme]
   # 1278/2226: ProgId: [PDFMaker.OfficeAddin]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]
   # 1928/2226: ProgId: [TFCOfficeShim.Connect]
   # 1929/2226: ProgId: [TFCOfficeShim.ControlHost.14]
   # 1930/2226: ProgId: [TFCOfficeShim.GetAddIn]

   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex star
   #  175/2226: ProgId: [bhWM2Core.ctlServerStartscreen]
   #  179/2226: ProgId: [bhWM2Core.ctlStartscreen]
   #  319/2226: ProgId: [com.sun.star.ServiceManager]
   #  772/2226: ProgId: [JavaWebStart.isInstalled]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]

   Trying to get at the published interfaces for e.g. 
"soffice.StarWriterDocument.6" does not
   return any published methods, properties, events and constants as 
is the case with MS Office. So
   wondering whether there are other ProgIDs for AOO on Windows 
registered that one should use
   instead? (Usually there are version independent ProgIDs which seems 
to not be the case here.)


 * Is there an AOO typelib available that would supply the published 
interfaces usable via OLE? If

   so what would be the name and how would one install them?

---rony




This may not be what you're looking for but I found this about an OLE 
bridge [1].

From the spec...
"The bridge is automatically used when someone access the Office through 
the COM mechanism. This is done by creating the service manager 
component, that has the ProgId "com.sun.star.ServiceManager". The 
service manager can then be used to create additional UNO services. 
There is no explicit mapping from COM to UNO or vice versa necessary. 
All objects which have been obtained directly or indirectly from the 
service manager are already COM objects. "


[1] https://www.openoffice.org/udk/common/man/spec/ole_bridge.html

Best regards,
Carl


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Windows version: ProgIDs and typelibs for OLE/COM ?

2022-05-05 Thread Rony G. Flatscher (Apache)

Curious about the Windows version of AOO and its support via OLE/COM:

 * What are the ProgIds to use to automate AOO? Found the following ones with "office", 
"star" in them:

   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex office
   #  415/2226: ProgId: [Dropbox.OfficeAddIn]
   #  815/2226: ProgId: [Lync.UCOfficeIntegration]
   #  918/2226: ProgId: [Microsoft.Office.List.OLEDB]
   # 1193/2226: ProgId: [OcOffice.FormRegionContext]
   # 1194/2226: ProgId: [OcOffice.OcForms]
   # 1195/2226: ProgId: [OcOffice.OneNoteHelper]
   # 1196/2226: ProgId: [Office.awsdc]
   # 1197/2226: ProgId: [Office.LocalSyncClient]
   # 1198/2226: ProgId: [OfficeCompatible.Application.x86]
   # 1199/2226: ProgId: [OfficeTheme]
   # 1278/2226: ProgId: [PDFMaker.OfficeAddin]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]
   # 1928/2226: ProgId: [TFCOfficeShim.Connect]
   # 1929/2226: ProgId: [TFCOfficeShim.ControlHost.14]
   # 1930/2226: ProgId: [TFCOfficeShim.GetAddIn]

   G:\tmp\orx\ole\oleinfo\work>listProgIds.rex star
   #  175/2226: ProgId: [bhWM2Core.ctlServerStartscreen]
   #  179/2226: ProgId: [bhWM2Core.ctlStartscreen]
   #  319/2226: ProgId: [com.sun.star.ServiceManager]
   #  772/2226: ProgId: [JavaWebStart.isInstalled]
   # 1560/2226: ProgId: [soffice.StarCalcDocument.6]
   # 1561/2226: ProgId: [soffice.StarDrawDocument.6]
   # 1562/2226: ProgId: [soffice.StarImpressDocument.6]
   # 1563/2226: ProgId: [soffice.StarMathDocument.6]
   # 1564/2226: ProgId: [soffice.StarWriterDocument.6]

   Trying to get at the published interfaces for e.g. 
"soffice.StarWriterDocument.6" does not
   return any published methods, properties, events and constants as is the 
case with MS Office. So
   wondering whether there are other ProgIDs for AOO on Windows registered that 
one should use
   instead? (Usually there are version independent ProgIDs which seems to not 
be the case here.)

 * Is there an AOO typelib available that would supply the published interfaces 
usable via OLE? If
   so what would be the name and how would one install them?

---rony