1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 25 #ifndef _SC_ACCESSIBLEPREVIEWCELL_HXX 26 #define _SC_ACCESSIBLEPREVIEWCELL_HXX 27 28 #include "AccessibleCellBase.hxx" 29 30 class ScPreviewShell; 31 32 namespace accessibility 33 { 34 class AccessibleTextHelper; 35 } 36 37 class ScAccessiblePreviewCell : public ScAccessibleCellBase 38 { 39 public: 40 //===== internal ======================================================== 41 ScAccessiblePreviewCell( 42 const ::com::sun::star::uno::Reference< 43 ::com::sun::star::accessibility::XAccessible>& rxParent, 44 ScPreviewShell* pViewShell, /* const */ ScAddress& rCellAddress, sal_Int32 nIndex ); 45 46 protected: 47 virtual ~ScAccessiblePreviewCell(); 48 49 using ScAccessibleCellBase::IsDefunc; 50 51 public: 52 using ScAccessibleCellBase::disposing; 53 virtual void SAL_CALL disposing(); 54 55 ///===== SfxListener ===================================================== 56 57 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 58 59 //===== XAccessibleComponent ============================================ 60 61 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL 62 getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) 63 throw (::com::sun::star::uno::RuntimeException); 64 virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException); 65 66 //===== XAccessibleContext ============================================== 67 68 // overloaded to calculate this on demand 69 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException); 70 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL 71 getAccessibleChild( sal_Int32 i ) 72 throw (::com::sun::star::lang::IndexOutOfBoundsException, 73 ::com::sun::star::uno::RuntimeException); 74 75 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL 76 getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException); 77 78 //===== XServiceInfo ==================================================== 79 80 virtual ::rtl::OUString SAL_CALL getImplementationName() 81 throw(::com::sun::star::uno::RuntimeException); 82 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 83 throw(::com::sun::star::uno::RuntimeException); 84 85 ///===== XTypeProvider =================================================== 86 87 /** Returns a implementation id. 88 */ 89 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL 90 getImplementationId(void) 91 throw (::com::sun::star::uno::RuntimeException); 92 93 protected: 94 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException); 95 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException); 96 97 private: 98 ScPreviewShell* mpViewShell; 99 100 accessibility::AccessibleTextHelper* mpTextHelper; 101 102 sal_Bool IsDefunc( 103 const com::sun::star::uno::Reference< 104 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 105 virtual sal_Bool IsEditable( 106 const com::sun::star::uno::Reference< 107 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 108 sal_Bool IsOpaque( 109 const com::sun::star::uno::Reference< 110 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 111 112 void CreateTextHelper(); 113 114 }; 115 116 #endif 117 118