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 INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPREVIEWTABLE_HXX
23 #include "AccessibleContextBase.hxx"
24 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
25 #include <cppuhelper/implbase1.hxx>
28 class ScPreviewTableInfo
;
30 typedef cppu::ImplHelper1
< ::com::sun::star::accessibility::XAccessibleTable
>
31 ScAccessiblePreviewTableImpl
;
33 class ScAccessiblePreviewTable
:
34 public ScAccessibleContextBase
,
35 public ScAccessiblePreviewTableImpl
38 ScAccessiblePreviewTable( const ::com::sun::star::uno::Reference
<
39 ::com::sun::star::accessibility::XAccessible
>& rxParent
,
40 ScPreviewShell
* pViewShell
, sal_Int32 nIndex
);
43 virtual ~ScAccessiblePreviewTable();
45 using ScAccessibleContextBase::IsDefunc
;
48 using ScAccessibleContextBase::disposing
;
49 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
51 //===== SfxListener =====================================================
53 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) SAL_OVERRIDE
;
55 ///===== XInterface =====================================================
57 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
58 ::com::sun::star::uno::Type
const & rType
)
59 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
63 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
65 //===== XAccessibleTable ================================================
67 virtual sal_Int32 SAL_CALL
getAccessibleRowCount()
68 throw (::com::sun::star::uno::RuntimeException
,
69 std::exception
) SAL_OVERRIDE
;
70 virtual sal_Int32 SAL_CALL
getAccessibleColumnCount()
71 throw (::com::sun::star::uno::RuntimeException
,
72 std::exception
) SAL_OVERRIDE
;
73 virtual OUString SAL_CALL
getAccessibleRowDescription( sal_Int32 nRow
)
74 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
75 ::com::sun::star::uno::RuntimeException
,
76 std::exception
) SAL_OVERRIDE
;
77 virtual OUString SAL_CALL
getAccessibleColumnDescription( sal_Int32 nColumn
)
78 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
79 ::com::sun::star::uno::RuntimeException
,
80 std::exception
) SAL_OVERRIDE
;
81 virtual sal_Int32 SAL_CALL
getAccessibleRowExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
)
82 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
83 ::com::sun::star::uno::RuntimeException
,
84 std::exception
) SAL_OVERRIDE
;
85 virtual sal_Int32 SAL_CALL
getAccessibleColumnExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
)
86 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
87 ::com::sun::star::uno::RuntimeException
,
88 std::exception
) SAL_OVERRIDE
;
89 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
90 getAccessibleRowHeaders() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
92 getAccessibleColumnHeaders() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
93 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleRows()
94 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleColumns()
96 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
97 virtual sal_Bool SAL_CALL
isAccessibleRowSelected( sal_Int32 nRow
)
98 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
99 ::com::sun::star::uno::RuntimeException
,
100 std::exception
) SAL_OVERRIDE
;
101 virtual sal_Bool SAL_CALL
isAccessibleColumnSelected( sal_Int32 nColumn
)
102 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
103 ::com::sun::star::uno::RuntimeException
,
104 std::exception
) SAL_OVERRIDE
;
105 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
106 getAccessibleCellAt( sal_Int32 nRow
, sal_Int32 nColumn
)
107 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
108 ::com::sun::star::uno::RuntimeException
,
109 std::exception
) SAL_OVERRIDE
;
110 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
111 getAccessibleCaption() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
112 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
113 getAccessibleSummary() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
114 virtual sal_Bool SAL_CALL
isAccessibleSelected( sal_Int32 nRow
, sal_Int32 nColumn
)
115 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
116 ::com::sun::star::uno::RuntimeException
,
117 std::exception
) SAL_OVERRIDE
;
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 std::exception
) SAL_OVERRIDE
;
122 virtual sal_Int32 SAL_CALL
getAccessibleRow( sal_Int32 nChildIndex
)
123 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
124 ::com::sun::star::uno::RuntimeException
,
125 std::exception
) SAL_OVERRIDE
;
126 virtual sal_Int32 SAL_CALL
getAccessibleColumn( sal_Int32 nChildIndex
)
127 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
128 ::com::sun::star::uno::RuntimeException
,
129 std::exception
) SAL_OVERRIDE
;
131 //===== XAccessibleComponent ============================================
133 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
134 getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
)
135 throw (::com::sun::star::uno::RuntimeException
,
136 std::exception
) SAL_OVERRIDE
;
137 virtual void SAL_CALL
grabFocus() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
139 //===== XAccessibleContext ==============================================
141 virtual sal_Int32 SAL_CALL
getAccessibleChildCount()
142 throw (::com::sun::star::uno::RuntimeException
,
143 std::exception
) SAL_OVERRIDE
;
144 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
145 getAccessibleChild( sal_Int32 i
)
146 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
147 ::com::sun::star::uno::RuntimeException
,
148 std::exception
) SAL_OVERRIDE
;
149 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
150 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
151 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
153 //===== XServiceInfo ====================================================
155 virtual OUString SAL_CALL
getImplementationName()
156 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
157 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
158 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
160 //===== XTypeProvider ===================================================
162 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
164 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
166 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
167 throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
169 //===== internal ========================================================
170 void SetCurrentIndexInParent(sal_Int32 nNew
) { mnIndex
= nNew
; }
173 virtual OUString SAL_CALL
createAccessibleDescription() throw(::com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
174 virtual OUString SAL_CALL
createAccessibleName()
175 throw (::com::sun::star::uno::RuntimeException
,
176 std::exception
) SAL_OVERRIDE
;
178 virtual Rectangle
GetBoundingBoxOnScreen() const throw(::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
179 virtual Rectangle
GetBoundingBox() const throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
182 ScPreviewShell
* mpViewShell
;
184 mutable ScPreviewTableInfo
* mpTableInfo
;
187 const com::sun::star::uno::Reference
<
188 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
190 void FillTableInfo() const;
195 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */