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 .
21 #ifndef _SC_ACCESSIBLEPREVIEWTABLE_HXX
22 #define _SC_ACCESSIBLEPREVIEWTABLE_HXX
24 #include "AccessibleContextBase.hxx"
25 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
26 #include <cppuhelper/implbase1.hxx>
29 class ScPreviewTableInfo
;
31 typedef cppu::ImplHelper1
< ::com::sun::star::accessibility::XAccessibleTable
>
32 ScAccessiblePreviewTableImpl
;
34 class ScAccessiblePreviewTable
:
35 public ScAccessibleContextBase
,
36 public ScAccessiblePreviewTableImpl
39 ScAccessiblePreviewTable( const ::com::sun::star::uno::Reference
<
40 ::com::sun::star::accessibility::XAccessible
>& rxParent
,
41 ScPreviewShell
* pViewShell
, sal_Int32 nIndex
);
44 virtual ~ScAccessiblePreviewTable();
46 using ScAccessibleContextBase::IsDefunc
;
49 using ScAccessibleContextBase::disposing
;
50 virtual void SAL_CALL
disposing();
52 //===== SfxListener =====================================================
54 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
56 ///===== XInterface =====================================================
58 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
59 ::com::sun::star::uno::Type
const & rType
)
60 throw (::com::sun::star::uno::RuntimeException
);
62 virtual void SAL_CALL
acquire() throw ();
64 virtual void SAL_CALL
release() throw ();
66 //===== XAccessibleTable ================================================
68 virtual sal_Int32 SAL_CALL
getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException
);
69 virtual sal_Int32 SAL_CALL
getAccessibleColumnCount() throw (::com::sun::star::uno::RuntimeException
);
70 virtual OUString SAL_CALL
getAccessibleRowDescription( sal_Int32 nRow
)
71 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
72 ::com::sun::star::uno::RuntimeException
);
73 virtual OUString SAL_CALL
getAccessibleColumnDescription( sal_Int32 nColumn
)
74 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
75 ::com::sun::star::uno::RuntimeException
);
76 virtual sal_Int32 SAL_CALL
getAccessibleRowExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
)
77 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
78 ::com::sun::star::uno::RuntimeException
);
79 virtual sal_Int32 SAL_CALL
getAccessibleColumnExtentAt( sal_Int32 nRow
, sal_Int32 nColumn
)
80 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
81 ::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
83 getAccessibleRowHeaders() throw (::com::sun::star::uno::RuntimeException
);
84 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleTable
> SAL_CALL
85 getAccessibleColumnHeaders() throw (::com::sun::star::uno::RuntimeException
);
86 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleRows()
87 throw (::com::sun::star::uno::RuntimeException
);
88 virtual ::com::sun::star::uno::Sequence
< sal_Int32
> SAL_CALL
getSelectedAccessibleColumns()
89 throw (::com::sun::star::uno::RuntimeException
);
90 virtual sal_Bool SAL_CALL
isAccessibleRowSelected( sal_Int32 nRow
)
91 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
92 ::com::sun::star::uno::RuntimeException
);
93 virtual sal_Bool SAL_CALL
isAccessibleColumnSelected( sal_Int32 nColumn
)
94 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
95 ::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
97 getAccessibleCellAt( sal_Int32 nRow
, sal_Int32 nColumn
)
98 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
99 ::com::sun::star::uno::RuntimeException
);
100 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
101 getAccessibleCaption() throw (::com::sun::star::uno::RuntimeException
);
102 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
103 getAccessibleSummary() throw (::com::sun::star::uno::RuntimeException
);
104 virtual sal_Bool SAL_CALL
isAccessibleSelected( sal_Int32 nRow
, sal_Int32 nColumn
)
105 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
106 ::com::sun::star::uno::RuntimeException
);
107 virtual sal_Int32 SAL_CALL
getAccessibleIndex( sal_Int32 nRow
, sal_Int32 nColumn
)
108 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
109 ::com::sun::star::uno::RuntimeException
);
110 virtual sal_Int32 SAL_CALL
getAccessibleRow( sal_Int32 nChildIndex
)
111 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
112 ::com::sun::star::uno::RuntimeException
);
113 virtual sal_Int32 SAL_CALL
getAccessibleColumn( sal_Int32 nChildIndex
)
114 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
115 ::com::sun::star::uno::RuntimeException
);
117 //===== XAccessibleComponent ============================================
119 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
120 getAccessibleAtPoint( const ::com::sun::star::awt::Point
& aPoint
)
121 throw (::com::sun::star::uno::RuntimeException
);
122 virtual void SAL_CALL
grabFocus() throw (::com::sun::star::uno::RuntimeException
);
124 //===== XAccessibleContext ==============================================
126 virtual sal_Int32 SAL_CALL
getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException
);
127 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
128 getAccessibleChild( sal_Int32 i
)
129 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
130 ::com::sun::star::uno::RuntimeException
);
131 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException
);
132 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessibleStateSet
> SAL_CALL
133 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException
);
135 //===== XServiceInfo ====================================================
137 virtual OUString SAL_CALL
getImplementationName()
138 throw(::com::sun::star::uno::RuntimeException
);
139 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
140 throw(::com::sun::star::uno::RuntimeException
);
142 //===== XTypeProvider ===================================================
144 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
146 throw (::com::sun::star::uno::RuntimeException
);
148 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
149 throw(::com::sun::star::uno::RuntimeException
);
151 //===== internal ========================================================
152 void SetCurrentIndexInParent(sal_Int32 nNew
) { mnIndex
= nNew
; }
155 virtual OUString SAL_CALL
createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException
);
156 virtual OUString SAL_CALL
createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException
);
158 virtual Rectangle
GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException
);
159 virtual Rectangle
GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException
);
162 ScPreviewShell
* mpViewShell
;
164 mutable ScPreviewTableInfo
* mpTableInfo
;
167 const com::sun::star::uno::Reference
<
168 ::com::sun::star::accessibility::XAccessibleStateSet
>& rxParentStates
);
170 void FillTableInfo() const;
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */