diff options
Diffstat (limited to 'accessibility/inc/accessibility/extended')
4 files changed, 57 insertions, 4 deletions
diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx index 33147add2197..9354e48511a9 100644 --- a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx +++ b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx @@ -26,14 +26,16 @@ #include <vcl/vclevent.hxx> #include <toolkit/awt/vclxaccessiblecomponent.hxx> +#include <map> // class AccessibleListBox ----------------------------------------------- class SvTreeListBox; - +class SvTreeListEntry; //........................................................................ namespace accessibility { + class AccessibleListBoxEntry; //........................................................................ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible @@ -62,6 +64,8 @@ namespace accessibility SvTreeListBox* getListBox() const; + void RemoveChildEntries(SvTreeListEntry*); + public: /** OAccessibleBase needs a valid view @param _rListBox @@ -107,6 +111,19 @@ namespace accessibility sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // IA2 CWS + sal_Int32 SAL_CALL getRoleType(); + +private: + + typedef std::map< SvTreeListEntry*, ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > MAP_ENTRY; + MAP_ENTRY m_mapEntry; + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xFocusedChild; + + accessibility::AccessibleListBoxEntry* GetCurEventEntry( const VclWindowEvent& rVclWindowEvent ); + }; //........................................................................ diff --git a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx index 0ff3de306e6c..4eff637f39ab 100644 --- a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx +++ b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx @@ -31,9 +31,11 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <cppuhelper/compbase8.hxx> +#include <com/sun/star/accessibility/XAccessibleValue.hpp> +#include <cppuhelper/compbase9.hxx> #include <comphelper/broadcasthelper.hxx> #include <comphelper/accessibletexthelper.hxx> +#include <svtools/treelistentry.hxx> #include <tools/gen.hxx> #include "accessibility/extended/listboxaccessible.hxx" @@ -55,7 +57,7 @@ namespace accessibility //........................................................................ // class AccessibleListBoxEntry ------------------------------------------ - +/* typedef ::cppu::WeakAggComponentImplHelper8< ::com::sun::star::accessibility::XAccessible , ::com::sun::star::accessibility::XAccessibleContext , ::com::sun::star::accessibility::XAccessibleComponent @@ -64,6 +66,16 @@ namespace accessibility , ::com::sun::star::accessibility::XAccessibleSelection , ::com::sun::star::accessibility::XAccessibleText , ::com::sun::star::lang::XServiceInfo > AccessibleListBoxEntry_BASE; +*/ + typedef ::cppu::WeakAggComponentImplHelper9< ::com::sun::star::accessibility::XAccessible + , ::com::sun::star::accessibility::XAccessibleContext + , ::com::sun::star::accessibility::XAccessibleComponent + , ::com::sun::star::accessibility::XAccessibleEventBroadcaster + , ::com::sun::star::accessibility::XAccessibleAction + , ::com::sun::star::accessibility::XAccessibleSelection + , ::com::sun::star::accessibility::XAccessibleText + , ::com::sun::star::accessibility::XAccessibleValue + , ::com::sun::star::lang::XServiceInfo > AccessibleListBoxEntry_BASE; /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ class AccessibleListBoxEntry:public ::comphelper::OBaseMutex @@ -76,6 +88,8 @@ namespace accessibility private: /** The treelistbox control */ ::std::deque< sal_Int32 > m_aEntryPath; + SvTreeListEntry* m_pSvLBoxEntry; // Needed for a11y focused item... + protected: /// client id in the AccessibleEventNotifier queue @@ -94,6 +108,8 @@ namespace accessibility Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException ); void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException ); + void NotifyAccessibleEvent( sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _aOldValue, const ::com::sun::star::uno::Any& _aNewValue ); + protected: virtual ~AccessibleListBoxEntry(); @@ -122,6 +138,9 @@ namespace accessibility const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent ); + SvTreeListEntry* GetSvLBoxEntry() const { return m_pSvLBoxEntry; } + + protected: // XTypeProvider virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); @@ -199,9 +218,15 @@ namespace accessibility sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - + virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue( ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue( ) throw (::com::sun::star::uno::RuntimeException); private: ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > implGetParentAccessible( ) const; + SvTreeListEntry* GetRealChild(sal_Int32 nIndex); + public: + sal_Int32 SAL_CALL getRoleType(); }; //........................................................................ diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx index 7b84ceab410b..7d97b77bcfc7 100644 --- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx +++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx @@ -39,6 +39,8 @@ class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public Access private: SvHeaderTabListBox* m_pTabListBox; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xCurChild; + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); DECL_LINK( WindowEventListener, VclSimpleEvent* ); diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index b707c8c179ad..a4d4ec708887 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -48,6 +48,10 @@ #include <comphelper/accessibletexthelper.hxx> #include <rtl/ref.hxx> +#include "svtools/svtools.hrc" +#include <vcl/svapp.hxx> +#include <unotools/accessiblerelationsethelper.hxx> +#include <com/sun/star/accessibility/AccessibleRelationType.hpp> #include <memory> #include <queue> #include <boost/unordered_map.hpp> @@ -571,6 +575,9 @@ private: SAL_CALL getAccessibleAtPoint(css::awt::Point const & rPoint) throw (css::uno::RuntimeException); + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ); + // ??? Will be called with both the external (Solar) and internal mutex // locked: virtual void SAL_CALL disposing(); @@ -622,6 +629,8 @@ private: void handleSelectionChangeNotification(); void notifySelectionChange( sal_Int32 nFirst, sal_Int32 nLast ); + ::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos); + void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId); void justifySelection( TextPaM& rTextStart, TextPaM& rTextEnd ); |