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_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX 26 #define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX 27 28 #include "AccessibleDocumentBase.hxx" 29 30 class ScPreviewShell; 31 class ScNotesChilds; 32 class ScShapeChilds; 33 class ScAccessiblePreviewTable; 34 class ScAccessiblePageHeader; 35 36 class ScAccessibleDocumentPagePreview 37 : public ScAccessibleDocumentBase 38 { 39 public: 40 //===== internal ======================================================== 41 ScAccessibleDocumentPagePreview( 42 const ::com::sun::star::uno::Reference< 43 ::com::sun::star::accessibility::XAccessible>& rxParent, 44 ScPreviewShell* pViewShell ); 45 protected: 46 virtual ~ScAccessibleDocumentPagePreview(void); 47 48 using ScAccessibleDocumentBase::IsDefunc; 49 50 public: 51 using ScAccessibleContextBase::disposing; 52 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 > 62 SAL_CALL getAccessibleAtPoint( 63 const ::com::sun::star::awt::Point& rPoint ) 64 throw (::com::sun::star::uno::RuntimeException); 65 66 virtual void SAL_CALL grabFocus( ) 67 throw (::com::sun::star::uno::RuntimeException); 68 69 ///===== XAccessibleContext ============================================== 70 71 /// Return the number of currently visible children. 72 virtual sal_Int32 SAL_CALL 73 getAccessibleChildCount(void) 74 throw (::com::sun::star::uno::RuntimeException); 75 76 /// Return the specified child or NULL if index is invalid. 77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL 78 getAccessibleChild(sal_Int32 nIndex) 79 throw (::com::sun::star::uno::RuntimeException, 80 ::com::sun::star::lang::IndexOutOfBoundsException); 81 82 /// Return the set of current states. 83 virtual ::com::sun::star::uno::Reference< 84 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL 85 getAccessibleStateSet(void) 86 throw (::com::sun::star::uno::RuntimeException); 87 88 //IAccessibility2 Implementation 2009----- 89 virtual ::rtl::OUString SAL_CALL getAccessibleName(void) 90 throw (::com::sun::star::uno::RuntimeException); 91 //-----IAccessibility2 Implementation 2009 92 ///===== XServiceInfo ==================================================== 93 94 /** Returns an identifier for the implementation of this object. 95 */ 96 virtual ::rtl::OUString SAL_CALL 97 getImplementationName(void) 98 throw (::com::sun::star::uno::RuntimeException); 99 100 /** Returns a list of all supported services. 101 */ 102 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL 103 getSupportedServiceNames(void) 104 throw (::com::sun::star::uno::RuntimeException); 105 106 ///===== XTypeProvider =================================================== 107 108 /** Returns a implementation id. 109 */ 110 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL 111 getImplementationId(void) 112 throw (::com::sun::star::uno::RuntimeException); 113 114 ///===== internal ======================================================== 115 116 //UNUSED2009-05 com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > 117 //UNUSED2009-05 GetCurrentAccessibleTable(); 118 119 //UNUSED2009-05 void ChildCountChanged(); 120 121 protected: 122 /// Return this object's description. 123 virtual ::rtl::OUString SAL_CALL 124 createAccessibleDescription(void) 125 throw (::com::sun::star::uno::RuntimeException); 126 127 /// Return the object's current name. 128 virtual ::rtl::OUString SAL_CALL 129 createAccessibleName(void) 130 throw (::com::sun::star::uno::RuntimeException); 131 132 public: // needed in ScShapeChilds 133 /// Return the object's current bounding box relative to the desktop. 134 virtual Rectangle GetBoundingBoxOnScreen(void) const 135 throw (::com::sun::star::uno::RuntimeException); 136 137 protected: 138 /// Return the object's current bounding box relative to the parent object. 139 virtual Rectangle GetBoundingBox(void) const 140 throw (::com::sun::star::uno::RuntimeException); 141 142 private: 143 ScPreviewShell* mpViewShell; 144 ScNotesChilds* mpNotesChilds; 145 ScShapeChilds* mpShapeChilds; 146 ScAccessiblePreviewTable* mpTable; 147 ScAccessiblePageHeader* mpHeader; 148 ScAccessiblePageHeader* mpFooter; 149 150 sal_Bool IsDefunc( 151 const com::sun::star::uno::Reference< 152 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates); 153 154 ScNotesChilds* GetNotesChilds(); 155 ScShapeChilds* GetShapeChilds(); 156 }; 157 158 159 #endif 160