You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/01/21 09:47:40 UTC

svn commit: r1436226 [1/2] - in /openoffice/branches/ia2/main/svtools: ./ inc/svtools/ source/brwbox/ source/contnr/ source/control/ source/edit/ source/misc/

Author: steve_y
Date: Mon Jan 21 08:47:39 2013
New Revision: 1436226

URL: http://svn.apache.org/viewvc?rev=1436226&view=rev
Log:
IA2 migration for svtools module

Added:
    openoffice/branches/ia2/main/svtools/inc/svtools/accessibleruler.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbar.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx
    openoffice/branches/ia2/main/svtools/source/control/accessibleruler.cxx
    openoffice/branches/ia2/main/svtools/source/control/ruler.src
    openoffice/branches/ia2/main/svtools/source/control/vclxaccessibleheaderbar.cxx
    openoffice/branches/ia2/main/svtools/source/control/vclxaccessibleheaderbaritem.cxx
Modified:
    openoffice/branches/ia2/main/svtools/AllLangResTarget_svt.mk
    openoffice/branches/ia2/main/svtools/Library_svt.mk
    openoffice/branches/ia2/main/svtools/Package_inc.mk
    openoffice/branches/ia2/main/svtools/inc/svtools/embedhlp.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/headbar.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/ivctrl.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/ruler.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/svlbitm.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/svlbox.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/svtools.hrc
    openoffice/branches/ia2/main/svtools/inc/svtools/svtreebx.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/texteng.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/treelist.hxx
    openoffice/branches/ia2/main/svtools/inc/svtools/valueset.hxx
    openoffice/branches/ia2/main/svtools/source/brwbox/brwbox3.cxx
    openoffice/branches/ia2/main/svtools/source/brwbox/editbrowsebox.cxx
    openoffice/branches/ia2/main/svtools/source/contnr/imivctl1.cxx
    openoffice/branches/ia2/main/svtools/source/contnr/ivctrl.cxx
    openoffice/branches/ia2/main/svtools/source/contnr/svimpbox.cxx
    openoffice/branches/ia2/main/svtools/source/contnr/svtabbx.cxx
    openoffice/branches/ia2/main/svtools/source/contnr/svtreebx.cxx
    openoffice/branches/ia2/main/svtools/source/control/headbar.cxx
    openoffice/branches/ia2/main/svtools/source/control/ruler.cxx
    openoffice/branches/ia2/main/svtools/source/control/valueacc.cxx
    openoffice/branches/ia2/main/svtools/source/control/valueimp.hxx
    openoffice/branches/ia2/main/svtools/source/control/valueset.cxx
    openoffice/branches/ia2/main/svtools/source/edit/svmedit.cxx
    openoffice/branches/ia2/main/svtools/source/misc/acceleratorexecute.cxx
    openoffice/branches/ia2/main/svtools/source/misc/embedhlp.cxx

