merge the formfield patch from ooo-build
[ooovba.git] / sc / source / ui / inc / AccessiblePreviewTable.hxx
blob35e07976324f18221abbdc8c91bed3435bda24ef
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessiblePreviewTable.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #ifndef _SC_ACCESSIBLEPREVIEWTABLE_HXX
33 #define _SC_ACCESSIBLEPREVIEWTABLE_HXX
35 #include "AccessibleContextBase.hxx"
36 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
37 #include <cppuhelper/implbase1.hxx>
39 class ScPreviewShell;
40 class ScPreviewTableInfo;
42 typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleTable>
43 ScAccessiblePreviewTableImpl;
45 class ScAccessiblePreviewTable :
46 public ScAccessibleContextBase,
47 public ScAccessiblePreviewTableImpl
49 public:
50 ScAccessiblePreviewTable( const ::com::sun::star::uno::Reference<
51 ::com::sun::star::accessibility::XAccessible>& rxParent,
52 ScPreviewShell* pViewShell, sal_Int32 nIndex );
54 protected:
55 virtual ~ScAccessiblePreviewTable();
57 using ScAccessibleContextBase::IsDefunc;
59 public:
60 using ScAccessibleContextBase::disposing;
61 virtual void SAL_CALL disposing();
63 //===== SfxListener =====================================================
65 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
67 ///===== XInterface =====================================================
69 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
70 ::com::sun::star::uno::Type const & rType )
71 throw (::com::sun::star::uno::RuntimeException);
73 virtual void SAL_CALL acquire() throw ();
75 virtual void SAL_CALL release() throw ();
77 //===== XAccessibleTable ================================================
79 virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException);
80 virtual sal_Int32 SAL_CALL getAccessibleColumnCount() throw (::com::sun::star::uno::RuntimeException);
81 virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
82 throw (::com::sun::star::lang::IndexOutOfBoundsException,
83 ::com::sun::star::uno::RuntimeException);
84 virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
85 throw (::com::sun::star::lang::IndexOutOfBoundsException,
86 ::com::sun::star::uno::RuntimeException);
87 virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
88 throw (::com::sun::star::lang::IndexOutOfBoundsException,
89 ::com::sun::star::uno::RuntimeException);
90 virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
91 throw (::com::sun::star::lang::IndexOutOfBoundsException,
92 ::com::sun::star::uno::RuntimeException);
93 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
94 getAccessibleRowHeaders() throw (::com::sun::star::uno::RuntimeException);
95 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
96 getAccessibleColumnHeaders() throw (::com::sun::star::uno::RuntimeException);
97 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows()
98 throw (::com::sun::star::uno::RuntimeException);
99 virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns()
100 throw (::com::sun::star::uno::RuntimeException);
101 virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
102 throw (::com::sun::star::lang::IndexOutOfBoundsException,
103 ::com::sun::star::uno::RuntimeException);
104 virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
105 throw (::com::sun::star::lang::IndexOutOfBoundsException,
106 ::com::sun::star::uno::RuntimeException);
107 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
108 getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
109 throw (::com::sun::star::lang::IndexOutOfBoundsException,
110 ::com::sun::star::uno::RuntimeException);
111 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
112 getAccessibleCaption() throw (::com::sun::star::uno::RuntimeException);
113 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
114 getAccessibleSummary() throw (::com::sun::star::uno::RuntimeException);
115 virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
116 throw (::com::sun::star::lang::IndexOutOfBoundsException,
117 ::com::sun::star::uno::RuntimeException);
118 virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
119 throw (::com::sun::star::lang::IndexOutOfBoundsException,
120 ::com::sun::star::uno::RuntimeException);
121 virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
122 throw (::com::sun::star::lang::IndexOutOfBoundsException,
123 ::com::sun::star::uno::RuntimeException);
124 virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
125 throw (::com::sun::star::lang::IndexOutOfBoundsException,
126 ::com::sun::star::uno::RuntimeException);
128 //===== XAccessibleComponent ============================================
130 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
131 getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
132 throw (::com::sun::star::uno::RuntimeException);
133 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
135 //===== XAccessibleContext ==============================================
137 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
138 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
139 getAccessibleChild( sal_Int32 i )
140 throw (::com::sun::star::lang::IndexOutOfBoundsException,
141 ::com::sun::star::uno::RuntimeException);
142 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
143 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
144 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
146 //===== XServiceInfo ====================================================
148 virtual ::rtl::OUString SAL_CALL getImplementationName()
149 throw(::com::sun::star::uno::RuntimeException);
150 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
151 throw(::com::sun::star::uno::RuntimeException);
153 //===== XTypeProvider ===================================================
155 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
156 getTypes()
157 throw (::com::sun::star::uno::RuntimeException);
159 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
160 throw(::com::sun::star::uno::RuntimeException);
162 //===== internal ========================================================
163 void SetCurrentIndexInParent(sal_Int32 nNew) { mnIndex = nNew; }
165 protected:
166 virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
167 virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
169 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
170 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
172 private:
173 ScPreviewShell* mpViewShell;
174 sal_Int32 mnIndex;
175 mutable ScPreviewTableInfo* mpTableInfo;
177 sal_Bool IsDefunc(
178 const com::sun::star::uno::Reference<
179 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
181 void FillTableInfo() const;
185 #endif