Hi Damjan

Excellent news!

If I understood correctly all these changes are included in a Python script 
file so this fix can be merged to trunk and cherry picked to both branch 41X 
and 42X?

Best,
Pedro

> On 04/25/2026 4:32 PM WEST Damjan Jovanovic <[email protected]> wrote:
> 
>  
> On Fri, Apr 24, 2026 at 6:03 AM Damjan Jovanovic <[email protected]> wrote:
> 
> >
> > A number of issues however were discovered:
> > - All macro operations (creating, renaming, deleting) give false errors
> > saying they failed, but actually succeed, you need to close and re-open the
> > macro dialog to see the changes. I suspect this is a bug in the Python UNO
> > bridge.
> > - Creating libraries inside documents is completely broken on Windows, the
> > UI buttons stay greyed out. This is some kind of a permission issue when
> > calling isReadOnly() on the SimpleFileAccess interface for the document.
> >
> 
> This is fully fixed now. All library and macro operations (creating,
> renaming, deleting) fully work everywhere, including on Windows.
> 
> The problem with the false error has that an UNO IDL function with this
> definition:
> (
> https://www.openoffice.org/api/docs/common/ref/com/sun/star/script/XInvocation.html#invoke
> )
> any
> *invoke*( [in] string  aFunctionName,
> 
> [in] sequence< any >  aParams,
> 
> [out] sequence< short >  aOutParamIndex,
> 
> [out] sequence< any >  aOutParam )
> normally compiles into a programming language function taking 4 parameters
> and returning the "any".
> But on Python, the "[out]" parameters are passed as None, and need to be
> returned as a tuple, so the Python function:
> 
> def invoke( self, name, params, outparamindex, outparams ):
> 
> needs to return a tuple of 3 values: the "any" return value, the
> aOutParamIndex, and the aOutParam. This wasn't being done, either
> previously in that code, or with the new invoke() methods I added. When I
> added it in, the error disappeared.
> 
> (That gotcha is documented
> on https://www.openoffice.org/udk/python/python-bridge.html)
> 
> As for isReadOnly() on the SimpleFileAccess interface failing, I changed it
> to only run on the child nodes of the root node, and always allow the root
> node to create, like is done by the "user" and "share" sources as well.
> 
> My changes have been pushed to the python-editing-embedding branch.
> 
> After some cleanups, and a way to edit Python macros, that branch should be
> ready to merge :-).
> 
> Regards
> Damjan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to