update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessiblePreviewCell.hxx
blobfb845fca61d3152321cc0f41e5a536666fad0810
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: AccessiblePreviewCell.hxx,v $
10 * $Revision: 1.11.32.1 $
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_ACCESSIBLEPREVIEWCELL_HXX
33 #define _SC_ACCESSIBLEPREVIEWCELL_HXX
35 #include "AccessibleCellBase.hxx"
37 class ScPreviewShell;
39 namespace accessibility
41 class AccessibleTextHelper;
44 class ScAccessiblePreviewCell : public ScAccessibleCellBase
46 public:
47 //===== internal ========================================================
48 ScAccessiblePreviewCell(
49 const ::com::sun::star::uno::Reference<
50 ::com::sun::star::accessibility::XAccessible>& rxParent,
51 ScPreviewShell* pViewShell, /* const */ ScAddress& rCellAddress, sal_Int32 nIndex );
53 protected:
54 virtual ~ScAccessiblePreviewCell();
56 using ScAccessibleCellBase::IsDefunc;
58 public:
59 using ScAccessibleCellBase::disposing;
60 virtual void SAL_CALL disposing();
62 ///===== SfxListener =====================================================
64 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
66 //===== XAccessibleComponent ============================================
68 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
69 getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
70 throw (::com::sun::star::uno::RuntimeException);
71 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
73 //===== XAccessibleContext ==============================================
75 // overloaded to calculate this on demand
76 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
78 getAccessibleChild( sal_Int32 i )
79 throw (::com::sun::star::lang::IndexOutOfBoundsException,
80 ::com::sun::star::uno::RuntimeException);
82 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
83 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
85 //===== XServiceInfo ====================================================
87 virtual ::rtl::OUString SAL_CALL getImplementationName()
88 throw(::com::sun::star::uno::RuntimeException);
89 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
90 throw(::com::sun::star::uno::RuntimeException);
92 ///===== XTypeProvider ===================================================
94 /** Returns a implementation id.
96 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
97 getImplementationId(void)
98 throw (::com::sun::star::uno::RuntimeException);
100 protected:
101 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
102 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
104 private:
105 ScPreviewShell* mpViewShell;
107 accessibility::AccessibleTextHelper* mpTextHelper;
109 sal_Bool IsDefunc(
110 const com::sun::star::uno::Reference<
111 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
112 virtual sal_Bool IsEditable(
113 const com::sun::star::uno::Reference<
114 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
115 sal_Bool IsOpaque(
116 const com::sun::star::uno::Reference<
117 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
119 void CreateTextHelper();
123 #endif