summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/a11y/aqua11yselectionwrapper.mm')
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm25
1 files changed, 14 insertions, 11 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 53ab6dd36128..804cf108dba8 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@ -40,20 +40,23 @@ using namespace ::com::sun::star::uno;
+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
{
Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
-
- try {
- sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
- for ( sal_Int32 i=0 ; i < n ; ++i ) {
- [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ if( xAccessibleSelection.is() )
+ {
+ NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
+ try {
+ sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
+ for ( sal_Int32 i=0 ; i < n ; ++i ) {
+ [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ }
+
+ return children;
+
+ } catch ( Exception& e)
+ {
}
-
- return children;
-
- } catch ( Exception& e) {
- return nil;
}
+ return nil;
}