Commits

Anonymous committed 3a68f1f

accfixes2: accessible name for scroll bars is horizontal/vertical scroll bar

  • Participants
  • Parent commits cd4eaa1

Comments (0)

Files changed (3)

accessibility/inc/accessibility/helper/accessiblestrings.hrc

 // Accessible Action Id's ------------------------------------------------------
 
 #define RID_STR_ACC_ACTION_CLICK			( RID_TK_ACC_START +    0 )
-#define RID_STR_ACC_ACTION_TOGGLEPOPUP		( RID_TK_ACC_START +    1 )
+#define RID_STR_ACC_ACTION_TOGGLEPOPUP			( RID_TK_ACC_START +    1 )
 #define RID_STR_ACC_ACTION_SELECT			( RID_TK_ACC_START +    2 )
 #define RID_STR_ACC_ACTION_INCLINE			( RID_TK_ACC_START +    3 )
 #define RID_STR_ACC_ACTION_DECLINE			( RID_TK_ACC_START +    4 )
 
 #define	RID_STR_ACC_ACTION_CHECK			( RID_TK_ACC_START +    11 )
 #define	RID_STR_ACC_ACTION_UNCHECK			( RID_TK_ACC_START +    12 )
-#define RID_STR_ACC_NAME_BROWSEBUTTON		( RID_TK_ACC_START + 100 )
-#define RID_STR_ACC_DESC_PANELDECL_TABBAR   ( RID_TK_ACC_START + 101 )
+#define RID_STR_ACC_SCROLLBAR_NAME_VERTICAL		( RID_TK_ACC_START +    14 )
+#define RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL		( RID_TK_ACC_START +    15 )
+#define RID_STR_ACC_NAME_BROWSEBUTTON			( RID_TK_ACC_START + 100 )
+#define RID_STR_ACC_DESC_PANELDECL_TABBAR   		( RID_TK_ACC_START + 101 )
 
 // -----------------------------------------------------------------------------
 

accessibility/source/helper/accessiblestrings.src

 {
 	Text [ en-US ] = "Uncheck";
 };
+String RID_STR_ACC_SCROLLBAR_NAME_VERTICAL
+{
+	Text [ en-US ] = "Vertical scroll bar";
+};
+String RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL
+{
+	Text [ en-US ] = "Horizontal scroll bar";
+};
 String RID_STR_ACC_DESC_PANELDECL_TABBAR
 {
     Text [ en-US ] = "Panel Deck Tab Bar";

accessibility/source/standard/vclxaccessiblescrollbar.cxx

 }
 
 // -----------------------------------------------------------------------------
+
+// IAccessible2 implementation, 2009
+::rtl::OUString VCLXAccessibleScrollBar::getAccessibleName(  ) throw (uno::RuntimeException)
+{
+	OExternalLockGuard aGuard( this );
+
+	::rtl::OUString aName;
+	VCLXScrollBar* pVCLXScrollBar = static_cast< VCLXScrollBar* >( GetVCLXWindow() );
+	if ( pVCLXScrollBar )
+	{
+		if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::HORIZONTAL )
+            aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL );
+		else if ( pVCLXScrollBar->getOrientation() == ScrollBarOrientation::VERTICAL )
+            aName = TK_RES_STRING( RID_STR_ACC_SCROLLBAR_NAME_VERTICAL );
+	}
+	return aName;
+}
+