1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_TABLE_SHAPE_HXX
21 #define _SVX_ACCESSIBILITY_ACCESSIBLE_TABLE_SHAPE_HXX
23 #include <com/sun/star/table/XTable.hpp>
24 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
25 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
26 #include <com/sun/star/util/XModifyListener.hpp>
28 #include <rtl/ref.hxx>
30 #include <cppuhelper/implbase2.hxx>
32 #include <svx/AccessibleShape.hxx>
34 #include <boost/noncopyable.hpp>
36 namespace sdr
{ namespace table
{
37 class SvxTableController
;
40 namespace accessibility
42 class AccessibleTableShapeImpl
;
44 typedef ::cppu::ImplInheritanceHelper2
< AccessibleShape
,
45 ::com::sun::star::accessibility::XAccessibleSelection
,
46 ::com::sun::star::accessibility::XAccessibleTable
47 > AccessibleTableShape_Base
;
50 class AccessibleTableShape
: boost::noncopyable
, public AccessibleTableShape_Base
53 AccessibleTableShape( const AccessibleShapeInfo
& rShapeInfo
, const AccessibleShapeTreeInfo
& rShapeTreeInfo
);
54 virtual ~AccessibleTableShape( );
56 virtual void Init (void);
59 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw (::com::sun::star::uno::RuntimeException
);
60 virtual void SAL_CALL
acquire( ) throw ();
61 virtual void SAL_CALL
release( ) throw ();
64 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException
);
67 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) throw(::com::sun::star::uno::RuntimeException
);
68 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
);
69 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException
);
70 virtual sal_Int16 SAL_CALL
getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException
);
73 virtual sal_Int32 SAL_CALL
getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException
);
74 virtual sal_Int32 SAL_CALL
getAccessibleColumnCount( ) throw (::com::sun::star::uno::RuntimeException
);
75 virtual OUString SAL_CALL
getAccessibleRowDescription( sal_Int32 nRow
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
76 virtual OUString SAL_CALL
getAccessibleColumnDescription( sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
77 virtual sal_Int32 SAL_CALL
getAccessibleRowExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
78 virtual sal_Int32 SAL_CALL
getAccessibleColumnExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
79 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
getAccessibleRowHeaders( ) throw (::com::sun::star::uno::RuntimeException
);
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
getAccessibleColumnHeaders( ) throw (::com::sun::star::uno::RuntimeException
);
81 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleRows( ) throw (::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleColumns( ) throw (::com::sun::star::uno::RuntimeException
);
83 virtual sal_Bool SAL_CALL
isAccessibleRowSelected( sal_Int32 nRow
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
84 virtual sal_Bool SAL_CALL
isAccessibleColumnSelected( sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
85 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
);
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleCaption( ) throw (::com::sun::star::uno::RuntimeException
);
87 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
getAccessibleSummary( ) throw (::com::sun::star::uno::RuntimeException
);
88 virtual sal_Bool SAL_CALL
isAccessibleSelected( sal_Int32 nRow
, sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
89 virtual sal_Int32 SAL_CALL
getAccessibleIndex( sal_Int32 nRow
, sal_Int32 nColumn
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
90 virtual sal_Int32 SAL_CALL
getAccessibleRow( sal_Int32 nChildIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
91 virtual sal_Int32 SAL_CALL
getAccessibleColumn( sal_Int32 nChildIndex
) throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
93 // XAccessibleSelection
94 virtual void SAL_CALL
selectAccessibleChild( sal_Int32 nChildIndex
) throw ( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
95 virtual sal_Bool SAL_CALL
isAccessibleChildSelected( sal_Int32 nChildIndex
) throw ( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
96 virtual void SAL_CALL
clearAccessibleSelection( ) throw ( ::com::sun::star::uno::RuntimeException
);
97 virtual void SAL_CALL
selectAllAccessibleChildren( ) throw ( ::com::sun::star::uno::RuntimeException
);
98 virtual sal_Int32 SAL_CALL
getSelectedAccessibleChildCount( ) throw ( ::com::sun::star::uno::RuntimeException
);
99 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
);
100 virtual void SAL_CALL
deselectAccessibleChild( sal_Int32 nChildIndex
) throw ( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
103 virtual OUString SAL_CALL
getImplementationName( ) throw(::com::sun::star::uno::RuntimeException
);
106 virtual void SAL_CALL
disposing( );
108 using AccessibleShape::disposing
;
111 virtual OUString
CreateAccessibleBaseName(void) throw (::com::sun::star::uno::RuntimeException
);
113 sdr::table::SvxTableController
* getTableController();
115 void checkCellPosition( sal_Int32 nCol
, sal_Int32 nRow
) throw ( ::com::sun::star::lang::IndexOutOfBoundsException
);
116 void getColumnAndRow( sal_Int32 nChildIndex
, sal_Int32
& rnColumn
, sal_Int32
& rnRow
) throw (::com::sun::star::lang::IndexOutOfBoundsException
);
119 rtl::Reference
< AccessibleTableShapeImpl
> mxImpl
;
122 } // end of namespace accessibility
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */