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

            Bug ID: 173293
           Summary: The Calc VBA Application API can’t be accessed from
                    Python
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

The ooo.vba.excel.Application service (and others) can’t be used from Python.
It implements XInvocation which makes the the css.script.Invocation service use
that directly to query what methods it has instead of getting an
XIntrospectionAccess object via the css.beans.Introspection service. The
implementation of XInvocation only advertises the dynamic methods from
WorksheetFunction so the other methods in the ooo.vba.excel.XApplication
interface can’t be used. This is a shame because it has some nice features.

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 an AttributeError for the Selection
attribute.

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

This is a follow-up from tdf#173114. The bug it described has been fixed but
the example to reproduce it still doesn’t work because of this extra problem.

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

Reply via email to