Modified: openoffice/branches/ia2/main/svtools/AllLangResTarget_svt.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/AllLangResTarget_svt.mk?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/AllLangResTarget_svt.mk (original)
+++ openoffice/branches/ia2/main/svtools/AllLangResTarget_svt.mk Mon Jan 21 08:47:39 2013
@@ -49,6 +49,7 @@ $(eval $(call gb_SrsTarget_add_files,svt
 	svtools/source/control/ctrlbox.src \
 	svtools/source/control/ctrltool.src \
 	svtools/source/control/filectrl.src \
+	svtools/source/control/ruler.src \
 	svtools/source/dialogs/addresstemplate.src \
 	svtools/source/dialogs/filedlg2.src \
 	svtools/source/dialogs/formats.src \

Modified: openoffice/branches/ia2/main/svtools/Library_svt.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/Library_svt.mk?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/Library_svt.mk (original)
+++ openoffice/branches/ia2/main/svtools/Library_svt.mk Mon Jan 21 08:47:39 2013
@@ -126,6 +126,7 @@ $(eval $(call gb_Library_add_exception_o
 	svtools/source/contnr/templwin \
 	svtools/source/contnr/tooltiplbox \
 	svtools/source/contnr/treelist \
+	svtools/source/control/accessibleruler \
 	svtools/source/control/asynclink \
 	svtools/source/control/calendar \
 	svtools/source/control/collatorres \
@@ -157,6 +158,8 @@ $(eval $(call gb_Library_add_exception_o
 	svtools/source/control/urlcontrol \
 	svtools/source/control/valueacc \
 	svtools/source/control/valueset \
+	svtools/source/control/vclxaccessibleheaderbar \
+	svtools/source/control/vclxaccessibleheaderbaritem \
 	svtools/source/dialogs/addresstemplate \
 	svtools/source/dialogs/colrdlg \
 	svtools/source/dialogs/filedlg \

Modified: openoffice/branches/ia2/main/svtools/Package_inc.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/Package_inc.mk?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/Package_inc.mk (original)
+++ openoffice/branches/ia2/main/svtools/Package_inc.mk Mon Jan 21 08:47:39 2013
@@ -29,6 +29,7 @@ $(eval $(call gb_Package_add_file,svtool
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibleruler.hxx,svtools/accessibleruler.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovider.hxx,svtools/accessibletableprovider.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx))

Added: openoffice/branches/ia2/main/svtools/inc/svtools/accessibleruler.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/accessibleruler.hxx?rev=1436226&view=auto
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/accessibleruler.hxx (added)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/accessibleruler.hxx Mon Jan 21 08:47:39 2013
@@ -0,0 +1,310 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * 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.
+ *
+ ************************************************************************/
+
+//IAccessibility2 Implementation 2009-----
+#ifndef _SVTRULERACCESSIBLE_HXX
+#define _SVTRULERACCESSIBLE_HXX
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ILLEGALACCESSIBLECOMPONENTSTATEEXCEPTION_HPP_
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef	_COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+#ifndef	_CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
+#include <com/sun/star/lang/XServiceName.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HPP_
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.h>
+#endif
+#ifndef _CPPUHELPER_COMPBASE5_HXX_
+#include <cppuhelper/compbase5.hxx>
+#endif
+#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
+#include <comphelper/broadcasthelper.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase5.hxx>
+#endif
+#ifndef _UTL_SERVICEHELPER_HXX_
+#include <comphelper/servicehelper.hxx>
+#endif
+
+namespace com { namespace sun { namespace star { namespace awt {
+	struct Point;
+	struct Rectangle;
+	struct Size;
+	class XFocusListener;
+} } } }
+
+class Rectangle;
+class Ruler;
+class Window;
+
+
+typedef ::cppu::WeakAggComponentImplHelper5<
+			::com::sun::star::accessibility::XAccessible,
+			::com::sun::star::accessibility::XAccessibleComponent,
+			::com::sun::star::accessibility::XAccessibleContext,
+			::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+			::com::sun::star::lang::XServiceInfo >
+			SvtRulerAccessible_Base;
+
+class SvtRulerAccessible : public ::comphelper::OBaseMutex, public SvtRulerAccessible_Base
+{
+public:
+	//=====  internal  ========================================================
+	SvtRulerAccessible(
+        const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, Ruler&	rRepresentation, const ::rtl::OUString& rName );
+protected:
+	virtual ~SvtRulerAccessible();
+public:
+	//=====  XAccessible  =====================================================
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+		getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	//=====  XAccessibleComponent  ============================================
+
+	virtual sal_Bool SAL_CALL
+		containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+		getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::awt::Rectangle SAL_CALL
+		getBounds() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::awt::Point SAL_CALL
+		getLocation() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::awt::Point SAL_CALL
+		getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::awt::Size SAL_CALL
+		getSize() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual sal_Bool SAL_CALL
+		isShowing() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual sal_Bool SAL_CALL
+		isVisible() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual sal_Bool SAL_CALL
+		isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual void SAL_CALL
+		addFocusListener(
+			const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+			throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual void SAL_CALL
+		removeFocusListener(
+			const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
+			throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual void SAL_CALL
+		grabFocus() throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::uno::Any SAL_CALL
+		getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
+    virtual sal_Int32 SAL_CALL 
+        getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL 
+        getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
+
+	//=====  XAccessibleContext  ==============================================
+
+	virtual sal_Int32 SAL_CALL
+		getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+		getAccessibleChild( sal_Int32 nIndex )
+			throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+		getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual	sal_Int32 SAL_CALL
+		getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual sal_Int16 SAL_CALL
+		getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::rtl::OUString SAL_CALL
+		getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
+
+	virtual ::rtl::OUString SAL_CALL
+		getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+		getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+		getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::lang::Locale SAL_CALL
+		getLocale( void )
+			throw(	::com::sun::star::uno::RuntimeException,
+					::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
+	//=====  XAccessibleEventBroadcaster  =====================================
+
+	virtual void SAL_CALL
+		addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )throw( com::sun::star::uno::RuntimeException );
+
+	virtual void SAL_CALL 
+		removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+
+	// Needed, because some compilers would complain about virtual functions above would hide cppu::WeakAggComponentImplHelperBase::add/removeEventListener(const Reference<lang::XEventListener>&)...
+	virtual void SAL_CALL
+		addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )throw( com::sun::star::uno::RuntimeException );
+
+	virtual void SAL_CALL 
+		removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
+
+
+	//=====  XServiceInfo  ====================================================
+
+	virtual ::rtl::OUString SAL_CALL
+		getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual sal_Bool SAL_CALL
+		supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+
+	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+		getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	//=====  XTypeProvider  ===================================================
+
+	virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+		getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+
+
+public:
+
+	/// Sets the name
+	void setName( const ::rtl::OUString& rName );
+
+	/// Sets the description
+	void setDescription( const ::rtl::OUString& rDescr );
+private:
+	static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
+protected:
+
+    ///	@Return the object's current bounding box relative to the desktop.
+	virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+	///	@Return the object's current bounding box relative to the parent object.
+	virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
+
+
+	virtual void SAL_CALL disposing();
+
+	/// @returns true if it's disposed or in disposing
+	inline sal_Bool IsAlive( void ) const;
+
+	/// @returns true if it's not disposed and no in disposing
+	inline sal_Bool IsNotAlive( void ) const;
+
+	/// throws the exception DisposedException if it's not alive
+	void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
+
+private:
+    /**	Description of this object.  This is not a constant because it can
+    	be set from the outside.
+    */
+    ::rtl::OUString						msDescription;
+
+    /**	Name of this object.
+    */
+    ::rtl::OUString						msName;
+
+    ///	Reference to the parent object.
+    ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+										mxParent;
+
+	/// pointer to internal representation
+	Ruler*							mpRepr;
+
+	    /// client id in the AccessibleEventNotifier queue
+    sal_uInt32 mnClientId;
+
+
+};
+
+inline sal_Bool SvtRulerAccessible::IsAlive( void ) const
+{
+	return !rBHelper.bDisposed && !rBHelper.bInDispose;
+}
+
+inline sal_Bool SvtRulerAccessible::IsNotAlive( void ) const
+{
+	return rBHelper.bDisposed || rBHelper.bInDispose;
+}
+
+
+
+#endif
+//-----IAccessibility2 Implementation 2009
+

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/embedhlp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/embedhlp.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/embedhlp.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/embedhlp.hxx Mon Jan 21 08:47:39 2013
@@ -117,11 +117,12 @@ namespace svt
         void            UpdateReplacementOnDemand();
         MapUnit         GetMapUnit() const;
         void            Lock( sal_Bool bLock = sal_True );
-        sal_Bool            IsLocked() const;
+        sal_Bool        IsLocked() const;
         void            Clear();
-        sal_Bool            is() const { return mxObj.is(); }
+        sal_Bool        is() const { return mxObj.is(); }
 
-        sal_Bool            IsChart() const;
+        sal_Bool        IsChart() const;
+		rtl::OUString	GetChartType();
 
         // #i104867#
         // Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/headbar.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/headbar.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/headbar.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/headbar.hxx Mon Jan 21 08:47:39 2013
@@ -233,6 +233,8 @@ typedef sal_uInt16 HeaderBarItemBits;
 // - HeaderBar -
 // -------------
 
+class VCLXHeaderBar; // IAccessibility2 Implementation 2009
+
 class SVT_DLLPUBLIC HeaderBar : public Window
 {
 private:
@@ -260,6 +262,9 @@ private:
 	Link				maSelectHdl;
 	Link				maDoubleClickHdl;
 	Link				maCreateAccessibleHdl;
+	
+	VCLXHeaderBar*		m_pVCLXHeaderBar; // IAccessibility2 Implementation 2009
+	
 
 	::com::sun::star::uno::Reference<
 		::com::sun::star::accessibility::XAccessible >
@@ -385,6 +390,9 @@ public:
     virtual ::com::sun::star::uno::Reference<
 		::com::sun::star::accessibility::XAccessible >	CreateAccessible();
 	void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > );
+	// IAccessibility2 Implementation 2009
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > GetComponentInterface( sal_Bool bCreate );
+	
 };
 
 #endif	// _HEADBAR_HXX

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/ivctrl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/ivctrl.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/ivctrl.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/ivctrl.hxx Mon Jan 21 08:47:39 2013
@@ -272,9 +272,6 @@ protected:
 	void				CallImplEventListeners(sal_uLong nEvent, void* pData);
 
 public:
-//IAccessibility2 Implementation 2009-----
-	sal_Bool 	bCanBeFocused;
-//-----IAccessibility2 Implementation 2009
 
 						SvtIconChoiceCtrl( Window* pParent, WinBits nWinStyle = WB_ICON | WB_BORDER );
 						SvtIconChoiceCtrl( Window* pParent, const ResId& rResId );

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/ruler.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/ruler.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/ruler.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/ruler.hxx Mon Jan 21 08:47:39 2013
@@ -32,6 +32,10 @@
 #endif
 #include <vcl/field.hxx>
 
+//IAccessibility2 Implementation 2009-----
+#include <svtools/accessibleruler.hxx>
+//-----IAccessibility2 Implementation 2009
+
 class MouseEvent;
 class TrackingEvent;
 class DataChangedEvent;
@@ -706,6 +710,10 @@ private:
     Link                maDoubleClickHdl;
     Link                maExtraDownHdl;
 
+//IAccessibility2 Implementation 2009-----
+	SvtRulerAccessible* pAccContext;
+//-----IAccessibility2 Implementation 2009
+
 #ifdef _SV_RULER_CXX
     SVT_DLLPRIVATE void                ImplVDrawLine( long nX1, long nY1, long nX2, long nY2 );
     SVT_DLLPRIVATE void                ImplVDrawRect( long nX1, long nY1, long nX2, long nY2 );
@@ -865,6 +873,10 @@ public:
 
     //set text direction right-to-left
     void                SetTextRTL(sal_Bool bRTL);
+
+//IAccessibility2 Implementation 2009-----
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+//-----IAccessibility2 Implementation 2009
 };
 
 #endif  // _RULER_HXX

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/svlbitm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/svlbitm.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/svlbitm.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/svlbitm.hxx Mon Jan 21 08:47:39 2013
@@ -42,6 +42,9 @@ class SvLBoxEntry;
 #define SV_ITEM_ID_LBOXBMP			2
 #define SV_ITEM_ID_LBOXBUTTON		3
 #define SV_ITEM_ID_LBOXCONTEXTBMP	4
+//IAccessibility2 Implementation 2009-----
+#define SV_ITEM_ID_EXTENDRLBOXSTRING	5
+//-----IAccessibility2 Implementation 2009
 
 enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE };
 
@@ -130,6 +133,9 @@ public:
 	virtual sal_uInt16	IsA();
 	void			InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
 	XubString		GetText() const { return aStr; }
+	//IAccessibility2 Implementation 2009-----
+	virtual XubString		GetExtendText() const {return XubString();}
+	//-----IAccessibility2 Implementation 2009
 	void 			SetText( SvLBoxEntry*, const XubString& rStr );
 	void			Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
 	SvLBoxItem* 	Create() const;
@@ -210,6 +216,8 @@ public:
     // Check whether this button can be modified via UI, sounding a beep if it
     // cannot be modified:
     bool            CheckModification() const;
+	//IAccessible2 implementation 2009
+	SvLBoxButtonData* GetButtonData() const{ return pData;}
 };
 
 inline void	SvLBoxButton::SetStateChecked()

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/svlbox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/svlbox.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/svlbox.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/svlbox.hxx Mon Jan 21 08:47:39 2013
@@ -189,6 +189,8 @@ class SVT_DLLPUBLIC SvLBoxEntry : public
 	friend class SvLBox;
 
 	SvPtrarr 	aItems;
+    // IAccessible2 implementation in 2009
+    sal_Bool      bIsMarked;
 	void*	 	pUserData;
 	sal_uInt16	 	nEntryFlags;
 //#if 0 // _SOLAR__PRIVATE
@@ -217,6 +219,9 @@ public:
 
 	sal_uInt16		GetFlags() const { return nEntryFlags; }
 	void		SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
+    // IAccessible2 implementation in 2009
+    sal_Bool		GetIsMarked() const { return bIsMarked ; }
+	void		       SetMarked( sal_Bool IsMarked ) { bIsMarked =IsMarked ; }
 };
 
 // *********************************************************************

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/svtools.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/svtools.hrc?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/svtools.hrc (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/svtools.hrc Mon Jan 21 08:47:39 2013
@@ -247,7 +247,7 @@
 #define STR_SVT_ACC_LISTENTRY_SELCTED_STATE		(STR_SVT_ACC_BEGIN+7)
 #define STR_SVT_ACC_RULER_VERT_NAME	(STR_SVT_ACC_BEGIN+8)
 #define STR_SVT_ACC_RULER_HORZ_NAME	(STR_SVT_ACC_BEGIN+9)
-#define STR_SVT_ACC_END						(STR_SVT_ACC_EMPTY_FIELD)
+#define STR_SVT_ACC_END					(STR_SVT_ACC_RULER_HORZ_NAME)
 
 #define STR_SVT_INDEXENTRY_START			(STR_SVT_ACC_END + 1)
 #define STR_SVT_INDEXENTRY_ALPHANUMERIC		(STR_SVT_INDEXENTRY_START+0)

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/svtreebx.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/svtreebx.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/svtreebx.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/svtreebx.hxx Mon Jan 21 08:47:39 2013
@@ -43,6 +43,11 @@ class TabBar;
 #define TREEFLAG_MANINS			0x0004
 #define TREEFLAG_RECALCTABS		0x0008
 
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_NOTSET	0x00
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_LIST	0x01
+#define TREEBOX_ALLITEM_ACCROLE_TYPE_TREE	0x02
+
+
 typedef sal_Int64   ExtendedWinBits;
 
 // disable the behavior of automatically selecting a "CurEntry" upon painting the control
@@ -71,7 +76,9 @@ class SVT_DLLPUBLIC SvTreeListBox : publ
 	short			nEntryHeightOffs;
 	short  			nIndent;
 	short			nFocusWidth;
-	sal_uInt16			aContextBmpMode;
+	sal_uInt16		aContextBmpMode;
+	
+	short			nAllItemAccRoleType;
 
 #ifdef _SVTREEBX_CXX
 	DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * );
@@ -400,6 +407,19 @@ public:
 	/** Enables, that one cell of a tablistbox entry can be focused */
 	void				EnableCellFocus();
 
+// IAccessible2 implementation in 2009-----------
+						// For overwriting accessible role for all entries - normally 0, so each entry can be different
+	void				SetAllEntriesAccessibleRoleType( short n ) { nAllItemAccRoleType = n; }
+	short				GetAllEntriesAccessibleRoleType() const { return nAllItemAccRoleType; }
+	
+	sal_uInt16 			GetTreeFlags() const {return nTreeFlags;}
+	
+	XubString			headString ;
+	String				SearchEntryTextWithHeadTitle( SvLBoxEntry* pEntry ) ;
+	virtual	String		GetEntryAltText( SvLBoxEntry* pEntry) const;
+	virtual	String		GetEntryLongDescription( SvLBoxEntry* pEntry) const;	
+// -----------IAccessible2 implementation in 2009
+
 protected:
     using SvListView::Expand;
     using SvListView::Collapse;

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/texteng.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/texteng.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/texteng.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/texteng.hxx Mon Jan 21 08:47:39 2013
@@ -324,6 +324,8 @@ public:
 	static sal_Bool			DoesKeyChangeText( const KeyEvent& rKeyEvent );
 	static sal_Bool			DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
 	static sal_Bool			IsSimpleCharInput( const KeyEvent& rKeyEvent );
+// IAccessible2 implementation in 2009
+	Color 				GetTextColor() {return maTextColor; };
 };
 
 #endif // _TEXTENG_HXX

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/treelist.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/treelist.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/treelist.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/treelist.hxx Mon Jan 21 08:47:39 2013
@@ -56,6 +56,8 @@
 #define SVLISTENTRYFLAG_FOCUSED			0x0004
 #define SVLISTENTRYFLAG_CURSORED		0x0008
 #define SVLISTENTRYFLAG_NOT_SELECTABLE	0x0010
+// IAccessible2 implementation
+#define SVLISTENTRYFLAG_OBJSELECTED	0x0040
 
 class SvListEntry;
 
@@ -152,6 +154,14 @@ public:
 			nFlags |= SVLISTENTRYFLAG_NOT_SELECTABLE;
 	}
 	bool IsSelectable() const { return (bool)(nFlags&SVLISTENTRYFLAG_NOT_SELECTABLE)==0; }
