update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessiblePageHeader.hxx
blobc5c6078d0f9a7fc6258982f955c04d19c3a48518
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: AccessiblePageHeader.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_ACCESSIBLEPAGEHEADER_HXX
33 #define _SC_ACCESSIBLEPAGEHEADER_HXX
35 #include "AccessibleContextBase.hxx"
36 #include <svx/svxenum.hxx>
38 class ScPreviewShell;
39 class EditTextObject;
40 class ScAccessiblePageHeaderArea;
41 class ScPreviewShell;
43 class ScAccessiblePageHeader : public ScAccessibleContextBase
45 public:
46 ScAccessiblePageHeader( const ::com::sun::star::uno::Reference<
47 ::com::sun::star::accessibility::XAccessible>& rxParent,
48 ScPreviewShell* pViewShell, sal_Bool bHeader, sal_Int32 nIndex );
50 protected:
51 virtual ~ScAccessiblePageHeader();
53 using ScAccessibleContextBase::IsDefunc;
55 public:
56 using ScAccessibleContextBase::disposing;
57 virtual void SAL_CALL disposing();
59 //===== SfxListener =====================================================
61 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
63 //===== XAccessibleComponent ============================================
65 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
66 getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
67 throw (::com::sun::star::uno::RuntimeException);
68 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
70 //===== XAccessibleContext ==============================================
72 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
73 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
74 getAccessibleChild( sal_Int32 i )
75 throw (::com::sun::star::lang::IndexOutOfBoundsException,
76 ::com::sun::star::uno::RuntimeException);
77 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
78 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
79 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
81 //===== XServiceInfo ====================================================
83 virtual ::rtl::OUString SAL_CALL getImplementationName()
84 throw(::com::sun::star::uno::RuntimeException);
85 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
86 throw(::com::sun::star::uno::RuntimeException);
88 //===== internal ========================================================
89 void SetCurrentIndexInParent(sal_Int32 nNew) { mnIndex = nNew; }
91 protected:
92 virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
93 virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
95 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
96 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
98 private:
99 ScPreviewShell* mpViewShell;
100 sal_Int32 mnIndex;
101 sal_Bool mbHeader;
102 typedef std::vector< ScAccessiblePageHeaderArea* > ScHFAreas;
103 ScHFAreas maAreas;
104 sal_Int32 mnChildCount;
106 sal_Bool IsDefunc(
107 const com::sun::star::uno::Reference<
108 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
110 void AddChild(const EditTextObject* pArea, sal_uInt32 nIndex, SvxAdjust eAdjust);
114 #endif