1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 29 #ifndef _SC_ACCESSIBLEPREVIEWCELL_HXX 30 #define _SC_ACCESSIBLEPREVIEWCELL_HXX 31 32 #include "AccessibleCellBase.hxx" 33 34 class ScPreviewShell; 35 36 namespace accessibility 37 { 38 class AccessibleTextHelper; 39 } 40 41 class ScAccessiblePreviewCell : public ScAccessibleCellBase 42 { 43 public: 44 //===== internal ======================================================== 45 ScAccessiblePreviewCell( 46 const ::com::sun::star::uno::Reference< 47 ::com::sun::star::accessibility::XAccessible>& rxParent, 48 ScPreviewShell* pViewShell, /* const */ ScAddress& rCellAddress, sal_Int32 nIndex ); 49 50 protected: 51 virtual ~ScAccessiblePreviewCell(); 52 53 using ScAccessibleCellBase::IsDefunc; 54 55 public: 56 using ScAccessibleCellBase::disposing; 57 virtual void SAL_CALL disposing(); 58 59 ///===== SfxListener ===================================================== 60 61 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 62 63 //===== XAccessibleComponent ============================================ 64 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); 69 70 //===== XAccessibleContext ============================================== 71 72 // overloaded to calculate this on demand 73 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException); 74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL 75 getAccessibleChild( sal_Int32 i ) 76 throw (::com::sun::star::lang::IndexOutOfBoundsException, 77 ::com::sun::star::uno::RuntimeException); 78 79 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL 80 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException); 81 82 //===== XServiceInfo ==================================================== 83 84 virtual ::rtl::OUString SAL_CALL getImplementationName() 85 throw(::com::sun::star::uno::RuntimeException); 86 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 87 throw(::com::sun::star::uno::RuntimeException); 88 89 ///===== XTypeProvider =================================================== 90 91 /** Returns a implementation id. 92 */ 93 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL 94 getImplementationId(void) 95 throw (::com::sun::star::uno::RuntimeException); 96 97 protected: 98 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException); 99 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException); 100 101 private: 102 ScPreviewShell* mpViewShell; 103 104 accessibility::AccessibleTextHelper* mpTextHelper; 105 106 sal_Bool IsDefunc( 107 const com::sun::star::uno::Reference< 108 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 109 virtual sal_Bool IsEditable( 110 const com::sun::star::uno::Reference< 111 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 112 sal_Bool IsOpaque( 113 const com::sun::star::uno::Reference< 114 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 115 116 void CreateTextHelper(); 117 118 }; 119 120 #endif 121 122