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_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX 30 #define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX 31 32 #include "AccessibleDocumentBase.hxx" 33 34 class ScPreviewShell; 35 class ScNotesChilds; 36 class ScShapeChilds; 37 class ScAccessiblePreviewTable; 38 class ScAccessiblePageHeader; 39 40 class ScAccessibleDocumentPagePreview 41 : public ScAccessibleDocumentBase 42 { 43 public: 44 //===== internal ======================================================== 45 ScAccessibleDocumentPagePreview( 46 const ::com::sun::star::uno::Reference< 47 ::com::sun::star::accessibility::XAccessible>& rxParent, 48 ScPreviewShell* pViewShell ); 49 protected: 50 virtual ~ScAccessibleDocumentPagePreview(void); 51 52 using ScAccessibleDocumentBase::IsDefunc; 53 54 public: 55 using ScAccessibleContextBase::disposing; 56 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 > 66 SAL_CALL getAccessibleAtPoint( 67 const ::com::sun::star::awt::Point& rPoint ) 68 throw (::com::sun::star::uno::RuntimeException); 69 70 virtual void SAL_CALL grabFocus( ) 71 throw (::com::sun::star::uno::RuntimeException); 72 73 ///===== XAccessibleContext ============================================== 74 75 /// Return the number of currently visible children. 76 virtual sal_Int32 SAL_CALL 77 getAccessibleChildCount(void) 78 throw (::com::sun::star::uno::RuntimeException); 79 80 /// Return the specified child or NULL if index is invalid. 81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL 82 getAccessibleChild(sal_Int32 nIndex) 83 throw (::com::sun::star::uno::RuntimeException, 84 ::com::sun::star::lang::IndexOutOfBoundsException); 85 86 /// Return the set of current states. 87 virtual ::com::sun::star::uno::Reference< 88 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL 89 getAccessibleStateSet(void) 90 throw (::com::sun::star::uno::RuntimeException); 91 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