+	// IAccessible2 implementation
+	void SetObjectSelected(sal_Bool bSelected)
+	{
+	if ( !bSelected )
+		nFlags &= (~SVLISTENTRYFLAG_OBJSELECTED);
+	else
+		nFlags |= SVLISTENTRYFLAG_OBJSELECTED;
+	}
 };
 
 enum SvSortMode { SortAscending, SortDescending, SortNone };

Modified: openoffice/branches/ia2/main/svtools/inc/svtools/valueset.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/valueset.hxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/valueset.hxx (original)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/valueset.hxx Mon Jan 21 08:47:39 2013
@@ -314,7 +314,7 @@ protected:
 
 	sal_Bool			StartDrag( const CommandEvent& rCEvt, Region& rRegion );
 	sal_uInt16			ShowDropPos( const Point& rPos );
-	void			HideDropPos();
+	void				HideDropPos();
 
 protected:
 
@@ -355,6 +355,9 @@ public:
 								sal_uInt16 nPos = VALUESET_APPEND );
 	void			InsertItem( sal_uInt16 nItemId,
 								sal_uInt16 nPos = VALUESET_APPEND );
+					// IA2 implementation in 2009 - method to set accessible when the style is user draw.
+	void			InsertItem( sal_uInt16 nItemId, const XubString& rStr, sal_uInt16 nPos = VALUESET_APPEND );
+
 	void			InsertSpace( sal_uInt16 nItemId,
 								 sal_uInt16 nPos = VALUESET_APPEND );
 	void			RemoveItem( sal_uInt16 nItemId );
@@ -362,34 +365,33 @@ public:
 	void			CopyItems( const ValueSet& rValueSet );
 	void			Clear();
 
-	sal_uInt16			GetItemCount() const;
-	sal_uInt16			GetItemPos( sal_uInt16 nItemId ) const;
-	sal_uInt16			GetItemId( sal_uInt16 nPos ) const;
-	sal_uInt16			GetItemId( const Point& rPos ) const;
+	sal_uInt16		GetItemCount() const;
+	sal_uInt16		GetItemPos( sal_uInt16 nItemId ) const;
+	sal_uInt16		GetItemId( sal_uInt16 nPos ) const;
+	sal_uInt16		GetItemId( const Point& rPos ) const;
 	Rectangle		GetItemRect( sal_uInt16 nItemId ) const;
 
 	void			EnableFullItemMode( sal_Bool bFullMode = sal_True );
-	sal_Bool			IsFullItemModeEnabled() const { return mbFullMode; }
+	sal_Bool		IsFullItemModeEnabled() const { return mbFullMode; }
 	void			SetColCount( sal_uInt16 nNewCols = 1 );
-	sal_uInt16			GetColCount() const { return mnUserCols; }
+	sal_uInt16		GetColCount() const { return mnUserCols; }
 	void			SetLineCount( sal_uInt16 nNewLines = 0 );
-	sal_uInt16			GetLineCount() const { return mnUserVisLines; }
+	sal_uInt16		GetLineCount() const { return mnUserVisLines; }
 	void			SetItemWidth( long nItemWidth = 0 );
 	long			GetItemWidth() const { return mnUserItemWidth; }
 	void			SetItemHeight( long nLineHeight = 0 );
 	long			GetItemHeight() const { return mnUserItemHeight; }
 	void			SetFirstLine( sal_uInt16 nNewLine = 0 );
-	sal_uInt16			GetFirstLine() const { return mnFirstLine; }
+	sal_uInt16		GetFirstLine() const { return mnFirstLine; }
 
 	void			SelectItem( sal_uInt16 nItemId );
-	sal_uInt16			GetSelectItemId() const { return mnSelItemId; }
-	sal_Bool			IsItemSelected( sal_uInt16 nItemId ) const
-						{ return ((!mbNoSelection && (nItemId == mnSelItemId)) ? sal_True : sal_False); }
+	sal_uInt16		GetSelectItemId() const { return mnSelItemId; }
+	sal_Bool		IsItemSelected( sal_uInt16 nItemId ) const { return ((!mbNoSelection && (nItemId == mnSelItemId)) ? sal_True : sal_False); }
 	void			SetNoSelection();
-	sal_Bool			IsNoSelection() const { return mbNoSelection; }
+	sal_Bool		IsNoSelection() const { return mbNoSelection; }
 
 	void			SetItemBits( sal_uInt16 nItemId, sal_uInt16 nBits );
-	sal_uInt16			GetItemBits( sal_uInt16 nItemId ) const;
+	sal_uInt16		GetItemBits( sal_uInt16 nItemId ) const;
 	void			SetItemImage( sal_uInt16 nItemId, const Image& rImage );
 	Image			GetItemImage( sal_uInt16 nItemId ) const;
 	void			SetItemColor( sal_uInt16 nItemId, const Color& rColor );
@@ -401,10 +403,10 @@ public:
 	void			SetColor( const Color& rColor );
 	void			SetColor() { SetColor( Color( COL_TRANSPARENT ) ); }
 	Color			GetColor() const { return maColor; }
-	sal_Bool			IsColor() const { return maColor.GetTransparency() == 0; }
+	sal_Bool		IsColor() const { return maColor.GetTransparency() == 0; }
 
 	void			SetExtraSpacing( sal_uInt16 nNewSpacing );
