diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /vcl/osx/a11yactionwrapper.mm | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vcl/osx/a11yactionwrapper.mm')
-rw-r--r-- | vcl/osx/a11yactionwrapper.mm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/osx/a11yactionwrapper.mm b/vcl/osx/a11yactionwrapper.mm index 9bea25c119..f9c5089a19 100644 --- a/vcl/osx/a11yactionwrapper.mm +++ b/vcl/osx/a11yactionwrapper.mm @@ -55,16 +55,22 @@ NSMutableArray * actionNames = [ [ NSMutableArray alloc ] init ]; if ( [ wrapper accessibleAction ] ) { for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) { - [ actionNames addObject: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ]; + // Related tdf#158914: explicitly call autorelease selector + // CreateNSString() is not a getter. It expects the caller to + // release the returned string. + [ actionNames addObject: [ AquaA11yActionWrapper nativeActionNameFor: [ CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) autorelease ] ] ]; } } - return actionNames; + return [actionNames autorelease]; } +(void)doAction:(NSString *)action ofElement:(AquaA11yWrapper *)wrapper { if ( [ wrapper accessibleAction ] ) { for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) { - if ( [ action isEqualToString: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ] ) { + // Related tdf#158914: explicitly call autorelease selector + // CreateNSString() is not a getter. It expects the caller to + // release the returned string. + if ( [ action isEqualToString: [ AquaA11yActionWrapper nativeActionNameFor: [ CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) autorelease ] ] ] ) { [ wrapper accessibleAction ] -> doAccessibleAction ( cnt ); break; } |