update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessiblePreviewHeaderCell.hxx
blobef0b173bd066313c1b2ee73e87dbf2912db9d934
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: AccessiblePreviewHeaderCell.hxx,v $
10 * $Revision: 1.13 $
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_ACCESSIBLEPREVIEWHEADERCELL_HXX
33 #define _SC_ACCESSIBLEPREVIEWHEADERCELL_HXX
35 #include "AccessibleContextBase.hxx"
36 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
37 #include <tools/gen.hxx>
38 #include "global.hxx"
39 #include "address.hxx"
40 #include <cppuhelper/implbase1.hxx>
42 class ScPreviewShell;
43 class ScPreviewTableInfo;
44 namespace accessibility {
45 class AccessibleTextHelper;
48 typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
49 ScAccessiblePreviewHeaderCellImpl;
51 class ScAccessiblePreviewHeaderCell :
52 public ScAccessibleContextBase,
53 public ScAccessiblePreviewHeaderCellImpl
55 public:
56 ScAccessiblePreviewHeaderCell( const ::com::sun::star::uno::Reference<
57 ::com::sun::star::accessibility::XAccessible>& rxParent,
58 ScPreviewShell* pViewShell,
59 const ScAddress& rCellPos, sal_Bool bIsColHdr, sal_Bool bIsRowHdr,
60 sal_Int32 nIndex );
62 protected:
63 virtual ~ScAccessiblePreviewHeaderCell();
65 using ScAccessibleContextBase::IsDefunc;
67 public:
68 using ScAccessibleContextBase::disposing;
69 virtual void SAL_CALL disposing();
71 //===== SfxListener =====================================================
73 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
75 ///===== XInterface =====================================================
77 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
78 ::com::sun::star::uno::Type const & rType )
79 throw (::com::sun::star::uno::RuntimeException);
81 virtual void SAL_CALL acquire() throw ();
83 virtual void SAL_CALL release() throw ();
85 //===== XAccessibleValue ================================================
87 virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue() throw (::com::sun::star::uno::RuntimeException);
88 virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
89 throw (::com::sun::star::uno::RuntimeException);
90 virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue() throw (::com::sun::star::uno::RuntimeException);
91 virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue() throw (::com::sun::star::uno::RuntimeException);
93 //===== XAccessibleComponent ============================================
95 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
96 getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
97 throw (::com::sun::star::uno::RuntimeException);
98 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
100 //===== XAccessibleContext ==============================================
102 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
103 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
104 getAccessibleChild( sal_Int32 i )
105 throw (::com::sun::star::lang::IndexOutOfBoundsException,
106 ::com::sun::star::uno::RuntimeException);
107 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
108 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
109 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
111 //===== XServiceInfo ====================================================
113 virtual ::rtl::OUString SAL_CALL getImplementationName()
114 throw(::com::sun::star::uno::RuntimeException);
115 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
116 throw(::com::sun::star::uno::RuntimeException);
118 ///===== XTypeProvider ===================================================
120 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
121 getTypes()
122 throw (::com::sun::star::uno::RuntimeException);
124 /** Returns a implementation id.
126 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
127 getImplementationId(void)
128 throw (::com::sun::star::uno::RuntimeException);
130 protected:
131 virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
132 virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
134 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
135 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
137 private:
138 ScPreviewShell* mpViewShell;
139 accessibility::AccessibleTextHelper* mpTextHelper;
140 sal_Int32 mnIndex;
141 ScAddress maCellPos;
142 sal_Bool mbColumnHeader;
143 sal_Bool mbRowHeader;
144 mutable ScPreviewTableInfo* mpTableInfo;
146 sal_Bool IsDefunc(
147 const com::sun::star::uno::Reference<
148 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
150 void CreateTextHelper();
151 void FillTableInfo() const;
155 #endif