summaryrefslogtreecommitdiff
path: root/accessibility/inc/accessibility/extended
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/inc/accessibility/extended')
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx311
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx527
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx95
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx281
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx81
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx175
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx280
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx143
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControl.hxx265
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx467
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx218
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx102
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx226
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx228
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx168
-rwxr-xr-xaccessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx91
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx92
-rw-r--r--accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx107
-rw-r--r--accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx86
-rw-r--r--accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx156
-rw-r--r--accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx119
-rw-r--r--accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx213
-rw-r--r--accessibility/inc/accessibility/extended/accessiblelistbox.hxx125
-rw-r--r--accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx223
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbar.hxx120
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbarbase.hxx78
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbarpage.hxx137
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx141
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistbox.hxx115
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx122
-rw-r--r--accessibility/inc/accessibility/extended/listboxaccessible.hxx95
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx711
32 files changed, 6298 insertions, 0 deletions
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx
new file mode 100644
index 000000000000..fd86653ca5ed
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx
@@ -0,0 +1,311 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOX_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOX_HXX
+
+#include <accessibility/extended/AccessibleBrowseBoxBase.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <svtools/accessibletableprovider.hxx>
+
+
+#include <memory>
+
+// ============================================================================
+
+namespace accessibility {
+
+ class AccessibleBrowseBoxImpl;
+ class AccessibleBrowseBoxTable;
+
+// ============================================================================
+
+/** This class represents the complete accessible BrowseBox object. */
+class AccessibleBrowseBox : public AccessibleBrowseBoxBase
+{
+ friend class AccessibleBrowseBoxAccess;
+
+protected:
+ AccessibleBrowseBox(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator,
+ ::svt::IAccessibleTableProvider& _rBrowseBox
+ );
+
+ virtual ~AccessibleBrowseBox();
+
+ /** sets the XAccessible which created the context
+
+ <p>To be called only once, and only if in the ctor NULL was passed.</p>
+ */
+ void setCreator(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator
+ );
+
+ /** Cleans up members. */
+ using AccessibleBrowseBoxBase::disposing;
+ virtual void SAL_CALL disposing();
+
+protected:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+// virtual sal_Int16 SAL_CALL getAccessibleRole()
+// throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ 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 );
+
+ /** Grabs the focus to the BrowseBox. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+public:
+ // helper functions
+ /** commitHeaderBarEvent commit the event at all listeners of the column/row header bar
+ @param nEventId
+ the event id
+ @param rNewValue
+ the new value
+ @param rOldValue
+ the old value
+ */
+ void commitHeaderBarEvent(sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+ const ::com::sun::star::uno::Any& rOldValue,sal_Bool _bColumnHeaderBar = sal_True);
+
+ // helper functions
+ /** commitTableEvent commit the event at all listeners of the table
+ @param nEventId
+ the event id
+ @param rNewValue
+ the new value
+ @param rOldValue
+ the old value
+ */
+ void commitTableEvent(sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+ const ::com::sun::star::uno::Any& rOldValue);
+
+ /** returns the accessible object for the row or the column header bar
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType )
+ {
+ return implGetHeaderBar(_eObjType);
+ }
+
+ /** returns the accessible object for the table representation
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getTable( )
+ {
+ return implGetTable();
+ }
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ // internal helper methods ------------------------------------------------
+
+ /** This method creates (once) and returns the accessible data table child.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the data table. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > implGetTable();
+
+ /** This method creates (once) and returns the specified header bar.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetHeaderBar( ::svt::AccessibleBrowseBoxObjType eObjType );
+
+ /** This method returns one of the children that are always present:
+ Data table, row and column header bar or corner control.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified child. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetFixedChild( sal_Int32 nChildIndex );
+
+ /** This method creates and returns an accessible table.
+ @return An AccessibleBrowseBoxTable. */
+ virtual AccessibleBrowseBoxTable* createAccessibleTable();
+
+private:
+ // members ----------------------------------------------------------------
+ ::std::auto_ptr< AccessibleBrowseBoxImpl > m_pImpl;
+};
+
+// ============================================================================
+/** the XAccessible which creates/returns an AccessibleBrowseBox
+
+ <p>The instance holds it's XAccessibleContext with a hard reference, while
+ the contxt holds this instance weak.</p>
+*/
+typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > AccessibleBrowseBoxAccess_Base;
+
+class AccessibleBrowseBoxAccess :public AccessibleBrowseBoxAccess_Base
+ ,public ::svt::IAccessibleBrowseBox
+{
+private:
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ m_xParent;
+ ::svt::IAccessibleTableProvider& m_rBrowseBox;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ m_xContext;
+ AccessibleBrowseBox* m_pContext;
+ // note that this pointer is valid as long as m_xContext is valid!
+
+public:
+ AccessibleBrowseBoxAccess(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::IAccessibleTableProvider& _rBrowseBox
+ );
+
+ /// checks whether the accessible context is still alive
+ bool isContextAlive() const;
+
+ /// returns the AccessibleContext belonging to this Accessible
+ inline AccessibleBrowseBox* getContext() { return m_pContext; }
+ inline const AccessibleBrowseBox* getContext() const { return m_pContext; }
+
+protected:
+ virtual ~AccessibleBrowseBoxAccess();
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ SAL_CALL getAccessibleContext() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // IAccessibleBrowseBox
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getMyself()
+ {
+ return this;
+ }
+ void dispose();
+ virtual sal_Bool isAlive() const
+ {
+ return isContextAlive();
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleBrowseBox* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getHeaderBar( _eObjType );
+ return xAccessible;
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getTable()
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleBrowseBox* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getTable();
+ return xAccessible;
+ }
+ virtual void commitHeaderBarEvent( sal_Int16 nEventId, const ::com::sun::star::uno::Any& rNewValue,
+ const ::com::sun::star::uno::Any& rOldValue, sal_Bool _bColumnHeaderBar )
+ {
+ AccessibleBrowseBox* pContext( getContext() );
+ if ( pContext )
+ pContext->commitHeaderBarEvent( nEventId, rNewValue, rOldValue, _bColumnHeaderBar );
+ }
+ virtual void commitTableEvent( sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue )
+ {
+ AccessibleBrowseBox* pContext( getContext() );
+ if ( pContext )
+ pContext->commitTableEvent( nEventId, rNewValue, rOldValue );
+ }
+ virtual void commitEvent( sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue )
+ {
+ AccessibleBrowseBox* pContext( getContext() );
+ if ( pContext )
+ pContext->commitEvent( nEventId, rNewValue, rOldValue );
+ }
+
+private:
+ AccessibleBrowseBoxAccess(); // never implemented
+ AccessibleBrowseBoxAccess( const AccessibleBrowseBoxAccess& ); // never implemented
+ AccessibleBrowseBoxAccess& operator=( const AccessibleBrowseBoxAccess& ); // never implemented
+};
+
+// ============================================================================
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx
new file mode 100644
index 000000000000..dc43e500dadd
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx
@@ -0,0 +1,527 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXBASE_HXX
+
+#include <svtools/AccessibleBrowseBoxObjType.hxx>
+#include <tools/debug.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/gen.hxx>
+#include <vcl/svapp.hxx>
+#include <cppuhelper/compbase5.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <toolkit/helper/convert.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <comphelper/accessibleeventnotifier.hxx>
+#include <comphelper/uno3.hxx>
+
+// ============================================================================
+
+class Window;
+
+namespace utl {
+ class AccessibleStateSetHelper;
+}
+
+namespace svt {
+ class IAccessibleTableProvider;
+}
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** Aquire the solar mutex. */
+class BBSolarGuard : public ::vos::OGuard
+{
+public:
+ inline BBSolarGuard() : ::vos::OGuard( Application::GetSolarMutex() ) {}
+};
+
+// ============================================================================
+
+typedef ::cppu::WeakAggComponentImplHelper5<
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::awt::XFocusListener,
+ ::com::sun::star::lang::XServiceInfo >
+ AccessibleBrowseBoxImplHelper;
+
+/** The BrowseBox accessible objects inherit from this base class. It
+ implements basic functionality for various Accessibility interfaces and
+ the event broadcaster and contains the ::osl::Mutex. */
+class AccessibleBrowseBoxBase :
+ public ::comphelper::OBaseMutex,
+ public AccessibleBrowseBoxImplHelper
+{
+public:
+ /** Constructor sets specified name and description. If the constant of a
+ text is BBTEXT_NONE, the derived class has to set the text via
+ implSetName() and implSetDescription() (in Ctor) or later via
+ setAccessibleName() and setAccessibleDescription() (these methods
+ notify the listeners about the change).
+ @param rxParent XAccessible interface of the parent object.
+ @param rBrowseBox The BrowseBox control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleBrowseBoxBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::AccessibleBrowseBoxObjType eObjType );
+
+ /** Constructor sets specified name and description.
+ @param rxParent XAccessible interface of the parent object.
+ @param rBrowseBox The BrowseBox control.
+ @param rName The name of this object.
+ @param rDescription The description text of this object. */
+ AccessibleBrowseBoxBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::AccessibleBrowseBoxObjType eObjType,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rDescription );
+
+protected:
+ virtual ~AccessibleBrowseBoxBase();
+
+ /** Commits DeFunc event to listeners and cleans up members. */
+ virtual void SAL_CALL disposing();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return A reference to the parent accessible object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The description of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The relation set (the BrowseBox does not have one).
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The set of current states. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The parent's locale. */
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
+ throw ( ::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported.
+ */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChildCount,
+ - getAccessibleChild,
+ - getAccessibleRole.
+ Derived classes may overwrite getAccessibleIndexInParent to increase
+ performance. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ <TRUE/>, if the point lies within the bounding box of this object. */
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The bounding box of this object. */
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box relative to the parent. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box in screen coordinates. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The size of the bounding box. */
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is showing. */
+ virtual sal_Bool SAL_CALL isShowing()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is visible. */
+ virtual sal_Bool SAL_CALL isVisible()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object can accept the focus. */
+ virtual sal_Bool SAL_CALL isFocusTraversable()
+ 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);
+
+ // XFocusListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ /** @return
+ No key bindings supported by default.
+ */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ 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 );
+
+ // XAccessibleEventBroadcaster --------------------------------------------
+
+ /** Adds a new event listener */
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Removes an event listener. */
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return Whether the specified service is supported by this class. */
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return A list of all supported services. */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getImplementationName. */
+
+ // helper methods ---------------------------------------------------------
+
+ /** @return The BrowseBox object type. */
+ inline ::svt::AccessibleBrowseBoxObjType getType() const;
+
+ /** Changes the name of the object and notifies listeners. */
+ void setAccessibleName( const ::rtl::OUString& rName );
+ /** Changes the description of the object and notifies listeners. */
+ void setAccessibleDescription( const ::rtl::OUString& rDescription );
+
+ /** Commits an event to all listeners. */
+ void commitEvent(
+ sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+
+ const ::com::sun::star::uno::Any& rOldValue );
+ /** @return <TRUE/>, if the object is not disposed or disposing. */
+ sal_Bool isAlive() const;
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** Determines whether the BrowseBox control is really showing inside of
+ its parent accessible window. Derived classes may implement different
+ behaviour.
+ @attention This method requires locked mutex's and a living object.
+ @return <TRUE/>, if the object is really showing. */
+ virtual sal_Bool implIsShowing();
+
+ /** Derived classes return the bounding box relative to the parent window.
+ @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox() = 0;
+ /** Derived classes return the bounding box in screen coordinates.
+ @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen() = 0;
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object. This method calls FillStateSet at the BrowseBox which
+ fills it with more states depending on the object type. Derived classes
+ may overwrite this method and add more states.
+ @attention This method requires locked mutex's.
+ @return A filled AccessibleStateSetHelper. */
+ virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // internal helper methods ------------------------------------------------
+
+ /** @throws <type>DisposedException</type> If the object is not alive. */
+ void ensureIsAlive() const
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** @return The ::osl::Mutex member provided by the class OBaseMutex. */
+ inline ::osl::Mutex& getOslMutex();
+ /** @return Pointer to the global ::osl::Mutex. */
+ static inline ::osl::Mutex* getOslGlobalMutex();
+
+ /** Changes the name of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetName( const ::rtl::OUString& rName );
+ /** Changes the description of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetDescription( const ::rtl::OUString& rDescription );
+
+ /** Locks all mutex's and calculates the bounding box relative to the
+ parent window.
+ @return The bounding box (VCL rect.) relative to the parent object. */
+ Rectangle getBoundingBox()
+ throw ( ::com::sun::star::lang::DisposedException );
+ /** Locks all mutex's and calculates the bounding box in screen
+ coordinates.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ Rectangle getBoundingBoxOnScreen()
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** Creates a new UUID, if rId is empty.
+ @attention This method requires locked global mutex to prevent double
+ creation of an UUID. */
+ static void implCreateUuid( ::com::sun::star::uno::Sequence< sal_Int8 >& rId );
+
+ ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; }
+ void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; }
+
+public:
+ // public versions of internal helper methods, with access control
+ struct AccessControl { friend class SolarMethodGuard; private: AccessControl() { } };
+
+ inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); }
+ inline void ensureIsAlive( const AccessControl& ) { ensureIsAlive(); }
+
+protected:
+ // members ----------------------------------------------------------------
+
+ /** The parent accessible object. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > mxParent;
+ /** The VCL BrowseBox control. */
+ ::svt::IAccessibleTableProvider* mpBrowseBox;
+
+ /** This is the window which get all the nice focus events
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xFocusWindow;
+
+private:
+ /** Localized name. */
+ ::rtl::OUString maName;
+ /** Localized description text. */
+ ::rtl::OUString maDescription;
+
+ /** The type of this object (for names, descriptions, state sets, ...). */
+ ::svt::AccessibleBrowseBoxObjType meObjType;
+
+ ::comphelper::AccessibleEventNotifier::TClientId m_aClientId;
+};
+
+// ============================================================================
+// a version of AccessibleBrowseBoxBase which implements not only the XAccessibleContext,
+// but also the XAccessible
+
+typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > BrowseBoxAccessibleElement_Base;
+
+class BrowseBoxAccessibleElement
+ :public AccessibleBrowseBoxBase
+ ,public BrowseBoxAccessibleElement_Base
+{
+protected:
+ /** Constructor sets specified name and description. If the constant of a
+ text is BBTEXT_NONE, the derived class has to set the text via
+ implSetName() and implSetDescription() (in Ctor) or later via
+ setAccessibleName() and setAccessibleDescription() (these methods
+ notify the listeners about the change).
+
+ @param rxParent XAccessible interface of the parent object.
+ @param rBrowseBox The BrowseBox control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text.
+ */
+ BrowseBoxAccessibleElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::AccessibleBrowseBoxObjType eObjType );
+
+ /** Constructor sets specified name and description.
+
+ @param rxParent XAccessible interface of the parent object.
+ @param rBrowseBox The BrowseBox control.
+ @param rName The name of this object.
+ @param rDescription The description text of this object.
+ */
+ BrowseBoxAccessibleElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::AccessibleBrowseBoxObjType eObjType,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rDescription );
+
+public:
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+protected:
+ virtual ~BrowseBoxAccessibleElement();
+
+protected:
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+private:
+ BrowseBoxAccessibleElement(); // never implemented
+ BrowseBoxAccessibleElement( const BrowseBoxAccessibleElement& ); // never implemented
+ BrowseBoxAccessibleElement& operator=( const BrowseBoxAccessibleElement& ); // never implemented
+};
+
+// ============================================================================
+// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex
+
+typedef ::osl::MutexGuard OslMutexGuard;
+
+class SolarMethodGuard : public BBSolarGuard, public OslMutexGuard
+{
+public:
+ inline SolarMethodGuard( AccessibleBrowseBoxBase& _rOwner, bool _bEnsureAlive = true )
+ :BBSolarGuard( )
+ ,OslMutexGuard( _rOwner.getMutex( AccessibleBrowseBoxBase::AccessControl() ) )
+ {
+ if ( _bEnsureAlive )
+ _rOwner.ensureIsAlive( AccessibleBrowseBoxBase::AccessControl() );
+ }
+};
+
+// inlines --------------------------------------------------------------------
+
+inline ::svt::AccessibleBrowseBoxObjType AccessibleBrowseBoxBase::getType() const
+{
+ return meObjType;
+}
+
+inline ::osl::Mutex& AccessibleBrowseBoxBase::getOslMutex()
+{
+ return m_aMutex;
+}
+
+inline ::osl::Mutex* AccessibleBrowseBoxBase::getOslGlobalMutex()
+{
+ return ::osl::Mutex::getGlobalMutex();
+}
+
+inline void AccessibleBrowseBoxBase::implSetName(
+ const ::rtl::OUString& rName )
+{
+ maName = rName;
+}
+
+inline void AccessibleBrowseBoxBase::implSetDescription(
+ const ::rtl::OUString& rDescription )
+{
+ maDescription = rDescription;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx
new file mode 100644
index 000000000000..5ab160535aa0
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
+
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#ifndef ACCESSIBILITY_EXT_BROWSE_BOX_CELL_HXX
+#include "accessibility/extended/accessiblebrowseboxcell.hxx"
+#endif
+#include <cppuhelper/implbase2.hxx>
+#include <vcl/wintypes.hxx>
+// ============================================================================
+namespace accessibility
+{
+// ============================================================================
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleValue
+ > AccessibleCheckBoxCell_BASE;
+
+ class AccessibleCheckBoxCell : public AccessibleBrowseBoxCell
+ ,public AccessibleCheckBoxCell_BASE
+ {
+ private:
+ TriState m_eState;
+ BOOL m_bEnabled;
+ BOOL m_bIsTriState;
+
+ protected:
+ virtual ~AccessibleCheckBoxCell() {}
+
+ virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ public:
+ AccessibleCheckBoxCell(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos,
+ const TriState& _eState,
+ sal_Bool _bEnabled,
+ sal_Bool _bIsTriState = sal_True);
+
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+ // 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 ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XAccessibleValue
+ 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);
+
+ // internal
+ void SetChecked( sal_Bool _bChecked );
+ };
+}
+#endif // ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx
new file mode 100644
index 000000000000..ac0b2761eb1f
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERBAR_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERBAR_HXX
+
+#include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleSelection >
+ AccessibleBrowseBoxHeaderBarImplHelper;
+
+/** This class represents the accessible object of a header bar of a BrowseBox
+ control (row or column header bar). This object supports the
+ XAccessibleSelection interface. Selecting a child of this object selects
+ complete rows or columns of the data table. */
+class AccessibleBrowseBoxHeaderBar :
+ public AccessibleBrowseBoxTableBase,
+ public AccessibleBrowseBoxHeaderBarImplHelper
+{
+public:
+ /** @param eObjType One of the two allowed types BBTYPE_ROWHEADERBAR or
+ BBTYPE_COLUMNHEADERBAR. */
+ AccessibleBrowseBoxHeaderBar(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ ::svt::AccessibleBrowseBoxObjType eObjType );
+
+protected:
+ virtual ~AccessibleBrowseBoxHeaderBar();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ 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 );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleSelection ---------------------------------------------------
+
+ /** Selects the specified child (row or column of the table). */
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified child (row/column) is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Clears the complete selection. */
+ virtual void SAL_CALL clearAccessibleSelection()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Selects all children or first, if multiselection is not supported. */
+ virtual void SAL_CALL selectAllAccessibleChildren()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of selected rows/columns. */
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The specified selected row/column. */
+ virtual ::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 );
+
+ /** Removes the specified row/column from the selection. */
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used rows. */
+ virtual sal_Int32 implGetRowCount() const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used columns. */
+ virtual sal_Int32 implGetColumnCount() const;
+
+ // internal helper methods ------------------------------------------------
+
+ /** @return <TRUE/>, if the objects is a header bar for rows. */
+ inline sal_Bool isRowBar() const;
+ /** @return <TRUE/>, if the objects is a header bar for columns. */
+ inline sal_Bool isColumnBar() const;
+
+ /** Returns the specified row or column. Uses one of the parameters,
+ depending on object type.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified column/row. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetChild( sal_Int32 nRow, sal_uInt16 nColumnPos );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The absolute child index from the index of selected children.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified index is invalid. */
+ sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified row/column index (depending on type) is invalid. */
+ void ensureIsValidHeaderIndex( sal_Int32 nIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+};
+
+// inlines --------------------------------------------------------------------
+
+inline sal_Bool AccessibleBrowseBoxHeaderBar::isRowBar() const
+{
+ return getType() == ::svt::BBTYPE_ROWHEADERBAR;
+}
+
+inline sal_Bool AccessibleBrowseBoxHeaderBar::isColumnBar() const
+{
+ return getType() == ::svt::BBTYPE_COLUMNHEADERBAR;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx
new file mode 100644
index 000000000000..68d4405ff25b
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
+
+#include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
+
+namespace accessibility
+{
+ class AccessibleBrowseBoxHeaderCell : public BrowseBoxAccessibleElement
+ {
+ sal_Int32 m_nColumnRowId;
+ public:
+ AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::AccessibleBrowseBoxObjType _eObjType);
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to the BrowseBox. */
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ inline sal_Bool isRowBarCell() const
+ {
+ return getType() == ::svt::BBTYPE_ROWHEADERCELL;
+ }
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ protected:
+ virtual Rectangle implGetBoundingBox();
+
+ virtual Rectangle implGetBoundingBoxOnScreen();
+ };
+}
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXHEADERCELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx
new file mode 100644
index 000000000000..afb345487239
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLE_HXX
+
+#include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx"
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** This class represents the accessible object of the data table of a
+ BrowseBox control. */
+class AccessibleBrowseBoxTable : public AccessibleBrowseBoxTableBase
+{
+ friend class AccessibleBrowseBox; // to create header bars
+
+public:
+ AccessibleBrowseBoxTable(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox );
+
+protected:
+ virtual ~AccessibleBrowseBoxTable();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ 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 );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ // internal helper methods ------------------------------------------------
+
+ /** @attention This method requires a locked mutex.
+ @return The XAccessibleTable interface of the specified header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ implGetHeaderBar( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx
new file mode 100644
index 000000000000..fa6ce94cfc7f
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLEBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXTABLEBASE_HXX
+
+#include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ AccessibleBrowseBoxTableImplHelper;
+
+/** The BrowseBox accessible table objects inherit from this base class. It
+ implements basic functionality for the XAccessibleTable interface.
+ BrowseBox table objects are: the data table, the column header bar and the
+ row header bar. */
+class AccessibleBrowseBoxTableBase :
+ public BrowseBoxAccessibleElement,
+ public AccessibleBrowseBoxTableImplHelper
+{
+public:
+ /** Constructor sets specified name and description. If the constant of a
+ text is BBTEXT_NONE, the derived class has to set the text via
+ implSetName() and implSetDescription() (in Ctor) or later via
+ setAccessibleName() and setAccessibleDescription() (these methods
+ notify the listeners about the change).
+ @param rxParent XAccessible interface of the parent object.
+ @param rBrowseBox The BrowseBox control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleBrowseBoxTableBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::IAccessibleTableProvider& rBrowseBox,
+ ::svt::AccessibleBrowseBoxObjType eObjType );
+
+protected:
+ virtual ~AccessibleBrowseBoxTableBase();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChild,
+ - getAccessibleIndexInParent. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The number of used rows in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of used columns in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The caption cell of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The summary object of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The child index of the specified cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleRowDescription,
+ - getAccessibleColumnDescription,
+ - getAccessibleRowHeaders,
+ - getAccessibleColumnHeaders,
+ - getSelectedAccessibleRows,
+ - getSelectedAccessibleColumns,
+ - isAccessibleRowSelected,
+ - isAccessibleColumnSelected,
+ - getAccessibleCellAt,
+ - isAccessibleSelected. */
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return A sequence of possible types (received from base classes). */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /* Derived classes have to implement:
+ - getImplementationName */
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of data rows without header bar. */
+ virtual sal_Int32 implGetRowCount() const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of data columns without "handle column". */
+ virtual sal_Int32 implGetColumnCount() const;
+
+ // internal helper methods ------------------------------------------------
+
+ /** @return <TRUE/>, if first BrowseBox column is the "handle column". */
+ sal_Bool implHasHandleColumn() const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @param nColumn
+ the position of the column in the Accessible world
+ @return
+ the position of the column in VCL the Accessible world
+ */
+ sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The number of cells of the table. */
+ sal_Int32 implGetChildCount() const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The row index of the specified cell index. */
+ sal_Int32 implGetRow( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The column index of the specified cell index. */
+ sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The child index of the specified cell address. */
+ sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return <TRUE/>, if the specified row is selected. */
+ sal_Bool implIsRowSelected( sal_Int32 nRow ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return <TRUE/>, if the specified column is selected. */
+ sal_Bool implIsColumnSelected( sal_Int32 nColumn ) const;
+
+ /** Selects/deselects a row (tries to expand selection).
+ @attention This method requires locked mutex's and a living object.
+ @param bSelect <TRUE/> = select, <FALSE/> = deselect */
+ void implSelectRow( sal_Int32 nRow, sal_Bool bSelect );
+ /** Selects/deselects a column (tries to expand selection).
+ @attention This method requires locked mutex's and a living object.
+ @param bSelect <TRUE/> = select, <FALSE/> = deselect */
+ void implSelectColumn( sal_Int32 nColumnPos, sal_Bool bSelect );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of selected rows. */
+ sal_Int32 implGetSelectedRowCount() const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of selected columns. */
+ sal_Int32 implGetSelectedColumnCount() const;
+
+ /** Fills a sequence with sorted indexes of completely selected rows.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted row index list. */
+ void implGetSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+ /** Fills a sequence with sorted indexes of completely selected columns.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted column index list. */
+ void implGetSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified row index is invalid. */
+ void ensureIsValidRow( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified column index is invalid. */
+ void ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified cell address is invalid. */
+ void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified child index is invalid. */
+ void ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx
new file mode 100644
index 000000000000..ec12e40dc179
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
+
+#include "accessibility/extended/accessiblebrowseboxcell.hxx"
+#include <comphelper/accessibletexthelper.hxx>
+#include <cppuhelper/implbase2.hxx>
+
+namespace accessibility
+{
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText
+ , ::com::sun::star::accessibility::XAccessible
+ > AccessibleTextHelper_BASE;
+
+ // implementation of a table cell of BrowseBox
+ class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell
+ ,public AccessibleTextHelper_BASE
+ ,public ::comphelper::OCommonAccessibleText
+ {
+ private:
+ sal_Int32 m_nOffset;
+
+ protected:
+ // OCommonAccessibleText
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+
+ public:
+ AccessibleBrowseBoxTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ sal_Int32 _nRowId,
+ sal_uInt16 _nColId,
+ sal_Int32 _nOffset );
+
+ void nameChanged( const ::rtl::OUString& rNewName, const ::rtl::OUString& rOldName );
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ // XEventListener
+ using AccessibleBrowseBoxBase::disposing;
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The count of visible children.
+ */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleText
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ };
+}
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEBROWSEBOXTABLECELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
new file mode 100755
index 000000000000..cb2c4f6628c8
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROL_HXX
+
+#include <accessibility/extended/AccessibleGridControlBase.hxx>
+#include <accessibility/extended/AccessibleGridControlTable.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <svtools/accessibletable.hxx>
+
+
+#include <memory>
+
+using namespace ::svt::table;
+
+// ============================================================================
+
+namespace accessibility {
+
+ class AccessibleGridControl_Impl;
+
+// ============================================================================
+
+/** This class represents the complete accessible Grid Control object. */
+class AccessibleGridControl : public AccessibleGridControlBase
+{
+ friend class AccessibleGridControlAccess;
+
+protected:
+ AccessibleGridControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxCreator,
+ ::svt::table::IAccessibleTable& _rTable
+ );
+
+ virtual ~AccessibleGridControl();
+
+ /** Cleans up members. */
+ using AccessibleGridControlBase::disposing;
+ virtual void SAL_CALL disposing();
+
+protected:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ 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 );
+
+ /** Grabs the focus to the Grid Control. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+public:
+ // helper functions
+ /** returns the accessible object for the row or the column header bar
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getHeaderBar( ::svt::table::AccessibleTableControlObjType _eObjType )
+ {
+ return implGetHeaderBar(_eObjType);
+ }
+
+ /** returns the accessible object for the table representation
+ */
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ getTable( )
+ {
+ return implGetTable();
+ }
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ // internal helper methods ------------------------------------------------
+
+ /** This method creates (once) and returns the accessible data table child.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the data table. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > implGetTable();
+
+ /** This method creates (once) and returns the specified header bar.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetHeaderBar( ::svt::table::AccessibleTableControlObjType eObjType );
+
+ /** This method returns one of the children that are always present:
+ Data table, row and column header bar or corner control.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified child. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetFixedChild( sal_Int32 nChildIndex );
+
+ /** This method creates and returns an accessible table.
+ @return An AccessibleGridControlTable. */
+ virtual AccessibleGridControlTable* createAccessibleTable();
+
+private:
+ // members ----------------------------------------------------------------
+ ::std::auto_ptr< AccessibleGridControl_Impl > m_pImpl;
+};
+
+// ============================================================================
+/** the XAccessible which creates/returns an AccessibleGridControl
+
+ <p>The instance holds it's XAccessibleContext with a hard reference, while
+ the contxt holds this instance weak.</p>
+*/
+typedef ::cppu::WeakImplHelper1 < ::com::sun::star::accessibility::XAccessible > AccessibleGridControlAccess_Base;
+
+class AccessibleGridControlAccess :public AccessibleGridControlAccess_Base
+ ,public ::svt::table::IAccessibleTableControl
+{
+private:
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ m_xParent;
+ ::svt::table::IAccessibleTable& m_rTable;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ m_xContext;
+ AccessibleGridControl* m_pContext;
+ // note that this pointer is valid as long as m_xContext is valid!
+
+public:
+ AccessibleGridControlAccess(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable
+ );
+
+ /// checks whether the accessible context is still alive
+ bool isContextAlive() const;
+
+ /// returns the AccessibleContext belonging to this Accessible
+ inline AccessibleGridControl* getContext() { return m_pContext; }
+ inline const AccessibleGridControl* getContext() const { return m_pContext; }
+
+protected:
+ virtual ~AccessibleGridControlAccess();
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ SAL_CALL getAccessibleContext() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // IAccessibleTable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getMyself()
+ {
+ return this;
+ }
+ void dispose();
+ virtual sal_Bool isAlive() const
+ {
+ return isContextAlive();
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getTableHeader( ::svt::table::AccessibleTableControlObjType _eObjType )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getHeaderBar( _eObjType );
+ return xAccessible;
+ }
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getTable()
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ xAccessible = pContext->getTable();
+ return xAccessible;
+ }
+ virtual void commitEvent( sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue, const ::com::sun::star::uno::Any& rOldValue )
+ {
+ AccessibleGridControl* pContext( getContext() );
+ if ( pContext )
+ pContext->commitEvent( nEventId, rNewValue, rOldValue );
+ }
+
+private:
+ AccessibleGridControlAccess(); // never implemented
+ AccessibleGridControlAccess( const AccessibleGridControlAccess& ); // never implemented
+ AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ); // never implemented
+};
+
+// ============================================================================
+} // namespace accessibility
+
+// ============================================================================
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
new file mode 100755
index 000000000000..c6a26d8c4548
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx
@@ -0,0 +1,467 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLBASE_HXX
+
+#include <svtools/accessibletable.hxx>
+#include <tools/debug.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/gen.hxx>
+#include <vcl/svapp.hxx>
+#include <cppuhelper/compbase4.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+#include <toolkit/helper/convert.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <comphelper/accessibleeventnotifier.hxx>
+#include <comphelper/uno3.hxx>
+
+// ============================================================================
+
+class Window;
+
+namespace utl {
+ class AccessibleStateSetHelper;
+}
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** Aquire the solar mutex. */
+class TCSolarGuard : public ::vos::OGuard
+{
+public:
+ inline TCSolarGuard() : ::vos::OGuard( Application::GetSolarMutex() ) {}
+};
+
+// ============================================================================
+
+typedef ::cppu::WeakAggComponentImplHelper4<
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo >
+ AccessibleGridControlImplHelper;
+
+/** The GridControl accessible objects inherit from this base class. It
+ implements basic functionality for various Accessibility interfaces and
+ the event broadcaster and contains the ::osl::Mutex. */
+class AccessibleGridControlBase :
+ public ::comphelper::OBaseMutex,
+ public AccessibleGridControlImplHelper
+{
+public:
+ /** Constructor sets specified name and description.
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleGridControlBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlBase();
+
+ /** Commits DeFunc event to listeners and cleans up members. */
+ virtual void SAL_CALL disposing();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return A reference to the parent accessible object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The description of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The relation set (the GridControl does not have one).
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The set of current states. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The parent's locale. */
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
+ throw ( ::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported.
+ */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChildCount,
+ - getAccessibleChild,
+ - getAccessibleRole.
+ Derived classes may overwrite getAccessibleIndexInParent to increase
+ performance. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return
+ <TRUE/>, if the point lies within the bounding box of this object. */
+ virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& rPoint )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The bounding box of this object. */
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box relative to the parent. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The upper left corner of the bounding box in screen coordinates. */
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The size of the bounding box. */
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is showing. */
+ virtual sal_Bool SAL_CALL isShowing()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object is visible. */
+ virtual sal_Bool SAL_CALL isVisible()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the object can accept the focus. */
+ virtual sal_Bool SAL_CALL isFocusTraversable()
+ 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);
+
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ /** @return
+ No key bindings supported by default.
+ */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ /** @return
+ The accessible child rendered under the given point.
+ */
+ 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 );
+
+ // XAccessibleEventBroadcaster --------------------------------------------
+
+ /** Adds a new event listener */
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Removes an event listener. */
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& rxListener )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return Whether the specified service is supported by this class. */
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return A list of all supported services. */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getImplementationName. */
+
+ // helper methods ---------------------------------------------------------
+
+ /** @return The GridControl object type. */
+ inline ::svt::table::AccessibleTableControlObjType getType() const;
+
+ /** Commits an event to all listeners. */
+ void commitEvent(
+ sal_Int16 nEventId,
+ const ::com::sun::star::uno::Any& rNewValue,
+
+ const ::com::sun::star::uno::Any& rOldValue );
+ /** @return <TRUE/>, if the object is not disposed or disposing. */
+ sal_Bool isAlive() const;
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** Determines whether the Grid control is really showing inside of
+ its parent accessible window. Derived classes may implement different
+ behaviour.
+ @attention This method requires locked mutex's and a living object.
+ @return <TRUE/>, if the object is really showing. */
+ virtual sal_Bool implIsShowing();
+
+ /** Derived classes return the bounding box relative to the parent window.
+ @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox() = 0;
+ ///** Derived classes return the bounding box in screen coordinates.
+ // @attention This method requires locked mutex's and a living object.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen() = 0;
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object. This method calls FillStateSet at the GridControl which
+ fills it with more states depending on the object type. Derived classes
+ may overwrite this method and add more states.
+ @attention This method requires locked mutex's.
+ @return A filled AccessibleStateSetHelper. */
+ virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // internal helper methods ------------------------------------------------
+
+ /** @throws <type>DisposedException</type> If the object is not alive. */
+ void ensureIsAlive() const
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** @return The ::osl::Mutex member provided by the class OBaseMutex. */
+ inline ::osl::Mutex& getOslMutex();
+ /** @return Pointer to the global ::osl::Mutex. */
+ static inline ::osl::Mutex* getOslGlobalMutex();
+
+ /** Changes the name of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetName( const ::rtl::OUString& rName );
+ /** Changes the description of the object (flat assignment, no notify).
+ @attention This method requires a locked mutex. */
+ inline void implSetDescription( const ::rtl::OUString& rDescription );
+
+ /** Locks all mutex's and calculates the bounding box relative to the
+ parent window.
+ @return The bounding box (VCL rect.) relative to the parent object. */
+ Rectangle getBoundingBox()
+ throw ( ::com::sun::star::lang::DisposedException );
+ ///** Locks all mutex's and calculates the bounding box in screen
+ // coordinates.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ Rectangle getBoundingBoxOnScreen()
+ throw ( ::com::sun::star::lang::DisposedException );
+
+ /** Creates a new UUID, if rId is empty.
+ @attention This method requires locked global mutex to prevent double
+ creation of an UUID. */
+ static void implCreateUuid( ::com::sun::star::uno::Sequence< sal_Int8 >& rId );
+
+ ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; }
+ void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; }
+
+public:
+ // public versions of internal helper methods, with access control
+ struct TC_AccessControl { friend class TC_SolarMethodGuard; private: TC_AccessControl() { } };
+
+ inline ::osl::Mutex& getMutex( const TC_AccessControl& ) { return getOslMutex(); }
+ inline void ensureIsAlive( const TC_AccessControl& ) { ensureIsAlive(); }
+
+protected:
+ // members ----------------------------------------------------------------
+
+ /** The parent accessible object. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > m_xParent;
+ /** The SVT Table control. */
+ ::svt::table::IAccessibleTable& m_aTable;
+ /** The type of this object (for names, descriptions, state sets, ...). */
+ ::svt::table::AccessibleTableControlObjType m_eObjType;
+
+private:
+ /** Localized name. */
+ ::rtl::OUString m_aName;
+ /** Localized description text. */
+ ::rtl::OUString m_aDescription;
+ ::comphelper::AccessibleEventNotifier::TClientId m_aClientId;
+};
+
+// ============================================================================
+// a version of AccessibleGridControlBase which implements not only the XAccessibleContext,
+// but also the XAccessible
+
+typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > GridControlAccessibleElement_Base;
+
+class GridControlAccessibleElement
+ :public AccessibleGridControlBase
+ ,public GridControlAccessibleElement_Base
+{
+protected:
+ /** Constructor sets specified name and description.
+
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text.
+ */
+ GridControlAccessibleElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+public:
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+protected:
+ virtual ~GridControlAccessibleElement();
+
+protected:
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+private:
+ GridControlAccessibleElement(); // never implemented
+ GridControlAccessibleElement( const GridControlAccessibleElement& ); // never implemented
+ GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ); // never implemented
+};
+
+// ============================================================================
+// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex
+
+typedef ::osl::MutexGuard OslMutexGuard;
+
+class TC_SolarMethodGuard : public TCSolarGuard, public OslMutexGuard
+{
+public:
+ inline TC_SolarMethodGuard( AccessibleGridControlBase& _rOwner, bool _bEnsureAlive = true )
+ :TCSolarGuard( )
+ ,OslMutexGuard( _rOwner.getMutex( AccessibleGridControlBase::TC_AccessControl() ) )
+ {
+ if ( _bEnsureAlive )
+ _rOwner.ensureIsAlive( AccessibleGridControlBase::TC_AccessControl() );
+ }
+};
+
+// inlines --------------------------------------------------------------------
+
+inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::getType() const
+{
+ return m_eObjType;
+}
+
+inline ::osl::Mutex& AccessibleGridControlBase::getOslMutex()
+{
+ return m_aMutex;
+}
+
+inline ::osl::Mutex* AccessibleGridControlBase::getOslGlobalMutex()
+{
+ return ::osl::Mutex::getGlobalMutex();
+}
+
+inline void AccessibleGridControlBase::implSetName(
+ const ::rtl::OUString& rName )
+{
+ m_aName = rName;
+}
+
+inline void AccessibleGridControlBase::implSetDescription(
+ const ::rtl::OUString& rDescription )
+{
+ m_aDescription = rDescription;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLBASE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx
new file mode 100755
index 000000000000..90306435bd4b
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADER_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADER_HXX
+
+
+#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx"
+#include "accessibility/extended/AccessibleGridControlTableBase.hxx"
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+
+/** This class represents the accessible object of a header bar of a Grid Control
+ (row or column header bar). This object supports the
+ XAccessibleSelection interface. Selecting a child of this object selects
+ complete rows or columns of the data table. */
+class AccessibleGridControlHeader : public AccessibleGridControlTableBase
+{
+public:
+ /** @param eObjType One of the two allowed types TCTYPE_ROWHEADERBAR or
+ TCTYPE_COLUMNHEADERBAR. */
+ AccessibleGridControlHeader(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlHeader();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ 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 );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+ /** @attention This method requires locked mutex's and a living object.
+ @return The absolute child index from the index of selected children.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified index is invalid. */
+ //sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex )
+ // throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Returns the specified row or column. Uses one of the parameters,
+ depending on object type.
+ @attention This method requires locked mutex's and a living object.
+ @return The XAccessible interface of the specified column/row. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos );
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used rows. */
+ virtual sal_Int32 implGetRowCount() const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The count of used columns. */
+ virtual sal_Int32 implGetColumnCount() const;
+
+ // internal helper methods ------------------------------------------------
+
+ /** @return <TRUE/>, if the objects is a header bar for rows. */
+ inline sal_Bool isRowBar() const;
+ /** @return <TRUE/>, if the objects is a header bar for columns. */
+ inline sal_Bool isColumnBar() const;
+};
+
+// inlines --------------------------------------------------------------------
+
+inline sal_Bool AccessibleGridControlHeader::isRowBar() const
+{
+ return getType() == ::svt::table::TCTYPE_ROWHEADERBAR;
+}
+
+inline sal_Bool AccessibleGridControlHeader::isColumnBar() const
+{
+ return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR;
+}
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx
new file mode 100755
index 000000000000..0672ca28a151
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+
+#include "accessibility/extended/AccessibleGridControlTableCell.hxx"
+
+namespace accessibility
+{
+ class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public ::com::sun::star::accessibility::XAccessible
+ {
+ sal_Int32 m_nColumnRowId;
+ public:
+ AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ ::svt::table::AccessibleTableControlObjType _eObjType);
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException,::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Grabs the focus to the GridControl. */
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+ //-------------------------------------------------------------------------
+ inline sal_Bool isRowBarCell() const
+ {
+ return getType() == ::svt::table::TCTYPE_ROWHEADERCELL;
+ }
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ protected:
+ virtual Rectangle implGetBoundingBox();
+
+ virtual Rectangle implGetBoundingBoxOnScreen();
+ private:
+ ::rtl::OUString m_sHeaderName;
+ };
+}
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx
new file mode 100644
index 000000000000..8058594d2938
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLE_HXX
+
+#include "accessibility/extended/AccessibleGridControlTableBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+// ============================================================================
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleSelection >
+ AccessibleGridControlTableImplHelper1;
+/** This class represents the accessible object of the data table of a
+ Grid control. */
+class AccessibleGridControlTable : public AccessibleGridControlTableBase,
+ public AccessibleGridControlTableImplHelper1
+{
+public:
+ AccessibleGridControlTable(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType _eType);
+
+protected:
+ virtual ~AccessibleGridControlTable();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** @return The accessible child rendered under the given point. */
+ 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 );
+
+ /** Grabs the focus to (the current cell of) the data table. */
+ virtual void SAL_CALL grabFocus()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The key bindings associated with this object. */
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The description text of the specified row. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The description text of the specified column. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the row header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessibleTable interface of the column header bar. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected rows. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An index list of completely selected columns. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified row is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified column is completely selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the cell object at the specified
+ cell position. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified cell is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleSelection ---------------------------------------------------
+
+ /** Selects the specified child (row or column of the table). */
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return <TRUE/>, if the specified child (row/column) is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Clears the complete selection. */
+ virtual void SAL_CALL clearAccessibleSelection()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Selects all children or first, if multiselection is not supported. */
+ virtual void SAL_CALL selectAllAccessibleChildren()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of selected rows/columns. */
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The specified selected row/column. */
+ virtual ::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 );
+
+ /** Removes the specified row/column from the selection. */
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+ // XServiceInfo -----------------------------------------------------------
+
+ /** @return The name of this class. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal virtual methods -----------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The bounding box (VCL rect.) relative to the parent window. */
+ virtual Rectangle implGetBoundingBox();
+ ///** @attention This method requires locked mutex's and a living object.
+ // @return The bounding box (VCL rect.) in screen coordinates. */
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+
+ //// internal helper methods ------------------------------------------------
+ ///** @attention This method requires a locked mutex.
+ // @return The XAccessibleTable interface of the specified header bar. */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ implGetHeaderBar( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx
new file mode 100755
index 000000000000..bee42d85e2a2
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx
@@ -0,0 +1,228 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX
+
+#include "accessibility/extended/AccessibleGridControlBase.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+
+// ============================================================================
+
+namespace accessibility {
+
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleTable >
+ AccessibleGridControlTableImplHelper;
+
+/** The Grid Control accessible table objects inherit from this base class. It
+ implements basic functionality for the XAccessibleTable interface.
+ Grid COntrol table objects are: the data table, the column header bar and the
+ row header bar. */
+class AccessibleGridControlTableBase :
+ public GridControlAccessibleElement,
+ public AccessibleGridControlTableImplHelper
+{
+public:
+ /** Constructor sets specified name and description.
+ @param rxParent XAccessible interface of the parent object.
+ @param rTable The Table control.
+ @param eNameText The constant for the name text.
+ @param eDescrText The constant for the description text. */
+ AccessibleGridControlTableBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& rxParent,
+ ::svt::table::IAccessibleTable& rTable,
+ ::svt::table::AccessibleTableControlObjType eObjType );
+
+protected:
+ virtual ~AccessibleGridControlTableBase();
+
+public:
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The role of this object (a table). */
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleChild,
+ - getAccessibleIndexInParent. */
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /* Derived classes have to implement:
+ - getAccessibleAt,
+ - grabFocus,
+ - getAccessibleKeyBinding. */
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** @return The number of used rows in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The number of used columns in the table (0 = empty table). */
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column extent of the specified cell (always 1). */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The caption cell of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The summary object of the table (not supported). */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The child index of the specified cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The row index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** @return The column index of the specified child cell. */
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /* Derived classes have to implement:
+ - getAccessibleRowDescription,
+ - getAccessibleColumnDescription,
+ - getAccessibleRowHeaders,
+ - getAccessibleColumnHeaders,
+ - getSelectedAccessibleRows,
+ - getSelectedAccessibleColumns,
+ - isAccessibleRowSelected,
+ - isAccessibleColumnSelected,
+ - getAccessibleCellAt,
+ - isAccessibleSelected. */
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** @return A sequence of possible types (received from base classes). */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return An unique implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ // internal helper methods ------------------------------------------------
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The number of cells of the table. */
+ sal_Int32 implGetChildCount() const;
+
+ /** @attention This method requires locked mutex's and a living object.
+ @return The row index of the specified cell index. */
+ sal_Int32 implGetRow( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The column index of the specified cell index. */
+ sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const;
+ /** @attention This method requires locked mutex's and a living object.
+ @return The child index of the specified cell address. */
+ sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const;
+
+ /** Fills a sequence with sorted indexes of completely selected rows.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted row index list. */
+ void implGetSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+ /** Fills a sequence with sorted indexes of completely selected columns.
+ @attention This method requires locked mutex's and a living object.
+ @param rSeq Out-parameter that takes the sorted column index list. */
+ //void implGetSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& rSeq );
+
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified row index is invalid. */
+ void ensureIsValidRow( sal_Int32 nRow )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified column index is invalid. */
+ void ensureIsValidColumn( sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified cell address is invalid. */
+ void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** @attention This method requires locked mutex's and a living object.
+ @throws <type>IndexOutOfBoundsException</type>
+ If the specified child index is invalid. */
+ void ensureIsValidIndex( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLEBASE_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx
new file mode 100755
index 000000000000..dd44927d7fc1
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+
+#include <comphelper/accessibletexthelper.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include "accessibility/extended/AccessibleGridControlBase.hxx"
+#include <svtools/accessibletable.hxx>
+
+namespace accessibility
+{
+ class AccessibleGridControlCell : public AccessibleGridControlBase
+ {
+ private:
+ sal_Int32 m_nRowPos; // the row number of the table cell
+ sal_Int32 m_nColPos; // the column id of the table cell
+
+ protected:
+ // attribute access
+ inline sal_Int32 getRowPos( ) const { return m_nRowPos; }
+ inline sal_Int32 getColumnPos( ) const { return m_nColPos; }
+
+ // XAccessibleComponent
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ protected:
+ AccessibleGridControlCell(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos,
+ ::svt::table::AccessibleTableControlObjType _eType
+ );
+
+ virtual ~AccessibleGridControlCell();
+
+ private:
+ AccessibleGridControlCell(); // never implemented
+ AccessibleGridControlCell( const AccessibleGridControlCell& ); // never implemented
+ AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ); // never implemented
+ };
+
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::accessibility::XAccessibleText
+ , ::com::sun::star::accessibility::XAccessible
+ > AccessibleTextHelper_BASE;
+ // implementation of a table cell of GridControl
+ class AccessibleGridControlTableCell :public AccessibleGridControlCell
+ ,public AccessibleTextHelper_BASE
+ ,public ::comphelper::OCommonAccessibleText
+ {
+ private:
+ sal_Int32 m_nOffset;
+
+ protected:
+ // OCommonAccessibleText
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+ virtual Rectangle implGetBoundingBox();
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ public:
+ AccessibleGridControlTableCell( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::table::IAccessibleTable& _rTable,
+ sal_Int32 _nRowId,
+ sal_uInt16 _nColId,
+ svt::table::AccessibleTableControlObjType eObjType);
+
+ // XInterface -------------------------------------------------------------
+
+ /** Queries for a new interface. */
+ ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** Aquires the object (calls acquire() on base class). */
+ virtual void SAL_CALL acquire() throw ();
+
+ /** Releases the object (calls release() on base class). */
+ virtual void SAL_CALL release() throw ();
+
+ /** @return The index of this object among the parent's children. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The name of this class.
+ */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The count of visible children.
+ */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return
+ The XAccessible interface of the specified child.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new AccessibleStateSetHelper and fills it with states of the
+ current object.
+ @return
+ A filled AccessibleStateSetHelper.
+ */
+ ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
+
+ // XAccessible ------------------------------------------------------------
+
+ /** @return The XAccessibleContext interface of this object. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL
+ getAccessibleContext()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleText
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ };
+}
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLECELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx
new file mode 100755
index 000000000000..10c6520b6a3d
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACC_ACCESSIBLETOOLPANELDECK_HXX
+#define ACC_ACCESSIBLETOOLPANELDECK_HXX
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+namespace svt
+{
+ class ToolPanelDeck;
+}
+
+//......................................................................................................................
+namespace accessibility
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= AccessibleToolPanelDeck
+ //==================================================================================================================
+ class AccessibleToolPanelDeck_Impl;
+ typedef VCLXAccessibleComponent AccessibleToolPanelDeck_Base;
+ class AccessibleToolPanelDeck : public AccessibleToolPanelDeck_Base
+ {
+ public:
+ AccessibleToolPanelDeck(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
+ ::svt::ToolPanelDeck& i_rPanelDeck
+ );
+
+ using AccessibleToolPanelDeck_Base::NotifyAccessibleEvent;
+
+ protected:
+ virtual ~AccessibleToolPanelDeck();
+
+ // 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_Int16 SAL_CALL getAccessibleRole( ) throw (::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);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // VCLXAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& i_rVclWindowEvent );
+ virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& i_rStateSet );
+
+ private:
+ ::boost::scoped_ptr< AccessibleToolPanelDeck_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} // namespace accessibility
+//......................................................................................................................
+
+#endif // ACC_ACCESSIBLETOOLPANELDECK_HXX
diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx
new file mode 100644
index 000000000000..cc2d39c5acbf
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACC_ACCESSIBLETOOLPANELTABBAR_HXX
+#define ACC_ACCESSIBLETOOLPANELTABBAR_HXX
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+namespace svt
+{
+ class IToolPanelDeck;
+ class PanelTabBar;
+}
+
+//......................................................................................................................
+namespace accessibility
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= AccessibleToolPanelTabBar
+ //==================================================================================================================
+ class AccessibleToolPanelTabBar_Impl;
+ typedef VCLXAccessibleComponent AccessibleToolPanelTabBar_Base;
+ class AccessibleToolPanelTabBar : public AccessibleToolPanelTabBar_Base
+ {
+ public:
+ AccessibleToolPanelTabBar(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
+ ::svt::IToolPanelDeck& i_rPanelDeck,
+ ::svt::PanelTabBar& i_rTabBar
+ );
+
+ using AccessibleToolPanelTabBar_Base::NotifyAccessibleEvent;
+
+ protected:
+ virtual ~AccessibleToolPanelTabBar();
+
+ // 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_Int16 SAL_CALL getAccessibleRole( ) throw (::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);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // VCLXAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& i_rVclWindowEvent );
+ virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& i_rStateSet );
+
+ private:
+ ::boost::scoped_ptr< AccessibleToolPanelTabBar_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} // namespace accessibility
+//......................................................................................................................
+
+#endif // ACC_ACCESSIBLETOOLPANELTABBAR_HXX
diff --git a/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx
new file mode 100644
index 000000000000..80b2ccaaf104
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
+#define ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
+
+/** === begin UNO includes === **/
+/** === end UNO includes === **/
+
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <cppuhelper/implbase1.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+namespace svt
+{
+ class IToolPanelDeck;
+ class PanelTabBar;
+}
+
+//......................................................................................................................
+namespace accessibility
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= AccessibleToolPanelDeckTabBarItem
+ //==================================================================================================================
+ class AccessibleToolPanelDeckTabBarItem_Impl;
+ typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleToolPanelDeckTabBarItem_Base;
+ class AccessibleToolPanelDeckTabBarItem : public AccessibleToolPanelDeckTabBarItem_Base
+ {
+ public:
+ AccessibleToolPanelDeckTabBarItem(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
+ ::svt::IToolPanelDeck& i_rPanelDeck,
+ ::svt::PanelTabBar& i_rTabBar,
+ const size_t i_nItemPos
+ );
+
+ using AccessibleToolPanelDeckTabBarItem_Base::NotifyAccessibleEvent;
+ using AccessibleToolPanelDeckTabBarItem_Base::lateInit;
+
+ protected:
+ virtual ~AccessibleToolPanelDeckTabBarItem();
+
+ public:
+ // 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_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);
+
+ // 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);
+
+ protected:
+ // OCommonAccessibleComponent
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL implGetBounds( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ protected:
+ ::boost::scoped_ptr< AccessibleToolPanelDeckTabBarItem_Impl > m_pImpl;
+ };
+
+//......................................................................................................................
+} // namespace accessibility
+//......................................................................................................................
+
+#endif // ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
diff --git a/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx
new file mode 100644
index 000000000000..a7b78c092213
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
+#define ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
+
+#include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
+#include <svtools/AccessibleBrowseBoxObjType.hxx>
+
+// .................................................................................
+namespace accessibility
+{
+// .................................................................................
+
+ // =============================================================================
+ // = AccessibleBrowseBoxCell
+ // =============================================================================
+ /** common accessibility-functionality for browse box elements which occupy a cell
+ */
+ class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase
+ {
+ private:
+ sal_Int32 m_nRowPos; // the row number of the table cell
+ sal_uInt16 m_nColPos; // the column id of the table cell
+
+ protected:
+ // attribute access
+ inline sal_Int32 getRowPos( ) const { return m_nRowPos; }
+ inline sal_Int32 getColumnPos( ) const { return m_nColPos; }
+
+ protected:
+ // AccessibleBrowseBoxBase overridables
+ virtual Rectangle implGetBoundingBox();
+ virtual Rectangle implGetBoundingBoxOnScreen();
+
+ // XAccessibleComponent
+ virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
+
+ protected:
+ AccessibleBrowseBoxCell(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos,
+ ::svt::AccessibleBrowseBoxObjType _eType = ::svt::BBTYPE_TABLECELL
+ );
+
+ virtual ~AccessibleBrowseBoxCell();
+
+ private:
+ AccessibleBrowseBoxCell(); // never implemented
+ AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ); // never implemented
+ AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ); // never implemented
+ };
+
+// .................................................................................
+} // namespace accessibility
+// .................................................................................
+
+
+#endif // ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
diff --git a/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx
new file mode 100644
index 000000000000..a38877d5aeae
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBILEEDITBROWSEBOXTABLECELL_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBILEEDITBROWSEBOXTABLECELL_HXX
+
+#ifndef ACCESSIBILITY_EXT_BROWSE_BOX_CELL_HXX
+#include "accessiblebrowseboxcell.hxx"
+#endif
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/compbase1.hxx>
+#include <comphelper/accessiblewrapper.hxx>
+
+namespace accessibility
+{
+ // =============================================================================
+ // = EditBrowseBoxTableCell
+ // =============================================================================
+ class EditBrowseBoxTableCell :public AccessibleBrowseBoxCell
+ ,public ::comphelper::OAccessibleContextWrapperHelper
+ {
+ public:
+ EditBrowseBoxTableCell(
+ const com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
+ const com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxOwningAccessible,
+ const com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >& _xControlChild,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos
+ );
+
+ protected:
+ virtual ~EditBrowseBoxTableCell();
+
+ protected:
+ // XAccessibleComponent
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException) ;
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException) ;
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+ // XAccessibleContext
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) 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);
+
+ sal_Int16 SAL_CALL getAccessibleRole() throw ( ::com::sun::star::uno::RuntimeException );
+
+ 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 void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ protected:
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ // XComponent/OComponentProxyAggregationHelper (needs to be disambiguated)
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+
+ // OAccessibleContextWrapperHelper();
+ void notifyTranslatedEvent( const ::com::sun::star::accessibility::AccessibleEventObject& _rEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ EditBrowseBoxTableCell(); // never implemented
+ EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ); // never implemented
+ EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ); // never implemented
+ };
+
+ // =============================================================================
+ // = EditBrowseBoxTableCell
+ // =============================================================================
+ typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > EditBrowseBoxTableCellAccess_Base;
+ // XAccessible providing an EditBrowseBoxTableCell
+ class EditBrowseBoxTableCellAccess
+ :public ::comphelper::OBaseMutex
+ ,public EditBrowseBoxTableCellAccess_Base
+ {
+ protected:
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessibleContext >
+ m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ m_xParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ m_xControlAccessible;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
+ m_xFocusWindow;
+ ::svt::IAccessibleTableProvider* m_pBrowseBox;
+ sal_Int32 m_nRowPos;
+ sal_uInt16 m_nColPos;
+
+ public:
+ EditBrowseBoxTableCellAccess(
+ const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxParent,
+ const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible > _xControlAccessible,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
+ ::svt::IAccessibleTableProvider& _rBrowseBox,
+ sal_Int32 _nRowPos,
+ sal_uInt16 _nColPos
+ );
+
+ protected:
+ virtual ~EditBrowseBoxTableCellAccess();
+
+ // XAccessible
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent/OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ private:
+ EditBrowseBoxTableCellAccess(); // never implemented
+ EditBrowseBoxTableCellAccess( const EditBrowseBoxTableCellAccess& ); // never implemented
+ EditBrowseBoxTableCellAccess& operator=( const EditBrowseBoxTableCellAccess& ); // never implemented
+ };
+}
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBILEEDITBROWSEBOXTABLECELL_HXX
+
diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx
new file mode 100644
index 000000000000..05dc41313fdd
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_
+
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <vcl/vclevent.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+// class AccessibleListBox -----------------------------------------------
+
+class SvtIconChoiceCtrl;
+
+//........................................................................
+namespace accessibility
+{
+//........................................................................
+
+ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible
+ , ::com::sun::star::accessibility::XAccessibleSelection> AccessibleIconChoiceCtrl_BASE;
+
+ /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry
+ */
+ class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE
+ ,public VCLXAccessibleComponent
+ {
+ protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent;
+
+ protected:
+ virtual ~AccessibleIconChoiceCtrl();
+
+ /** this function is called upon disposing the component */
+ virtual void SAL_CALL disposing();
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ SvtIconChoiceCtrl* getCtrl();
+ public:
+ /** OAccessibleBase needs a valid view
+ @param _rIconCtrl
+ is the box for which we implement an accessible object
+ @param _xParent
+ is our parent accessible object
+ */
+ AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent );
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw(com::sun::star::uno::RuntimeException);
+ static ::rtl::OUString getImplementationName_Static(void) 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_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);
+
+ // XAccessibleSelection
+ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ 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);
+ };
+
+//........................................................................
+}// namespace accessibility
+//........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRL_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
new file mode 100644
index 000000000000..245645dfebf0
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
@@ -0,0 +1,213 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRLENTRY_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLEICONCHOICECTRLENTRY_HXX_
+
+#include <deque>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#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 <comphelper/broadcasthelper.hxx>
+#include <comphelper/accessibletexthelper.hxx>
+#include <tools/gen.hxx>
+
+// forward ---------------------------------------------------------------
+
+class SvxIconChoiceCtrlEntry;
+class SvtIconChoiceCtrl;
+
+//........................................................................
+namespace accessibility
+{
+//........................................................................
+
+// class AccessibleIconChoiceCtrlEntry ------------------------------------------
+
+ typedef ::cppu::WeakAggComponentImplHelper8< ::com::sun::star::accessibility::XAccessible
+ , ::com::sun::star::accessibility::XAccessibleContext
+ , ::com::sun::star::accessibility::XAccessibleComponent
+ , ::com::sun::star::accessibility::XAccessibleEventBroadcaster
+ , ::com::sun::star::accessibility::XAccessibleText
+ , ::com::sun::star::accessibility::XAccessibleAction
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XEventListener > AccessibleIconChoiceCtrlEntry_BASE;
+
+ /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */
+ class AccessibleIconChoiceCtrlEntry : public ::comphelper::OBaseMutex,
+ public AccessibleIconChoiceCtrlEntry_BASE,
+ public ::comphelper::OCommonAccessibleText
+ {
+ private:
+ /** The treelistbox control */
+ SvtIconChoiceCtrl* m_pIconCtrl;
+ sal_Int32 m_nIndex;
+
+ protected:
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 m_nClientId;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent;
+
+ private:
+ #ifdef ACCESSIBLE_EVENT_NOTIFICATION_ENABLED
+ // (the following method is unused currently. If you need it, simply remove the #ifdef thing here and
+ // in the cxx)
+ /** notifies all listeners that this object has changed
+ @param _nEventId
+ is the event id
+ @param _aOldValue
+ is the old value
+ @param _aNewValue
+ is the new value
+ */
+ void NotifyAccessibleEvent( sal_Int16 _nEventId,
+ const ::com::sun::star::uno::Any& _aOldValue,
+ const ::com::sun::star::uno::Any& _aNewValue );
+ #endif
+
+ Rectangle GetBoundingBox_Impl() const;
+ Rectangle GetBoundingBoxOnScreen_Impl() const;
+ sal_Bool IsAlive_Impl() const;
+ sal_Bool IsShowing_Impl() const;
+
+ Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException );
+ Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException );
+ void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException );
+
+ protected:
+ virtual ~AccessibleIconChoiceCtrlEntry();
+ /** this function is called upon disposing the component
+ */
+ virtual void SAL_CALL disposing();
+
+ // OCommonAccessibleText
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+
+ public:
+ /** Ctor()
+ @param _rListBox
+ the view control
+ @param _pEntry
+ the entry
+ @param _xParent
+ is our parent accessible object
+ */
+ AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl,
+ ULONG _nPos,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent );
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw(com::sun::star::uno::RuntimeException);
+ static ::rtl::OUString getImplementationName_Static(void) throw(com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) 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 sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) 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& aPoint ) 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 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);
+
+ // XAccessibleText
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleEventBroadcaster
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ };
+
+//........................................................................
+}// namespace accessibility
+//........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLELISTBOXENTRY_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
new file mode 100644
index 000000000000..a92ac6356fa2
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLELISTBOX_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLELISTBOX_HXX_
+
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <vcl/vclevent.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+
+
+// class AccessibleListBox -----------------------------------------------
+
+class SvTreeListBox;
+
+//........................................................................
+namespace accessibility
+{
+//........................................................................
+
+ typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible
+ , ::com::sun::star::accessibility::XAccessibleSelection> AccessibleListBox_BASE;
+
+ /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry
+ */
+ class AccessibleListBox :public AccessibleListBox_BASE
+ ,public VCLXAccessibleComponent
+ {
+ protected:
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent;
+
+ protected:
+ virtual ~AccessibleListBox();
+
+ // OComponentHelper overridables
+ /** this function is called upon disposing the component */
+ virtual void SAL_CALL disposing();
+
+ // VCLXAccessibleComponent
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent );
+ virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
+
+ SvTreeListBox* getListBox() const;
+
+ public:
+ /** OAccessibleBase needs a valid view
+ @param _rListBox
+ is the box for which we implement an accessible object
+ @param _xParent
+ is our parent accessible object
+ */
+ AccessibleListBox( SvTreeListBox& _rListBox,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent );
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw(com::sun::star::uno::RuntimeException);
+ static ::rtl::OUString getImplementationName_Static(void) 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_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);
+
+ // XAccessibleSelection
+ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ 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);
+ };
+
+//........................................................................
+}// namespace accessibility
+//........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLELISTBOX_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx
new file mode 100644
index 000000000000..ce0fa5ad0ac0
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLELISTBOXENTRY_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLELISTBOXENTRY_HXX_
+
+#include <deque>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#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 <comphelper/broadcasthelper.hxx>
+#include <comphelper/accessibletexthelper.hxx>
+#include <tools/gen.hxx>
+#include "accessibility/extended/listboxaccessible.hxx"
+
+// forward ---------------------------------------------------------------
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Point;
+ struct Rectangle;
+ struct Size;
+ class XFocusListener;
+} } } }
+
+class SvTreeListBox;
+class SvLBoxEntry;
+
+//........................................................................
+namespace accessibility
+{
+//........................................................................
+
+// class AccessibleListBoxEntry ------------------------------------------
+
+ typedef ::cppu::WeakAggComponentImplHelper8< ::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::lang::XServiceInfo > AccessibleListBoxEntry_BASE;
+
+ /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */
+ class AccessibleListBoxEntry:public ::comphelper::OBaseMutex
+ ,public AccessibleListBoxEntry_BASE
+ ,public ::comphelper::OCommonAccessibleText
+ ,public ListBoxAccessibleBase
+ {
+ friend class AccessibleListBox;
+
+ private:
+ /** The treelistbox control */
+ SvTreeListBox* m_pListBox;
+ ::std::deque< sal_Int32 > m_aEntryPath;
+
+ protected:
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 m_nClientId;
+
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible >
+ m_aParent;
+
+ private:
+ Rectangle GetBoundingBox_Impl() const;
+ Rectangle GetBoundingBoxOnScreen_Impl() const;
+ sal_Bool IsAlive_Impl() const;
+ sal_Bool IsShowing_Impl() const;
+
+ Rectangle GetBoundingBox() throw ( ::com::sun::star::lang::DisposedException );
+ Rectangle GetBoundingBoxOnScreen() throw ( ::com::sun::star::lang::DisposedException );
+ void EnsureIsAlive() const throw ( ::com::sun::star::lang::DisposedException );
+
+ protected:
+ virtual ~AccessibleListBoxEntry();
+
+ /** this function is called upon disposing the component
+ */
+ virtual void SAL_CALL disposing();
+
+ // ListBoxAccessible/XComponent
+ virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // OCommonAccessibleText
+ virtual ::rtl::OUString implGetText();
+ virtual ::com::sun::star::lang::Locale implGetLocale();
+ virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex );
+
+ public:
+ /** Ctor()
+ @param _rListBox
+ the view control
+ @param _pEntry
+ the entry
+ @param _xParent
+ is our parent accessible object
+ */
+ AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvLBoxEntry* _pEntry,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >& _xParent );
+
+ protected:
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo - static methods
+ static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw(com::sun::star::uno::RuntimeException);
+ static ::rtl::OUString getImplementationName_Static(void) 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 sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) 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& aPoint ) 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 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);
+
+ // XAccessibleText
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleEventBroadcaster
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleSelection
+ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ 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);
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > implGetParentAccessible( ) const;
+ };
+
+//........................................................................
+}// namespace accessibility
+//........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLELISTBOXENTRY_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessibletabbar.hxx b/accessibility/inc/accessibility/extended/accessibletabbar.hxx
new file mode 100644
index 000000000000..df30cc1dc647
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletabbar.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABBAR_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLETABBAR_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include "accessibility/extended/accessibletabbarbase.hxx"
+
+#include <vector>
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+//.........................................................................
+namespace accessibility
+{
+//.........................................................................
+
+ // ----------------------------------------------------
+ // class AccessibleTabBar
+ // ----------------------------------------------------
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::lang::XServiceInfo > AccessibleTabBar_BASE;
+
+ class AccessibleTabBar : public AccessibleTabBarBase,
+ public AccessibleTabBar_BASE
+ {
+ private:
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
+
+ AccessibleChildren m_aAccessibleChildren;
+
+ protected:
+ 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:
+ AccessibleTabBar( TabBar* pTabBar );
+ ~AccessibleTabBar();
+
+ // 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);
+ };
+
+//.........................................................................
+} // namespace accessibility
+//.........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLETABBAR_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
new file mode 100644
index 000000000000..eac79b152b75
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABBARBASE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLETABBARBASE_HXX
+
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <tools/link.hxx>
+
+class TabBar;
+class VCLExternalSolarLock;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+//.........................................................................
+namespace accessibility
+{
+//.........................................................................
+
+// ============================================================================
+
+typedef ::comphelper::OAccessibleExtendedComponentHelper AccessibleExtendedComponentHelper_BASE;
+
+class AccessibleTabBarBase : public AccessibleExtendedComponentHelper_BASE
+{
+public:
+ explicit AccessibleTabBarBase( TabBar* pTabBar );
+ virtual ~AccessibleTabBarBase();
+
+protected:
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+
+ // XComponent
+ virtual void SAL_CALL disposing();
+
+private:
+ void SetTabBarPointer( TabBar* pTabBar );
+ void ClearTabBarPointer();
+
+protected:
+ VCLExternalSolarLock* m_pExternalLock;
+ TabBar* m_pTabBar;
+};
+
+// ============================================================================
+
+//.........................................................................
+} // namespace accessibility
+//.........................................................................
+
+#endif
+
diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx
new file mode 100644
index 000000000000..9ddf20b6cc65
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include "accessibility/extended/accessibletabbarbase.hxx"
+
+#include <vector>
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+//.........................................................................
+namespace accessibility
+{
+//.........................................................................
+
+ // ----------------------------------------------------
+ // class AccessibleTabBarPage
+ // ----------------------------------------------------
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::lang::XServiceInfo > AccessibleTabBarPage_BASE;
+
+ class AccessibleTabBarPage : public AccessibleTabBarBase,
+ public AccessibleTabBarPage_BASE
+ {
+ friend class AccessibleTabBarPageList;
+
+ private:
+ sal_uInt16 m_nPageId;
+ sal_Bool m_bEnabled;
+ sal_Bool m_bShowing;
+ sal_Bool m_bSelected;
+ ::rtl::OUString m_sPageText;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xParent;
+
+ protected:
+ sal_Bool IsEnabled();
+ sal_Bool IsShowing();
+ sal_Bool IsSelected();
+
+ void SetEnabled( sal_Bool bEnabled );
+ void SetShowing( sal_Bool bShowing );
+ void SetSelected( sal_Bool bSelected );
+ void SetPageText( const ::rtl::OUString& sPageText );
+
+ sal_uInt16 GetPageId() const { return m_nPageId; }
+
+ 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:
+ AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent );
+ virtual ~AccessibleTabBarPage();
+
+ // 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);
+ };
+
+//.........................................................................
+} // namespace accessibility
+//.........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGE_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx
new file mode 100644
index 000000000000..d834e3ef86c7
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGELIST_HXX_
+#define ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGELIST_HXX_
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase3.hxx>
+#include "accessibility/extended/accessibletabbarbase.hxx"
+
+#include <vector>
+
+namespace utl {
+class AccessibleStateSetHelper;
+}
+
+//.........................................................................
+namespace accessibility
+{
+//.........................................................................
+
+ // ----------------------------------------------------
+ // class AccessibleTabBarPageList
+ // ----------------------------------------------------
+
+ typedef ::cppu::ImplHelper3<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleSelection,
+ ::com::sun::star::lang::XServiceInfo > AccessibleTabBarPageList_BASE;
+
+ class AccessibleTabBarPageList : public AccessibleTabBarBase,
+ public AccessibleTabBarPageList_BASE
+ {
+ private:
+ typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
+
+ AccessibleChildren m_aAccessibleChildren;
+ sal_Int32 m_nIndexInParent;
+
+ protected:
+ void UpdateEnabled( sal_Int32 i, sal_Bool bEnabled );
+ void UpdateShowing( sal_Bool bShowing );
+ void UpdateSelected( sal_Int32 i, sal_Bool bSelected );
+ void UpdatePageText( sal_Int32 i );
+
+ void InsertChild( sal_Int32 i );
+ void RemoveChild( sal_Int32 i );
+ void MoveChild( sal_Int32 i, sal_Int32 j );
+
+ 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:
+ AccessibleTabBarPageList( TabBar* pTabBar, sal_Int32 nIndexInParent );
+ virtual ~AccessibleTabBarPageList();
+
+ // 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);
+
+ // XAccessibleSelection
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::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);
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ };
+
+//.........................................................................
+} // namespace accessibility
+//.........................................................................
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGELIST_HXX_
+
diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
new file mode 100644
index 000000000000..b488e9c6068b
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
+
+#include "AccessibleBrowseBox.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <svtools/accessibletableprovider.hxx>
+
+class SvHeaderTabListBox;
+
+// ============================================================================
+
+namespace accessibility {
+
+class AccessibleBrowseBoxTable;
+
+typedef ::cppu::ImplHelper1 < ::com::sun::star::accessibility::XAccessible
+ > AccessibleTabListBox_Base;
+
+/** !!! */
+class AccessibleTabListBox
+ :public AccessibleBrowseBox
+ ,public AccessibleTabListBox_Base
+ ,public ::svt::IAccessibleTabListBox
+{
+private:
+ SvHeaderTabListBox* m_pTabListBox;
+
+public:
+ /** ctor()
+ @param rxParent XAccessible interface of the parent object.
+ @param rBox The HeaderTabListBox control. */
+ AccessibleTabListBox(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
+ SvHeaderTabListBox& rBox );
+
+public:
+ // XInterface
+ DECLARE_XINTERFACE( )
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+ // XAccessibleContext -----------------------------------------------------
+
+ /** @return The count of visible children. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw ( ::com::sun::star::uno::RuntimeException );
+
+ /** @return The XAccessible interface of the specified child. */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 nChildIndex )
+ throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleContext
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // IAccessibleTabListBox
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getMyself()
+ {
+ return this;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType )
+ {
+ return AccessibleBrowseBox::getHeaderBar( _eObjType );
+ }
+
+protected:
+ /** dtor() */
+ virtual ~AccessibleTabListBox();
+
+ /** This method creates and returns an accessible table.
+ @return An AccessibleBrowseBoxTable. */
+ virtual AccessibleBrowseBoxTable* createAccessibleTable();
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
+
diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
new file mode 100644
index 000000000000..7365a17e6138
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOXTABLE_HXX
+#define ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOXTABLE_HXX
+
+#include "AccessibleBrowseBoxTable.hxx"
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+
+class SvHeaderTabListBox;
+
+// ============================================================================
+
+namespace accessibility {
+
+typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelection >
+ AccessibleTabListBoxTableImplHelper;
+
+class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper
+{
+private:
+ SvHeaderTabListBox* m_pTabListBox;
+
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ // helpers ----------------------------------------------------------------
+
+ /** Throws an exception, if nIndex is not a valid child index. */
+ void ensureValidIndex( sal_Int32 _nIndex ) const
+ SAL_THROW( ( ::com::sun::star::lang::IndexOutOfBoundsException ) );
+
+ /** Returns true, if the specified row is selected. */
+ sal_Bool implIsRowSelected( sal_Int32 _nRow ) const;
+ /** Selects the specified row. */
+ void implSelectRow( sal_Int32 _nRow, sal_Bool _bSelect );
+
+ /** Returns the count of rows in the table. */
+ sal_Int32 implGetRowCount() const;
+ /** Returns the total column count in the table. */
+ sal_Int32 implGetColumnCount() const;
+ /** Returns the count of selected rows in the table. */
+ sal_Int32 implGetSelRowCount() const;
+ /** Returns the total cell count in the table (including header). */
+ inline sal_Int32 implGetCellCount() const { return implGetRowCount() * implGetColumnCount(); }
+
+ /** Returns the row index from cell index. */
+ inline sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); }
+ /** Returns the column index from cell index. */
+ inline sal_Int32 implGetColumn( sal_Int32 _nIndex ) const { return _nIndex % implGetColumnCount(); }
+ /** Returns the absolute row index of the nSelRow-th selected row. */
+ sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const;
+ /** Returns the child index from cell position. */
+ inline sal_Int32 implGetIndex( sal_Int32 _nRow, sal_Int32 _nColumn ) const { return _nRow * implGetColumnCount() + _nColumn; }
+
+public:
+ /** ctor()
+ @param rxParent XAccessible interface of the parent object.
+ @param rBox The HeaderTabListBox control. */
+ AccessibleTabListBoxTable(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
+ SvHeaderTabListBox& rBox );
+
+protected:
+ /** dtor() */
+ virtual ~AccessibleTabListBoxTable();
+
+public:
+ // XInterface
+ DECLARE_XINTERFACE( )
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER( )
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName (void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleSelection
+ void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ 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);
+};
+
+// ============================================================================
+
+} // namespace accessibility
+
+// ============================================================================
+
+#endif // ACCESSIBILITY_EXT_ACCESSIBLETABLISTBOX_HXX
+
diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
new file mode 100644
index 000000000000..f05926f3abda
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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 ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
+#define ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
+
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <tools/link.hxx>
+
+class SvTreeListBox;
+class VclSimpleEvent;
+class VclWindowEvent;
+
+//........................................................................
+namespace accessibility
+{
+//........................................................................
+
+ //====================================================================
+ //= ListBoxAccessibleBase
+ //====================================================================
+ /** helper class which couples it's life time to the life time of an
+ SvTreeListBox
+ */
+ class ListBoxAccessibleBase
+ {
+ private:
+ SvTreeListBox* m_pWindow;
+
+ protected:
+ inline SvTreeListBox* getListBox() const
+ {
+ return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow;
+ }
+
+ inline bool isAlive() const { return NULL != m_pWindow; }
+
+ public:
+ ListBoxAccessibleBase( SvTreeListBox& _rWindow );
+
+ protected:
+ virtual ~ListBoxAccessibleBase( );
+
+ // own overridables
+ /// will be called for any VclWindowEvent events broadcasted by our VCL window
+ virtual void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent );
+
+ /** will be called when our window broadcasts the VCLEVENT_OBJECT_DYING event
+
+ <p>Usually, you derive your class from both ListBoxAccessibleBase and XComponent,
+ and call XComponent::dispose here.</p>
+ */
+ virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException ) = 0;
+
+ /// to be called in the dispose method of your derived class
+ void disposing();
+
+ private:
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ private:
+ ListBoxAccessibleBase( ); // never implemented
+ ListBoxAccessibleBase( const ListBoxAccessibleBase& ); // never implemented
+ ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& ); // never implemented
+ };
+
+//........................................................................
+} // namespace accessibility
+//........................................................................
+
+#endif // ACCESSIBILITY_EXT_LISTBOX_ACCESSIBLE
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
new file mode 100644
index 000000000000..d4b3be6c5bf3
--- /dev/null
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -0,0 +1,711 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#if !defined INCLUDED_ACCESSIBILITY_TEXTWINDOWACCESSIBILITY_HXX
+#define INCLUDED_ACCESSIBILITY_TEXTWINDOWACCESSIBILITY_HXX
+
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <svl/lstner.hxx>
+#include <svtools/textdata.hxx>
+#include <svtools/texteng.hxx>
+#include <svtools/textview.hxx>
+#include <svtools/txtattr.hxx>
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/util/Color.hpp>
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <toolkit/awt/vclxwindow.hxx>
+#include <cppuhelper/compbase7.hxx>
+#include <comphelper/accessiblecontexthelper.hxx>
+#include <comphelper/accessibletexthelper.hxx>
+#include <rtl/ref.hxx>
+
+#include <memory>
+#include <queue>
+#include <hash_map>
+
+class TextEngine;
+class TextView;
+
+namespace css = ::com::sun::star;
+
+namespace accessibility
+{
+
+class Paragraph;
+class Document;
+
+class SfxListenerGuard
+{
+public:
+ inline SfxListenerGuard(::SfxListener & rListener):
+ m_rListener(rListener), m_pNotifier(0) {}
+
+ inline ~SfxListenerGuard() { endListening(); }
+
+ // Not thread safe:
+ void startListening(::SfxBroadcaster & rNotifier);
+
+ // Not thread safe:
+ void endListening();
+
+private:
+ ::SfxListener & m_rListener;
+ ::SfxBroadcaster * m_pNotifier;
+};
+
+class WindowListenerGuard
+{
+public:
+ inline WindowListenerGuard(::Link const & rListener):
+ m_aListener(rListener), m_pNotifier(0) {}
+
+ inline ~WindowListenerGuard() { endListening(); }
+
+ // Not thread safe:
+ void startListening(::Window & rNotifier);
+
+ // Not thread safe:
+ void endListening();
+
+private:
+ ::Link m_aListener;
+ ::Window * m_pNotifier;
+};
+
+class ParagraphInfo
+{
+public:
+ inline ParagraphInfo(::sal_Int32 nHeight): m_nHeight(nHeight) {}
+
+ inline
+ ::css::uno::WeakReference< ::css::accessibility::XAccessible > const &
+ getParagraph() const { return m_xParagraph; }
+
+ inline ::sal_Int32 getHeight() const { return m_nHeight; }
+
+ inline void setParagraph(
+ ::css::uno::Reference< ::css::accessibility::XAccessible > const &
+ rParagraph) { m_xParagraph = rParagraph; }
+
+ inline void changeHeight(::sal_Int32 nHeight) { m_nHeight = nHeight; }
+
+private:
+ ::css::uno::WeakReference< ::css::accessibility::XAccessible >
+ m_xParagraph;
+ ::sal_Int32 m_nHeight;
+};
+
+typedef ::std::vector< ParagraphInfo > Paragraphs;
+
+typedef ::cppu::WeakAggComponentImplHelper7<
+ ::css::accessibility::XAccessible,
+ ::css::accessibility::XAccessibleContext,
+ ::css::accessibility::XAccessibleComponent,
+ ::css::accessibility::XAccessibleEditableText,
+ ::css::accessibility::XAccessibleMultiLineText,
+ ::css::accessibility::XAccessibleTextAttributes,
+ ::css::accessibility::XAccessibleEventBroadcaster > ParagraphBase;
+
+// The Paragraph's number is the absolute position within the text engine (from
+// 0 to N - 1), whereas the Paragraph's index is the position within the text
+// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently
+// visible range have an index of -1.
+class ParagraphImpl:
+ public ParagraphBase, private ::comphelper::OCommonAccessibleText
+{
+public:
+ ParagraphImpl(::rtl::Reference< Document > const & rDocument,
+ Paragraphs::size_type nNumber, ::osl::Mutex & rMutex);
+
+ // Not thread-safe.
+ inline Paragraphs::size_type getNumber() const { return m_nNumber; }
+
+ // Not thread-safe.
+ void numberChanged(bool bIncremented);
+
+ // Not thread-safe.
+ void textChanged();
+
+ // Thread-safe.
+ void notifyEvent(::sal_Int16 nEventId, ::css::uno::Any const & rOldValue,
+ ::css::uno::Any const & rNewValue);
+
+protected:
+ // OCommonAccessibleText
+ virtual void implGetParagraphBoundary( ::css::i18n::Boundary& rBoundary,
+ ::sal_Int32 nIndex );
+ virtual void implGetLineBoundary( ::css::i18n::Boundary& rBoundary,
+ ::sal_Int32 nIndex );
+
+private:
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessibleContext >
+ SAL_CALL getAccessibleContext() throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild(::sal_Int32 i)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent() throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw (::css::uno::RuntimeException);
+
+ virtual
+ ::css::uno::Reference< ::css::accessibility::XAccessibleRelationSet >
+ SAL_CALL getAccessibleRelationSet() throw (::css::uno::RuntimeException);
+
+ virtual
+ ::css::uno::Reference< ::css::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet() throw (::css::uno::RuntimeException);
+
+ virtual ::css::lang::Locale SAL_CALL getLocale()
+ throw (::css::accessibility::IllegalAccessibleComponentStateException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL containsPoint(::css::awt::Point const & rPoint)
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint(::css::awt::Point const & rPoint)
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::awt::Rectangle SAL_CALL getBounds()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::awt::Point SAL_CALL getLocation()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::awt::Point SAL_CALL getLocationOnScreen()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::awt::Size SAL_CALL getSize()
+ throw (::css::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus() throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Any SAL_CALL getAccessibleKeyBinding()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::util::Color SAL_CALL getForeground()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::util::Color SAL_CALL getBackground()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getCaretPosition()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL setCaretPosition(::sal_Int32 nIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Unicode SAL_CALL getCharacter(::sal_Int32 nIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL
+ getCharacterAttributes(::sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::css::awt::Rectangle SAL_CALL
+ getCharacterBounds(::sal_Int32 nIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getCharacterCount()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL
+ getIndexAtPoint(::css::awt::Point const & rPoint)
+ throw (::css::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL getSelectedText()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getSelectionStart()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getSelectionEnd()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL setSelection(::sal_Int32 nStartIndex,
+ ::sal_Int32 nEndIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL getText()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::rtl::OUString SAL_CALL getTextRange(::sal_Int32 nStartIndex,
+ ::sal_Int32 nEndIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL copyText(::sal_Int32 nStartIndex,
+ ::sal_Int32 nEndIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL cutText(::sal_Int32 nStartIndex,
+ ::sal_Int32 nEndIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL pasteText(::sal_Int32 nIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL deleteText(::sal_Int32 nStartIndex,
+ ::sal_Int32 nEndIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL insertText(::rtl::OUString const & rText,
+ ::sal_Int32 nIndex)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL replaceText(
+ ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
+ ::rtl::OUString const & rReplacement)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL setAttributes(
+ ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
+ ::css::uno::Sequence< ::css::beans::PropertyValue > const &
+ rAttributeSet)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Bool SAL_CALL setText(::rtl::OUString const & rText)
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL
+ getDefaultAttributes(const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes)
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL
+ getRunAttributes(::sal_Int32 Index, const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ using cppu::WeakAggComponentImplHelperBase::addEventListener;
+ virtual void SAL_CALL addEventListener(
+ ::css::uno::Reference<
+ ::css::accessibility::XAccessibleEventListener > const & rListener)
+ throw (::css::uno::RuntimeException);
+
+ using cppu::WeakAggComponentImplHelperBase::removeEventListener;
+ virtual void SAL_CALL removeEventListener(
+ ::css::uno::Reference<
+ ::css::accessibility::XAccessibleEventListener > const & rListener)
+ throw (::css::uno::RuntimeException);
+
+ virtual void SAL_CALL disposing();
+
+ virtual ::rtl::OUString implGetText();
+
+ virtual ::css::lang::Locale implGetLocale();
+
+ virtual void implGetSelection(::sal_Int32 & rStartIndex,
+ ::sal_Int32 & rEndIndex);
+
+ // Throws ::css::lang::DisposedException:
+ void checkDisposed();
+
+ ::rtl::Reference< Document > m_xDocument;
+ Paragraphs::size_type m_nNumber;
+
+// ::cppu::OInterfaceContainerHelper m_aListeners;
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 m_nClientId;
+
+ ::rtl::OUString m_aParagraphText;
+};
+
+
+typedef ::std::hash_map< ::rtl::OUString,
+ ::css::beans::PropertyValue,
+ ::rtl::OUStringHash,
+ ::std::equal_to< ::rtl::OUString > > tPropValMap;
+
+class Document: public ::VCLXAccessibleComponent, public ::SfxListener
+{
+public:
+ Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine,
+ ::TextView & rView, bool bCompoundControlChild);
+
+ inline ::css::uno::Reference< ::css::accessibility::XAccessible >
+ getAccessible() { return m_xAccessible; }
+
+ // Must be called only after init has been called.
+ ::css::lang::Locale retrieveLocale();
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const *" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::sal_Int32 retrieveParagraphIndex(ParagraphImpl const * pParagraph);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const *" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::sal_Int64 retrieveParagraphState(ParagraphImpl const * pParagraph);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::css::awt::Rectangle
+ retrieveParagraphBounds(ParagraphImpl const * pParagraph, bool bAbsolute);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::rtl::OUString retrieveParagraphText(ParagraphImpl const * pParagraph);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ void retrieveParagraphSelection(ParagraphImpl const * pParagraph,
+ ::sal_Int32 * pBegin, ::sal_Int32 * pEnd);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const *" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::sal_Int32 retrieveParagraphCaretPosition(ParagraphImpl const * pParagraph);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ ::css::awt::Rectangle
+ retrieveCharacterBounds(ParagraphImpl const * pParagraph,
+ ::sal_Int32 nIndex);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::sal_Int32 retrieveCharacterIndex(ParagraphImpl const * pParagraph,
+ ::css::awt::Point const & rPoint);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ ::css::uno::Sequence< ::css::beans::PropertyValue > retrieveCharacterAttributes(
+ ParagraphImpl const * pParagraph, ::sal_Int32 nIndex,
+ const ::css::uno::Sequence< ::rtl::OUString >& aRequestedAttributes);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ ::css::uno::Sequence< ::css::beans::PropertyValue > retrieveDefaultAttributes(
+ ParagraphImpl const * pParagraph,
+ const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ ::css::uno::Sequence< ::css::beans::PropertyValue > retrieveRunAttributes(
+ ParagraphImpl const * pParagraph, ::sal_Int32 Index,
+ const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ void changeParagraphText(ParagraphImpl * pParagraph,
+ ::rtl::OUString const & rText);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ void changeParagraphText(ParagraphImpl * pParagraph, ::sal_Int32 nBegin,
+ ::sal_Int32 nEnd, bool bCut, bool bPaste,
+ ::rtl::OUString const & rText);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ void copyParagraphText(ParagraphImpl const * pParagraph,
+ ::sal_Int32 nBegin, ::sal_Int32 nEnd);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ void changeParagraphAttributes(
+ ParagraphImpl * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
+ ::css::uno::Sequence< ::css::beans::PropertyValue > const &
+ rAttributeSet);
+
+ // Must be called only after init has been called.
+ // To make it possible for this method to be (indirectly) called from
+ // within Paragraph's constructor (i.e., when the Paragraph's ref count is
+ // still zero), pass a "ParagraphImpl const &" instead of a
+ // "::rtl::Reference< ParagraphImpl > const &".
+ // Throws ::css::lang::IndexOutOfBoundsException.
+ void changeParagraphSelection(ParagraphImpl * pParagraph,
+ ::sal_Int32 nBegin, ::sal_Int32 nEnd);
+
+ ::css::i18n::Boundary
+ retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph,
+ ::sal_Int32 nIndex, ::sal_Int32 *pLineNo = NULL);
+
+ ::css::i18n::Boundary
+ retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph,
+ ::sal_Int32 nIndex );
+
+ sal_Int32 retrieveParagraphLineWithCursor( ParagraphImpl const * pParagraph );
+
+ ::css::uno::Reference< ::css::accessibility::XAccessibleRelationSet >
+ retrieveParagraphRelationSet( ParagraphImpl const * pParagraph );
+
+protected:
+ // window event listener from base class
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
+
+private:
+ virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessible >
+ SAL_CALL getAccessibleChild(::sal_Int32 i)
+ throw (::css::lang::IndexOutOfBoundsException,
+ ::css::uno::RuntimeException);
+
+ virtual ::sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::css::uno::RuntimeException);
+
+ virtual ::css::uno::Reference< ::css::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(::css::awt::Point const & rPoint)
+ throw (::css::uno::RuntimeException);
+
+ // ??? Will be called with both the external (Solar) and internal mutex
+ // locked:
+ virtual void SAL_CALL disposing();
+
+ // ??? Will be called with the external (Solar) mutex locked.
+ // init will already have been called.
+ virtual void Notify(::SfxBroadcaster & rBC, ::SfxHint const & rHint);
+
+ // Assuming that this will only be called with the external (Solar) mutex
+ // locked.
+ // init will already have been called.
+ DECL_LINK(WindowEventHandler, VclSimpleEvent *);
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked.
+ void init();
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked, and after init has been called:
+ ::rtl::Reference< ParagraphImpl >
+ getParagraph(Paragraphs::iterator const & rIt);
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked, and after init has been called.
+ // Throws ::css::uno::RuntimeException.
+ ::css::uno::Reference< ::css::accessibility::XAccessible >
+ getAccessibleChild(Paragraphs::iterator const & rIt);
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked, and after init has been called:
+ void determineVisibleRange();
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked, and after init has been called:
+ void notifyVisibleRangeChanges(
+ Paragraphs::iterator const & rOldVisibleBegin,
+ Paragraphs::iterator const & rOldVisibleEnd,
+ Paragraphs::iterator const & rInserted);
+
+ // Must be called with both the external (Solar) and internal mutex
+ // locked, and after init has been called:
+ void changeParagraphText(::ULONG nNumber, ::USHORT nBegin, ::USHORT nEnd,
+ bool bCut, bool bPaste,
+ ::rtl::OUString const & rText);
+
+ void
+ handleParagraphNotifications();
+
+ void handleSelectionChangeNotification();
+
+ void notifySelectionChange( sal_Int32 nFirst, sal_Int32 nLast );
+
+ void justifySelection( TextPaM& rTextStart, TextPaM& rTextEnd );
+
+ void disposeParagraphs();
+
+ static ::css::uno::Any mapFontColor(::Color const & rColor);
+
+ static ::Color mapFontColor(::css::uno::Any const & rColor);
+
+ static ::css::uno::Any mapFontWeight(::FontWeight nWeight);
+
+ static ::FontWeight mapFontWeight(::css::uno::Any const & rWeight);
+
+ void retrieveDefaultAttributesImpl(
+ ParagraphImpl const * pParagraph,
+ const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes,
+ tPropValMap& rDefAttrSeq);
+
+ void retrieveRunAttributesImpl(
+ ParagraphImpl const * pParagraph, ::sal_Int32 Index,
+ const ::css::uno::Sequence< ::rtl::OUString >& RequestedAttributes,
+ tPropValMap& rRunAttrSeq);
+
+ static ::css::uno::Sequence< ::css::beans::PropertyValue >
+ convertHashMapToSequence(tPropValMap& rAttrSeq);
+
+ ::css::uno::Reference< ::css::accessibility::XAccessible > m_xAccessible;
+ ::TextEngine & m_rEngine;
+ ::TextView & m_rView;
+
+ SfxListenerGuard m_aEngineListener;
+ WindowListenerGuard m_aViewListener;
+
+ // All the following members have valid values only after calling init:
+
+ ::std::auto_ptr< Paragraphs > m_xParagraphs;
+
+ // m_nViewOffset is from the start of the document (0) to the start of the
+ // current view, and m_nViewHeight is the height of the view:
+ ::sal_Int32 m_nViewOffset;
+ ::sal_Int32 m_nViewHeight;
+
+ // m_aVisibleBegin points to the first Paragraph that is (partially)
+ // contained in the view, and m_aVisibleEnd points past the last Paragraph
+ // that is (partially) contained. If no Paragraphs are (partially) in the
+ // view, both m_aVisibleBegin and m_aVisibleEnd are set to
+ // m_xParagraphs->end(). These values are only changed by
+ // determineVisibleRange.
+ Paragraphs::iterator m_aVisibleBegin;
+ Paragraphs::iterator m_aVisibleEnd;
+
+ // m_nVisibleBeginOffset is from m_nViewOffset back to the start of the
+ // Paragraph pointed to by m_aVisibleBegin (and always has a non-negative
+ // value). If m_aVisibleBegin == m_xParagraphs->end(),
+ // m_nVisibleBeginOffset is set to 0. These values are only changed by
+ // determineVisibleRange.
+ ::sal_Int32 m_nVisibleBeginOffset;
+
+ // If no selection has yet been set, all the following four variables are
+ // set to -1. m_nSelectionLastPara/Pos is also the cursor position.
+ ::sal_Int32 m_nSelectionFirstPara;
+ ::sal_Int32 m_nSelectionFirstPos;
+ ::sal_Int32 m_nSelectionLastPara;
+ ::sal_Int32 m_nSelectionLastPos;
+
+ Paragraphs::iterator m_aFocused;
+
+ ::std::queue< ::TextHint > m_aParagraphNotifications;
+ bool m_bSelectionChangedNotification;
+ bool m_bCompoundControlChild;
+};
+
+}
+
+#endif // INCLUDED_ACCESSIBILITY_TEXTWINDOWACCESSIBILITY_HXX