summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/a11y')
-rw-r--r--vcl/aqua/source/a11y/aqua11yactionwrapper.h44
-rw-r--r--vcl/aqua/source/a11y/aqua11yactionwrapper.mm87
-rw-r--r--vcl/aqua/source/a11y/aqua11ycomponentwrapper.h48
-rw-r--r--vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm113
-rw-r--r--vcl/aqua/source/a11y/aqua11yfactory.mm203
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocuslistener.cxx121
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocuslistener.hxx63
-rw-r--r--vcl/aqua/source/a11y/aqua11yfocustracker.cxx282
-rw-r--r--vcl/aqua/source/a11y/aqua11ylistener.cxx162
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.h45
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.mm281
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.h46
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm99
-rw-r--r--vcl/aqua/source/a11y/aqua11ytablewrapper.h47
-rw-r--r--vcl/aqua/source/a11y/aqua11ytablewrapper.mm215
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h41
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm259
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextwrapper.h67
-rw-r--r--vcl/aqua/source/a11y/aqua11ytextwrapper.mm304
-rw-r--r--vcl/aqua/source/a11y/aqua11yutil.h41
-rw-r--r--vcl/aqua/source/a11y/aqua11yutil.mm57
-rw-r--r--vcl/aqua/source/a11y/aqua11yvaluewrapper.h49
-rw-r--r--vcl/aqua/source/a11y/aqua11yvaluewrapper.mm98
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapper.mm1150
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperbutton.h44
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperbutton.mm65
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercheckbox.h44
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm69
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercombobox.h53
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappercombobox.mm166
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappergroup.h43
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappergroup.mm60
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperlist.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperlist.mm51
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h44
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm68
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm51
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperrow.h43
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperrow.mm60
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h44
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm88
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm54
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappersplitter.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappersplitter.mm51
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperstatictext.h43
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm59
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertabgroup.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm53
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertextarea.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertextarea.mm51
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertoolbar.h42
-rw-r--r--vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm53
-rw-r--r--vcl/aqua/source/a11y/documentfocuslistener.cxx250
-rw-r--r--vcl/aqua/source/a11y/documentfocuslistener.hxx100
-rw-r--r--vcl/aqua/source/a11y/readme.txt8
57 files changed, 0 insertions, 5931 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yactionwrapper.h b/vcl/aqua/source/a11y/aqua11yactionwrapper.h
deleted file mode 100644
index 15071fce57..0000000000
--- a/vcl/aqua/source/a11y/aqua11yactionwrapper.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11ACTIONWRAPPER_H
-#define _SV_AQUA11ACTIONWRAPPER_H
-
-#include "aqua/aquavcltypes.h"
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yActionWrapper : NSObject
-{
-}
-+(NSArray *)actionNamesForElement:(AquaA11yWrapper *)wrapper;
-+(void)doAction:(NSString *)action ofElement:(AquaA11yWrapper *)wrapper;
-@end
-
-#endif // _SV_AQUA11ACTIONWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yactionwrapper.mm b/vcl/aqua/source/a11y/aqua11yactionwrapper.mm
deleted file mode 100644
index d0f8ca91c7..0000000000
--- a/vcl/aqua/source/a11y/aqua11yactionwrapper.mm
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11yactionwrapper.h"
-
-// Wrapper for XAccessibleAction
-
-@implementation AquaA11yActionWrapper : NSObject
-
-+(NSString *)nativeActionNameFor:(NSString *)actionName {
- // TODO: Optimize ?
- // Use NSAccessibilityActionDescription
- if ( [ actionName isEqualToString: @"click" ] ) {
- return NSAccessibilityPressAction;
- } else if ( [ actionName isEqualToString: @"togglePopup" ] ) {
- return NSAccessibilityShowMenuAction;
- } else if ( [ actionName isEqualToString: @"select" ] ) {
- return NSAccessibilityPickAction;
- } else if ( [ actionName isEqualToString: @"incrementLine" ] ) {
- return NSAccessibilityIncrementAction;
- } else if ( [ actionName isEqualToString: @"decrementLine" ] ) {
- return NSAccessibilityDecrementAction;
- } else if ( [ actionName isEqualToString: @"incrementBlock" ] ) {
- return NSAccessibilityIncrementAction; // TODO ?
- } else if ( [ actionName isEqualToString: @"decrementBlock" ] ) {
- return NSAccessibilityDecrementAction; // TODO ?
- } else if ( [ actionName isEqualToString: @"Browse" ] ) {
- return NSAccessibilityPressAction; // TODO ?
- } else {
- return [ NSString string ];
- }
-}
-
-+(NSArray *)actionNamesForElement:(AquaA11yWrapper *)wrapper {
- NSMutableArray * actionNames = [ [ NSMutableArray alloc ] init ];
- if ( [ wrapper accessibleAction ] != nil ) {
- for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) {
- [ actionNames addObject: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ];
- }
- }
- return actionNames;
-}
-
-+(void)doAction:(NSString *)action ofElement:(AquaA11yWrapper *)wrapper {
- if ( [ wrapper accessibleAction ] != nil ) {
- for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) {
- if ( [ action isEqualToString: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ] ) {
- [ wrapper accessibleAction ] -> doAccessibleAction ( cnt );
- break;
- }
- }
- }
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
deleted file mode 100644
index 7b275f08eb..0000000000
--- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11COMPONENTWRAPPER_H
-#define _SV_AQUA11COMPONENTWRAPPER_H
-
-#include "aqua/aquavcltypes.h"
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yComponentWrapper : NSObject
-{
-}
-+(id)sizeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)positionAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)descriptionAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setFocusedAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-@end
-
-#endif // _SV_AQUA11COMPONENTWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm b/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm
deleted file mode 100644
index 0f50dad02c..0000000000
--- a/vcl/aqua/source/a11y/aqua11ycomponentwrapper.mm
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua11ycomponentwrapper.h"
-#include "aqua11yrolehelper.h"
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::uno;
-
-// Wrapper for XAccessibleComponent and XAccessibleExtendedComponent
-
-@implementation AquaA11yComponentWrapper : NSObject
-
-+(id)sizeAttributeForElement:(AquaA11yWrapper *)wrapper {
- Size size = [ wrapper accessibleComponent ] -> getSize();
- NSSize nsSize = NSMakeSize ( (float) size.Width, (float) size.Height );
- return [ NSValue valueWithSize: nsSize ];
-}
-
-// TODO: should be merged with AquaSalFrame::VCLToCocoa... to a general helper method
-+(id)positionAttributeForElement:(AquaA11yWrapper *)wrapper {
- // VCL coordinates are in upper-left-notation, Cocoa likes it the Cartesian way (lower-left)
- NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- Size size = [ wrapper accessibleComponent ] -> getSize();
- Point location = [ wrapper accessibleComponent ] -> getLocationOnScreen();
- NSPoint nsPoint = NSMakePoint ( (float) location.X, (float) ( screenRect.size.height - size.Height - location.Y ) );
- return [ NSValue valueWithPoint: nsPoint ];
-}
-
-+(id)descriptionAttributeForElement:(AquaA11yWrapper *)wrapper {
- if ( [ wrapper accessibleExtendedComponent ] != nil ) {
- return CreateNSString ( [ wrapper accessibleExtendedComponent ] -> getToolTipText() );
- } else {
- return nil;
- }
-}
-
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames {
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- [ attributeNames addObjectsFromArray: [ NSArray arrayWithObjects:
- NSAccessibilitySizeAttribute,
- NSAccessibilityPositionAttribute,
- NSAccessibilityFocusedAttribute,
- NSAccessibilityEnabledAttribute,
- nil ] ];
- [ pool release ];
-}
-
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- BOOL isSettable = NO;
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- if ( [ attribute isEqualToString: NSAccessibilityFocusedAttribute ]
- && ! [ [ AquaA11yRoleHelper getNativeRoleFrom: [ wrapper accessibleContext ] ] isEqualToString: NSAccessibilityScrollBarRole ]
- && ! [ [ AquaA11yRoleHelper getNativeRoleFrom: [ wrapper accessibleContext ] ] isEqualToString: NSAccessibilityStaticTextRole ] ) {
- isSettable = YES;
- }
- [ pool release ];
- return isSettable;
-}
-
-+(void)setFocusedAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value {
- if ( [ value boolValue ] == YES ) {
- if ( [ wrapper accessibleContext ] -> getAccessibleRole() == AccessibleRole::COMBO_BOX ) {
- // special treatment for comboboxes: find the corresponding PANEL and set focus to it
- Reference < XAccessible > rxParent = [ wrapper accessibleContext ] -> getAccessibleParent();
- if ( rxParent.is() ) {
- Reference < XAccessibleContext > rxContext = rxParent->getAccessibleContext();
- if ( rxContext.is() && rxContext -> getAccessibleRole() == AccessibleRole::PANEL ) {
- Reference < XAccessibleComponent > rxComponent = Reference < XAccessibleComponent > ( rxParent -> getAccessibleContext(), UNO_QUERY );
- if ( rxComponent.is() ) {
- rxComponent -> grabFocus();
- }
- }
- }
- } else {
- [ wrapper accessibleComponent ] -> grabFocus();
- }
- }
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm
deleted file mode 100644
index 944a8e9ea9..0000000000
--- a/vcl/aqua/source/a11y/aqua11yfactory.mm
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua/aqua11yfactory.h"
-#include "aqua/aqua11yfocustracker.hxx"
-
-#include "aqua11yfocuslistener.hxx"
-#include "aqua11yrolehelper.h"
-#include "aqua11ywrapperbutton.h"
-#include "aqua11ywrapperstatictext.h"
-#include "aqua11ywrappertextarea.h"
-#include "aqua11ywrappercheckbox.h"
-#include "aqua11ywrappercombobox.h"
-#include "aqua11ywrappergroup.h"
-#include "aqua11ywrapperlist.h"
-#include "aqua11ywrapperradiobutton.h"
-#include "aqua11ywrapperradiogroup.h"
-#include "aqua11ywrapperrow.h"
-#include "aqua11ywrapperscrollarea.h"
-#include "aqua11ywrapperscrollbar.h"
-#include "aqua11ywrappersplitter.h"
-#include "aqua11ywrappertabgroup.h"
-#include "aqua11ywrappertoolbar.h"
-#include "aqua11ytablewrapper.h"
-
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-static bool enabled = false;
-
-@implementation AquaA11yFactory : NSObject
-
-#pragma mark -
-#pragma mark Wrapper Repository
-
-+(NSMutableDictionary *)allWrapper {
- static NSMutableDictionary * mdAllWrapper = nil;
- if ( mdAllWrapper == nil ) {
- mdAllWrapper = [ [ [ NSMutableDictionary alloc ] init ] retain ];
- // initialize keyboard focus tracker
- rtl::Reference< AquaA11yFocusListener > listener( AquaA11yFocusListener::get() );
- AquaA11yFocusTracker::get().setFocusListener(listener.get());
- enabled = true;
- }
- return mdAllWrapper;
-}
-
-+(NSValue *)keyForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext {
- return [ NSValue valueWithPointer: rxAccessibleContext.get() ];
-}
-
-+(NSValue *)keyForAccessibleContextAsRadioGroup: (Reference < XAccessibleContext >) rxAccessibleContext {
- return [ NSValue valueWithPointer: ( rxAccessibleContext.get() + 2 ) ];
-}
-
-+(AquaA11yWrapper *)wrapperForAccessible: (Reference < XAccessible >) rxAccessible {
- if ( rxAccessible.is() ) {
- Reference< XAccessibleContext > xAccessibleContext = rxAccessible->getAccessibleContext();
- if( xAccessibleContext.is() ) {
- return [ AquaA11yFactory wrapperForAccessibleContext: xAccessibleContext ];
- }
- }
- return nil;
-}
-
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext {
- return [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: YES asRadioGroup: NO ];
-}
-
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate {
- return [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: bCreate asRadioGroup: NO ];
-}
-
-+(AquaA11yWrapper *)wrapperForAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext createIfNotExists:(BOOL) bCreate asRadioGroup:(BOOL) asRadioGroup{
- NSMutableDictionary * dAllWrapper = [ AquaA11yFactory allWrapper ];
- NSValue * nKey = nil;
- if ( asRadioGroup ) {
- nKey = [ AquaA11yFactory keyForAccessibleContextAsRadioGroup: rxAccessibleContext ];
- } else {
- nKey = [ AquaA11yFactory keyForAccessibleContext: rxAccessibleContext ];
- }
- AquaA11yWrapper * aWrapper = (AquaA11yWrapper *) [ dAllWrapper objectForKey: nKey ];
- if ( aWrapper != nil ) {
- [ aWrapper retain ];
- } else if ( bCreate ) {
- NSString * nativeRole = [ AquaA11yRoleHelper getNativeRoleFrom: rxAccessibleContext.get() ];
- // TODO: reflection
- if ( [ nativeRole isEqualToString: NSAccessibilityButtonRole ] ) {
- aWrapper = [ [ AquaA11yWrapperButton alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityTextAreaRole ] ) {
- aWrapper = [ [ AquaA11yWrapperTextArea alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityStaticTextRole ] ) {
- aWrapper = [ [ AquaA11yWrapperStaticText alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityComboBoxRole ] ) {
- aWrapper = [ [ AquaA11yWrapperComboBox alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityGroupRole ] ) {
- aWrapper = [ [ AquaA11yWrapperGroup alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityToolbarRole ] ) {
- aWrapper = [ [ AquaA11yWrapperToolbar alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityScrollAreaRole ] ) {
- aWrapper = [ [ AquaA11yWrapperScrollArea alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityTabGroupRole ] ) {
- aWrapper = [ [ AquaA11yWrapperTabGroup alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityScrollBarRole ] ) {
- aWrapper = [ [ AquaA11yWrapperScrollBar alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityCheckBoxRole ] ) {
- aWrapper = [ [ AquaA11yWrapperCheckBox alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityRadioGroupRole ] ) {
- aWrapper = [ [ AquaA11yWrapperRadioGroup alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityRadioButtonRole ] ) {
- aWrapper = [ [ AquaA11yWrapperRadioButton alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityRowRole ] ) {
- aWrapper = [ [ AquaA11yWrapperRow alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityListRole ] ) {
- aWrapper = [ [ AquaA11yWrapperList alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilitySplitterRole ] ) {
- aWrapper = [ [ AquaA11yWrapperSplitter alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else if ( [ nativeRole isEqualToString: NSAccessibilityTableRole ] ) {
- aWrapper = [ [ AquaA11yTableWrapper alloc ] initWithAccessibleContext: rxAccessibleContext ];
- } else {
- aWrapper = [ [ AquaA11yWrapper alloc ] initWithAccessibleContext: rxAccessibleContext ];
- }
- [ nativeRole release ];
- [ aWrapper setActsAsRadioGroup: asRadioGroup ];
- #if 0
- /* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
- That means we need to cache this, else e.g. tree list boxes are not accessible (moreover
- it crashes by notifying dead objects - which would seemt o be another bug)
-
- FIXME:
- Unfortunately this can increase memory consumption drastically until the non transient parent
- is destroyed an finally all the transients are released.
- */
- if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) )
- #endif
- {
- [ dAllWrapper setObject: aWrapper forKey: nKey ];
- }
- }
- return aWrapper;
-}
-
-+(void)insertIntoWrapperRepository: (NSView *) viewElement forAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext {
- NSMutableDictionary * dAllWrapper = [ AquaA11yFactory allWrapper ];
- [ dAllWrapper setObject: viewElement forKey: [ AquaA11yFactory keyForAccessibleContext: rxAccessibleContext ] ];
-}
-
-+(void)removeFromWrapperRepositoryFor: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext {
- // TODO: when RADIO_BUTTON search for associated RadioGroup-wrapper and delete that as well
- AquaA11yWrapper * theWrapper = [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: NO ];
- if ( theWrapper != nil ) {
- [ [ AquaA11yFactory allWrapper ] removeObjectForKey: [ AquaA11yFactory keyForAccessibleContext: rxAccessibleContext ] ];
- [ theWrapper release ];
- }
-}
-
-+(void)registerView: (NSView *) theView {
- if ( enabled && [ theView isKindOfClass: [ AquaA11yWrapper class ] ] ) {
- // insertIntoWrapperRepository gets called from SalFrameView itself to bootstrap the bridge initially
- [ (AquaA11yWrapper *) theView accessibleContext ];
- }
-}
-
-+(void)revokeView: (NSView *) theView {
- if ( enabled && [ theView isKindOfClass: [ AquaA11yWrapper class ] ] ) {
- [ AquaA11yFactory removeFromWrapperRepositoryFor: [ (AquaA11yWrapper *) theView accessibleContext ] ];
- }
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
deleted file mode 100644
index 6667ee6e81..0000000000
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <salhelper/refobj.hxx>
-
-#include "aqua/aqua11yfocustracker.hxx"
-#include "aqua/aqua11yfactory.h"
-
-#include "aqua11yfocuslistener.hxx"
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-
-rtl::Reference< AquaA11yFocusListener > AquaA11yFocusListener::theListener;
-
-//------------------------------------------------------------------------------
-
-rtl::Reference< AquaA11yFocusListener > AquaA11yFocusListener::get()
-{
- if ( ! theListener.is() )
- theListener = new AquaA11yFocusListener();
-
- return theListener;
-}
-
-//------------------------------------------------------------------------------
-
-AquaA11yFocusListener::AquaA11yFocusListener() : m_focusedObject(nil)
-{
-}
-
-//------------------------------------------------------------------------------
-
-id AquaA11yFocusListener::getFocusedUIElement()
-{
- if ( nil == m_focusedObject ) {
- Reference< XAccessible > xAccessible( AquaA11yFocusTracker::get().getFocusedObject() );
- try {
- if( xAccessible.is() ) {
- Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
- if( xContext.is() )
- m_focusedObject = [ AquaA11yFactory wrapperForAccessibleContext: xContext ];
- }
- } catch( RuntimeException ) {
- // intentionally do nothing ..
- }
- }
-
- return m_focusedObject;
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL
-AquaA11yFocusListener::focusedObjectChanged(const Reference< XAccessible >& xAccessible)
-{
- if ( nil != m_focusedObject ) {
- [ m_focusedObject release ];
- m_focusedObject = nil;
- }
-
- try {
- if( xAccessible.is() ) {
- Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
- if( xContext.is() )
- {
- m_focusedObject = [ AquaA11yFactory wrapperForAccessibleContext: xContext ];
- NSAccessibilityPostNotification(m_focusedObject, NSAccessibilityFocusedUIElementChangedNotification);
- }
- }
- } catch( RuntimeException ) {
- // intentionally do nothing ..
- }
-}
-
-//------------------------------------------------------------------------------
-
-oslInterlockedCount SAL_CALL
-AquaA11yFocusListener::acquire() SAL_THROW(())
-{
- return ReferenceObject::acquire();
-}
-
-//------------------------------------------------------------------------------
-
-oslInterlockedCount SAL_CALL
-AquaA11yFocusListener::release() SAL_THROW(())
-{
- return ReferenceObject::release();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx b/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
deleted file mode 100644
index 08d7433b0b..0000000000
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _AQUA11YFOCUSLISTENER_HXX_
-#define _AQUA11YFOCUSLISTENER_HXX_
-
-#include <salhelper/refobj.hxx>
-
-#include "aqua/keyboardfocuslistener.hxx"
-#include "aqua/aquavcltypes.h"
-
-class AquaA11yFocusListener :
- public KeyboardFocusListener,
- public salhelper::ReferenceObject
-{
- id m_focusedObject;
-
- static rtl::Reference< AquaA11yFocusListener > theListener;
-
- AquaA11yFocusListener::AquaA11yFocusListener();
- virtual AquaA11yFocusListener::~AquaA11yFocusListener() {};
-public:
-
- static rtl::Reference< AquaA11yFocusListener > get();
-
- id getFocusedUIElement();
-
- // KeyboardFocusListener
- virtual void SAL_CALL focusedObjectChanged(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible);
-
- // rtl::IReference
- virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(());
- virtual oslInterlockedCount SAL_CALL release() SAL_THROW(());
-};
-
-#endif // _AQUA11YFOCUSLISTENER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
deleted file mode 100644
index 4c225f3baa..0000000000
--- a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
+++ /dev/null
@@ -1,282 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "vcl/svapp.hxx"
-#include "vcl/window.hxx"
-#include "vcl/toolbox.hxx"
-#include "vcl/menu.hxx"
-
-#include "aqua/aqua11yfocustracker.hxx"
-
-#include "documentfocuslistener.hxx"
-
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
-#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
-#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-//------------------------------------------------------------------------------
-
-static inline Window *
-getWindow(const ::VclSimpleEvent *pEvent)
-{
- return static_cast< const ::VclWindowEvent *> (pEvent)->GetWindow();
-}
-
-
-//------------------------------------------------------------------------------
-
-// callback function for Application::addEventListener
-
-long AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent)
-{
- switch (pEvent->GetId())
- {
- case VCLEVENT_WINDOW_PAINT:
- pFocusTracker-> toolbox_open_floater( getWindow(pEvent) );
- break;
- case VCLEVENT_WINDOW_GETFOCUS:
- pFocusTracker->window_got_focus( getWindow(pEvent) );
- break;
- case VCLEVENT_OBJECT_DYING:
- pFocusTracker->m_aDocumentWindowList.erase( getWindow(pEvent) );
- // intentional pass through ..
- case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
- pFocusTracker->toolbox_highlight_off( getWindow(pEvent) );
- break;
- case VCLEVENT_TOOLBOX_HIGHLIGHT:
- pFocusTracker->toolbox_highlight_on( getWindow(pEvent) );
- break;
- case VCLEVENT_TABPAGE_ACTIVATE:
- pFocusTracker->tabpage_activated( getWindow(pEvent) );
- break;
- case VCLEVENT_MENU_HIGHLIGHT:
- pFocusTracker->menu_highlighted( static_cast < const VclMenuEvent * > (pEvent) );
- break;
- default:
- break;
- };
-
- return 0;
-}
-
-//------------------------------------------------------------------------------
-
-AquaA11yFocusTracker::AquaA11yFocusTracker() :
- m_aWindowEventLink(this, (PSTUB) WindowEventHandler),
- m_xDocumentFocusListener(new DocumentFocusListener(*this))
-{
- Application::AddEventListener(m_aWindowEventLink);
- window_got_focus(Application::GetFocusWindow());
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::setFocusedObject(const Reference< XAccessible >& xAccessible)
-{
- if( xAccessible != m_xFocusedObject )
- {
- m_xFocusedObject = xAccessible;
-
- if( m_aFocusListener.is() )
- m_aFocusListener->focusedObjectChanged(xAccessible);
- }
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::notify_toolbox_item_focus(ToolBox *pToolBox)
-{
- Reference< XAccessible > xAccessible( pToolBox->GetAccessible() );
-
- if( xAccessible.is() )
- {
- Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
-
- if( xContext.is() )
- {
- sal_Int32 nPos = pToolBox->GetItemPos( pToolBox->GetHighlightItemId() );
- if( nPos != TOOLBOX_ITEM_NOTFOUND )
- setFocusedObject( xContext->getAccessibleChild( nPos ) );
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::toolbox_open_floater(Window *pWindow)
-{
- bool bToolboxFound = false;
- bool bFloatingWindowFound = false;
- Window * pFloatingWindow = NULL;
- while ( pWindow != NULL ) {
- if ( pWindow->GetType() == WINDOW_TOOLBOX ) {
- bToolboxFound = true;
- } else if ( pWindow->GetType() == WINDOW_FLOATINGWINDOW ) {
- bFloatingWindowFound = true;
- pFloatingWindow = pWindow;
- }
- pWindow = pWindow->GetParent();
- }
- if ( bToolboxFound && bFloatingWindowFound ) {
- Reference < XAccessible > rxAccessible = pFloatingWindow -> GetAccessible();
- if ( ! rxAccessible.is() ) {
- return;
- }
- Reference < XAccessibleContext > rxContext = rxAccessible -> getAccessibleContext();
- if ( ! rxContext.is() ) {
- return;
- }
- if ( rxContext -> getAccessibleChildCount() > 0 ) {
- Reference < XAccessible > rxAccessibleChild = rxContext -> getAccessibleChild( 0 );
- if ( ! rxAccessibleChild.is() ) {
- return;
- }
- setFocusedObject ( rxAccessibleChild );
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::toolbox_highlight_on(Window *pWindow)
-{
- // Make sure either the toolbox or its parent toolbox has the focus
- if ( ! pWindow->HasFocus() )
- {
- ToolBox* pToolBoxParent = dynamic_cast< ToolBox * >( pWindow->GetParent() );
- if ( ! pToolBoxParent || ! pToolBoxParent->HasFocus() )
- return;
- }
-
- notify_toolbox_item_focus(static_cast <ToolBox *> (pWindow));
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::toolbox_highlight_off(Window *pWindow)
-{
- ToolBox* pToolBoxParent = dynamic_cast< ToolBox * >( pWindow->GetParent() );
-
- // Notify when leaving sub toolboxes
- if( pToolBoxParent && pToolBoxParent->HasFocus() )
- notify_toolbox_item_focus( pToolBoxParent );
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::tabpage_activated(Window *pWindow)
-{
- Reference< XAccessible > xAccessible( pWindow->GetAccessible() );
-
- if( xAccessible.is() )
- {
- Reference< XAccessibleSelection > xSelection(xAccessible->getAccessibleContext(), UNO_QUERY);
-
- if( xSelection.is() )
- setFocusedObject( xSelection->getSelectedAccessibleChild(0) );
- }
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::menu_highlighted(const VclMenuEvent *pEvent)
-{
- Menu * pMenu = pEvent->GetMenu();
-
- if( pMenu )
- {
- Reference< XAccessible > xAccessible( pMenu->GetAccessible() );
-
- if( xAccessible.is() )
- setFocusedObject( xAccessible );
- }
-}
-
-//------------------------------------------------------------------------------
-
-void AquaA11yFocusTracker::window_got_focus(Window *pWindow)
-{
- // The menu bar is handled through VCLEVENT_MENU_HIGHLIGHTED
- if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW )
- return;
-
- // ToolBoxes are handled through VCLEVENT_TOOLBOX_HIGHLIGHT
- if( pWindow->GetType() == WINDOW_TOOLBOX )
- return;
-
- if( pWindow->GetType() == WINDOW_TABCONTROL )
- {
- tabpage_activated( pWindow );
- return;
- }
-
- Reference< XAccessible > xAccessible(pWindow->GetAccessible());
-
- if( ! xAccessible.is() )
- return;
-
- Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
-
- if( ! xContext.is() )
- return;
-
- Reference< XAccessibleStateSet > xStateSet = xContext->getAccessibleStateSet();
-
- if( ! xStateSet.is() )
- return;
-
-/* the UNO ToolBox wrapper does not (yet?) support XAccessibleSelection, so we
- * need to add listeners to the children instead of re-using the tabpage stuff
- */
- if( xStateSet->contains(AccessibleStateType::FOCUSED) && (pWindow->GetType() != WINDOW_TREELISTBOX) )
- {
- setFocusedObject( xAccessible );
- }
- else
- {
- if( m_aDocumentWindowList.find(pWindow) == m_aDocumentWindowList.end() )
- {
- m_aDocumentWindowList.insert(pWindow);
- m_xDocumentFocusListener->attachRecursive(xAccessible, xContext, xStateSet);
- }
-#ifdef ENABLE_TRACING
- else
- fprintf(stderr, "Window %p already in the list\n", pWindow );
-#endif
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ylistener.cxx b/vcl/aqua/source/a11y/aqua11ylistener.cxx
deleted file mode 100644
index a7094d13c7..0000000000
--- a/vcl/aqua/source/a11y/aqua11ylistener.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "aqua/salinst.h"
-#include "aqua/aqua11ylistener.hxx"
-#include "aqua/aqua11yfactory.h"
-#include "aqua/aqua11yfocustracker.hxx"
-#include "aqua/aqua11ywrapper.h"
-
-#include "aqua11ytextwrapper.h"
-
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-NSString * getTableNotification( const AccessibleEventObject& aEvent )
-{
- AccessibleTableModelChange aChange;
- NSString * notification = nil;
-
- if( (aEvent.NewValue >>= aChange) &&
- ( AccessibleTableModelChangeType::INSERT == aChange.Type || AccessibleTableModelChangeType::DELETE == aChange.Type ) &&
- aChange.FirstRow != aChange.LastRow )
- {
- notification = NSAccessibilityRowCountChangedNotification;
- }
-
- return notification;
-}
-
-//------------------------------------------------------------------------------
-
-AquaA11yEventListener::AquaA11yEventListener(id wrapperObject, sal_Int16 role) : m_wrapperObject(wrapperObject), m_role(role)
-{
- [ m_wrapperObject retain ];
-}
-
-//------------------------------------------------------------------------------
-
-AquaA11yEventListener::~AquaA11yEventListener()
-{
- [ m_wrapperObject release ];
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL
-AquaA11yEventListener::disposing( const EventObject& ) throw( RuntimeException )
-{
- [ AquaA11yFactory removeFromWrapperRepositoryFor: [ (AquaA11yWrapper *) m_wrapperObject accessibleContext ] ];
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL
-AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) throw( RuntimeException )
-{
- NSString * notification = nil;
- id element = m_wrapperObject;
- Rectangle bounds;
-
- // TODO: NSAccessibilityValueChanged, NSAccessibilitySelectedRowsChangedNotification
- switch( aEvent.EventId )
- {
- case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED:
- if( m_role != AccessibleRole::LIST ) {
- Reference< XAccessible > xAccessible;
- if( aEvent.NewValue >>= xAccessible )
- AquaA11yFocusTracker::get().setFocusedObject( xAccessible );
- }
- break;
-
- case AccessibleEventId::NAME_CHANGED:
- notification = NSAccessibilityTitleChangedNotification;
- break;
-
- case AccessibleEventId::CHILD:
- // only needed for tooltips (says Apple)
- if ( m_role == AccessibleRole::TOOL_TIP ) {
- if(aEvent.NewValue.hasValue()) {
- notification = NSAccessibilityCreatedNotification;
- } else if(aEvent.OldValue.hasValue()) {
- notification = NSAccessibilityUIElementDestroyedNotification;
- }
- }
- break;
-
- case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
- // TODO: depricate or remember all children
- break;
-
- case AccessibleEventId::BOUNDRECT_CHANGED:
- bounds = [ element accessibleComponent ] -> getBounds();
- if ( m_oldBounds.X != 0 && ( bounds.X != m_oldBounds.X || bounds.Y != m_oldBounds.Y ) ) {
- NSAccessibilityPostNotification(element, NSAccessibilityMovedNotification); // post directly since both cases can happen simultaneously
- }
- if ( m_oldBounds.X != 0 && ( bounds.Width != m_oldBounds.Width || bounds.Height != m_oldBounds.Height ) ) {
- NSAccessibilityPostNotification(element, NSAccessibilityResizedNotification); // post directly since both cases can happen simultaneously
- }
- m_oldBounds = bounds;
- break;
-
- case AccessibleEventId::SELECTION_CHANGED:
- notification = NSAccessibilitySelectedChildrenChangedNotification;
- break;
-
- case AccessibleEventId::TEXT_SELECTION_CHANGED:
- notification = NSAccessibilitySelectedTextChangedNotification;
- break;
-
- case AccessibleEventId::TABLE_MODEL_CHANGED:
- notification = getTableNotification(aEvent);
- break;
-
- case AccessibleEventId::CARET_CHANGED:
- notification = NSAccessibilitySelectedTextChangedNotification;
- break;
-
- case AccessibleEventId::TEXT_CHANGED:
- notification = NSAccessibilityValueChangedNotification;
- break;
-
- default:
- break;
- }
-
- if( nil != notification )
- NSAccessibilityPostNotification(element, notification);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.h b/vcl/aqua/source/a11y/aqua11yrolehelper.h
deleted file mode 100644
index 51cc908391..0000000000
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11ROLEHELPER_H
-#define _SV_AQUA11ROLEHELPER_H
-
-#include "aqua/salinst.h"
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
-
-@interface AquaA11yRoleHelper : NSObject
-{
-}
-+(id)getNativeRoleFrom: (::com::sun::star::accessibility::XAccessibleContext *) accessibleContext;
-+(id)getNativeSubroleFrom: (sal_Int16) nRole;
-+(id)getRoleDescriptionFrom: (NSString *) role with: (NSString *) subRole;
-@end
-
-#endif // _SV_AQUA11ROLEHELPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.mm b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
deleted file mode 100644
index e989f38f4a..0000000000
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.mm
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/aqua11yfactory.h"
-
-#include "aqua11yrolehelper.h"
-
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-@implementation AquaA11yRoleHelper
-
-+(id)simpleMapNativeRoleFrom: (XAccessibleContext *) accessibleContext {
- id nativeRole = nil;
-
- if (accessibleContext == NULL)
- return nativeRole;
-
- switch( accessibleContext -> getAccessibleRole() ) {
-#define MAP(a,b) \
- case a: nativeRole = b; break
-
- MAP( AccessibleRole::UNKNOWN, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::ALERT, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::COLUMN_HEADER, NSAccessibilityColumnRole );
- MAP( AccessibleRole::CANVAS, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::CHECK_BOX, NSAccessibilityCheckBoxRole );
- MAP( AccessibleRole::CHECK_MENU_ITEM, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::COLOR_CHOOSER, NSAccessibilityColorWellRole ); // FIXME
- MAP( AccessibleRole::COMBO_BOX, NSAccessibilityComboBoxRole );
- MAP( AccessibleRole::DATE_EDITOR, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::DESKTOP_ICON, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::DESKTOP_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::DIRECTORY_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::DIALOG, NSAccessibilityGroupRole );
- MAP( AccessibleRole::DOCUMENT, NSAccessibilityGroupRole );
- MAP( AccessibleRole::EMBEDDED_OBJECT, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::END_NOTE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FILE_CHOOSER, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FILLER, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FONT_CHOOSER, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FOOTER, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FOOTNOTE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::FRAME, NSAccessibilityWindowRole );
- MAP( AccessibleRole::GLASS_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::GRAPHIC, NSAccessibilityImageRole );
- MAP( AccessibleRole::GROUP_BOX, NSAccessibilityGroupRole );
- MAP( AccessibleRole::HEADER, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::HEADING, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::HYPER_LINK, NSAccessibilityLinkRole );
- MAP( AccessibleRole::ICON, NSAccessibilityImageRole );
- MAP( AccessibleRole::INTERNAL_FRAME, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::LABEL, NSAccessibilityStaticTextRole );
- MAP( AccessibleRole::LAYERED_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::LIST, NSAccessibilityMenuRole );
- MAP( AccessibleRole::LIST_ITEM, NSAccessibilityMenuItemRole );
- MAP( AccessibleRole::MENU, NSAccessibilityMenuRole );
- MAP( AccessibleRole::MENU_BAR, NSAccessibilityMenuBarRole );
- MAP( AccessibleRole::MENU_ITEM, NSAccessibilityMenuItemRole );
- MAP( AccessibleRole::OPTION_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::PAGE_TAB, NSAccessibilityButtonRole );
- MAP( AccessibleRole::PAGE_TAB_LIST, NSAccessibilityTabGroupRole );
- MAP( AccessibleRole::PANEL, NSAccessibilityGroupRole );
- MAP( AccessibleRole::PARAGRAPH, NSAccessibilityTextAreaRole );
- MAP( AccessibleRole::PASSWORD_TEXT, NSAccessibilityTextFieldRole );
- MAP( AccessibleRole::POPUP_MENU, NSAccessibilityMenuRole );
- MAP( AccessibleRole::PUSH_BUTTON, NSAccessibilityButtonRole );
- MAP( AccessibleRole::PROGRESS_BAR, NSAccessibilityProgressIndicatorRole );
- MAP( AccessibleRole::RADIO_BUTTON, NSAccessibilityRadioButtonRole );
- MAP( AccessibleRole::RADIO_MENU_ITEM, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::ROW_HEADER, NSAccessibilityRowRole );
- MAP( AccessibleRole::ROOT_PANE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::SCROLL_BAR, NSAccessibilityScrollBarRole );
- MAP( AccessibleRole::SCROLL_PANE, NSAccessibilityScrollAreaRole );
- MAP( AccessibleRole::SHAPE, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::SEPARATOR, NSAccessibilitySplitterRole ); // FIXME
- MAP( AccessibleRole::SLIDER, NSAccessibilitySliderRole );
- MAP( AccessibleRole::SPIN_BOX, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitterRole );
- MAP( AccessibleRole::STATUS_BAR, NSAccessibilityGroupRole ); // FIXME
- MAP( AccessibleRole::TABLE, NSAccessibilityTableRole );
- MAP( AccessibleRole::TABLE_CELL, NSAccessibilityTextFieldRole );
- MAP( AccessibleRole::TEXT, NSAccessibilityTextAreaRole );
- MAP( AccessibleRole::TEXT_FRAME, NSAccessibilityGroupRole );
- MAP( AccessibleRole::TOGGLE_BUTTON, NSAccessibilityCheckBoxRole );
- MAP( AccessibleRole::TOOL_BAR, NSAccessibilityToolbarRole );
- MAP( AccessibleRole::TOOL_TIP, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::TREE, NSAccessibilityGroupRole );
- MAP( AccessibleRole::VIEW_PORT, NSAccessibilityUnknownRole ); // FIXME
- MAP( AccessibleRole::WINDOW, NSAccessibilityWindowRole );
-
- MAP( AccessibleRole::BUTTON_DROPDOWN, NSAccessibilityMenuButtonRole );
- MAP( AccessibleRole::BUTTON_MENU, NSAccessibilityMenuButtonRole );
- MAP( AccessibleRole::CAPTION, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::CHART, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::FORM, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::IMAGE_MAP, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::NOTE, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::PAGE, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::RULER, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::SECTION, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::TREE_ITEM, NSAccessibilityUnknownRole );
- MAP( AccessibleRole::TREE_TABLE, NSAccessibilityUnknownRole );
-
-#undef MAP
- default:
- break;
- }
- return nativeRole;
-}
-
-+(id)getNativeRoleFrom: (XAccessibleContext *) accessibleContext {
- id nativeRole = [ AquaA11yRoleHelper simpleMapNativeRoleFrom: accessibleContext ];
- if ( accessibleContext -> getAccessibleRole() == AccessibleRole::LABEL ) {
- if ( accessibleContext -> getAccessibleChildCount() > 0 ) {
- [ nativeRole release ];
- nativeRole = NSAccessibilityOutlineRole;
- } else if ( accessibleContext -> getAccessibleParent().is() ) {
- Reference < XAccessibleContext > rxParentContext = accessibleContext -> getAccessibleParent() -> getAccessibleContext();
- if ( rxParentContext.is() ) {
- NSString * roleParent = (NSString *) [ AquaA11yRoleHelper simpleMapNativeRoleFrom: rxParentContext.get() ];
- if ( [ roleParent isEqualToString: NSAccessibilityOutlineRole ] ) {
- [ nativeRole release ];
- nativeRole = NSAccessibilityRowRole;
- }
- [ roleParent release ];
- }
- }
- } else if ( accessibleContext -> getAccessibleRole() == AccessibleRole::COMBO_BOX ) {
- Reference < XAccessible > rxAccessible = accessibleContext -> getAccessibleChild(0);
- if ( rxAccessible.is() ) {
- Reference < XAccessibleContext > rxAccessibleContext = rxAccessible -> getAccessibleContext();
- if ( rxAccessibleContext.is() && rxAccessibleContext -> getAccessibleRole() == AccessibleRole::TEXT ) {
- if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::EDITABLE ) ) {
- [ nativeRole release ];
- nativeRole = NSAccessibilityPopUpButtonRole;
- }
- }
- }
- }
- return nativeRole;
-}
-
-+(id)getNativeSubroleFrom: (sal_Int16) nRole {
- id nativeSubrole = nil;
- switch( nRole ) {
-#define MAP(a,b) \
- case a: nativeSubrole = b; break
-
- MAP( AccessibleRole::UNKNOWN, NSAccessibilityUnknownSubrole );
- MAP( AccessibleRole::ALERT, NSAccessibilitySystemDialogSubrole );
- MAP( AccessibleRole::COLUMN_HEADER, @"" );
- MAP( AccessibleRole::CANVAS, @"" );
- MAP( AccessibleRole::CHECK_BOX, @"" );
- MAP( AccessibleRole::CHECK_MENU_ITEM, @"" );
- MAP( AccessibleRole::COLOR_CHOOSER, @"" );
- MAP( AccessibleRole::COMBO_BOX, @"" );
- MAP( AccessibleRole::DATE_EDITOR, @"" );
- MAP( AccessibleRole::DESKTOP_ICON, @"" );
- MAP( AccessibleRole::DESKTOP_PANE, @"" );
- MAP( AccessibleRole::DIRECTORY_PANE, @"" );
- MAP( AccessibleRole::DIALOG, NSAccessibilityDialogSubrole );
- MAP( AccessibleRole::DOCUMENT, @"" );
- MAP( AccessibleRole::EMBEDDED_OBJECT, @"" );
- MAP( AccessibleRole::END_NOTE, @"" );
- MAP( AccessibleRole::FILE_CHOOSER, @"" );
- MAP( AccessibleRole::FILLER, @"" );
- MAP( AccessibleRole::FONT_CHOOSER, @"" );
- MAP( AccessibleRole::FOOTER, @"" );
- MAP( AccessibleRole::FOOTNOTE, @"" );
- MAP( AccessibleRole::FRAME, @"" );
- MAP( AccessibleRole::GLASS_PANE, @"" );
- MAP( AccessibleRole::GRAPHIC, @"" );
- MAP( AccessibleRole::GROUP_BOX, @"" );
- MAP( AccessibleRole::HEADER, @"" );
- MAP( AccessibleRole::HEADING, @"" );
- MAP( AccessibleRole::HYPER_LINK, NSAccessibilityTextLinkSubrole );
- MAP( AccessibleRole::ICON, @"" );
- MAP( AccessibleRole::INTERNAL_FRAME, @"" );
- MAP( AccessibleRole::LABEL, @"" );
- MAP( AccessibleRole::LAYERED_PANE, @"" );
- MAP( AccessibleRole::LIST, @"" );
- MAP( AccessibleRole::LIST_ITEM, NSAccessibilityOutlineRowSubrole );
- MAP( AccessibleRole::MENU, @"" );
- MAP( AccessibleRole::MENU_BAR, @"" );
- MAP( AccessibleRole::MENU_ITEM, @"" );
- MAP( AccessibleRole::OPTION_PANE, @"" );
- MAP( AccessibleRole::PAGE_TAB, @"" );
- MAP( AccessibleRole::PAGE_TAB_LIST, @"" );
- MAP( AccessibleRole::PANEL, @"" );
- MAP( AccessibleRole::PARAGRAPH, @"" );
- MAP( AccessibleRole::PASSWORD_TEXT, NSAccessibilitySecureTextFieldSubrole );
- MAP( AccessibleRole::POPUP_MENU, @"" );
- MAP( AccessibleRole::PUSH_BUTTON, @"" );
- MAP( AccessibleRole::PROGRESS_BAR, @"" );
- MAP( AccessibleRole::RADIO_BUTTON, @"" );
- MAP( AccessibleRole::RADIO_MENU_ITEM, @"" );
- MAP( AccessibleRole::ROW_HEADER, @"" );
- MAP( AccessibleRole::ROOT_PANE, @"" );
- MAP( AccessibleRole::SCROLL_BAR, @"" );
- MAP( AccessibleRole::SCROLL_PANE, @"" );
- MAP( AccessibleRole::SHAPE, @"" );
- MAP( AccessibleRole::SEPARATOR, @"" );
- MAP( AccessibleRole::SLIDER, @"" );
- MAP( AccessibleRole::SPIN_BOX, @"" );
- MAP( AccessibleRole::SPLIT_PANE, @"" );
- MAP( AccessibleRole::STATUS_BAR, @"" );
- MAP( AccessibleRole::TABLE, @"" );
- MAP( AccessibleRole::TABLE_CELL, @"" );
- MAP( AccessibleRole::TEXT, @"" );
- MAP( AccessibleRole::TEXT_FRAME, @"" );
- MAP( AccessibleRole::TOGGLE_BUTTON, @"" );
- MAP( AccessibleRole::TOOL_BAR, @"" );
- MAP( AccessibleRole::TOOL_TIP, @"" );
- MAP( AccessibleRole::TREE, @"" );
- MAP( AccessibleRole::VIEW_PORT, @"" );
- MAP( AccessibleRole::WINDOW, NSAccessibilityStandardWindowSubrole );
-
- MAP( AccessibleRole::BUTTON_DROPDOWN, @"" );
- MAP( AccessibleRole::BUTTON_MENU, @"" );
- MAP( AccessibleRole::CAPTION, @"" );
- MAP( AccessibleRole::CHART, @"" );
- MAP( AccessibleRole::FORM, @"" );
- MAP( AccessibleRole::IMAGE_MAP, @"" );
- MAP( AccessibleRole::NOTE, @"" );
- MAP( AccessibleRole::PAGE, @"" );
- MAP( AccessibleRole::RULER, @"" );
- MAP( AccessibleRole::SECTION, @"" );
- MAP( AccessibleRole::TREE_ITEM, @"" );
- MAP( AccessibleRole::TREE_TABLE, @"" );
-
-#undef MAP
- default:
- break;
- }
- return nativeSubrole;
-}
-
-+(id)getRoleDescriptionFrom: (NSString *) role with: (NSString *) subRole {
- id roleDescription;
- if ( [ subRole length ] == 0 )
- roleDescription = NSAccessibilityRoleDescription( role, nil );
- else
- roleDescription = NSAccessibilityRoleDescription( role, subRole );
- return roleDescription;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h b/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
deleted file mode 100644
index bc521daa98..0000000000
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11SELECTIONWRAPPER_H
-#define _SV_AQUA11SELECTIONWRAPPER_H
-
-#include "aqua/aquavcltypes.h"
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11ySelectionWrapper : NSObject
-{
-}
-+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setSelectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-@end
-
-#endif // _SV_AQUA11SELECTIONWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
deleted file mode 100644
index 960afb384c..0000000000
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua/aqua11yfactory.h"
-
-#include "aqua11yselectionwrapper.h"
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-@implementation AquaA11ySelectionWrapper : NSObject
-
-+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
-{
- Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- 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 nil;
-}
-
-
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames
-{
- [ attributeNames addObject: NSAccessibilitySelectedChildrenAttribute ];
-}
-
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper
-{
- (void)wrapper;
- if ( [ attribute isEqualToString: NSAccessibilitySelectedChildrenAttribute ] )
- {
- return YES;
- }
- else
- {
- return NO;
- }
-}
-
-+(void)setSelectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value
-{
- Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- try {
- xAccessibleSelection -> clearAccessibleSelection();
-
- unsigned c = [ value count ];
- for ( unsigned i = 0 ; i < c ; ++i ) {
- xAccessibleSelection -> selectAccessibleChild( [ [ value objectAtIndex: i ] accessibleContext ] -> getAccessibleIndexInParent() );
- }
- } catch ( Exception& e) {
- }
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytablewrapper.h b/vcl/aqua/source/a11y/aqua11ytablewrapper.h
deleted file mode 100644
index 7aea1ac080..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytablewrapper.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11TABLEWRAPPER_H
-#define _SV_AQUA11TABLEWRAPPER_H
-
-#include "aqua/aqua11ywrapper.h"
-
-#define MAXIMUM_ACCESSIBLE_TABLE_CELLS 1000
-
-@interface AquaA11yTableWrapper : AquaA11yWrapper
-{
-}
-+(id)childrenAttributeForElement:(AquaA11yTableWrapper *)wrapper;
-+(void)addAttributeNamesTo: (NSMutableArray *)attributeNames object: (AquaA11yWrapper*)pObject;
-
--(id)rowsAttribute;
--(id)columnsAttribute;
-@end
-#endif // _SV_AQUA11TABLEWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytablewrapper.mm b/vcl/aqua/source/a11y/aqua11ytablewrapper.mm
deleted file mode 100644
index 47b766df22..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytablewrapper.mm
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/aqua11yfactory.h"
-
-#include "aqua11ytablewrapper.h"
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::uno;
-
-@implementation AquaA11yTableWrapper : AquaA11yWrapper
-
-+(id)childrenAttributeForElement:(AquaA11yTableWrapper *)wrapper
-{
- XAccessibleTable * accessibleTable = [ wrapper accessibleTable ];
- NSArray* pResult = nil;
- if( accessibleTable )
- {
- NSMutableArray * cells = [ [ NSMutableArray alloc ] init ];
- try
- {
- sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
- sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-
- if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
- {
- // make all children visible to the hierarchy
- for ( sal_Int32 rowCount = 0; rowCount < nRows; rowCount++ )
- {
- for ( sal_Int32 columnCount = 0; columnCount < nCols; columnCount++ )
- {
- Reference < XAccessible > rAccessibleCell = accessibleTable -> getAccessibleCellAt ( rowCount, columnCount );
- if ( rAccessibleCell.is() )
- {
- id cell_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rAccessibleCell -> getAccessibleContext() ];
- [ cells addObject: cell_wrapper ];
- [ cell_wrapper release ];
- }
- }
- }
- }
- else
- {
- XAccessibleComponent * accessibleComponent = [ wrapper accessibleComponent ];
- // find out which cells are actually visible by determining the top-left-cell and the bottom-right-cell
- Size tableSize = accessibleComponent -> getSize();
- Point point;
- point.X = 0;
- point.Y = 0;
- Reference < XAccessible > rAccessibleTopLeft = accessibleComponent -> getAccessibleAtPoint ( point );
- point.X = tableSize.Width - 1;
- point.Y = tableSize.Height - 1;
- Reference < XAccessible > rAccessibleBottomRight = accessibleComponent -> getAccessibleAtPoint ( point );
- if ( rAccessibleTopLeft.is() && rAccessibleBottomRight.is() )
- {
- sal_Int32 idxTopLeft = rAccessibleTopLeft -> getAccessibleContext() -> getAccessibleIndexInParent();
- sal_Int32 idxBottomRight = rAccessibleBottomRight -> getAccessibleContext() -> getAccessibleIndexInParent();
- sal_Int32 rowTopLeft = accessibleTable -> getAccessibleRow ( idxTopLeft );
- sal_Int32 columnTopLeft = accessibleTable -> getAccessibleColumn ( idxTopLeft );
- sal_Int32 rowBottomRight = accessibleTable -> getAccessibleRow ( idxBottomRight );
- sal_Int32 columnBottomRight = accessibleTable -> getAccessibleColumn ( idxBottomRight );
- // create an array containing the visible cells
- for ( sal_Int32 rowCount = rowTopLeft; rowCount <= rowBottomRight; rowCount++ )
- {
- for ( sal_Int32 columnCount = columnTopLeft; columnCount <= columnBottomRight; columnCount++ )
- {
- Reference < XAccessible > rAccessibleCell = accessibleTable -> getAccessibleCellAt ( rowCount, columnCount );
- if ( rAccessibleCell.is() )
- {
- id cell_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rAccessibleCell -> getAccessibleContext() ];
- [ cells addObject: cell_wrapper ];
- [ cell_wrapper release ];
- }
- }
- }
- }
- }
- pResult = NSAccessibilityUnignoredChildren( cells );
- }
- catch (const Exception &e)
- {
- }
- [cells autorelease];
- }
-
- return pResult;
-}
-
-+(void)addAttributeNamesTo: (NSMutableArray *)attributeNames object: (AquaA11yWrapper*)pObject
-{
- XAccessibleTable * accessibleTable = [ pObject accessibleTable ];
- if( accessibleTable )
- {
- sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
- sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-
-
- if( nRows*nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
- {
- [ attributeNames addObject: NSAccessibilityRowsAttribute ];
- [ attributeNames addObject: NSAccessibilityColumnsAttribute ];
- }
- }
-}
-
--(id)rowsAttribute
-{
- NSArray* pResult = nil;
-
- XAccessibleTable * accessibleTable = [ self accessibleTable ];
- if( accessibleTable )
- {
- sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
- sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
- if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
- {
- NSMutableArray * cells = [ [ NSMutableArray alloc ] init ];
- try
- {
- // find out number of rows
- sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
- for( sal_Int32 n = 0; n < nRows; n++ )
- {
- Reference < XAccessible > rAccessibleCell = accessibleTable -> getAccessibleCellAt ( n, 0 );
- if ( rAccessibleCell.is() )
- {
- id cell_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rAccessibleCell -> getAccessibleContext() ];
- [ cells addObject: cell_wrapper ];
- [ cell_wrapper release ];
- }
- }
- pResult = NSAccessibilityUnignoredChildren( cells );
- }
- catch (const Exception &e)
- {
- pResult = nil;
- }
- [ cells autorelease ];
- }
- }
-
- return pResult;
-}
-
--(id)columnsAttribute
-{
- NSArray* pResult = nil;
-
- XAccessibleTable * accessibleTable = [ self accessibleTable ];
-
- if( accessibleTable )
- {
- sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
- sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
- if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
- {
- NSMutableArray * cells = [ [ NSMutableArray alloc ] init ];
- try
- {
- // find out number of columns
- for( sal_Int32 n = 0; n < nCols; n++ )
- {
- Reference < XAccessible > rAccessibleCell = accessibleTable -> getAccessibleCellAt ( 0, n );
- if ( rAccessibleCell.is() )
- {
- id cell_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rAccessibleCell -> getAccessibleContext() ];
- [ cells addObject: cell_wrapper ];
- [ cell_wrapper release ];
- }
- }
- pResult = NSAccessibilityUnignoredChildren( cells );
- }
- catch (const Exception &e)
- {
- pResult = nil;
- }
- [ cells autorelease ];
- }
- }
-
- return pResult;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h
deleted file mode 100644
index a739fde92d..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11TEXTATTRIBUTESWRAPPER_H
-#define _SV_AQUA11TEXTATTRIBUTESWRAPPER_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yTextAttributesWrapper : NSObject
-{
-}
-+(NSMutableAttributedString *)createAttributedStringForElement:(AquaA11yWrapper *)wrapper inOrigRange:(id)origRange;
-@end
-#endif // _SV_AQUA11TEXTATTRIBUTESWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
deleted file mode 100644
index 5a4628edb7..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ytextattributeswrapper.h"
-
-#include <com/sun/star/accessibility/AccessibleTextType.hpp>
-#include <com/sun/star/awt/FontUnderline.hpp>
-#include <com/sun/star/awt/FontWeight.hpp>
-#include <com/sun/star/awt/FontStrikeout.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-using namespace ::rtl;
-
-@implementation AquaA11yTextAttributesWrapper : NSObject
-
-+(int)convertUnderlineStyle:(PropertyValue)property {
- int underlineStyle = NSNoUnderlineStyle;
- sal_Int16 value = 0;
- property.Value >>= value;
- if ( value != FontUnderline::NONE
- && value != FontUnderline::DONTKNOW) {
- underlineStyle = NSSingleUnderlineStyle;
- }
- return underlineStyle;
-}
-
-+(int)convertBoldStyle:(PropertyValue)property {
- int boldStyle = 0;
- float value = 0;
- property.Value >>= value;
- if ( value == FontWeight::SEMIBOLD
- || value == FontWeight::BOLD
- || value == FontWeight::ULTRABOLD
- || value == FontWeight::BLACK ) {
- boldStyle = NSBoldFontMask;
- }
- return boldStyle;
-}
-
-+(int)convertItalicStyle:(PropertyValue)property {
- int italicStyle = 0;
- sal_Int16 value = property.Value.get<FontSlant>();
- if ( value == FontSlant_ITALIC ) {
- italicStyle = NSItalicFontMask;
- }
- return italicStyle;
-}
-
-+(BOOL)isStrikethrough:(PropertyValue)property {
- BOOL strikethrough = NO;
- sal_Int16 value = 0;
- property.Value >>= value;
- if ( value != FontStrikeout::NONE
- && value != FontStrikeout::DONTKNOW ) {
- strikethrough = YES;
- }
- return strikethrough;
-}
-
-+(BOOL)convertBoolean:(PropertyValue)property {
- BOOL myBoolean = NO;
- bool value = sal_False;
- property.Value >>= value;
- if ( value ) {
- myBoolean = YES;
- }
- return myBoolean;
-}
-
-+(NSNumber *)convertShort:(PropertyValue)property {
- sal_Int16 value = 0;
- property.Value >>= value;
- return [ NSNumber numberWithShort: value ];
-}
-
-+(void)addColor:(sal_Int32)salColor forAttribute:(NSString *)attribute andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
- if ( salColor != -1 ) {
- float elements[] = { salColor & 0x00ff0000, salColor & 0x0000ff00, salColor & 0x000000ff };
- CGColorRef color = CGColorCreate ( CGColorSpaceCreateWithName ( kCGColorSpaceGenericRGB ), elements );
- [ string addAttribute: attribute value: (id) color range: range ];
- CGColorRelease ( color );
- }
-}
-
-+(void)addFont:(NSFont *)font toString:(NSMutableAttributedString *)string forRange:(NSRange)range {
- if ( font != nil ) {
- NSDictionary * fontDictionary = [ NSDictionary dictionaryWithObjectsAndKeys:
- [ font fontName ], NSAccessibilityFontNameKey,
- [ font familyName ], NSAccessibilityFontFamilyKey,
- [ font displayName ], NSAccessibilityVisibleNameKey,
- [ NSNumber numberWithFloat: [ font pointSize ] ], NSAccessibilityFontSizeKey,
- nil
- ];
- [ string addAttribute: NSAccessibilityFontTextAttribute
- value: fontDictionary
- range: range
- ];
- }
-}
-
-+(void)applyAttributesFrom:(Sequence < PropertyValue >)attributes toString:(NSMutableAttributedString *)string forRange:(NSRange)range storeDefaultsTo:(AquaA11yWrapper *)wrapperStore getDefaultsFrom:(AquaA11yWrapper *)wrapper {
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- // constants
- static const OUString attrUnderline(RTL_CONSTASCII_USTRINGPARAM("CharUnderline"));
- static const OUString attrBold(RTL_CONSTASCII_USTRINGPARAM("CharWeight"));
- static const OUString attrFontname(RTL_CONSTASCII_USTRINGPARAM("CharFontName"));
- static const OUString attrItalic(RTL_CONSTASCII_USTRINGPARAM("CharPosture"));
- static const OUString attrHeight(RTL_CONSTASCII_USTRINGPARAM("CharHeight"));
- static const OUString attrStrikethrough(RTL_CONSTASCII_USTRINGPARAM("CharStrikeout"));
- static const OUString attrShadow(RTL_CONSTASCII_USTRINGPARAM("CharShadowed"));
- static const OUString attrUnderlineColor(RTL_CONSTASCII_USTRINGPARAM("CharUnderlineColor"));
- static const OUString attrUnderlineHasColor(RTL_CONSTASCII_USTRINGPARAM("CharUnderlineHasColor"));
- static const OUString attrForegroundColor(RTL_CONSTASCII_USTRINGPARAM("CharColor"));
- static const OUString attrBackgroundColor(RTL_CONSTASCII_USTRINGPARAM("CharBackColor"));
- static const OUString attrSuperscript(RTL_CONSTASCII_USTRINGPARAM("CharEscapement"));
- // vars
- OUString fontname;
- int fonttraits = 0;
- float fontsize = 0.0;
- sal_Int32 underlineColor = 0;
- BOOL underlineHasColor = NO;
- // add attributes to string
- for ( int attrIndex = 0; attrIndex < attributes.getLength(); attrIndex++ ) {
- PropertyValue property = attributes [ attrIndex ];
- // TODO: NSAccessibilityMisspelledTextAttribute, NSAccessibilityAttachmentTextAttribute, NSAccessibilityLinkTextAttribute
- // NSAccessibilityStrikethroughColorTextAttribute is unsupported by UNP-API
- if ( property.Value.hasValue() ) {
- if ( property.Name.equals ( attrUnderline ) ) {
- int style = [ AquaA11yTextAttributesWrapper convertUnderlineStyle: property ];
- if ( style != NSNoUnderlineStyle ) {
- [ string addAttribute: NSAccessibilityUnderlineTextAttribute value: [ NSNumber numberWithInt: style ] range: range ];
- }
- } else if ( property.Name.equals ( attrFontname ) ) {
- property.Value >>= fontname;
- } else if ( property.Name.equals ( attrBold ) ) {
- fonttraits |= [ AquaA11yTextAttributesWrapper convertBoldStyle: property ];
- } else if ( property.Name.equals ( attrItalic ) ) {
- fonttraits |= [ AquaA11yTextAttributesWrapper convertItalicStyle: property ];
- } else if ( property.Name.equals ( attrHeight ) ) {
- property.Value >>= fontsize;
- } else if ( property.Name.equals ( attrStrikethrough ) ) {
- if ( [ AquaA11yTextAttributesWrapper isStrikethrough: property ] ) {
- [ string addAttribute: NSAccessibilityStrikethroughTextAttribute value: [ NSNumber numberWithBool: YES ] range: range ];
- }
- } else if ( property.Name.equals ( attrShadow ) ) {
- if ( [ AquaA11yTextAttributesWrapper convertBoolean: property ] ) {
- [ string addAttribute: NSAccessibilityShadowTextAttribute value: [ NSNumber numberWithBool: YES ] range: range ];
- }
- } else if ( property.Name.equals ( attrUnderlineColor ) ) {
- property.Value >>= underlineColor;
- } else if ( property.Name.equals ( attrUnderlineHasColor ) ) {
- underlineHasColor = [ AquaA11yTextAttributesWrapper convertBoolean: property ];
- } else if ( property.Name.equals ( attrForegroundColor ) ) {
- [ AquaA11yTextAttributesWrapper addColor: property.Value.get<sal_Int32>() forAttribute: NSAccessibilityForegroundColorTextAttribute andRange: range toString: string ];
- } else if ( property.Name.equals ( attrBackgroundColor ) ) {
- [ AquaA11yTextAttributesWrapper addColor: property.Value.get<sal_Int32>() forAttribute: NSAccessibilityBackgroundColorTextAttribute andRange: range toString: string ];
- } else if ( property.Name.equals ( attrSuperscript ) ) {
- // values < zero mean subscript
- // values > zero mean superscript
- // this is true for both NSAccessibility-API and UNO-API
- NSNumber * number = [ AquaA11yTextAttributesWrapper convertShort: property ];
- if ( [ number shortValue ] != 0 ) {
- [ string addAttribute: NSAccessibilitySuperscriptTextAttribute value: number range: range ];
- }
- }
- }
- }
- // add underline information
- if ( underlineHasColor ) {
- [ AquaA11yTextAttributesWrapper addColor: underlineColor forAttribute: NSAccessibilityUnderlineColorTextAttribute andRange: range toString: string ];
- }
- // add font information
- if ( wrapperStore != nil ) { // default
- [ wrapperStore setDefaultFontname: CreateNSString ( fontname ) ];
- [ wrapperStore setDefaultFontsize: fontsize ];
- NSFont * font = [ [ NSFontManager sharedFontManager ] fontWithFamily: CreateNSString ( fontname ) traits: fonttraits weight: 0 size: fontsize ];
- [ AquaA11yTextAttributesWrapper addFont: font toString: string forRange: range ];
- } else if ( wrapper != nil && fonttraits != 0 ) { // attribute run and bold and/or italic was found
- NSFont * font = [ [ NSFontManager sharedFontManager ] fontWithFamily: [ wrapper defaultFontname ] traits: fonttraits weight: 0 size: [ wrapper defaultFontsize ] ];
- [ AquaA11yTextAttributesWrapper addFont: font toString: string forRange: range ];
- }
- [ pool release ];
-}
-
-+(NSMutableAttributedString *)createAttributedStringForElement:(AquaA11yWrapper *)wrapper inOrigRange:(id)origRange {
- static const Sequence < OUString > emptySequence;
- // vars
- NSMutableAttributedString * string = nil;
- int loc = [ origRange rangeValue ].location;
- int len = [ origRange rangeValue ].length;
- int endIndex = loc + len;
- int currentIndex = loc;
- try {
- NSString * myString = CreateNSString ( [ wrapper accessibleText ] -> getText() ); // TODO: dirty fix for i87817
- string = [ [ NSMutableAttributedString alloc ] initWithString: CreateNSString ( [ wrapper accessibleText ] -> getTextRange ( loc, loc + len ) ) ];
- if ( [ wrapper accessibleTextAttributes ] != nil && [myString characterAtIndex:0] != 57361) { // TODO: dirty fix for i87817
- [ string beginEditing ];
- // add default attributes for whole string
- Sequence < PropertyValue > defaultAttributes = [ wrapper accessibleTextAttributes ] -> getDefaultAttributes ( emptySequence );
- [ AquaA11yTextAttributesWrapper applyAttributesFrom: defaultAttributes toString: string forRange: [ origRange rangeValue ] storeDefaultsTo: wrapper getDefaultsFrom: nil ];
- // add attributes for attribute run(s)
- while ( currentIndex < endIndex ) {
- TextSegment textSegment = [ wrapper accessibleText ] -> getTextAtIndex ( currentIndex, AccessibleTextType::ATTRIBUTE_RUN );
- int endOfRange = endIndex > textSegment.SegmentEnd ? textSegment.SegmentEnd : endIndex;
- NSRange rangeForAttributeRun = NSMakeRange ( currentIndex, endOfRange - currentIndex );
- // add run attributes
- Sequence < PropertyValue > attributes = [ wrapper accessibleTextAttributes ] -> getRunAttributes ( currentIndex, emptySequence );
- [ AquaA11yTextAttributesWrapper applyAttributesFrom: attributes toString: string forRange: rangeForAttributeRun storeDefaultsTo: nil getDefaultsFrom: wrapper ];
- currentIndex = textSegment.SegmentEnd;
- }
- [ string endEditing ];
- }
- } catch ( IllegalArgumentException & e ) {
- // empty
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- } catch ( RuntimeException& ) {
- // at least don't crash
- }
- return string;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.h b/vcl/aqua/source/a11y/aqua11ytextwrapper.h
deleted file mode 100644
index fba5936864..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytextwrapper.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11TEXTWRAPPER_H
-#define _SV_AQUA11TEXTWRAPPER_H
-
-#include "aqua/aquavcltypes.h"
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yTextWrapper : NSObject
-{
-}
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)numberOfCharactersAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)selectedTextAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)selectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)visibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)stringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)attributedStringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)rangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point;
-+(id)boundsForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)styleRangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rTFForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range;
-+(id)lineForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index;
-+(id)rangeForLineAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)line;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(void)addParameterizedAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(NSArray *)specialAttributeNames;
-+(NSArray *)specialParameterizedAttributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setSelectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setSelectedTextAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-@end
-
-#endif // _SV_AQUA11TEXTWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm
deleted file mode 100644
index cb6fae77a7..0000000000
--- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm
+++ /dev/null
@@ -1,304 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ytextwrapper.h"
-#include "aqua11ytextattributeswrapper.h"
-#include "aqua11yutil.h"
-
-#include <com/sun/star/accessibility/AccessibleTextType.hpp>
-#include <com/sun/star/awt/Rectangle.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-using namespace ::rtl;
-
-// Wrapper for XAccessibleText, XAccessibleEditableText and XAccessibleMultiLineText
-
-@implementation AquaA11yTextWrapper : NSObject
-
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper {
- return CreateNSString ( [ wrapper accessibleText ] -> getText() );
-}
-
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value
-{
- // TODO
- (void)wrapper;
- (void)value;
-}
-
-+(id)numberOfCharactersAttributeForElement:(AquaA11yWrapper *)wrapper {
- return [ NSNumber numberWithLong: [ wrapper accessibleText ] -> getCharacterCount() ];
-}
-
-+(id)selectedTextAttributeForElement:(AquaA11yWrapper *)wrapper {
- return CreateNSString ( [ wrapper accessibleText ] -> getSelectedText() );
-}
-
-+(void)setSelectedTextAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value {
- if ( [ wrapper accessibleEditableText ] != nil ) {
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- OUString newText = GetOUString ( (NSString *) value );
- NSRange selectedTextRange = [ [ AquaA11yTextWrapper selectedTextRangeAttributeForElement: wrapper ] rangeValue ];
- try {
- [ wrapper accessibleEditableText ] -> replaceText ( selectedTextRange.location, selectedTextRange.location + selectedTextRange.length, newText );
- } catch ( const Exception & e ) {
- // empty
- }
- [ pool release ];
- }
-}
-
-+(id)selectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper {
- sal_Int32 start = [ wrapper accessibleText ] -> getSelectionStart();
- sal_Int32 end = [ wrapper accessibleText ] -> getSelectionEnd();
- if ( start != end ) {
- return [ NSValue valueWithRange: NSMakeRange ( start, end - start ) ]; // true selection
- } else {
- long caretPos = [ wrapper accessibleText ] -> getCaretPosition();
- if ( caretPos < 0 || caretPos > [ wrapper accessibleText ] -> getCharacterCount() ) {
- return nil;
- }
- return [ NSValue valueWithRange: NSMakeRange ( caretPos, 0 ) ]; // insertion point
- }
-}
-
-+(void)setSelectedTextRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value {
- NSRange range = [ value rangeValue ];
- try {
- [ wrapper accessibleText ] -> setSelection ( range.location, range.location + range.length );
- } catch ( const Exception & e ) {
- // empty
- }
-}
-
-+(id)visibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper {
- // the OOo a11y API returns only the visible portion...
- return [ NSValue valueWithRange: NSMakeRange ( 0, [ wrapper accessibleText ] -> getCharacterCount() ) ];
-}
-
-+(void)setVisibleCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value
-{
- // do nothing
- (void)wrapper;
- (void)value;
-}
-
-+(id)sharedTextUIElementsAttributeForElement:(AquaA11yWrapper *)wrapper
-{
- (void)wrapper;
- return [ [ NSArray alloc ] init ]; // unsupported
-}
-
-+(id)sharedCharacterRangeAttributeForElement:(AquaA11yWrapper *)wrapper
-{
- (void)wrapper;
- return [ NSValue valueWithRange: NSMakeRange ( 0, 0 ) ]; // unsupported
-}
-
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames {
- [ attributeNames addObjectsFromArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
-}
-
-+(NSArray *)specialAttributeNames {
- return [ NSArray arrayWithObjects:
- NSAccessibilityValueAttribute,
- NSAccessibilityNumberOfCharactersAttribute,
- NSAccessibilitySelectedTextAttribute,
- NSAccessibilitySelectedTextRangeAttribute,
- NSAccessibilityVisibleCharacterRangeAttribute,
- NSAccessibilitySharedTextUIElementsAttribute,
- NSAccessibilitySharedCharacterRangeAttribute,
- nil ];
-}
-
-+(void)addParameterizedAttributeNamesTo:(NSMutableArray *)attributeNames {
- [ attributeNames addObjectsFromArray: [ AquaA11yTextWrapper specialParameterizedAttributeNames ] ];
-}
-
-+(NSArray *)specialParameterizedAttributeNames {
- return [ NSArray arrayWithObjects:
- NSAccessibilityStringForRangeParameterizedAttribute,
- NSAccessibilityAttributedStringForRangeParameterizedAttribute,
- NSAccessibilityRangeForIndexParameterizedAttribute,
- NSAccessibilityRangeForPositionParameterizedAttribute,
- NSAccessibilityBoundsForRangeParameterizedAttribute,
- NSAccessibilityStyleRangeForIndexParameterizedAttribute,
- NSAccessibilityRTFForRangeParameterizedAttribute,
- NSAccessibilityLineForIndexParameterizedAttribute,
- NSAccessibilityRangeForLineParameterizedAttribute,
- nil ];
-}
-
-+(id)lineForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index {
- NSNumber * lineNumber = nil;
- try {
- sal_Int32 line = [ wrapper accessibleMultiLineText ] -> getLineNumberAtIndex ( (sal_Int32) [ index intValue ] );
- lineNumber = [ NSNumber numberWithInt: line ];
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- }
- return lineNumber;
-}
-
-+(id)rangeForLineAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)line {
- NSValue * range = nil;
- try {
- TextSegment textSegment = [ wrapper accessibleMultiLineText ] -> getTextAtLineNumber ( [ line intValue ] );
- range = [ NSValue valueWithRange: NSMakeRange ( textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- }
- return range;
-}
-
-+(id)stringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range {
- int loc = [ range rangeValue ].location;
- int len = [ range rangeValue ].length;
- NSMutableString * textRange = [ [ NSMutableString alloc ] init ];
- try {
- [ textRange appendString: CreateNSString ( [ wrapper accessibleText ] -> getTextRange ( loc, loc + len ) ) ];
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- }
- return textRange;
-}
-
-+(id)attributedStringForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range {
- return [ AquaA11yTextAttributesWrapper createAttributedStringForElement: wrapper inOrigRange: range ];
-}
-
-+(id)rangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index {
- NSValue * range = nil;
- try {
- TextSegment textSegment = [ wrapper accessibleText ] -> getTextBeforeIndex ( [ index intValue ], AccessibleTextType::GLYPH );
- range = [ NSValue valueWithRange: NSMakeRange ( textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- } catch ( IllegalArgumentException & e ) {
- // empty
- }
- return range;
-}
-
-+(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point {
- NSValue * value = nil;
- sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint ( [ AquaA11yUtil nsPointToVclPoint: point ] );
- if ( index > -1 ) {
- value = [ AquaA11yTextWrapper rangeForIndexAttributeForElement: wrapper forParameter: [ NSNumber numberWithLong: index ] ];
- }
- return value;
-}
-
-+(id)boundsForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range {
- NSValue * rect = nil;
- try {
- // TODO: this is ugly!!!
- // the UNP-API can only return the bounds for a single character, not for a range
- int loc = [ range rangeValue ].location;
- int len = [ range rangeValue ].length;
- int minx = 0x7fffffff, miny = 0x7fffffff, maxx = 0, maxy = 0;
- for ( int i = 0; i < len; i++ ) {
- Rectangle vclRect = [ wrapper accessibleText ] -> getCharacterBounds ( loc + i );
- if ( vclRect.X < minx ) {
- minx = vclRect.X;
- }
- if ( vclRect.Y < miny ) {
- miny = vclRect.Y;
- }
- if ( vclRect.Width + vclRect.X > maxx ) {
- maxx = vclRect.Width + vclRect.X;
- }
- if ( vclRect.Height + vclRect.Y > maxy ) {
- maxy = vclRect.Height + vclRect.Y;
- }
- }
- if ( [ wrapper accessibleComponent ] != nil ) {
- // get location on screen (must be added since get CharacterBounds returns values relative to parent)
- Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen();
- Point pos ( minx + screenPos.X, miny + screenPos.Y );
- Point size ( maxx - minx, maxy - miny );
- NSValue * nsPos = [ AquaA11yUtil vclPointToNSPoint: pos ];
- rect = [ NSValue valueWithRect: NSMakeRect ( [ nsPos pointValue ].x, [ nsPos pointValue ].y - size.Y, size.X, size.Y ) ];
- //printf("Range: %s --- Rect: %s\n", [ NSStringFromRange ( [ range rangeValue ] ) UTF8String ], [ NSStringFromRect ( [ rect rectValue ] ) UTF8String ]);
- }
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- }
- return rect;
-}
-
-+(id)styleRangeForIndexAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)index {
- NSValue * range = nil;
- try {
- TextSegment textSegment = [ wrapper accessibleText ] -> getTextAtIndex ( [ index intValue ], AccessibleTextType::ATTRIBUTE_RUN );
- range = [ NSValue valueWithRange: NSMakeRange ( textSegment.SegmentStart, textSegment.SegmentEnd - textSegment.SegmentStart ) ];
- } catch ( IndexOutOfBoundsException & e ) {
- // empty
- } catch ( IllegalArgumentException & e ) {
- // empty
- }
- return range;
-}
-
-+(id)rTFForRangeAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)range {
- NSData * rtfData = nil;
- NSAttributedString * attrString = (NSAttributedString *) [ AquaA11yTextWrapper attributedStringForRangeAttributeForElement: wrapper forParameter: range ];
- if ( attrString != nil ) {
- @try {
- rtfData = [ attrString RTFFromRange: [ range rangeValue ] documentAttributes: nil ];
- } @catch ( NSException * e) {
- // emtpy
- }
- }
- return rtfData;
-}
-
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- BOOL isSettable = NO;
- if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ]
- || [ attribute isEqualToString: NSAccessibilitySelectedTextAttribute ]
- || [ attribute isEqualToString: NSAccessibilitySelectedTextRangeAttribute ]
- || [ attribute isEqualToString: NSAccessibilityVisibleCharacterRangeAttribute ] ) {
- if ( ! [ [ wrapper accessibilityAttributeValue: NSAccessibilityRoleAttribute ] isEqualToString: NSAccessibilityStaticTextRole ] ) {
- isSettable = YES;
- }
- }
- return isSettable;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yutil.h b/vcl/aqua/source/a11y/aqua11yutil.h
deleted file mode 100644
index 7939685e8c..0000000000
--- a/vcl/aqua/source/a11y/aqua11yutil.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11YUTIL_H
-#define _SV_AQUA11YUTIL_H
-
-#include <com/sun/star/awt/Point.hpp>
-
-@interface AquaA11yUtil : NSObject {
-}
-+(NSValue *)vclPointToNSPoint:(::com::sun::star::awt::Point)vclPoint;
-+(::com::sun::star::awt::Point)nsPointToVclPoint:(NSValue *)nsPoint;
-@end
-
-#endif // _SV_AQUA11YUTIL_H
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yutil.mm b/vcl/aqua/source/a11y/aqua11yutil.mm
deleted file mode 100644
index b244f1f678..0000000000
--- a/vcl/aqua/source/a11y/aqua11yutil.mm
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/aquavcltypes.h"
-
-#include "aqua11yutil.h"
-
-using namespace ::com::sun::star::awt;
-
-@implementation AquaA11yUtil : NSObject
-
-// TODO: should be merged with AquaSalFrame::VCLToCocoa... to a general helper method
-+(NSValue *)vclPointToNSPoint:(Point)vclPoint {
- // VCL coordinates are in upper-left-notation, Cocoa likes it the Cartesian way (lower-left)
- NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- NSPoint nsPoint = NSMakePoint ( (float) vclPoint.X, (float) ( screenRect.size.height - vclPoint.Y ) );
- return [ NSValue valueWithPoint: nsPoint ];
-}
-
-// TODO: should be merged with AquaSalFrame::VCLToCocoa... to a general helper method
-+(Point)nsPointToVclPoint:(NSValue *)nsPoint {
- // VCL coordinates are in upper-left-notation, Cocoa likes it the Cartesian way (lower-left)
- NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- return Point ( static_cast<long>([ nsPoint pointValue ].x), static_cast<long>(screenRect.size.height - [ nsPoint pointValue ].y) );
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h b/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
deleted file mode 100644
index c6c5b53b5d..0000000000
--- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11VALUEWRAPPER_H
-#define _SV_AQUA11VALUEWRAPPER_H
-
-#include "aqua/salinst.h"
-#include "aqua/aquavcltypes.h"
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yValueWrapper : NSObject
-{
-}
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)minValueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(id)maxValueAttributeForElement:(AquaA11yWrapper *)wrapper;
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames;
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper;
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value;
-@end
-
-#endif // _SV_AQUA11VALUEWRAPPER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm b/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm
deleted file mode 100644
index fc10d44058..0000000000
--- a/vcl/aqua/source/a11y/aqua11yvaluewrapper.mm
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua11yvaluewrapper.h"
-#include "aqua11ywrapperstatictext.h"
-
-using namespace ::com::sun::star::uno;
-
-// Wrapper for XAccessibleValue
-// Remember: A UNO-Value is a single numeric value. Regarding the Mac A11y-API, a value can be anything!
-
-@implementation AquaA11yValueWrapper : NSObject
-
-+(id)valueAttributeForElement:(AquaA11yWrapper *)wrapper {
- // TODO: Detect Type from Any
- if ( [ wrapper accessibleValue ] != nil ) {
- long value = 0;
- [ wrapper accessibleValue ] -> getCurrentValue() >>= value;
- return [ NSNumber numberWithLong: value ];
- }
- return [ NSNumber numberWithLong: 0 ];
-}
-
-+(id)minValueAttributeForElement:(AquaA11yWrapper *)wrapper {
- // TODO: Detect Type from Any
- if ( [ wrapper accessibleValue ] != nil ) {
- long value = 0;
- [ wrapper accessibleValue ] -> getMinimumValue() >>= value;
- return [ NSNumber numberWithLong: value ];
- }
- return [ NSNumber numberWithLong: 0 ];
-}
-
-+(id)maxValueAttributeForElement:(AquaA11yWrapper *)wrapper {
- // TODO: Detect Type from Any
- if ( [ wrapper accessibleValue ] != nil ) {
- long value = 0;
- [ wrapper accessibleValue ] -> getMaximumValue() >>= value;
- return [ NSNumber numberWithLong: value ];
- }
- return [ NSNumber numberWithLong: 0 ];
-}
-
-+(void)setValueAttributeForElement:(AquaA11yWrapper *)wrapper to:(id)value {
- // TODO: Detect Type from NSNumber
- if ( [ value isKindOfClass: [ NSNumber class ] ]
- && [ wrapper accessibleValue ] != nil ) {
- NSNumber * number = (NSNumber *) value;
- Any numberAny ( [ number longValue ] );
- [ wrapper accessibleValue ] -> setCurrentValue ( numberAny );
- }
-}
-
-+(void)addAttributeNamesTo:(NSMutableArray *)attributeNames {
- [ attributeNames addObject: NSAccessibilityValueAttribute ];
-}
-
-+(BOOL)isAttributeSettable:(NSString *)attribute forElement:(AquaA11yWrapper *)wrapper {
- BOOL isSettable = NO;
- if ( [ wrapper accessibleValue ] != nil
- && [ attribute isEqualToString: NSAccessibilityValueAttribute ]
- && ! [ wrapper isKindOfClass: [ AquaA11yWrapperStaticText class ] ] ) {
- isSettable = YES;
- }
- return isSettable;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
deleted file mode 100644
index 2376111eb4..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ /dev/null
@@ -1,1150 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua/saldata.hxx"
-
-#include "aqua/aqua11ywrapper.h"
-#include "aqua/aqua11ylistener.hxx"
-#include "aqua/aqua11yfactory.h"
-#include "aqua/aqua11yfocustracker.hxx"
-
-#include "aqua11yfocuslistener.hxx"
-#include "aqua11yactionwrapper.h"
-#include "aqua11ycomponentwrapper.h"
-#include "aqua11yselectionwrapper.h"
-#include "aqua11ytablewrapper.h"
-#include "aqua11ytextwrapper.h"
-#include "aqua11yvaluewrapper.h"
-#include "aqua11yrolehelper.h"
-
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-#include <com/sun/star/awt/Size.hpp>
-#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
-#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-@interface SalFrameWindow : NSWindow
-{
-}
--(Reference<XAccessibleContext>)accessibleContext;
-@end
-
-static BOOL isPopupMenuOpen = NO;
-
-@implementation AquaA11yWrapper : NSView
-
-#pragma mark -
-#pragma mark Init and dealloc
-
--(id)initWithAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext {
- self = [ super init ];
- if ( self != nil ) {
- [ self setDefaults: rxAccessibleContext ];
- }
- return self;
-}
-
--(void) setDefaults: (Reference < XAccessibleContext >) rxAccessibleContext {
- mDefaultFontsize = 0.0;
- mpDefaultFontname = nil;
- mpReferenceWrapper = new ReferenceWrapper;
- mActsAsRadioGroup = NO;
- mpReferenceWrapper -> rAccessibleContext = rxAccessibleContext;
- mIsTableCell = NO;
- // Querying all supported interfaces
- try {
- // XAccessibleComponent
- mpReferenceWrapper -> rAccessibleComponent = Reference < XAccessibleComponent > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleExtendedComponent
- mpReferenceWrapper -> rAccessibleExtendedComponent = Reference < XAccessibleExtendedComponent > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleSelection
- mpReferenceWrapper -> rAccessibleSelection = Reference< XAccessibleSelection > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleTable
- mpReferenceWrapper -> rAccessibleTable = Reference < XAccessibleTable > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleText
- mpReferenceWrapper -> rAccessibleText = Reference < XAccessibleText > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleEditableText
- mpReferenceWrapper -> rAccessibleEditableText = Reference < XAccessibleEditableText > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleValue
- mpReferenceWrapper -> rAccessibleValue = Reference < XAccessibleValue > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleAction
- mpReferenceWrapper -> rAccessibleAction = Reference < XAccessibleAction > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleTextAttributes
- mpReferenceWrapper -> rAccessibleTextAttributes = Reference < XAccessibleTextAttributes > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleMultiLineText
- mpReferenceWrapper -> rAccessibleMultiLineText = Reference < XAccessibleMultiLineText > ( rxAccessibleContext, UNO_QUERY );
- // XAccessibleEventBroadcaster
- #if 0
- /* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
- That means we need to cache this, else e.g. tree list boxes are not accessible (moreover
- it crashes by notifying dead objects - which would seemt o be another bug)
-
- FIXME:
- Unfortunately this can increase memory consumption drastically until the non transient parent
- is destroyed an finally all the transients are released.
- */
- if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) )
- #endif
- {
- Reference< XAccessibleEventBroadcaster > xBroadcaster(rxAccessibleContext, UNO_QUERY);
- if( xBroadcaster.is() ) {
- /*
- * We intentionally do not hold a reference to the event listener in the wrapper object,
- * but let the listener control the life cycle of the wrapper instead ..
- */
- xBroadcaster->addEventListener( new AquaA11yEventListener( self, rxAccessibleContext -> getAccessibleRole() ) );
- }
- }
- // TABLE_CELL
- if ( rxAccessibleContext -> getAccessibleRole() == AccessibleRole::TABLE_CELL ) {
- mIsTableCell = YES;
- }
- } catch ( const Exception ) {
- }
-}
-
--(void)dealloc {
- if ( mpReferenceWrapper != nil ) {
- delete mpReferenceWrapper;
- }
- if ( mpDefaultFontname != nil ) {
- [ mpDefaultFontname release ];
- }
- [ super dealloc ];
-}
-
-#pragma mark -
-#pragma mark Utility Section
-
-// generates selectors for attribute name AXAttributeNameHere
-// (getter without parameter) attributeNameHereAttribute
-// (getter with parameter) attributeNameHereAttributeForParameter:
-// (setter) setAttributeNameHereAttributeForElement:to:
--(SEL)selectorForAttribute:(NSString *)attribute asGetter:(BOOL)asGetter withGetterParameter:(BOOL)withGetterParameter {
- SEL selector = nil;
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- @try {
- // step 1: create method name from attribute name
- NSMutableString * methodName = [ NSMutableString string ];
- if ( ! asGetter ) {
- [ methodName appendString: @"set" ];
- }
- NSRange aRange = { 2, 1 };
- NSString * firstChar = [ attribute substringWithRange: aRange ]; // drop leading "AX" and get first char
- if ( asGetter ) {
- [ methodName appendString: [ firstChar lowercaseString ] ];
- } else {
- [ methodName appendString: firstChar ];
- }
- [ methodName appendString: [ attribute substringFromIndex: 3 ] ]; // append rest of attribute name
- // append rest of method name
- [ methodName appendString: @"Attribute" ];
- if ( ! asGetter ) {
- [ methodName appendString: @"ForElement:to:" ];
- } else if ( asGetter && withGetterParameter ) {
- [ methodName appendString: @"ForParameter:" ];
- }
- // step 2: create selector
- selector = NSSelectorFromString ( methodName );
- } @catch ( id exception ) {
- selector = nil;
- }
- [ pool release ];
- return selector;
-}
-
--(Reference < XAccessible >)getFirstRadioButtonInGroup {
- Reference < XAccessibleRelationSet > rxAccessibleRelationSet = [ self accessibleContext ] -> getAccessibleRelationSet();
- if( rxAccessibleRelationSet.is() )
- {
- AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
- if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() )
- return Reference < XAccessible > ( relationMemberOf.TargetSet[0], UNO_QUERY );
- }
- return Reference < XAccessible > ();
-}
-
--(BOOL)isFirstRadioButtonInGroup {
- Reference < XAccessible > rFirstMateAccessible = [ self getFirstRadioButtonInGroup ];
- if ( rFirstMateAccessible.is() && rFirstMateAccessible -> getAccessibleContext().get() == [ self accessibleContext ] ) {
- return YES;
- }
- return NO;
-}
-
-#pragma mark -
-#pragma mark Attribute Value Getters
-// ( called via Reflection by accessibilityAttributeValue )
-
-/*
- Radiobutton grouping is done differently in NSAccessibility and the UNO-API. In UNO related radio buttons share an entry in their
- RelationSet. In NSAccessibility the relationship is axpressed through the hierarchy. A AXRadioGroup contains two or more AXRadioButton
- objects. Since this group is not available in the UNO hierarchy, an extra wrapper is used for it. This wrapper shares almost all
- attributes with the first radio button of the group, except for the role, subrole, role description, parent and children attributes.
- So in this five methods there is a special treatment for radio buttons and groups.
-*/
-
--(id)roleAttribute {
- if ( mActsAsRadioGroup ) {
- return NSAccessibilityRadioGroupRole;
- }
- else {
- return [ AquaA11yRoleHelper getNativeRoleFrom: [ self accessibleContext ] ];
- }
-}
-
--(id)subroleAttribute {
- if ( mActsAsRadioGroup ) {
- return @"";
- } else {
- NSString * subRole = [ AquaA11yRoleHelper getNativeSubroleFrom: [ self accessibleContext ] -> getAccessibleRole() ];
- if ( ! [ subRole isEqualToString: @"" ] ) {
- return subRole;
- } else {
- [ subRole release ];
- return [ super accessibilityAttributeValue: NSAccessibilitySubroleAttribute ];
- }
- }
-}
-
--(id)titleAttribute {
- return CreateNSString ( [ self accessibleContext ] -> getAccessibleName() );
-}
-
--(id)descriptionAttribute {
- if ( [ self accessibleContext ] -> getAccessibleRole() == AccessibleRole::COMBO_BOX ) {
- return [ self titleAttribute ];
- } else if ( [ self accessibleExtendedComponent ] != nil ) {
- return [ AquaA11yComponentWrapper descriptionAttributeForElement: self ];
- } else {
- return CreateNSString ( [ self accessibleContext ] -> getAccessibleDescription() );
- }
-}
-
--(id)enabledAttribute {
- if ( [ self accessibleContext ] -> getAccessibleStateSet().is() ) {
- return [ NSNumber numberWithBool: [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::ENABLED ) ];
- } else {
- return nil;
- }
-}
-
--(id)focusedAttribute {
- if ( [ self accessibleContext ] -> getAccessibleRole() == AccessibleRole::COMBO_BOX ) {
- id isFocused = nil;
- Reference < XAccessible > rxParent = [ self accessibleContext ] -> getAccessibleParent();
- if ( rxParent.is() ) {
- Reference < XAccessibleContext > rxContext = rxParent -> getAccessibleContext();
- if ( rxContext.is() && rxContext -> getAccessibleStateSet().is() ) {
- isFocused = [ NSNumber numberWithBool: rxContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::FOCUSED ) ];
- }
- }
- return isFocused;
- } else if ( [ self accessibleContext ] -> getAccessibleStateSet().is() ) {
- return [ NSNumber numberWithBool: [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::FOCUSED ) ];
- } else {
- return nil;
- }
-}
-
--(id)parentAttribute {
- if ( [ self accessibleContext ] -> getAccessibleRole() == AccessibleRole::RADIO_BUTTON && ! mActsAsRadioGroup ) {
- Reference < XAccessible > rxAccessible = [ self getFirstRadioButtonInGroup ];
- if ( rxAccessible.is() && rxAccessible -> getAccessibleContext().is() ) {
- Reference < XAccessibleContext > rxAccessibleContext = rxAccessible -> getAccessibleContext();
- id parent_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rxAccessibleContext createIfNotExists: YES asRadioGroup: YES ];
- [ parent_wrapper autorelease ];
- return NSAccessibilityUnignoredAncestor( parent_wrapper );
- }
- return nil;
- }
- try {
- Reference< XAccessible > xParent( [ self accessibleContext ] -> getAccessibleParent() );
- if ( xParent.is() ) {
- Reference< XAccessibleContext > xContext( xParent -> getAccessibleContext() );
- if ( xContext.is() ) {
- id parent_wrapper = [ AquaA11yFactory wrapperForAccessibleContext: xContext ];
- [ parent_wrapper autorelease ];
- return NSAccessibilityUnignoredAncestor( parent_wrapper );
- }
- }
- } catch (const Exception&) {
- }
-
- OSL_ASSERT( 0 );
- return nil;
-}
-
--(id)childrenAttribute {
- if ( mActsAsRadioGroup ) {
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
- Reference < XAccessibleRelationSet > rxAccessibleRelationSet = [ self accessibleContext ] -> getAccessibleRelationSet();
- AccessibleRelation relationMemberOf = rxAccessibleRelationSet -> getRelationByType ( AccessibleRelationType::MEMBER_OF );
- if ( relationMemberOf.RelationType == AccessibleRelationType::MEMBER_OF && relationMemberOf.TargetSet.hasElements() ) {
- for ( int index = 0; index < relationMemberOf.TargetSet.getLength(); index++ ) {
- Reference < XAccessible > rMateAccessible = Reference < XAccessible > ( relationMemberOf.TargetSet[index], UNO_QUERY );
- if ( rMateAccessible.is() ) {
- Reference< XAccessibleContext > rMateAccessibleContext( rMateAccessible -> getAccessibleContext() );
- if ( rMateAccessibleContext.is() ) {
- id wrapper = [ AquaA11yFactory wrapperForAccessibleContext: rMateAccessibleContext ];
- [ children addObject: wrapper ];
- [ wrapper release ];
- }
- }
- }
- }
- return children;
- } else if ( [ self accessibleTable ] != nil )
- {
- AquaA11yTableWrapper* pTable = [self isKindOfClass: [AquaA11yTableWrapper class]] ? (AquaA11yTableWrapper*)self : nil;
- return [ AquaA11yTableWrapper childrenAttributeForElement: pTable ];
- } else {
- try {
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
- Reference< XAccessibleContext > xContext( [ self accessibleContext ] );
-
- sal_Int32 cnt = xContext -> getAccessibleChildCount();
- for ( sal_Int32 i = 0; i < cnt; i++ ) {
- Reference< XAccessible > xChild( xContext -> getAccessibleChild( i ) );
- if( xChild.is() ) {
- Reference< XAccessibleContext > xChildContext( xChild -> getAccessibleContext() );
- // the menubar is already accessible (including Apple- and Application-Menu) through NSApplication => omit it here
- if ( xChildContext.is() && AccessibleRole::MENU_BAR != xChildContext -> getAccessibleRole() ) {
- id wrapper = [ AquaA11yFactory wrapperForAccessibleContext: xChildContext ];
- [ children addObject: wrapper ];
- [ wrapper release ];
- }
- }
- }
-
- // if not already acting as RadioGroup now is the time to replace RadioButtons with RadioGroups and remove RadioButtons
- if ( ! mActsAsRadioGroup ) {
- NSEnumerator * enumerator = [ children objectEnumerator ];
- AquaA11yWrapper * element;
- while ( ( element = ( (AquaA11yWrapper *) [ enumerator nextObject ] ) ) ) {
- if ( [ element accessibleContext ] -> getAccessibleRole() == AccessibleRole::RADIO_BUTTON ) {
- if ( [ element isFirstRadioButtonInGroup ] ) {
- id wrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ element accessibleContext ] createIfNotExists: YES asRadioGroup: YES ];
- [ children replaceObjectAtIndex: [ children indexOfObjectIdenticalTo: element ] withObject: wrapper ];
- }
- [ children removeObject: element ];
- }
- }
- }
-
- [ children autorelease ];
- return NSAccessibilityUnignoredChildren( children );
- } catch (const Exception &e) {
- // TODO: Log
- return nil;
- }
- }
-}
-
--(id)windowAttribute {
- // go upstairs until reaching the broken connection
- AquaA11yWrapper * aWrapper = self;
- while ( [ aWrapper accessibleContext ] -> getAccessibleParent().is() ) {
- aWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper accessibleContext ] -> getAccessibleParent() -> getAccessibleContext() ];
- [ aWrapper autorelease ];
- }
- // get associated NSWindow
- NSView * theView = [ aWrapper viewElementForParent ];
- return theView;
-}
-
--(id)topLevelUIElementAttribute {
- return [ self windowAttribute ];
-}
-
--(id)sizeAttribute {
- if ( [ self accessibleComponent ] != nil ) {
- return [ AquaA11yComponentWrapper sizeAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)positionAttribute {
- if ( [ self accessibleComponent ] != nil ) {
- return [ AquaA11yComponentWrapper positionAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)helpAttribute {
- return CreateNSString ( [ self accessibleContext ] -> getAccessibleDescription() );
-}
-
--(id)roleDescriptionAttribute {
- if ( mActsAsRadioGroup ) {
- return [ AquaA11yRoleHelper getRoleDescriptionFrom: NSAccessibilityRadioGroupRole with: @"" ];
- } else if( [ self accessibleContext ] -> getAccessibleRole() == AccessibleRole::RADIO_BUTTON ) {
- // FIXME: VO should read this because of hierarchy, this is just a workaround
- // get parent and its children
- AquaA11yWrapper * parent = [ self parentAttribute ];
- NSArray * children = [ parent childrenAttribute ];
- // find index of self
- int index = 1;
- NSEnumerator * enumerator = [ children objectEnumerator ];
- AquaA11yWrapper * child = nil;
- while ( ( child = [ enumerator nextObject ] ) ) {
- if ( self == child ) {
- break;
- }
- index++;
- }
- // build string
- NSNumber * nIndex = [ NSNumber numberWithInt: index ];
- NSNumber * nGroupsize = [ NSNumber numberWithInt: [ children count ] ];
- NSMutableString * value = [ [ NSMutableString alloc ] init ];
- [ value appendString: @"radio button " ];
- [ value appendString: [ nIndex stringValue ] ];
- [ value appendString: @" of " ];
- [ value appendString: [ nGroupsize stringValue ] ];
- // clean up and return string
- [ nIndex release ];
- [ nGroupsize release ];
- [ children release ];
- return value;
- } else {
- return [ AquaA11yRoleHelper getRoleDescriptionFrom:
- [ AquaA11yRoleHelper getNativeRoleFrom: [ self accessibleContext ] ]
- with: [ AquaA11yRoleHelper getNativeSubroleFrom: [ self accessibleContext ] -> getAccessibleRole() ] ];
- }
-}
-
--(id)valueAttribute {
- if ( [ [ self roleAttribute ] isEqualToString: NSAccessibilityMenuItemRole ] ) {
- return nil;
- } else if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper valueAttributeForElement: self ];
- } else if ( [ self accessibleValue ] != nil ) {
- return [ AquaA11yValueWrapper valueAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)minValueAttribute {
- if ( [ self accessibleValue ] != nil ) {
- return [ AquaA11yValueWrapper minValueAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)maxValueAttribute {
- if ( [ self accessibleValue ] != nil ) {
- return [ AquaA11yValueWrapper maxValueAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)contentsAttribute {
- return [ self childrenAttribute ];
-}
-
--(id)selectedChildrenAttribute {
- return [ AquaA11ySelectionWrapper selectedChildrenAttributeForElement: self ];
-}
-
--(id)numberOfCharactersAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper numberOfCharactersAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)selectedTextAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper selectedTextAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)selectedTextRangeAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper selectedTextRangeAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)visibleCharacterRangeAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper visibleCharacterRangeAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)tabsAttribute {
- return self; // TODO ???
-}
-
--(id)sharedTextUIElementsAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper sharedTextUIElementsAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)sharedCharacterRangeAttribute {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper sharedCharacterRangeAttributeForElement: self ];
- } else {
- return nil;
- }
-}
-
--(id)expandedAttribute {
- return [ NSNumber numberWithBool: [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::EXPANDED ) ];
-}
-
--(id)selectedAttribute {
- return [ NSNumber numberWithBool: [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::SELECTED ) ];
-}
-
--(id)stringForRangeAttributeForParameter:(id)range {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper stringForRangeAttributeForElement: self forParameter: range ];
- } else {
- return nil;
- }
-}
-
--(id)attributedStringForRangeAttributeForParameter:(id)range {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper attributedStringForRangeAttributeForElement: self forParameter: range ];
- } else {
- return nil;
- }
-}
-
--(id)rangeForIndexAttributeForParameter:(id)index {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper rangeForIndexAttributeForElement: self forParameter: index ];
- } else {
- return nil;
- }
-}
-
--(id)rangeForPositionAttributeForParameter:(id)point {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper rangeForPositionAttributeForElement: self forParameter: point ];
- } else {
- return nil;
- }
-}
-
--(id)boundsForRangeAttributeForParameter:(id)range {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper boundsForRangeAttributeForElement: self forParameter: range ];
- } else {
- return nil;
- }
-}
-
--(id)styleRangeForIndexAttributeForParameter:(id)index {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper styleRangeForIndexAttributeForElement: self forParameter: index ];
- } else {
- return nil;
- }
-}
-
--(id)rTFForRangeAttributeForParameter:(id)range {
- if ( [ self accessibleText ] != nil ) {
- return [ AquaA11yTextWrapper rTFForRangeAttributeForElement: self forParameter: range ];
- } else {
- return nil;
- }
-}
-
--(id)orientationAttribute {
- NSString * orientation = nil;
- Reference < XAccessibleStateSet > stateSet = [ self accessibleContext ] -> getAccessibleStateSet();
- if ( stateSet -> contains ( AccessibleStateType::HORIZONTAL ) ) {
- orientation = NSAccessibilityHorizontalOrientationValue;
- } else if ( stateSet -> contains ( AccessibleStateType::VERTICAL ) ) {
- orientation = NSAccessibilityVerticalOrientationValue;
- }
- return orientation;
-}
-
--(id)titleUIElementAttribute {
- if ( [ self accessibleContext ] -> getAccessibleRelationSet().is() ) {
- NSString * title = [ self titleAttribute ];
- id titleElement = nil;
- if ( [ title length ] == 0 ) {
- AccessibleRelation relationLabeledBy = [ self accessibleContext ] -> getAccessibleRelationSet() -> getRelationByType ( AccessibleRelationType::LABELED_BY );
- if ( relationLabeledBy.RelationType == AccessibleRelationType::LABELED_BY && relationLabeledBy.TargetSet.hasElements() ) {
- Reference < XAccessible > rxAccessible ( relationLabeledBy.TargetSet[0], UNO_QUERY );
- titleElement = [ AquaA11yFactory wrapperForAccessibleContext: rxAccessible -> getAccessibleContext() ];
- }
- }
- if ( title != nil ) {
- [ title release ];
- }
- return titleElement;
- } else {
- return nil;
- }
-}
-
--(id)servesAsTitleForUIElementsAttribute {
- if ( [ self accessibleContext ] -> getAccessibleRelationSet().is() ) {
- id titleForElement = nil;
- AccessibleRelation relationLabelFor = [ self accessibleContext ] -> getAccessibleRelationSet() -> getRelationByType ( AccessibleRelationType::LABEL_FOR );
- if ( relationLabelFor.RelationType == AccessibleRelationType::LABEL_FOR && relationLabelFor.TargetSet.hasElements() ) {
- Reference < XAccessible > rxAccessible ( relationLabelFor.TargetSet[0], UNO_QUERY );
- titleForElement = [ AquaA11yFactory wrapperForAccessibleContext: rxAccessible -> getAccessibleContext() ];
- }
- return titleForElement;
- } else {
- return nil;
- }
-}
-
--(id)lineForIndexAttributeForParameter:(id)index {
- if ( [ self accessibleMultiLineText ] != nil ) {
- return [ AquaA11yTextWrapper lineForIndexAttributeForElement: self forParameter: index ];
- } else {
- return nil;
- }
-}
-
--(id)rangeForLineAttributeForParameter:(id)line {
- if ( [ self accessibleMultiLineText ] != nil ) {
- return [ AquaA11yTextWrapper rangeForLineAttributeForElement: self forParameter: line ];
- } else {
- return nil;
- }
-}
-
-#pragma mark -
-#pragma mark Accessibility Protocol
-
--(id)accessibilityAttributeValue:(NSString *)attribute {
- // #i90575# guard NSAccessibility protocol against unwanted access
- if ( isPopupMenuOpen ) {
- return nil;
- }
-
- id value = nil;
- // if we are no longer in the wrapper repository, we have been disposed
- AquaA11yWrapper * theWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ self accessibleContext ] createIfNotExists: NO ];
- if ( theWrapper != nil || mIsTableCell ) {
- try {
- SEL methodSelector = [ self selectorForAttribute: attribute asGetter: YES withGetterParameter: NO ];
- if ( [ self respondsToSelector: methodSelector ] ) {
- value = [ self performSelector: methodSelector ];
- }
- } catch ( const DisposedException & e ) {
- mIsTableCell = NO; // just to be sure
- [ AquaA11yFactory removeFromWrapperRepositoryFor: [ self accessibleContext ] ];
- return nil;
- } catch ( const Exception & e ) {
- // empty
- }
- }
- if ( theWrapper != nil ) {
- [ theWrapper release ]; // the above called method calls retain on the returned Wrapper
- }
- return value;
-}
-
--(BOOL)accessibilityIsIgnored {
- // #i90575# guard NSAccessibility protocol against unwanted access
- if ( isPopupMenuOpen ) {
- return nil;
- }
- BOOL ignored = NO;
- sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole();
- switch ( nRole ) {
- case AccessibleRole::PANEL:
- case AccessibleRole::FRAME:
- case AccessibleRole::ROOT_PANE:
- case AccessibleRole::SEPARATOR:
- case AccessibleRole::FILLER:
- case AccessibleRole::DIALOG:
- ignored = YES;
- break;
- default:
- ignored = ! ( [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::VISIBLE ) );
- break;
- }
- return ignored; // TODO: to be completed
-}
-
--(NSArray *)accessibilityAttributeNames {
- // #i90575# guard NSAccessibility protocol against unwanted access
- if ( isPopupMenuOpen ) {
- return nil;
- }
- NSString * nativeSubrole = nil;
- NSString * title = nil;
- NSMutableArray * attributeNames = nil;
- sal_Int32 nAccessibleChildren = 0;
- try {
- // Default Attributes
- attributeNames = [ NSMutableArray arrayWithObjects:
- NSAccessibilityRoleAttribute,
- NSAccessibilityDescriptionAttribute,
- NSAccessibilityParentAttribute,
- NSAccessibilityWindowAttribute,
- NSAccessibilityHelpAttribute,
- NSAccessibilityTopLevelUIElementAttribute,
- NSAccessibilityRoleDescriptionAttribute,
- nil ];
- nativeSubrole = (NSString *) [ AquaA11yRoleHelper getNativeSubroleFrom: [ self accessibleContext ] -> getAccessibleRole() ];
- title = (NSString *) [ self titleAttribute ];
- Reference < XAccessibleRelationSet > rxRelationSet = [ self accessibleContext ] -> getAccessibleRelationSet();
- // Special Attributes depending on attribute values
- if ( nativeSubrole != nil && ! [ nativeSubrole isEqualToString: @"" ] ) {
- [ attributeNames addObject: NSAccessibilitySubroleAttribute ];
- }
- try
- {
- nAccessibleChildren = [ self accessibleContext ] -> getAccessibleChildCount();
- if ( nAccessibleChildren > 0 ) {
- [ attributeNames addObject: NSAccessibilityChildrenAttribute ];
- }
- }
- catch( DisposedException& ) {}
- catch( RuntimeException& ) {}
-
- if ( title != nil && ! [ title isEqualToString: @"" ] ) {
- [ attributeNames addObject: NSAccessibilityTitleAttribute ];
- }
- if ( [ title length ] == 0 && rxRelationSet.is() && rxRelationSet -> containsRelation ( AccessibleRelationType::LABELED_BY ) ) {
- [ attributeNames addObject: NSAccessibilityTitleUIElementAttribute ];
- }
- if ( rxRelationSet.is() && rxRelationSet -> containsRelation ( AccessibleRelationType::LABEL_FOR ) ) {
- [ attributeNames addObject: NSAccessibilityServesAsTitleForUIElementsAttribute ];
- }
- // Special Attributes depending on interface
- if( [self accessibleContext ] -> getAccessibleRole() == AccessibleRole::TABLE )
- [AquaA11yTableWrapper addAttributeNamesTo: attributeNames object: self];
-
- if ( [ self accessibleText ] != nil ) {
- [ AquaA11yTextWrapper addAttributeNamesTo: attributeNames ];
- }
- if ( [ self accessibleComponent ] != nil ) {
- [ AquaA11yComponentWrapper addAttributeNamesTo: attributeNames ];
- }
- if ( [ self accessibleSelection ] != nil ) {
- [ AquaA11ySelectionWrapper addAttributeNamesTo: attributeNames ];
- }
- if ( [ self accessibleValue ] != nil ) {
- [ AquaA11yValueWrapper addAttributeNamesTo: attributeNames ];
- }
- [ nativeSubrole release ];
- [ title release ];
- return attributeNames;
- } catch ( DisposedException & e ) { // Object is no longer available
- if ( nativeSubrole != nil ) {
- [ nativeSubrole release ];
- }
- if ( title != nil ) {
- [ title release ];
- }
- if ( attributeNames != nil ) {
- [ attributeNames release ];
- }
- [ AquaA11yFactory removeFromWrapperRepositoryFor: [ self accessibleContext ] ];
- return [ [ NSArray alloc ] init ];
- }
-}
-
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- BOOL isSettable = NO;
- if ( [ self accessibleText ] != nil ) {
- isSettable = [ AquaA11yTextWrapper isAttributeSettable: attribute forElement: self ];
- }
- if ( ! isSettable && [ self accessibleComponent ] != nil ) {
- isSettable = [ AquaA11yComponentWrapper isAttributeSettable: attribute forElement: self ];
- }
- if ( ! isSettable && [ self accessibleSelection ] != nil ) {
- isSettable = [ AquaA11ySelectionWrapper isAttributeSettable: attribute forElement: self ];
- }
- if ( ! isSettable && [ self accessibleValue ] != nil ) {
- isSettable = [ AquaA11yValueWrapper isAttributeSettable: attribute forElement: self ];
- }
- return isSettable; // TODO: to be completed
-}
-
--(NSArray *)accessibilityParameterizedAttributeNames {
- NSMutableArray * attributeNames = [ [ NSMutableArray alloc ] init ];
- // Special Attributes depending on interface
- if ( [ self accessibleText ] != nil ) {
- [ AquaA11yTextWrapper addParameterizedAttributeNamesTo: attributeNames ];
- }
- return attributeNames; // TODO: to be completed
-}
-
--(id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter {
- SEL methodSelector = [ self selectorForAttribute: attribute asGetter: YES withGetterParameter: YES ];
- if ( [ self respondsToSelector: methodSelector ] ) {
- return [ self performSelector: methodSelector withObject: parameter ];
- }
- return nil; // TODO: to be completed
-}
-
--(BOOL)accessibilitySetOverrideValue:(id)value forAttribute:(NSString *)attribute
-{
- (void)value;
- (void)attribute;
- return NO; // TODO
-}
-
--(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
- SEL methodSelector = [ self selectorForAttribute: attribute asGetter: NO withGetterParameter: NO ];
- if ( [ AquaA11yComponentWrapper respondsToSelector: methodSelector ] ) {
- [ AquaA11yComponentWrapper performSelector: methodSelector withObject: self withObject: value ];
- }
- if ( [ AquaA11yTextWrapper respondsToSelector: methodSelector ] ) {
- [ AquaA11yTextWrapper performSelector: methodSelector withObject: self withObject: value ];
- }
- if ( [ AquaA11ySelectionWrapper respondsToSelector: methodSelector ] ) {
- [ AquaA11ySelectionWrapper performSelector: methodSelector withObject: self withObject: value ];
- }
- if ( [ AquaA11yValueWrapper respondsToSelector: methodSelector ] ) {
- [ AquaA11yValueWrapper performSelector: methodSelector withObject: self withObject: value ];
- }
-}
-
--(id)accessibilityFocusedUIElement {
- // #i90575# guard NSAccessibility protocol against unwanted access
- if ( isPopupMenuOpen ) {
- return nil;
- }
-
- // as this seems to be the first API call on a newly created SalFrameView object,
- // make sure self gets registered in the repository ..
- [ self accessibleContext ];
-
- AquaA11yWrapper * focusedUIElement = AquaA11yFocusListener::get()->getFocusedUIElement();
-// AquaA11yWrapper * ancestor = focusedUIElement;
-
- // Make sure the focused object is a descendant of self
-// do {
-// if( self == ancestor )
- return focusedUIElement;
-
-// ancestor = [ ancestor accessibilityAttributeValue: NSAccessibilityParentAttribute ];
-// } while( nil != ancestor );
-
- return self;
-}
-
-// TODO: hard-coded like the role descriptions. is there a better way?
--(NSString *)accessibilityActionDescription:(NSString *)action {
- if ( [ action isEqualToString: NSAccessibilityConfirmAction ] ) {
- return @"confirm";
- } else if ( [ action isEqualToString: NSAccessibilityDecrementAction ] ) {
- return @"decrement";
- } else if ( [ action isEqualToString: NSAccessibilityDeleteAction ] ) {
- return @"delete";
- } else if ( [ action isEqualToString: NSAccessibilityIncrementAction ] ) {
- return @"increment";
- } else if ( [ action isEqualToString: NSAccessibilityPickAction ] ) {
- return @"pick";
- } else if ( [ action isEqualToString: NSAccessibilityPressAction ] ) {
- return @"press";
- } else if ( [ action isEqualToString: NSAccessibilityCancelAction ] ) {
- return @"cancel";
- } else if ( [ action isEqualToString: NSAccessibilityRaiseAction ] ) {
- return @"raise";
- } else if ( [ action isEqualToString: NSAccessibilityShowMenuAction ] ) {
- return @"show menu";
- } else {
- return [ NSString string ];
- }
-}
-
--(AquaA11yWrapper *)actionResponder {
- AquaA11yWrapper * wrapper = nil;
- // get some information
- NSString * role = (NSString *) [ self accessibilityAttributeValue: NSAccessibilityRoleAttribute ];
- id enabledAttr = [ self enabledAttribute ];
- BOOL enabled = [ enabledAttr boolValue ];
- NSView * parent = (NSView *) [ self accessibilityAttributeValue: NSAccessibilityParentAttribute ];
- AquaA11yWrapper * parentAsWrapper = nil;
- if ( [ parent isKindOfClass: [ AquaA11yWrapper class ] ] ) {
- parentAsWrapper = (AquaA11yWrapper *) parent;
- }
- NSString * parentRole = (NSString *) [ parent accessibilityAttributeValue: NSAccessibilityRoleAttribute ];
- // if we are a textarea inside a combobox, then the combobox is the action responder
- if ( enabled
- && [ role isEqualToString: NSAccessibilityTextAreaRole ]
- && [ parentRole isEqualToString: NSAccessibilityComboBoxRole ]
- && parentAsWrapper != nil ) {
- wrapper = parentAsWrapper;
- } else if ( enabled && [ self accessibleAction ] != nil ) {
- wrapper = self ;
- }
- [ parentRole release ];
- [ enabledAttr release ];
- [ role release ];
- return wrapper;
-}
-
--(void)accessibilityPerformAction:(NSString *)action {
- AquaA11yWrapper * actionResponder = [ self actionResponder ];
- if ( actionResponder != nil ) {
- [ AquaA11yActionWrapper doAction: action ofElement: actionResponder ];
- }
-}
-
--(NSArray *)accessibilityActionNames {
- NSArray * actionNames = nil;
- AquaA11yWrapper * actionResponder = [ self actionResponder ];
- if ( actionResponder != nil ) {
- actionNames = [ AquaA11yActionWrapper actionNamesForElement: actionResponder ];
- } else {
- actionNames = [ [ NSArray alloc ] init ];
- }
- return actionNames;
-}
-
-#pragma mark -
-#pragma mark Hit Test
-
--(BOOL)isViewElement:(NSObject *)viewElement hitByPoint:(NSPoint)point {
- BOOL hit = NO;
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- NSValue * position = [ viewElement accessibilityAttributeValue: NSAccessibilityPositionAttribute ];
- NSValue * size = [ viewElement accessibilityAttributeValue: NSAccessibilitySizeAttribute ];
- if ( position != nil && size != nil ) {
- float minX = [ position pointValue ].x;
- float minY = [ position pointValue ].y;
- float maxX = minX + [ size sizeValue ].width;
- float maxY = minY + [ size sizeValue ].height;
- if ( minX < point.x && maxX > point.x && minY < point.y && maxY > point.y ) {
- hit = YES;
- }
- }
- [ pool release ];
- return hit;
-}
-
-Reference < XAccessibleContext > hitTestRunner ( com::sun::star::awt::Point point,
- Reference < XAccessibleContext > rxAccessibleContext ) {
- Reference < XAccessibleContext > hitChild;
- Reference < XAccessibleContext > emptyReference;
- try {
- Reference < XAccessibleComponent > rxAccessibleComponent ( rxAccessibleContext, UNO_QUERY );
- if ( rxAccessibleComponent.is() ) {
- com::sun::star::awt::Point location = rxAccessibleComponent -> getLocationOnScreen();
- com::sun::star::awt::Point hitPoint ( point.X - location.X , point.Y - location.Y);
- Reference < XAccessible > rxAccessible = rxAccessibleComponent -> getAccessibleAtPoint ( hitPoint );
- if ( rxAccessible.is() && rxAccessible -> getAccessibleContext().is() ) {
- if ( rxAccessible -> getAccessibleContext() -> getAccessibleChildCount() > 0 ) {
- hitChild = hitTestRunner ( point, rxAccessible -> getAccessibleContext() );
- if ( ! hitChild.is() ) {
- hitChild = rxAccessible -> getAccessibleContext();
- }
- } else {
- hitChild = rxAccessible -> getAccessibleContext();
- }
- }
- }
- if ( !hitChild.is() && rxAccessibleContext -> getAccessibleChildCount() > 0 ) { // special treatment for e.g. comboboxes
- for ( int i = 0; i < rxAccessibleContext -> getAccessibleChildCount(); i++ ) {
- Reference < XAccessible > rxAccessibleChild = rxAccessibleContext -> getAccessibleChild ( i );
- if ( rxAccessibleChild.is() && rxAccessibleChild -> getAccessibleContext().is() && rxAccessibleChild -> getAccessibleContext() -> getAccessibleRole() != AccessibleRole::LIST ) {
- Reference < XAccessibleContext > myHitChild = hitTestRunner ( point, rxAccessibleChild -> getAccessibleContext() );
- if ( myHitChild.is() ) {
- hitChild = myHitChild;
- break;
- }
- }
- }
- }
- } catch ( RuntimeException ) {
- return emptyReference;
- }
- return hitChild;
-}
-
--(id)accessibilityHitTest:(NSPoint)point {
- static id wrapper = nil;
- if ( nil != wrapper ) {
- [ wrapper release ];
- wrapper = nil;
- }
- Reference < XAccessibleContext > hitChild;
- NSRect screenRect = [ [ NSScreen mainScreen ] frame ];
- com::sun::star::awt::Point hitPoint ( static_cast<long>(point.x) , static_cast<long>(screenRect.size.height - point.y) );
- // check child windows first
- NSWindow * window = (NSWindow *) [ self accessibilityAttributeValue: NSAccessibilityWindowAttribute ];
- NSArray * childWindows = [ window childWindows ];
- if ( [ childWindows count ] > 0 ) {
- NSWindow * element = nil;
- NSEnumerator * enumerator = [ childWindows objectEnumerator ];
- while ( ( element = [ enumerator nextObject ] ) && hitChild == nil ) {
- if ( [ element isKindOfClass: [ SalFrameWindow class ] ] && [ self isViewElement: element hitByPoint: point ] ) {
- // we have a child window that is hit
- Reference < XAccessibleRelationSet > relationSet = [ ( ( SalFrameWindow * ) element ) accessibleContext ] -> getAccessibleRelationSet();
- if ( relationSet.is() && relationSet -> containsRelation ( AccessibleRelationType::SUB_WINDOW_OF )) {
- // we have a valid relation to the parent element
- AccessibleRelation relation = relationSet -> getRelationByType ( AccessibleRelationType::SUB_WINDOW_OF );
- for ( int i = 0; i < relation.TargetSet.getLength() && !hitChild.is(); i++ ) {
- Reference < XAccessible > rxAccessible ( relation.TargetSet [ i ], UNO_QUERY );
- if ( rxAccessible.is() && rxAccessible -> getAccessibleContext().is() ) {
- // hit test for children of parent
- hitChild = hitTestRunner ( hitPoint, rxAccessible -> getAccessibleContext() );
- }
- }
- }
- }
- }
- }
- // nothing hit yet, so check ourself
- if ( ! hitChild.is() ) {
- if ( mpReferenceWrapper == nil ) {
- [ self setDefaults: [ self accessibleContext ] ];
- }
- hitChild = hitTestRunner ( hitPoint, mpReferenceWrapper -> rAccessibleContext );
- }
- if ( hitChild.is() ) {
- wrapper = [ AquaA11yFactory wrapperForAccessibleContext: hitChild ];
- }
- if ( wrapper != nil ) {
- [ wrapper retain ]; // TODO: retain only when transient ?
- }
- return wrapper;
-}
-
-#pragma mark -
-#pragma mark Access Methods
-
--(XAccessibleAction *)accessibleAction {
- return mpReferenceWrapper -> rAccessibleAction.get();
-}
-
--(XAccessibleContext *)accessibleContext {
- return mpReferenceWrapper -> rAccessibleContext.get();
-}
-
--(XAccessibleComponent *)accessibleComponent {
- return mpReferenceWrapper -> rAccessibleComponent.get();
-}
-
--(XAccessibleExtendedComponent *)accessibleExtendedComponent {
- return mpReferenceWrapper -> rAccessibleExtendedComponent.get();
-}
-
--(XAccessibleSelection *)accessibleSelection {
- return mpReferenceWrapper -> rAccessibleSelection.get();
-}
-
--(XAccessibleTable *)accessibleTable {
- return mpReferenceWrapper -> rAccessibleTable.get();
-}
-
--(XAccessibleText *)accessibleText {
- return mpReferenceWrapper -> rAccessibleText.get();
-}
-
--(XAccessibleEditableText *)accessibleEditableText {
- return mpReferenceWrapper -> rAccessibleEditableText.get();
-}
-
--(XAccessibleValue *)accessibleValue {
- return mpReferenceWrapper -> rAccessibleValue.get();
-}
-
--(XAccessibleTextAttributes *)accessibleTextAttributes {
- return mpReferenceWrapper -> rAccessibleTextAttributes.get();
-}
-
--(XAccessibleMultiLineText *)accessibleMultiLineText {
- return mpReferenceWrapper -> rAccessibleMultiLineText.get();
-}
-
--(NSView *)viewElementForParent {
- return self;
-}
-
-// These four are for AXTextAreas only. They are needed, because bold and italic
-// attributes have to be bound to a font on the Mac. Our UNO-API instead handles
-// and reports them independently. When they occur we bundle them to a font with
-// this information here to create a according NSFont.
--(void)setDefaultFontname:(NSString *)fontname {
- if ( mpDefaultFontname != nil ) {
- [ mpDefaultFontname release ];
- }
- mpDefaultFontname = fontname;
-}
-
--(NSString *)defaultFontname {
- return mpDefaultFontname;
-}
-
--(void)setDefaultFontsize:(float)fontsize {
- mDefaultFontsize = fontsize;
-}
-
--(float)defaultFontsize {
- return mDefaultFontsize;
-}
-
--(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup {
- mActsAsRadioGroup = actsAsRadioGroup;
-}
-
--(BOOL)actsAsRadioGroup {
- return mActsAsRadioGroup;
-}
-
-+(void)setPopupMenuOpen:(BOOL)popupMenuOpen {
- isPopupMenuOpen = popupMenuOpen;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperbutton.h b/vcl/aqua/source/a11y/aqua11ywrapperbutton.h
deleted file mode 100644
index d378cc585a..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperbutton.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERBUTTON_H
-#define _SV_AQUA11WRAPPERBUTTON_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperButton : AquaA11yWrapper
-{
-}
--(id)valueAttribute;
--(id)descriptionAttribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERBUTTON_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm b/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm
deleted file mode 100644
index dd9b95901d..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperbutton.mm
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrapperbutton.h"
-#include "aqua11ytextwrapper.h"
-
-// Wrapper for AXButton role
-
-@implementation AquaA11yWrapperButton : AquaA11yWrapper
-
--(id)valueAttribute {
- return [ NSString string ]; // we propagate AXTitle, that's enough
-}
-
--(id)descriptionAttribute {
- return [ NSString string ]; // we propagate AXTitle, that's enough
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- if ( [ attributeNames containsObject: NSAccessibilityTitleAttribute ] ) {
- [ attributeNames removeObject: NSAccessibilityDescriptionAttribute ];
- } else {
- [ attributeNames addObject: NSAccessibilityTitleAttribute ];
- }
- // Remove text-specific attributes
- [ attributeNames removeObjectsInArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
deleted file mode 100644
index 7d47c55388..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERCHECKBOX_H
-#define _SV_AQUA11WRAPPERCHECKBOX_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperCheckBox : AquaA11yWrapper
-{
-}
--(id)valueAttribute;
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERCHECKOBOX_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm b/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm
deleted file mode 100644
index 1c70d774d0..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappercheckbox.mm
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrappercheckbox.h"
-#include "aqua11yvaluewrapper.h"
-#include "aqua11ytextwrapper.h"
-
-// Wrapper for AXCheckbox role
-
-@implementation AquaA11yWrapperCheckBox : AquaA11yWrapper
-
--(id)valueAttribute {
- if ( [ self accessibleValue ] != nil ) {
- return [ AquaA11yValueWrapper valueAttributeForElement: self ];
- }
- return [ NSNumber numberWithInt: 0 ];
-}
-
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ] ) {
- return NO;
- }
- return [ super accessibilityIsAttributeSettable: attribute ];
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Remove text-specific attributes
- [ attributeNames removeObjectsInArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
- [ attributeNames addObject: NSAccessibilityValueAttribute ];
- [ attributeNames addObject: NSAccessibilityMinValueAttribute ];
- [ attributeNames addObject: NSAccessibilityMaxValueAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h b/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
deleted file mode 100644
index a5ed434b52..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERCOMBOBOX_H
-#define _SV_AQUA11WRAPPERCOMBOBOX_H
-
-#include "aqua/aqua11ywrapper.h"
-#include <com/sun/star/accessibility/XAccessibleContext.hpp>
-
-@interface AquaA11yWrapperComboBox : AquaA11yWrapper
-{
- AquaA11yWrapper * textArea;
-}
--(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext;
--(id)valueAttribute;
--(id)numberOfCharactersAttribute;
--(id)selectedTextAttribute;
--(id)selectedTextRangeAttribute;
--(id)visibleCharacterRangeAttribute;
-// Accessibility Protocol
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERCOMBOBOX_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm b/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm
deleted file mode 100644
index 1fd7468f88..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappercombobox.mm
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrappercombobox.h"
-#include "aqua11yrolehelper.h"
-
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-// Wrapper for AXCombobox role
-
-@implementation AquaA11yWrapperComboBox : AquaA11yWrapper
-
-#pragma mark -
-#pragma mark Specialized Init Method
-
--(id)initWithAccessibleContext: (Reference < XAccessibleContext >) rxAccessibleContext {
- self = [ super initWithAccessibleContext: rxAccessibleContext ];
- if ( self != nil )
- {
- textArea = nil;
- }
- return self;
-}
-
-#pragma mark -
-#pragma mark Private Helper Method
-
--(AquaA11yWrapper *)textArea {
- // FIXME: May cause problems when stored. Then get dynamically each time (bad performance!)
- if ( textArea == nil ) {
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- NSArray * elementChildren = [ super childrenAttribute ];
- if ( [ elementChildren count ] > 0 ) {
- NSEnumerator * enumerator = [ elementChildren objectEnumerator ];
- id child;
- while ( ( child = [ enumerator nextObject ] ) ) {
- AquaA11yWrapper * element = ( AquaA11yWrapper * ) child;
- if ( [ [ AquaA11yRoleHelper getNativeRoleFrom: [ element accessibleContext ] ] isEqualToString: NSAccessibilityTextAreaRole ] ) {
- textArea = element;
- break;
- }
- }
- }
- [ pool release ];
- }
- return textArea;
-}
-
-#pragma mark -
-#pragma mark Wrapped Attributes From Contained Text Area
-
--(id)valueAttribute {
- if ( [ self textArea ] != nil ) {
- return [ [ self textArea ] valueAttribute ];
- }
- return @"";
-}
-
--(id)numberOfCharactersAttribute {
- if ( [ self textArea ] != nil ) {
- return [ [ self textArea ] numberOfCharactersAttribute ];
- }
- return [ NSNumber numberWithInt: 0 ];
-}
-
--(id)selectedTextAttribute {
- if ( [ self textArea ] != nil ) {
- return [ [ self textArea ] selectedTextAttribute ];
- }
- return @"";
-}
-
--(id)selectedTextRangeAttribute {
- if ( [ self textArea ] != nil ) {
- return [ [ self textArea ] selectedTextRangeAttribute ];
- }
- return [ NSValue valueWithRange: NSMakeRange ( 0, 0 ) ];
-}
-
--(id)visibleCharacterRangeAttribute {
- if ( [ self textArea ] != nil ) {
- return [ [ self textArea ] visibleCharacterRangeAttribute ];
- }
- return [ NSValue valueWithRange: NSMakeRange ( 0, 0 ) ];
-}
-
-#pragma mark -
-#pragma mark Accessibility Protocol
-
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- if ( [ self textArea ] != nil && (
- [ attribute isEqualToString: NSAccessibilitySelectedTextAttribute ]
- || [ attribute isEqualToString: NSAccessibilitySelectedTextRangeAttribute ]
- || [ attribute isEqualToString: NSAccessibilityVisibleCharacterRangeAttribute ] ) ) {
- return [ [ self textArea ] accessibilityIsAttributeSettable: attribute ];
- }
- return [ super accessibilityIsAttributeSettable: attribute ];
-}
-
--(void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
- if ( [ self textArea ] != nil && (
- [ attribute isEqualToString: NSAccessibilitySelectedTextAttribute ]
- || [ attribute isEqualToString: NSAccessibilitySelectedTextRangeAttribute ]
- || [ attribute isEqualToString: NSAccessibilityVisibleCharacterRangeAttribute ] ) ) {
- return [ [ self textArea ] accessibilitySetValue: value forAttribute: attribute ];
- }
- return [ super accessibilitySetValue: value forAttribute: attribute ];
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ NSArray arrayWithObjects:
- NSAccessibilityTitleAttribute,
- NSAccessibilityChildrenAttribute,
- nil ]
- ];
- [ attributeNames addObjectsFromArray: [ NSArray arrayWithObjects:
- NSAccessibilityExpandedAttribute,
- NSAccessibilityValueAttribute,
- NSAccessibilityNumberOfCharactersAttribute,
- NSAccessibilitySelectedTextAttribute,
- NSAccessibilitySelectedTextRangeAttribute,
- NSAccessibilityVisibleCharacterRangeAttribute,
- nil ]
- ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappergroup.h b/vcl/aqua/source/a11y/aqua11ywrappergroup.h
deleted file mode 100644
index f3342b2f5d..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappergroup.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERGROUP_H
-#define _SV_AQUA11WRAPPERGROUP_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperGroup : AquaA11yWrapper
-{
-}
--(id)titleUIElementAttribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERGROUP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappergroup.mm b/vcl/aqua/source/a11y/aqua11ywrappergroup.mm
deleted file mode 100644
index f3e1dcf769..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappergroup.mm
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrappergroup.h"
-
-// Wrapper for AXGroup role
-
-@implementation AquaA11yWrapperGroup : AquaA11yWrapper
-
--(id)titleUIElementAttribute {
- return self; // TODO
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ NSArray arrayWithObjects:
- NSAccessibilityTitleAttribute,
- NSAccessibilityEnabledAttribute,
- NSAccessibilitySelectedChildrenAttribute,
- nil ]
- ];
- [ attributeNames addObject: NSAccessibilityContentsAttribute ];
- [ attributeNames addObject: NSAccessibilityTitleUIElementAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperlist.h b/vcl/aqua/source/a11y/aqua11ywrapperlist.h
deleted file mode 100644
index bcb67d499c..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperlist.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERLIST_H
-#define _SV_AQUA11WRAPPERLIST_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperList : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERLIST_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperlist.mm b/vcl/aqua/source/a11y/aqua11ywrapperlist.mm
deleted file mode 100644
index 9c7f5f6fe9..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperlist.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrapperlist.h"
-
-using namespace ::com::sun::star::accessibility;
-
-// Wrapper for AXList role
-
-@implementation AquaA11yWrapperList : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames addObject: NSAccessibilityOrientationAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
deleted file mode 100644
index 20043af855..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERRADIOBUTTON_H
-#define _SV_AQUA11WRAPPERRADIOBUTTON_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperRadioButton : AquaA11yWrapper
-{
-}
--(id)valueAttribute;
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERRADIOGROUP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm b/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm
deleted file mode 100644
index af4fda68a8..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiobutton.mm
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrapperradiobutton.h"
-#include "aqua11ytextwrapper.h"
-#include "aqua11yvaluewrapper.h"
-
-// Wrapper for AXRadioButton role
-
-@implementation AquaA11yWrapperRadioButton : AquaA11yWrapper
-
--(id)valueAttribute {
- if ( [ self accessibleValue ] != nil ) {
- return [ AquaA11yValueWrapper valueAttributeForElement: self ];
- }
- return [ NSNumber numberWithInt: 0 ];
-}
-
--(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- if ( [ attribute isEqualToString: NSAccessibilityValueAttribute ] ) {
- return NO;
- }
- return [ super accessibilityIsAttributeSettable: attribute ];
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
- [ attributeNames addObject: NSAccessibilityMinValueAttribute ];
- [ attributeNames addObject: NSAccessibilityMaxValueAttribute ];
- [ attributeNames addObject: NSAccessibilityValueAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h
deleted file mode 100644
index 162383c229..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERRADIOGROUP_H
-#define _SV_AQUA11WRAPPERRADIOGROUP_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperRadioGroup : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERRADIOGROUP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm b/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm
deleted file mode 100644
index 4766800537..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperradiogroup.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrapperradiogroup.h"
-#include "aqua11ytextwrapper.h"
-
-// Wrapper for AXRadioGroup role
-
-@implementation AquaA11yWrapperRadioGroup : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
- [ attributeNames removeObject: NSAccessibilityTitleAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperrow.h b/vcl/aqua/source/a11y/aqua11ywrapperrow.h
deleted file mode 100644
index 148dd55d0d..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperrow.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERROW_H
-#define _SV_AQUA11WRAPPERROW_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperRow : AquaA11yWrapper
-{
-}
--(id)disclosingAttribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERROW_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperrow.mm b/vcl/aqua/source/a11y/aqua11ywrapperrow.mm
deleted file mode 100644
index 8ecd37aafc..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperrow.mm
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrapperrow.h"
-#include "aqua11ytextwrapper.h"
-
-// Wrapper for AXRow role
-
-@implementation AquaA11yWrapperRow : AquaA11yWrapper
-
--(id)disclosingAttribute {
- return NO; // TODO
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ AquaA11yTextWrapper specialAttributeNames ] ];
- [ attributeNames removeObject: NSAccessibilityTitleAttribute ];
- [ attributeNames removeObject: NSAccessibilityEnabledAttribute ];
- [ attributeNames removeObject: NSAccessibilityFocusedAttribute ];
- [ attributeNames addObject: NSAccessibilitySelectedAttribute ];
- [ attributeNames addObject: NSAccessibilityDisclosingAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h
deleted file mode 100644
index 57dcca8fd5..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERSCROLLAREA_H
-#define _SV_AQUA11WRAPPERSCROLLAREA_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperScrollArea : AquaA11yWrapper
-{
-}
--(id)verticalScrollBarAttribute;
--(id)horizontalScrollBarAttribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERSCROLLAREA_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm b/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm
deleted file mode 100644
index 7c9c6f12fc..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollarea.mm
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrapperscrollarea.h"
-#include "aqua11ywrapperscrollbar.h"
-#include "aqua11yrolehelper.h"
-
-// Wrapper for AXScrollArea role
-
-@implementation AquaA11yWrapperScrollArea : AquaA11yWrapper
-
--(id)scrollBarWithOrientation:(NSString *)orientation {
- AquaA11yWrapper * theScrollBar = nil;
- NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ];
- NSArray * elementChildren = [ self accessibilityAttributeValue: NSAccessibilityChildrenAttribute ];
- if ( [ elementChildren count ] > 0 ) {
- NSEnumerator * enumerator = [ elementChildren objectEnumerator ];
- id child;
- while ( ( child = [ enumerator nextObject ] ) ) {
- AquaA11yWrapper * element = ( AquaA11yWrapper * ) child;
- if ( [ element isKindOfClass: [ AquaA11yWrapperScrollBar class ] ] ) {
- AquaA11yWrapperScrollBar * scrollBar = (AquaA11yWrapperScrollBar *) element;
- if ( [ [ scrollBar orientationAttribute ] isEqualToString: orientation ] ) {
- theScrollBar = scrollBar;
- break;
- }
- }
- }
- }
- [ pool release ];
- return theScrollBar;
-}
-
--(id)verticalScrollBarAttribute {
- return [ self scrollBarWithOrientation: NSAccessibilityVerticalOrientationValue ];
-}
-
--(id)horizontalScrollBarAttribute {
- return [ self scrollBarWithOrientation: NSAccessibilityHorizontalOrientationValue ];
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObject: NSAccessibilityEnabledAttribute ];
- [ attributeNames addObjectsFromArray: [ NSArray arrayWithObjects:
- NSAccessibilityContentsAttribute,
- NSAccessibilityVerticalScrollBarAttribute,
- NSAccessibilityHorizontalScrollBarAttribute,
- nil ]
- ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h
deleted file mode 100644
index 0cf3ef125f..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERSCROLLBAR_H
-#define _SV_AQUA11WRAPPERSCROLLBAR_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperScrollBar : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERSCROLLBAR_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm b/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm
deleted file mode 100644
index 5087ae5e3f..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperscrollbar.mm
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-
-#include "aqua11ywrapperscrollbar.h"
-
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-
-// Wrapper for AXScrollBar role
-
-@implementation AquaA11yWrapperScrollBar : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames addObject: NSAccessibilityOrientationAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappersplitter.h b/vcl/aqua/source/a11y/aqua11ywrappersplitter.h
deleted file mode 100644
index cda7344cdd..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappersplitter.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERSPLITTER_H
-#define _SV_AQUA11WRAPPERSPLITTER_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperSplitter : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERSPLITTER_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm b/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm
deleted file mode 100644
index 96f8c6413c..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappersplitter.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrappersplitter.h"
-
-using namespace ::com::sun::star::accessibility;
-
-// Wrapper for AXSplitter role
-
-@implementation AquaA11yWrapperSplitter : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames addObject: NSAccessibilityOrientationAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h
deleted file mode 100644
index 50f0f8fa9e..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERSTATICTEXT_H
-#define _SV_AQUA11WRAPPERSTATICTEXT_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperStaticText : AquaA11yWrapper
-{
-}
--(id)titleAttribute;
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERSTATICTEXT_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm b/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm
deleted file mode 100644
index d280264a36..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrapperstatictext.mm
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrapperstatictext.h"
-
-// Wrapper for AXStaticText role
-
-@implementation AquaA11yWrapperStaticText : AquaA11yWrapper
-
--(id)titleAttribute {
- NSString * title = [ super titleAttribute ];
- if ( [ title isEqualToString: [ super valueAttribute ] ] ) {
- return [ NSString string ];
- }
- return title;
-}
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObject: NSAccessibilityTitleAttribute ];
- [ attributeNames removeObject: NSAccessibilitySharedTextUIElementsAttribute ];
- [ attributeNames removeObject: NSAccessibilitySharedCharacterRangeAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h
deleted file mode 100644
index 778a369c9e..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERTABGROUP_H
-#define _SV_AQUA11WRAPPERTABGROUP_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperTabGroup : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERTABGROUP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm b/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm
deleted file mode 100644
index 09fa3d2b69..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertabgroup.mm
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrappertabgroup.h"
-
-// Wrapper for AXTabGroup role
-
-@implementation AquaA11yWrapperTabGroup : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames addObjectsFromArray: [ NSArray arrayWithObjects:
- NSAccessibilityContentsAttribute,
- NSAccessibilityTabsAttribute,
- nil ]
- ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertextarea.h b/vcl/aqua/source/a11y/aqua11ywrappertextarea.h
deleted file mode 100644
index 7c9f23f28c..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertextarea.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERTEXTAREA_H
-#define _SV_AQUA11WRAPPERTEXTAREA_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperTextArea : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERTEXTAREA_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm b/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm
deleted file mode 100644
index 074b6d84d4..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertextarea.mm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrappertextarea.h"
-
-// Wrapper for AXTextArea role
-
-@implementation AquaA11yWrapperTextArea : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObject: NSAccessibilityTitleAttribute ];
- [ attributeNames removeObject: NSAccessibilityEnabledAttribute ];
- [ attributeNames addObject: NSAccessibilityChildrenAttribute ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h
deleted file mode 100644
index 4a719d1f60..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SV_AQUA11WRAPPERTOOLBAR_H
-#define _SV_AQUA11WRAPPERTOOLBAR_H
-
-#include "aqua/aqua11ywrapper.h"
-
-@interface AquaA11yWrapperToolbar : AquaA11yWrapper
-{
-}
--(NSArray *)accessibilityAttributeNames;
-@end
-
-#endif // _SV_AQUA11WRAPPERTOOLBAR_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm b/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm
deleted file mode 100644
index 636be7b2fd..0000000000
--- a/vcl/aqua/source/a11y/aqua11ywrappertoolbar.mm
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "aqua/salinst.h"
-#include "aqua11ywrappertoolbar.h"
-
-// Wrapper for AXToolbar role
-
-@implementation AquaA11yWrapperToolbar : AquaA11yWrapper
-
--(NSArray *)accessibilityAttributeNames {
- // Default Attributes
- NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super accessibilityAttributeNames ] ];
- // Special Attributes and removing unwanted attributes depending on role
- [ attributeNames removeObjectsInArray: [ NSArray arrayWithObjects:
- NSAccessibilityTitleAttribute,
- NSAccessibilityEnabledAttribute,
- nil ]
- ];
- return attributeNames;
-}
-
-@end
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/documentfocuslistener.cxx b/vcl/aqua/source/a11y/documentfocuslistener.cxx
deleted file mode 100644
index a9f526f4b2..0000000000
--- a/vcl/aqua/source/a11y/documentfocuslistener.cxx
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "documentfocuslistener.hxx"
-
-#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
-
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-
-//------------------------------------------------------------------------------
-
-DocumentFocusListener::DocumentFocusListener(AquaA11yFocusTracker& rTracker) :
- m_aFocusTracker(rTracker)
-{
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL
-DocumentFocusListener::disposing( const EventObject& aEvent )
- throw (RuntimeException)
-{
- // Unref the object here, but do not remove as listener since the object
- // might no longer be in a state that safely allows this.
- if( aEvent.Source.is() )
- m_aRefList.erase(aEvent.Source);
-}
-
-//------------------------------------------------------------------------------
-
-void SAL_CALL
-DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent )
- throw( RuntimeException )
-{
- switch( aEvent.EventId )
- {
- case AccessibleEventId::STATE_CHANGED:
- try
- {
- sal_Int16 nState = AccessibleStateType::INVALID;
- aEvent.NewValue >>= nState;
-
- if( AccessibleStateType::FOCUSED == nState )
- m_aFocusTracker.setFocusedObject( getAccessible(aEvent) );
- }
- catch(IndexOutOfBoundsException e)
- {
- OSL_TRACE("Focused object has invalid index in parent");
- }
- break;
-
- case AccessibleEventId::CHILD:
- {
- Reference< XAccessible > xChild;
- if( (aEvent.OldValue >>= xChild) && xChild.is() )
- detachRecursive(xChild);
-
- if( (aEvent.NewValue >>= xChild) && xChild.is() )
- attachRecursive(xChild);
- }
- break;
-
- case AccessibleEventId::INVALIDATE_ALL_CHILDREN:
- {
- Reference< XAccessible > xAccessible( getAccessible(aEvent) );
- detachRecursive(xAccessible);
- attachRecursive(xAccessible);
- }
-
- OSL_TRACE( "Invalidate all children called\n" );
- break;
- default:
- break;
- }
-}
-
-//------------------------------------------------------------------------------
-
-Reference< XAccessible > DocumentFocusListener::getAccessible(const EventObject& aEvent )
- throw (IndexOutOfBoundsException, RuntimeException)
-{
- Reference< XAccessible > xAccessible(aEvent.Source, UNO_QUERY);
-
- if( xAccessible.is() )
- return xAccessible;
-
- Reference< XAccessibleContext > xContext(aEvent.Source, UNO_QUERY);
-
- if( xContext.is() )
- {
- Reference< XAccessible > xParent( xContext->getAccessibleParent() );
- if( xParent.is() )
- {
- Reference< XAccessibleContext > xParentContext( xParent->getAccessibleContext() );
- if( xParentContext.is() )
- {
- return xParentContext->getAccessibleChild( xContext->getAccessibleIndexInParent() );
- }
- }
- }
-
- return Reference< XAccessible >();
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::attachRecursive(const Reference< XAccessible >& xAccessible)
- throw (IndexOutOfBoundsException, RuntimeException)
-{
- Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
-
- if( xContext.is() )
- attachRecursive(xAccessible, xContext);
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::attachRecursive(
- const Reference< XAccessible >& xAccessible,
- const Reference< XAccessibleContext >& xContext
-) throw (IndexOutOfBoundsException, RuntimeException)
-{
- if( xContext.is() )
- {
- Reference< XAccessibleStateSet > xStateSet = xContext->getAccessibleStateSet();
-
- if( xStateSet.is() )
- attachRecursive(xAccessible, xContext, xStateSet);
- }
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::attachRecursive(
- const Reference< XAccessible >& xAccessible,
- const Reference< XAccessibleContext >& xContext,
- const Reference< XAccessibleStateSet >& xStateSet
-) throw (IndexOutOfBoundsException,RuntimeException)
-{
- if( xStateSet->contains(AccessibleStateType::FOCUSED ) )
- m_aFocusTracker.setFocusedObject( xAccessible );
-
- Reference< XAccessibleEventBroadcaster > xBroadcaster =
- Reference< XAccessibleEventBroadcaster >(xContext, UNO_QUERY);
-
- // If not already done, add the broadcaster to the list and attach as listener.
- if( xBroadcaster.is() && m_aRefList.insert(xBroadcaster).second )
- {
- xBroadcaster->addEventListener(static_cast< XAccessibleEventListener *>(this));
-
- if( ! xStateSet->contains(AccessibleStateType::MANAGES_DESCENDANTS ) )
- {
- sal_Int32 n, nmax = xContext->getAccessibleChildCount();
- for( n = 0; n < nmax; n++ )
- {
- Reference< XAccessible > xChild( xContext->getAccessibleChild( n ) );
-
- if( xChild.is() )
- attachRecursive(xChild);
- }
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::detachRecursive(const Reference< XAccessible >& xAccessible)
- throw (IndexOutOfBoundsException, RuntimeException)
-{
- Reference< XAccessibleContext > xContext = xAccessible->getAccessibleContext();
-
- if( xContext.is() )
- detachRecursive(xAccessible, xContext);
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::detachRecursive(
- const Reference< XAccessible >& xAccessible,
- const Reference< XAccessibleContext >& xContext
-) throw (IndexOutOfBoundsException, RuntimeException)
-{
- Reference< XAccessibleStateSet > xStateSet = xContext->getAccessibleStateSet();
-
- if( xStateSet.is() )
- detachRecursive(xAccessible, xContext, xStateSet);
-}
-
-//------------------------------------------------------------------------------
-
-void DocumentFocusListener::detachRecursive(
- const Reference< XAccessible >&,
- const Reference< XAccessibleContext >& xContext,
- const Reference< XAccessibleStateSet >& xStateSet
-) throw (IndexOutOfBoundsException, RuntimeException)
-{
- Reference< XAccessibleEventBroadcaster > xBroadcaster =
- Reference< XAccessibleEventBroadcaster >(xContext, UNO_QUERY);
-
- if( xBroadcaster.is() && 0 < m_aRefList.erase(xBroadcaster) )
- {
- xBroadcaster->removeEventListener(static_cast< XAccessibleEventListener *>(this));
-
- if( ! xStateSet->contains(AccessibleStateType::MANAGES_DESCENDANTS ) )
- {
- sal_Int32 n, nmax = xContext->getAccessibleChildCount();
- for( n = 0; n < nmax; n++ )
- {
- Reference< XAccessible > xChild( xContext->getAccessibleChild( n ) );
-
- if( xChild.is() )
- detachRecursive(xChild);
- }
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/documentfocuslistener.hxx b/vcl/aqua/source/a11y/documentfocuslistener.hxx
deleted file mode 100644
index 60475ebdff..0000000000
--- a/vcl/aqua/source/a11y/documentfocuslistener.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _DOCUMENTFOCUSLISTENER_HXX_
-#define _DOCUMENTFOCUSLISTENER_HXX_
-
-#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-#include "aqua/aqua11yfocustracker.hxx"
-
-#include <set>
-
-// -------------------------
-// - DocumentFocusListener -
-// -------------------------
-
-class DocumentFocusListener :
- public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleEventListener >
-{
-
-public:
-
- DocumentFocusListener(AquaA11yFocusTracker& rTracker);
-
- void attachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- void attachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& xContext
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- void attachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& xContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet >& xStateSet
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- void detachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- void detachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& xContext
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- void detachRecursive(
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xAccessible,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& xContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet >& xStateSet
- ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- static ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > getAccessible(const ::com::sun::star::lang::EventObject& aEvent )
- throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
-
- // XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XAccessibleEventListener
- virtual void SAL_CALL notifyEvent( const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
- throw( ::com::sun::star::uno::RuntimeException );
-
-private:
- std::set< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > m_aRefList;
-
- AquaA11yFocusTracker& m_aFocusTracker;
-};
-
-#endif // _DOCUMENTFOCUSLISTENER_HXX_
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/aqua/source/a11y/readme.txt b/vcl/aqua/source/a11y/readme.txt
deleted file mode 100644
index 19e80ab1a1..0000000000
--- a/vcl/aqua/source/a11y/readme.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Naming scheme:
-
-aqua11yXYZhelper: Helper class providing static methods
-
-aqua11yXYZwrapper: Wrapper around one (or two) UNO-interfaces
-
-aqua11ywrapperXYZ: Subclass of aqua11ywrapper for a specific AXRole
-