Commits

Anonymous committed a40baf6

accfixes2: minor changes

Comments (0)

Files changed (2)

accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx

 
 #include <accessibility/standard/vclxaccessibletextcomponent.hxx>
 
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
-#endif
 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
-
-#ifndef _CPPUHELPER_IMPLBASE2_HXX
 #include <cppuhelper/implbase2.hxx>
-#endif
 
 
 //	----------------------------------------------------

accessibility/source/standard/vclxaccessiblebutton.cxx

 
 		if ( pButton->IsPressed() )
             rStateSet.AddState( AccessibleStateType::PRESSED );
+
+        // IA2 CWS: If the button has a poppup menu,it should has the state EXPANDABLE
+        if( pButton->GetType() == WINDOW_MENUBUTTON )
+        {
+        	rStateSet.AddState( AccessibleStateType::EXPANDABLE );	
+        }
+		if( pButton->GetStyle() & WB_DEFBUTTON )
+		{
+			rStateSet.AddState( AccessibleStateType::DEFAULT );	
+		}
 	}
 }
 
 	OExternalLockGuard aGuard( this );
 
 	::rtl::OUString aName( VCLXAccessibleTextComponent::getAccessibleName() );
+
+	// IA2 CWS: Removed special handling for browse/more buttons. 
+	//          Comment was "the '...' or '<<' or '>>' should be kepted per the requirements from AT"
+	// MT: We did introduce this special handling by intention. 
+	//     As the original text is still what you get via XAccessibleText,
+	//     I think for the accessible name the stuff below is correct.
+
 	sal_Int32 nLength = aName.getLength();
 
 	if ( nLength >= 3 && aName.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("..."), nLength - 3 ) )