-	sal_uInt16			GetExtraSpacing() { return mnSpacing; }
+	sal_uInt16		GetExtraSpacing() { return mnSpacing; }
 
 	void			Format();
 

Added: openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbar.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbar.hxx?rev=1436226&view=auto
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbar.hxx (added)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbar.hxx Mon Jan 21 08:47:39 2013
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * 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 _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+#define _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+
+#ifndef _TOOLKIT_AWT_VCLXACCESSIBLECOMPONENT_HXX_
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#endif
+#ifndef _HEADBAR_HXX
+#include <svtools/headbar.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include "toolkit/awt/vclxwindow.hxx"
+#endif
+class HeaderBar;
+
+//	----------------------------------------------------
+//	class VCLXAccessibleHeaderBar
+//	----------------------------------------------------
+
+typedef std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > >
+    ListItems;
+
+class VCLXAccessibleHeaderBar : public VCLXAccessibleComponent								
+{
+
+public:
+	HeaderBar*	m_pHeadBar;
+	virtual ~VCLXAccessibleHeaderBar();
+
+    virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+    virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+	VCLXAccessibleHeaderBar( VCLXWindow* pVCLXindow );
+
+	// XAccessibleContext
+	virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+	virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
+
+
+	// XServiceInfo
+	virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+public:
+	virtual void SAL_CALL disposing (void);
+	::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateChild(sal_Int32 i);
+
+private:
+	ListItems m_aAccessibleChildren;
+
+
+};
+
+class VCLXHeaderBar :  public VCLXWindow
+{
+public:
+    VCLXHeaderBar(Window* pHeaderBar);
+    virtual ~VCLXHeaderBar();
+	
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+	
+};
+
+#endif // _SVTOOLS_VCLXACCESSIBLEHEADERBAR_HXX_
+

Added: openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx?rev=1436226&view=auto
==============================================================================
--- openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx (added)
+++ openoffice/branches/ia2/main/svtools/inc/svtools/vclxaccessibleheaderbaritem.hxx Mon Jan 21 08:47:39 2013
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * 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 _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+#define _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef COMPHELPER_ACCESSIBLE_COMPONENT_HELPER_HXX
+#include <comphelper/accessiblecomponenthelper.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+#include <vector>
+
+class HeaderBar;
+class VCLExternalSolarLock;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+
+//	----------------------------------------------------
+//	class VCLXAccessibleHeaderBarItem
+//	----------------------------------------------------
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper	AccessibleExtendedComponentHelper_BASE;
+
+typedef ::cppu::ImplHelper2<
+::com::sun::star::accessibility::XAccessible,
+::com::sun::star::lang::XServiceInfo > VCLXAccessibleHeaderBarItem_BASE;
+
+class VCLXAccessibleHeaderBarItem :	public AccessibleExtendedComponentHelper_BASE,
+						public VCLXAccessibleHeaderBarItem_BASE		
+{
+private:		
+	VCLExternalSolarLock*	m_pExternalLock;
+	HeaderBar*				m_pHeadBar;
+	sal_Int32				m_nIndexInParent;
+
+protected:
+	DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+	virtual void			ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+	virtual void			FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+	// OCommonAccessibleComponent 
+	virtual ::com::sun::star::awt::Rectangle SAL_CALL	implGetBounds(  ) throw (::com::sun::star::uno::RuntimeException);
+
+	// XComponent
+	virtual void SAL_CALL	disposing();
+
+public:
+	VCLXAccessibleHeaderBarItem( HeaderBar*	pHeadBar, sal_Int32 _nIndexInParent );
+	~VCLXAccessibleHeaderBarItem();
+
+	// XInterface
+	DECLARE_XINTERFACE()
+
+	// XTypeProvider
+	DECLARE_XTYPEPROVIDER()
+
+	// XServiceInfo
+	virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+	// XAccessible
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
+
+	// XAccessibleContext
+	virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::rtl::OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::com::sun::star::lang::Locale SAL_CALL getLocale(  ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+	// XAccessibleComponent
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+	virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException){};
+	virtual sal_Int32 SAL_CALL getForeground() throw (::com::sun::star::uno::RuntimeException);
+	virtual sal_Int32 SAL_CALL getBackground() throw (::com::sun::star::uno::RuntimeException);
+
+	// XAccessibleExtendedComponent
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont > SAL_CALL getFont(	) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::rtl::OUString SAL_CALL getTitledBorderText(  ) throw (::com::sun::star::uno::RuntimeException);
+	virtual ::rtl::OUString SAL_CALL getToolTipText(  ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _SVTOOLS_VCLACCESSIBLEHEADBARITEM_HXX_
+

Modified: openoffice/branches/ia2/main/svtools/source/brwbox/brwbox3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/brwbox/brwbox3.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/brwbox/brwbox3.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/brwbox/brwbox3.cxx Mon Jan 21 08:47:39 2013
@@ -215,7 +215,9 @@ sal_Bool BrowseBox::ConvertPointToContro
 
 // Object data and state ------------------------------------------------------
 
-OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 ) const
+//IAccessibility2 Implementation 2009-----
+OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition) const
+//-----IAccessibility2 Implementation 2009
 {
     OUString aRetText;
     switch( eObjType )
@@ -233,7 +235,18 @@ OUString BrowseBox::GetAccessibleObjectN
 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) );
 			break;
         case ::svt::BBTYPE_TABLECELL:
-            aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TableCell" ) );
+//IAccessibility2 Implementation 2009-----
+			if( ColCount() !=0 && GetRowCount()!=0)
+			{
+           
+				sal_Int32 columnId = _nPosition % ColCount() +1;
+				aRetText = OUString( GetColumnDescription( sal_Int16( columnId ) ) );
+				sal_Int32 rowId = _nPosition / GetRowCount() + 1;
+				aRetText += OUString::valueOf(rowId); 
+			}
+			else
+//-----IAccessibility2 Implementation 2009
+				aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TableCell" ) );
 #if OSL_DEBUG_LEVEL > 1
             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
@@ -243,7 +256,11 @@ OUString BrowseBox::GetAccessibleObjectN
 #endif			
 			break;
         case ::svt::BBTYPE_ROWHEADERCELL:
-			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderCell" ) );
+			{
+			sal_Int32 rowId = _nPosition + 1;
+			aRetText = OUString::valueOf( rowId );
+			}
+			//aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderCell" ) );
 #if OSL_DEBUG_LEVEL > 1
             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
@@ -253,7 +270,8 @@ OUString BrowseBox::GetAccessibleObjectN
 #endif
 			break;
         case ::svt::BBTYPE_COLUMNHEADERCELL:
-			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderCell" ) );
+			//aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderCell" ) );
+			aRetText = OUString( GetColumnDescription( sal_Int16( _nPosition ) ) );
 #if OSL_DEBUG_LEVEL > 1
             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));

Modified: openoffice/branches/ia2/main/svtools/source/brwbox/editbrowsebox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/brwbox/editbrowsebox.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/brwbox/editbrowsebox.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/brwbox/editbrowsebox.cxx Mon Jan 21 08:47:39 2013
@@ -1072,7 +1072,10 @@ namespace svt
                 {
 					commitTableEvent(
                         ACTIVE_DESCENDANT_CHANGED,
-						makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol ) ) ),
+//IAccessibility2 Implementation 2009-----
+						//makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol ) ) ),
+						makeAny( CreateAccessibleCell( nRow, GetColumnPos( nCol -1) ) ),
+//-----IAccessibility2 Implementation 2009
 						Any()
 					);
                 }

Modified: openoffice/branches/ia2/main/svtools/source/contnr/imivctl1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/contnr/imivctl1.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/contnr/imivctl1.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/contnr/imivctl1.cxx Mon Jan 21 08:47:39 2013
@@ -1180,6 +1180,9 @@ void SvxIconChoiceCtrl_Impl::SetCursor_I
 		{
 			SelectEntry( pCursor, sal_True, sal_True,  sal_False, bPaintSync );
 			aCurSelectionRect = GetEntryBoundRect( pCursor );
+			//IAccessibility2 Implementation 2009-----
+			CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
+			//-----IAccessibility2 Implementation 2009
 		}
 	}
 }

Modified: openoffice/branches/ia2/main/svtools/source/contnr/ivctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/contnr/ivctrl.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/contnr/ivctrl.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/contnr/ivctrl.cxx Mon Jan 21 08:47:39 2013
@@ -133,9 +133,6 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Wi
 	_pImp->SetGrid( Size( 100, 70 ) );
 	_pImp->InitSettings();
 	_pImp->SetPositionMode( IcnViewPositionModeAutoArrange );
-//IAccessibility2 Implementation 2009-----
-	bCanBeFocused = sal_True;
-//-----IAccessibility2 Implementation 2009
 }
 
 SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, const ResId& rResId ) :
@@ -151,9 +148,6 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Wi
 	_pImp->SetGrid( Size( 100, 70 ) );
 	_pImp->InitSettings();
 	_pImp->SetPositionMode( IcnViewPositionModeAutoArrange );
