https://bugs.documentfoundation.org/show_bug.cgi?id=173114

            Bug ID: 173114
           Summary: Pyuno can’t use services that implement XInvocation
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: sdk
          Assignee: [email protected]
          Reporter: [email protected]

Description:
If an UNO object implements XInvocation then the Invocation service will
directly return the object’s XInvocation implementation instead of making its
own wrapper. pyuno assumes all XInvocation wrappers also implement XInvocation2
which is not the case for a lot of services. This makes it just throw an
exception whenever one of these objects is encountered. It also assumes that
XIntrospection::getIntrospection returns a valid reference but a lot of
services just return null for this.

Steps to Reproduce:
1. Create a new calc document
2. Create the following Python macro:

def fill_selection():
    ctx = XSCRIPTCONTEXT.getComponentContext()
    app =
ctx.getServiceManager().createInstanceWithContext("ooo.vba.excel.Application",
ctx)
    app.Selection.Value = "x"

3. Select a range in the spreadsheet
4. Run the macro

Actual Results:
A dialog box pops up complaining about a RuntimeException for an unsatisfied
query of the XInvocation2 interface.

Expected Results:
The cells of the selection should be filled with x’s.


Reproducible: Always


User Profile Reset: No

Additional Info:
I made a patch series for this here:

https://gerrit.libreoffice.org/c/core/+/209087/

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to