summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/a11y/aqua11yrolehelper.mm
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-07-25 08:06:05 +0000
committerOliver Bolte <obo@openoffice.org>2008-07-25 08:06:05 +0000
commit226a6cbbb36862d46af9f926d7fc83a9ca9c7cd7 (patch)
tree6ed6c0149b5c636233f3c575b6fdbd1812d068ca /vcl/aqua/source/a11y/aqua11yrolehelper.mm
parentf4210b48ec23153e252de6734fad1d362bede926 (diff)
INTEGRATION: CWS aqua11y02 (1.2.30); FILE MERGED
2008/06/10 08:41:14 fne 1.2.30.6: #i90525# changed role, so VO speaks title of cells 2008/05/29 12:43:29 fne 1.2.30.5: #i88046# distinguish between combobox and popup menu button 2008/05/29 10:32:49 fne 1.2.30.4: #i88047# menu button role added 2008/05/27 09:01:41 fne 1.2.30.3: #i88047# added role description for menu button 2008/05/26 11:40:10 fne 1.2.30.2: #i88047# temporary solution until new role is added 2008/05/15 13:57:44 fne 1.2.30.1: #i88043# TEXT_FRAME is a group
Diffstat (limited to 'vcl/aqua/source/a11y/aqua11yrolehelper.mm')
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.mm52
1 files changed, 48 insertions, 4 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.mm b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
index 251d76763782..cec0064e420f 100644
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.mm
+++ b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
@@ -8,7 +8,7 @@
*
* $RCSfile: aqua11yrolehelper.mm,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
@@ -35,6 +35,7 @@
#include "aqua11yrolehelper.h"
#include "aqua11yfactory.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;
@@ -87,7 +88,7 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::OPTION_PANE, NSAccessibilityUnknownRole ); // FIXME
MAP( AccessibleRole::PAGE_TAB, NSAccessibilityButtonRole );
MAP( AccessibleRole::PAGE_TAB_LIST, NSAccessibilityTabGroupRole );
- MAP( AccessibleRole::PANEL, NSAccessibilityUnknownRole ); // FIXME
+ MAP( AccessibleRole::PANEL, NSAccessibilityGroupRole );
MAP( AccessibleRole::PARAGRAPH, NSAccessibilityTextAreaRole );
MAP( AccessibleRole::PASSWORD_TEXT, NSAccessibilityTextFieldRole );
MAP( AccessibleRole::POPUP_MENU, NSAccessibilityMenuRole );
@@ -106,15 +107,29 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitterRole );
MAP( AccessibleRole::STATUS_BAR, NSAccessibilityGroupRole ); // FIXME
MAP( AccessibleRole::TABLE, NSAccessibilityTableRole );
- MAP( AccessibleRole::TABLE_CELL, NSAccessibilityStaticTextRole ); // FIXME
+ MAP( AccessibleRole::TABLE_CELL, NSAccessibilityTextFieldRole );
MAP( AccessibleRole::TEXT, NSAccessibilityTextAreaRole );
- MAP( AccessibleRole::TEXT_FRAME, NSAccessibilityUnknownRole );
+ 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;
@@ -139,6 +154,17 @@ using namespace ::com::sun::star::uno;
[ 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;
}
@@ -217,6 +243,20 @@ using namespace ::com::sun::star::uno;
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;
@@ -271,6 +311,10 @@ using namespace ::com::sun::star::uno;
} else if ( [ subRole isEqualToString: NSAccessibilityTableRowSubrole ] ) {
roleDescription = @"table row";
}
+ } else if ( [ role isEqualToString: NSAccessibilityMenuButtonRole ] ) {
+ roleDescription = @"menu button";
+ } else if ( [ role isEqualToString: NSAccessibilityPopUpButtonRole ] ) {
+ roleDescription = @"popup menu button";
}
return roleDescription;
}