-//IAccessibility2 Implementation 2009-----
-	bCanBeFocused = sal_True;
-//-----IAccessibility2 Implementation 2009
 }
 
 SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
@@ -312,13 +306,6 @@ void SvtIconChoiceCtrl::VisibleRectChang
 
 void SvtIconChoiceCtrl::GetFocus()
 {
-//IAccessibility2 Implementation 2009-----
-	if( !bCanBeFocused ) 
-	{
-		bCanBeFocused = sal_True;		
-		return;
-	}
-//-----IAccessibility2 Implementation 2009
 	_pImp->GetFocus();
 	Control::GetFocus();
 	sal_uLong nPos;

Modified: openoffice/branches/ia2/main/svtools/source/contnr/svimpbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/contnr/svimpbox.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/contnr/svimpbox.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/contnr/svimpbox.cxx Mon Jan 21 08:47:39 2013
@@ -299,6 +299,10 @@ void SvImpLBox::Clear()
 
 	// #97680# ---------
 	aContextBmpWidthVector.clear();
+
+//IAccessibility2 Implementation 2009-----
+	CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, NULL );
+//-----IAccessibility2 Implementation 2009
 }
 
 // *********************************************************************
@@ -646,6 +650,9 @@ void SvImpLBox::SetCursor( SvLBoxEntry* 
 		if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
 		{
 			pView->Select( pCursor, sal_True );
+			//IAccessibility2 Implementation 2009-----
+			CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor );
+			//-----IAccessibility2 Implementation 2009
 		}
 		// Mehrfachselektion: Im Cursor-Move selektieren, wenn
 		// nicht im Add-Mode (Ctrl-F8)
@@ -655,10 +662,19 @@ void SvImpLBox::SetCursor( SvLBoxEntry* 
 				 !bForceNoSelect )
 		{
 			pView->Select( pCursor, sal_True );
+			//IAccessibility2 Implementation 2009-----
+			CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor );
+			//-----IAccessibility2 Implementation 2009
 		}
 		else
 		{
 			ShowCursor( sal_True );
+			//IAccessibility2 Implementation 2009-----
+			if (bForceNoSelect && GetUpdateMode())
+			{
+				CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pCursor);
+			}
+			//-----IAccessibility2 Implementation 2009
 		}
 
 		if( pAnchor )
