update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessiblePageHeaderArea.hxx
blob394166b10361dfff91e412204ad05e952136203b
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: AccessiblePageHeaderArea.hxx,v $
10 * $Revision: 1.8 $
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_ACCESSIBLEPAGEHEADERAREA_HXX
33 #define _SC_ACCESSIBLEPAGEHEADERAREA_HXX
35 #ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX
36 #include "AccessibleContextBase.hxx"
37 #endif
38 #include <svx/svxenum.hxx>
40 class EditTextObject;
41 namespace accessibility
43 class AccessibleTextHelper;
45 class ScPreviewShell;
47 class ScAccessiblePageHeaderArea
48 : public ScAccessibleContextBase
50 public:
51 //===== internal ========================================================
52 ScAccessiblePageHeaderArea(
53 const ::com::sun::star::uno::Reference<
54 ::com::sun::star::accessibility::XAccessible>& rxParent,
55 ScPreviewShell* pViewShell,
56 const EditTextObject* pEditObj,
57 sal_Bool bHeader,
58 SvxAdjust eAdjust);
59 protected:
60 virtual ~ScAccessiblePageHeaderArea (void);
61 public:
62 const EditTextObject* GetEditTextObject() const { return mpEditObj; }
64 using ScAccessibleContextBase::disposing;
65 virtual void SAL_CALL disposing();
67 ///===== SfxListener =====================================================
69 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
71 ///===== XAccessibleComponent ============================================
73 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
74 SAL_CALL getAccessibleAtPoint(
75 const ::com::sun::star::awt::Point& rPoint )
76 throw (::com::sun::star::uno::RuntimeException);
78 ///===== XAccessibleContext ==============================================
80 /// Return the number of currently visible children.
81 // is overloaded to calculate this on demand
82 virtual sal_Int32 SAL_CALL
83 getAccessibleChildCount(void)
84 throw (::com::sun::star::uno::RuntimeException);
86 /// Return the specified child or NULL if index is invalid.
87 // is overloaded to calculate this on demand
88 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
89 getAccessibleChild(sal_Int32 nIndex)
90 throw (::com::sun::star::uno::RuntimeException,
91 ::com::sun::star::lang::IndexOutOfBoundsException);
93 /// Return the set of current states.
94 virtual ::com::sun::star::uno::Reference<
95 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
96 getAccessibleStateSet(void)
97 throw (::com::sun::star::uno::RuntimeException);
99 ///===== XServiceInfo ====================================================
101 /** Returns an identifier for the implementation of this object.
103 virtual ::rtl::OUString SAL_CALL
104 getImplementationName(void)
105 throw (::com::sun::star::uno::RuntimeException);
107 /** Returns a list of all supported services. In this case that is just
108 the AccessibleContext and Accessible service.
110 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
111 getSupportedServiceNames(void)
112 throw (::com::sun::star::uno::RuntimeException);
114 ///===== XTypeProvider ===================================================
116 /** Returns a implementation id.
118 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
119 getImplementationId(void)
120 throw (::com::sun::star::uno::RuntimeException);
122 protected:
123 virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
124 virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
126 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
127 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
129 private:
130 EditTextObject* mpEditObj;
131 accessibility::AccessibleTextHelper* mpTextHelper;
132 ScPreviewShell* mpViewShell;
133 sal_Bool mbHeader;
134 SvxAdjust meAdjust;
136 void CreateTextHelper();
140 #endif