@@ -1700,6 +1716,10 @@ void SvImpLBox::EntrySelected( SvLBoxEnt
 
 void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
 {
+	//IAccessibility2 Implementation 2009-----
+	CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED , pEntry );
+	//-----IAccessibility2 Implementation 2009
+
 	DestroyAnchor();
 
 	if( !pView->IsEntryVisible( pEntry ) )
@@ -2359,7 +2379,10 @@ sal_Bool SvImpLBox::KeyInput( const KeyE
 
 		case KEY_LEFT:
 		{
-            if ( bIsCellFocusEnabled )
+            //IAccessibility2 Implementation 2009-----
+            // if ( bIsCellFocusEnabled )
+            if ( bIsCellFocusEnabled && pCursor )
+			//-----IAccessibility2 Implementation 2009
             {
                 if ( nCurTabPos > FIRST_ENTRY_TAB )
                 {
@@ -2677,7 +2700,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyE
             // is from SvTreeListBox::KeyInput. If we set bKeyUsed to sal_True here, then the key input
             // is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection
             // handling.
-            // (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search"
+            // (The old code here which intentionally set bKeyUsed to sal_True said this was because of "quick search"
             // handling, but actually there was no quick search handling anymore. We just re-implemented it.)
             // #i31275# / 2009-06-16 / frank.schoenheit@sun.com
 			bKeyUsed = sal_False;

Modified: openoffice/branches/ia2/main/svtools/source/contnr/svtabbx.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/contnr/svtabbx.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/contnr/svtabbx.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/contnr/svtabbx.cxx Mon Jan 21 08:47:39 2013
@@ -1182,6 +1182,10 @@ void SvHeaderTabListBox::FillAccessibleS
 			sal_uInt16 nCurColumn = GetCurrColumn();
 			if ( IsCellVisible( nCurRow, nCurColumn ) )
 				_rStateSet.AddState( AccessibleStateType::VISIBLE );
+			//IAccessibility2 Implementation 2009-----
+			if ( IsEnabled() )
+				_rStateSet.AddState( AccessibleStateType::ENABLED );
+			//-----IAccessibility2 Implementation 2009
 			_rStateSet.AddState( AccessibleStateType::TRANSIENT );
 			break;
 		}
@@ -1192,6 +1196,10 @@ void SvHeaderTabListBox::FillAccessibleS
 			_rStateSet.AddState( AccessibleStateType::VISIBLE );
 			_rStateSet.AddState( AccessibleStateType::FOCUSABLE );
 			_rStateSet.AddState( AccessibleStateType::TRANSIENT );
+			//IAccessibility2 Implementation 2009-----
+			if ( IsEnabled() )
+				_rStateSet.AddState( AccessibleStateType::ENABLED );
+			//-----IAccessibility2 Implementation 2009
 			break;
 		}
         default:
@@ -1216,6 +1224,9 @@ void SvHeaderTabListBox::FillAccessibleS
 		_rStateSet.AddState( AccessibleStateType::ACTIVE );
 		_rStateSet.AddState( AccessibleStateType::SELECTED );
 	}
+	//IAccessibility2 Implementation 2009-----
+	if ( IsEnabled() )
+		_rStateSet.AddState( AccessibleStateType::ENABLED );
 }
 // -----------------------------------------------------------------------
 void SvHeaderTabListBox::GrabTableFocus()

Modified: openoffice/branches/ia2/main/svtools/source/contnr/svtreebx.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/contnr/svtreebx.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/contnr/svtreebx.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/contnr/svtreebx.cxx Mon Jan 21 08:47:39 2013
@@ -91,6 +91,7 @@ void SvTreeListBox::InitTreeView()
 	nFirstSelTab = 0;
 	nLastSelTab = 0;
 	nFocusWidth = -1;
+	nAllItemAccRoleType = 0;
 
 	Link* pLink = new Link( LINK(this,SvTreeListBox, DefaultCompare) );
     pLBoxImpl->m_pLink = pLink;
@@ -345,6 +346,89 @@ String SvTreeListBox::GetEntryText(SvLBo
 	return pItem->GetText();
 }
 
+//IAccessibility2 Implementation 2009-----
+String  SvTreeListBox::GetEntryAltText( SvLBoxEntry* ) const
+{
+	String tmp;
+	return tmp;
+}
+String SvTreeListBox::GetEntryLongDescription( SvLBoxEntry* ) const
+{
+	String tmp;
+	return tmp;
+}
+
+String SvTreeListBox::SearchEntryTextWithHeadTitle( SvLBoxEntry* pEntry ) 
+{
+	DBG_CHKTHIS(SvTreeListBox,0);
+	DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
+	String sRet;
+
+	sal_uInt16 nCount = pEntry->ItemCount();
+	sal_uInt16 nCur = 0;
+	sal_uInt16 nHeaderCur = 0;
+	SvLBoxItem* pItem;
+	while( nCur < nCount )
+	{
+		// MT: SV_ITEM_ID_EXTENDRLBOXSTRING / GetExtendText() was in use in IA2 cws, but only used in sc: ScSolverOptionsString. Needed?
+		pItem = pEntry->GetItem( nCur );
+		if ( (pItem->IsA() == SV_ITEM_ID_LBOXSTRING /* || pItem->IsA() == SV_ITEM_ID_EXTENDRLBOXSTRING */ ) &&
+			 static_cast<SvLBoxString*>( pItem )->GetText().Len() > 0 )
+		{
+
+			//want to the column header
+			if( headString.Len() > 0)
+			{
+				xub_StrLen nEnd = headString.Search( sal_Unicode( '\t' ) );
+				if( nEnd == STRING_NOTFOUND )
+				{
+					if(sRet.Len()>0)
+					{
+						sRet += ',';
+					}
+					if(headString.Len()>0)
+					{
+						sRet += headString ;
+						sRet += ':' ;
+					}
+				}
+				else
+				{
+					String	aString=headString.GetToken(nHeaderCur, sal_Unicode( '\t' ) );
+					if(sRet.Len()>0)
+					{
+						sRet += ',';
+					}
+					if( aString.Len() > 0)
+					{
+						sRet += aString ;
+						sRet += ':' ;
+					}
+					nHeaderCur++;
+				}
+				// if (pItem->IsA() == SV_ITEM_ID_LBOXSTRING)
+					sRet += static_cast<SvLBoxString*>( pItem )->GetText();
+				// else
+				//	sRet += static_cast<SvLBoxString*>( pItem )->GetExtendText();
+			}
+			else
+			{
+				// if (pItem->IsA() == SV_ITEM_ID_LBOXSTRING)
+					sRet += static_cast<SvLBoxString*>( pItem )->GetText();
+				// else
+				// 	sRet += static_cast<SvLBoxString*>( pItem )->GetExtendText();
+				sRet += ',';
+			}
+			//end want to the column header
+		}
+		nCur++;
+	}
+
+	if (sRet.Len() > 0)
+		sRet = sRet.Erase(sRet.Len() - 1);
+	return sRet;
+}
+//-----IAccessibility2 Implementation 2009
 String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
 {
 	DBG_CHKTHIS(SvTreeListBox,0);
@@ -806,18 +890,45 @@ void SvTreeListBox::RequestingChilds( Sv
 void SvTreeListBox::GetFocus()
 {
 	DBG_CHKTHIS(SvTreeListBox,0);
+	//IAccessibility2 Implementation 2009-----
+	//Solution:If there is no item in the tree,draw focus.
+	if( !SvLBox::First())
+	{
+		Invalidate();
+	}
+	//-----IAccessibility2 Implementation 2009
 	pImp->GetFocus();
 	SvLBox::GetFocus();
 
 	SvLBoxEntry* pEntry = FirstSelected();
+	//IAccessibility2 Implementation 2009-----
+	if ( !pEntry )
+	{
+		pEntry = pImp->GetCurrentEntry();
+	}
+	if (pImp->pCursor)
+	{
+		if (pEntry != pImp->pCursor)
+			pEntry = pImp->pCursor;
+	}
+	//IAccessibility2 Implementation 2009-----
 	if ( pEntry )
-		pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+		//pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+		pImp->CallEventListeners( VCLEVENT_LISTBOX_TREEFOCUS, pEntry );
+	//-----IAccessibility2 Implementation 2009
 
 }
 
 void SvTreeListBox::LoseFocus()
 {
 	DBG_CHKTHIS(SvTreeListBox,0);
+	//IAccessibility2 Implementation 2009-----
+	//Solution:If there is no item in the tree,delete visual focus.
+	if( !SvLBox::First())
+	{
+		Invalidate();
+	}
+	//-----IAccessibility2 Implementation 2009
 	pImp->LoseFocus();
 	SvLBox::LoseFocus();
 }
@@ -1064,7 +1175,9 @@ sal_Bool SvTreeListBox::Select( SvLBoxEn
 		if( bSelect )
 		{
 			SelectHdl();
-			pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+			// IA2 CWS
+			// pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry );
+			CallEventListeners( VCLEVENT_LISTBOX_TREESELECT, pEntry);			
 		}
 		else
 			DeselectHdl();
@@ -1185,6 +1298,24 @@ void SvTreeListBox::Paint( const Rectang
 	if( nTreeFlags & TREEFLAG_RECALCTABS )
 		SetTabs();
 	pImp->Paint( rRect );
+	//IAccessibility2 Implementation 2009-----
+	//Solution:Add visual focus draw
+	if( !SvLBox::First() )
+	{
+		if( HasFocus() )
+		{
+			long tempHeight = GetTextHeight();
+			Rectangle tempRect(
+								Point(0,0),Size(GetSizePixel().Width(),tempHeight)
+							   );
+			ShowFocus(tempRect);
+		}
+
+		else{
+			HideFocus();
+		}
+	}
+	//-----IAccessibility2 Implementation 2009
 }
 
 void SvTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
@@ -2644,6 +2775,14 @@ void SvTreeListBox::FillAccessibleEntryS
 		rStateSet.AddState( AccessibleStateType::EXPANDABLE );
 		if ( IsExpanded( pEntry ) )
 		    rStateSet.AddState( (sal_Int16)AccessibleStateType::EXPANDED );
+		// IA2 CWS
+		/*
+		else
+		{
+			// MT: COLLAPSE == EXPANDABLE & !EXPANDED
+			rStateSet.AddState( (sal_Int16)AccessibleStateType::COLLAPSE );
+		}
+		*/
 	}
 
 	if ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
@@ -2652,6 +2791,21 @@ void SvTreeListBox::FillAccessibleEntryS
 		rStateSet.AddState( AccessibleStateType::VISIBLE );
 	if ( IsSelected( pEntry ) )
 		rStateSet.AddState( AccessibleStateType::SELECTED );
+	//IAccessibility2 Implementation 2009-----
+	if ( IsEnabled() )
+	{
+		rStateSet.AddState( AccessibleStateType::ENABLED );
+		rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+		rStateSet.AddState( AccessibleStateType::SELECTABLE );
+		SvViewDataEntry* pViewDataNewCur = 0;
+		if( pEntry )
+		{
+			pViewDataNewCur= GetViewDataEntry(pEntry);
+			if(pViewDataNewCur->HasFocus())
+				rStateSet.AddState( AccessibleStateType::FOCUSED );
+		}
+	}
+	//-----IAccessibility2 Implementation 2009
 }
 
 Rectangle SvTreeListBox::GetBoundingRect( SvLBoxEntry* pEntry )
@@ -2675,3 +2829,4 @@ void SvTreeListBox::FillAccessibleStateS
 {
       SvLBox::FillAccessibleStateSet( rStateSet );
 }
+

Added: openoffice/branches/ia2/main/svtools/source/control/accessibleruler.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/control/accessibleruler.cxx?rev=1436226&view=auto
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/control/accessibleruler.cxx (added)
+++ openoffice/branches/ia2/main/svtools/source/control/accessibleruler.cxx Mon Jan 21 08:47:39 2013
@@ -0,0 +1,556 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * 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_svtools.hxx"
+
+//add by duan mei hua, 2006/09/04, for issue 174
+#ifndef _SVTRULERACCESSIBLE_HXX
+#include <svtools/accessibleruler.hxx>
+#endif
+//end add by duan mei hua, 2006/09/04, for issue 174
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLESTATESETHELPER_HXX_
+#include <unotools/accessiblestatesethelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+
+#ifndef	_COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+
+#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _TOOLKIT_HELPER_CONVERT_HXX_
+#include <toolkit/helper/convert.hxx>
+#endif
+
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _RTL_UUID_H_
+#include <rtl/uuid.h>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+
+#include "ruler.hxx"
+
+#ifndef COMPHELPER_ACCESSIBLE_EVENT_NOTIFIER
+#include <comphelper/accessibleeventnotifier.hxx>
+#endif
+
+using namespace ::cppu;
+using namespace ::osl;
+using namespace	::rtl;
+using namespace	::com::sun::star;
+using namespace	::com::sun::star::uno;
+using namespace	::com::sun::star::accessibility;
+
+DBG_NAME( SvtRulerAccessible )
+
+
+//=====  internal  ============================================================
+
+SvtRulerAccessible::SvtRulerAccessible(
+	const uno::Reference< XAccessible >& rxParent, Ruler& rRepr, const OUString& rName ) :
+
+	SvtRulerAccessible_Base( m_aMutex ),
+	msName( rName ),
+	mxParent( rxParent ),
+	mpRepr( &rRepr ),
+    mnClientId( 0 )
+{
+	DBG_CTOR( SvtRulerAccessible, NULL );
+}
+
+SvtRulerAccessible::~SvtRulerAccessible()
+{
+	DBG_DTOR( SvtRulerAccessible, NULL );
+
+	if( IsAlive() )
+	{
+		osl_incrementInterlockedCount( &m_refCount );
+		dispose();		// set mpRepr = NULL & release all childs
+	}
+}
+
+//=====  XAccessible  =========================================================
+
+uno::Reference< XAccessibleContext > SAL_CALL SvtRulerAccessible::getAccessibleContext( void ) throw( RuntimeException )
+{
+	return this;
+}
+
+//=====  XAccessibleComponent  ================================================
+
+sal_Bool SAL_CALL SvtRulerAccessible::containsPoint( const awt::Point& rPoint ) throw( RuntimeException )
+{
+	// no guard -> done in getBounds()
+//	return GetBoundingBox().IsInside( VCLPoint( rPoint ) );
+	return Rectangle( Point( 0, 0 ), GetBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleAtPoint( const awt::Point& ) throw( RuntimeException )
+{
+	::osl::MutexGuard			aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+
+	uno::Reference< XAccessible >	xRet;
+
+
+	return xRet;
+}
+
+awt::Rectangle SAL_CALL SvtRulerAccessible::getBounds() throw( RuntimeException )
+{
+	// no guard -> done in GetBoundingBox()
+	return AWTRectangle( GetBoundingBox() );
+}
+
+awt::Point SAL_CALL SvtRulerAccessible::getLocation() throw( RuntimeException )
+{
+	// no guard -> done in GetBoundingBox()
+	return AWTPoint( GetBoundingBox().TopLeft() );
+}
+
+awt::Point SAL_CALL SvtRulerAccessible::getLocationOnScreen() throw( RuntimeException )
+{
+	// no guard -> done in GetBoundingBoxOnScreen()
+	return AWTPoint( GetBoundingBoxOnScreen().TopLeft() );
+}
+
+awt::Size SAL_CALL SvtRulerAccessible::getSize() throw( RuntimeException )
+{
+	// no guard -> done in GetBoundingBox()
+	return AWTSize( GetBoundingBox().GetSize() );
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isShowing() throw( RuntimeException )
+{
+	return sal_True;
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isVisible() throw( RuntimeException )
+{
+	::osl::MutexGuard			aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+
+	return mpRepr->IsVisible();
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::isFocusTraversable() throw( RuntimeException )
+{
+	return sal_True;
+}
+
+//=====  XAccessibleContext  ==================================================
+
+sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleChildCount( void ) throw( RuntimeException )
+{
+	::osl::MutexGuard	aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+
+	return 0;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleChild( sal_Int32 )
+	throw( RuntimeException, lang::IndexOutOfBoundsException )
+{
+	uno::Reference< XAccessible >	xChild ;
+
+	return xChild;
+}
+
+uno::Reference< XAccessible > SAL_CALL SvtRulerAccessible::getAccessibleParent( void ) throw( RuntimeException )
+{
+	return mxParent;
+}
+
+sal_Int32 SAL_CALL SvtRulerAccessible::getAccessibleIndexInParent( void ) throw( RuntimeException )
+{
+	::osl::MutexGuard	aGuard( m_aMutex );
+	//	Use a simple but slow solution for now.  Optimize later.
+
+    //	Iterate over all the parent's children and search for this object.
+    if( mxParent.is() )
+    {
+    	uno::Reference< XAccessibleContext >		xParentContext( mxParent->getAccessibleContext() );
+        if( xParentContext.is() )
+        {
+        	sal_Int32						nChildCount = xParentContext->getAccessibleChildCount();
+            for( sal_Int32 i = 0 ; i < nChildCount ; ++i )
+            {
+            	uno::Reference< XAccessible >	xChild( xParentContext->getAccessibleChild( i ) );
+				if( xChild.get() == ( XAccessible* ) this )
+                    return i;
+            }
+        }
+   }
+
+   //	Return -1 to indicate that this object's parent does not know about the
+   //	object.
+   return -1;
+}
+
+sal_Int16 SAL_CALL SvtRulerAccessible::getAccessibleRole( void ) throw( RuntimeException )
+{
+	return AccessibleRole::RULER;
+}
+
+OUString SAL_CALL SvtRulerAccessible::getAccessibleDescription( void ) throw( RuntimeException )
+{
+	::osl::MutexGuard	aGuard( m_aMutex );
+	return msDescription;
+}
+
+OUString SAL_CALL SvtRulerAccessible::getAccessibleName( void ) throw( RuntimeException )
+{
+	::osl::MutexGuard	aGuard( m_aMutex );
+	return msName;
+}
+
+/**	Return empty uno::Reference to indicate that the relation set is not
+	supported.
+*/
+uno::Reference< XAccessibleRelationSet > SAL_CALL SvtRulerAccessible::getAccessibleRelationSet( void ) throw( RuntimeException )
+{
+	return uno::Reference< XAccessibleRelationSet >();
+}
+
+
+uno::Reference< XAccessibleStateSet > SAL_CALL SvtRulerAccessible::getAccessibleStateSet( void ) throw( RuntimeException )
+{
+	::osl::MutexGuard						aGuard( m_aMutex );
+	utl::AccessibleStateSetHelper*			pStateSetHelper = new utl::AccessibleStateSetHelper;
+
+	if( IsAlive() )
+	{
+		pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+				
+		if( isShowing() )
+			pStateSetHelper->AddState( AccessibleStateType::SHOWING );
+
+		if( isVisible() )
+			pStateSetHelper->AddState( AccessibleStateType::VISIBLE );
+
+		
+		if ( mpRepr )
+		{
+			if ( mpRepr->GetStyle() & WB_HORZ )
+				pStateSetHelper->AddState( AccessibleStateType::HORIZONTAL );
+			else 
+				pStateSetHelper->AddState( AccessibleStateType::VERTICAL );
+		}
+		if(pStateSetHelper->contains(AccessibleStateType::FOCUSABLE))
+		{
+			pStateSetHelper->RemoveState( AccessibleStateType::FOCUSABLE );
+		}
+
+	}
+	
+
+	return pStateSetHelper;
+}
+
+lang::Locale SAL_CALL SvtRulerAccessible::getLocale( void ) throw( IllegalAccessibleComponentStateException, RuntimeException )
+{
+	::osl::MutexGuard							aGuard( m_aMutex );
+	if( mxParent.is() )
+    {
+    	uno::Reference< XAccessibleContext >	xParentContext( mxParent->getAccessibleContext() );
+        if( xParentContext.is() )
+	    	return xParentContext->getLocale();
+    }
+
+    //	No parent.  Therefore throw exception to indicate this cluelessness.
+    throw IllegalAccessibleComponentStateException();
+}
+
+void SAL_CALL SvtRulerAccessible::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+    throw( RuntimeException )
+{
+	if (xListener.is())
+    {
+		::osl::MutexGuard	aGuard( m_aMutex );
+		if (!mnClientId)
+            mnClientId = comphelper::AccessibleEventNotifier::registerClient( );
+		comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener );
+    }
+}
+
+void SAL_CALL SvtRulerAccessible::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
+    throw( RuntimeException )
+{
+	if (xListener.is())
+	{
+    	::osl::MutexGuard	aGuard( m_aMutex );
+
+        sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
+		if ( !nListenerCount )
+		{
+			// no listeners anymore
+			// -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
+			// and at least to us not firing any events anymore, in case somebody calls
+			// NotifyAccessibleEvent, again
+			comphelper::AccessibleEventNotifier::revokeClient( mnClientId );
+			mnClientId = 0;
+		}
+	}
+}
+
+void SAL_CALL SvtRulerAccessible::addFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+	throw( RuntimeException )
+{
+	if( xListener.is() )
+    {
+		::osl::MutexGuard	aGuard( m_aMutex );
+
+		ThrowExceptionIfNotAlive();
+
+		uno::Reference< awt::XWindow >	xWindow = VCLUnoHelper::GetInterface( mpRepr );
+		if( xWindow.is() )
+			xWindow->addFocusListener( xListener );
+    }
+}
+
+void SAL_CALL SvtRulerAccessible::removeFocusListener( const uno::Reference< awt::XFocusListener >& xListener )
+	throw (RuntimeException)
+{
+	if( xListener.is() )
+    {
+		::osl::MutexGuard	aGuard( m_aMutex );
+
+		ThrowExceptionIfNotAlive();
+
+		uno::Reference< awt::XWindow >	xWindow = VCLUnoHelper::GetInterface( mpRepr );
+		if( xWindow.is() )
+			xWindow->removeFocusListener( xListener );
+    }
+}
+
+void SAL_CALL SvtRulerAccessible::grabFocus() throw( RuntimeException )
+{
+	::vos::OGuard		aSolarGuard( Application::GetSolarMutex() );
+	::osl::MutexGuard	aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+
+	mpRepr->GrabFocus();
+}
+
+Any SAL_CALL SvtRulerAccessible::getAccessibleKeyBinding() throw( RuntimeException )
+{
+	// here is no implementation, because here are no KeyBindings for every object
+	return Any();
+}
+
+sal_Int32 SvtRulerAccessible::getForeground(  ) 
+        throw (::com::sun::star::uno::RuntimeException)
+{
+    ::vos::OGuard       aSolarGuard( Application::GetSolarMutex() );
+    ::osl::MutexGuard   aGuard( m_aMutex );
+    ThrowExceptionIfNotAlive();
+    
+    return mpRepr->GetControlForeground().GetColor();
+}
+sal_Int32 SvtRulerAccessible::getBackground(  ) 
+        throw (::com::sun::star::uno::RuntimeException)
+{
+    ::vos::OGuard       aSolarGuard( Application::GetSolarMutex() );
+    ::osl::MutexGuard   aGuard( m_aMutex );
+    ThrowExceptionIfNotAlive();
+
+    return mpRepr->GetControlBackground().GetColor();
+}
+
+//=====  XServiceInfo  ========================================================
+
+OUString SAL_CALL SvtRulerAccessible::getImplementationName( void ) throw( RuntimeException )
+{
+	return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.ui.SvtRulerAccessible" ) );
+}
+
+sal_Bool SAL_CALL SvtRulerAccessible::supportsService( const OUString& sServiceName ) throw( RuntimeException )
+{
+	::osl::MutexGuard	aGuard( m_aMutex );
+    //  Iterate over all supported service names and return true if on of them
+    //  matches the given name.
+    Sequence< OUString >	aSupportedServices( getSupportedServiceNames() );
+	int						nLength = aSupportedServices.getLength();
+	const OUString*			pStr = aSupportedServices.getConstArray();
+
+    for( int i = nLength ; i ; --i, ++pStr )
+	{
+        if( sServiceName == *pStr )
+            return sal_True;
+	}
+
+    return sal_False;
+}
+
+Sequence< OUString > SAL_CALL SvtRulerAccessible::getSupportedServiceNames( void ) throw( RuntimeException )
+{
+	const OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleContext" ) );
+	return Sequence< OUString >( &sServiceName, 1 );
+}
+
+//=====  XTypeProvider  =======================================================
+
+Sequence< sal_Int8 > SAL_CALL SvtRulerAccessible::getImplementationId( void ) throw( RuntimeException )
+{
+	return getUniqueId();
+}
+
+
+//=====  internals ========================================================
+
+void SvtRulerAccessible::setName( const OUString& rName )
+{
+		msName = rName;
+
+}
+
+void SvtRulerAccessible::setDescription( const OUString& rDescr )
+{
+
+		msDescription = rDescr;
+
+}
+
+
+
+void SAL_CALL SvtRulerAccessible::disposing()
+{
+	if( !rBHelper.bDisposed )
+	{
+		{
+			::osl::MutexGuard	aGuard( m_aMutex );
+			mpRepr = NULL;		// object dies with representation
+
+		}
+
+		{
+			::osl::MutexGuard	aGuard( m_aMutex );
+
+            // Send a disposing to all listeners.
+	        if ( mnClientId )
+	        {
+                comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( mnClientId, *this );
+		        mnClientId =  0;
+	        }
+			mxParent = uno::Reference< XAccessible >();
+		}
+	}
+}
+
+Rectangle SvtRulerAccessible::GetBoundingBoxOnScreen( void ) throw( RuntimeException )
+{
+	::vos::OGuard		aSolarGuard( Application::GetSolarMutex() );
+	::osl::MutexGuard	aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+//IAccessibility2 Implementation 2009-----
+	//Modified by Li Xing, 2007/03/26, SODC_7333, the absolute on screen pixel is wrong
+	//return Rectangle( mpRepr->GetParent()->OutputToScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() );
+	return Rectangle( mpRepr->GetParent()->OutputToAbsoluteScreenPixel( mpRepr->GetPosPixel() ), mpRepr->GetSizePixel() );
+	//Ended by Li Xing, 2007/03/26, SODC_7333.
+//-----IAccessibility2 Implementation 2009
+}
+
+Rectangle SvtRulerAccessible::GetBoundingBox( void ) throw( RuntimeException )
+{
+	::vos::OGuard		aSolarGuard( Application::GetSolarMutex() );
+	::osl::MutexGuard	aGuard( m_aMutex );
+
+	ThrowExceptionIfNotAlive();
+
+	return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() );
+}
+
+Sequence< sal_Int8 > SvtRulerAccessible::getUniqueId( void )
+{
+	static OImplementationId*	pId = 0;
+	if( !pId )
+	{
+		MutexGuard						aGuard( Mutex::getGlobalMutex() );
+		if( !pId)
+		{
+			static OImplementationId	aId;
+			pId = &aId;
+		}
+	}
+	return pId->getImplementationId();
+}
+
+void SvtRulerAccessible::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException )
+{
+	if( IsNotAlive() )
+		throw lang::DisposedException();
+}
+
+void SvtRulerAccessible::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )throw( com::sun::star::uno::RuntimeException )
+{
+	cppu::WeakAggComponentImplHelperBase::addEventListener( xListener );
+}
+
+void SvtRulerAccessible::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException )
+{
+	cppu::WeakAggComponentImplHelperBase::removeEventListener( xListener );
+}
+
+
+// -------------------------------------------------------------------------------------------------
+

Modified: openoffice/branches/ia2/main/svtools/source/control/headbar.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/control/headbar.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/control/headbar.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/control/headbar.cxx Mon Jan 21 08:47:39 2013
@@ -42,6 +42,10 @@
 #endif
 #include <com/sun/star/accessibility/XAccessible.hpp>
 
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <vclxaccessibleheaderbar.hxx>
+//-----IAccessibility2 Implementation 2009
 // =======================================================================
 
 struct ImplHeadItem
@@ -95,6 +99,9 @@ void HeaderBar::ImplInit( WinBits nWinSt
 	mbOutDrag		= sal_False;
 	mbItemMode		= sal_False;
 
+	//IAccessibility2 Implementation 2009-----
+	m_pVCLXHeaderBar = NULL;
+	//-----IAccessibility2 Implementation 2009
 	// StyleBits auswerten
 	if ( nWinStyle & WB_DRAG )
 		mbDragable = sal_True;
@@ -116,6 +123,9 @@ void HeaderBar::ImplInit( WinBits nWinSt
 	}
 
 	ImplInitSettings( sal_True, sal_True, sal_True );
+	//IAccessibility2 Implementation 2009-----
+	//SetAccessibleRole(com::sun::star::accessibility::AccessibleRole::COLUMN_HEADER);	
+	//-----IAccessibility2 Implementation 2009
 }
 
 // -----------------------------------------------------------------------
@@ -1645,3 +1655,20 @@ void HeaderBar::SetAccessible( ::com::su
     mxAccessible = _xAccessible;
 }
 
+//IAccessibility2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > HeaderBar::GetComponentInterface( sal_Bool bCreate )
+{
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer 
+		(Window::GetComponentInterface(false));
+	if ( !xPeer.is() && bCreate )
+    {
+		::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXHeaderBar(this);
+		m_pVCLXHeaderBar = (VCLXHeaderBar*)(mxPeer);
+		SetComponentInterface(mxPeer);
+		return mxPeer;
+    }
+	else
+		return xPeer;
+}
+//-----IAccessibility2 Implementation 2009
+

Modified: openoffice/branches/ia2/main/svtools/source/control/ruler.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/control/ruler.cxx?rev=1436226&r1=1436225&r2=1436226&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/control/ruler.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/control/ruler.cxx Mon Jan 21 08:47:39 2013
@@ -32,7 +32,15 @@
 
 #define _SV_RULER_CXX
 #include <svtools/ruler.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <svtools/svtdata.hxx>
+#include <svtools/svtools.hrc>
+using namespace	::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
 // =======================================================================
 
 #define RULER_OFF           3
@@ -299,7 +307,10 @@ void Ruler::ImplInit( WinBits nWinBits )
     else
         aDefSize.Width() = nDefHeight;
     SetOutputSizePixel( aDefSize );
+	//IAccessibility2 Implementation 2009-----
 	SetType(WINDOW_RULER);
+	pAccContext = NULL; 
+	//-----IAccessibility2 Implementation 2009
 }
 
 // -----------------------------------------------------------------------
@@ -323,6 +334,10 @@ Ruler::~Ruler()
         Application::RemoveUserEvent( mnUpdateEvtId );
     delete mpSaveData;
     delete mpDragData;
+	//IAccessibility2 Implementation 2009-----
+	if( pAccContext )
+		pAccContext->release();
+	//-----IAccessibility2 Implementation 2009
 }
 
 // -----------------------------------------------------------------------
@@ -3179,3 +3194,31 @@ const RulerBorder*  Ruler::GetBorders() 
 sal_uInt16              Ruler::GetIndentCount() const { return mpData->nIndents; }
 const RulerIndent*  Ruler::GetIndents() const { return mpData->pIndents; }
 
+//IAccessibility2 Implementation 2009-----
+uno::Reference< XAccessible > Ruler::CreateAccessible()
+{
+	Window*						pParent = GetAccessibleParentWindow();
+	DBG_ASSERT( pParent, "-SvxRuler::CreateAccessible(): No Parent!" );
+	uno::Reference< XAccessible >	xAccParent  = pParent->GetAccessible();
+	if( xAccParent.is() )
+	{
+		// MT: Fixed compiler issue because the address from a temporary object was used.
+		// BUT: Shoudl it really be a Pointer, instead of const&???
+		OUString aStr;
+		if ( mnWinStyle & WB_HORZ )
+		{
+			aStr = OUString(XubString(SvtResId(STR_SVT_ACC_RULER_HORZ_NAME)));
+		}
+		else
+		{
+			aStr = OUString(XubString(SvtResId(STR_SVT_ACC_RULER_VERT_NAME)));
+		}
+		pAccContext = new SvtRulerAccessible( xAccParent, *this, aStr );
+		pAccContext->acquire();
+		this->SetAccessible(pAccContext);
+		return pAccContext;
+	}
+	else
+		return uno::Reference< XAccessible >();
+}
+//-----IAccessibility2 Implementation 2009

Added: openoffice/branches/ia2/main/svtools/source/control/ruler.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/control/ruler.src?rev=1436226&view=auto
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/control/ruler.src (added)
+++ openoffice/branches/ia2/main/svtools/source/control/ruler.src Mon Jan 21 08:47:39 2013
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2010.
+ * 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 "svtools/svtools.hrc"
+
+//IAccessibility2 Implementation 2009-----
+//add by duan mei hua, 2006/09/05, for issue 174
+String STR_SVT_ACC_RULER_HORZ_NAME
+{
+	Text[ en-US ] = "Horizontal Ruler";
+};
+String STR_SVT_ACC_RULER_VERT_NAME
+{
+	Text[ en-US ] = "Vertical Ruler";
+};
+//end add by duan mei hua, 2006/09/05, for issue 174
+//-----IAccessibility2 Implementation 2009