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 #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX 23 #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX 24 25 #include "AccessibleDocumentViewBase.hxx" 26 #include <svx/AccessibleTextHelper.hxx> 27 28 namespace sd { 29 class OutlineViewShell; 30 class Window; 31 } 32 33 namespace accessibility { 34 35 /** This class makes the Impress outline view accessible. 36 37 Please see the documentation of the base class for further 38 explanations of the individual methods. This class is a mere 39 wrapper around the AccessibleTextHelper class; as basically the 40 Outline View is a big Outliner. 41 */ 42 class AccessibleOutlineView 43 : public AccessibleDocumentViewBase 44 { 45 public: 46 AccessibleOutlineView ( 47 ::sd::Window* pSdWindow, 48 ::sd::OutlineViewShell* pViewShell, 49 const ::com::sun::star::uno::Reference< 50 ::com::sun::star::frame::XController>& rxController, 51 const ::com::sun::star::uno::Reference< 52 ::com::sun::star::accessibility::XAccessible>& rxParent); 53 54 virtual ~AccessibleOutlineView (void); 55 56 /** Complete the initialization begun in the constructor. 57 */ 58 virtual void Init (void); 59 60 61 // ===== IAccessibleViewForwarderListener ================================ 62 63 virtual void ViewForwarderChanged (ChangeType aChangeType, 64 const IAccessibleViewForwarder* pViewForwarder); 65 66 // ===== XAccessibleContext ============================================== 67 68 virtual sal_Int32 SAL_CALL 69 getAccessibleChildCount (void); 70 71 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL 72 getAccessibleChild (sal_Int32 nIndex); 73 virtual ::rtl::OUString SAL_CALL 74 getAccessibleName(void); 75 // ===== XAccessibleEventBroadcaster ======================================== 76 77 virtual void SAL_CALL 78 addEventListener ( 79 const ::com::sun::star::uno::Reference< 80 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener); 81 82 virtual void SAL_CALL 83 removeEventListener ( 84 const ::com::sun::star::uno::Reference< 85 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener); 86 87 using cppu::WeakComponentImplHelperBase::addEventListener; 88 using cppu::WeakComponentImplHelperBase::removeEventListener; 89 90 // ===== XServiceInfo ==================================================== 91 92 /** Returns an identifier for the implementation of this object. 93 */ 94 virtual ::rtl::OUString SAL_CALL 95 getImplementationName (void); 96 97 // ===== lang::XEventListener ============================================ 98 99 virtual void SAL_CALL 100 disposing (const ::com::sun::star::lang::EventObject& rEventObject); 101 102 // ===== XPropertyChangeListener ========================================= 103 104 virtual void SAL_CALL 105 propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject); 106 107 108 protected: 109 110 // overridden, as we hold the listeners ourselves 111 virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent); 112 113 // overridden to detect focus changes 114 virtual void Activated (void); 115 116 // overridden to detect focus changes 117 virtual void Deactivated (void); 118 119 // declared, but not defined 120 AccessibleOutlineView( const AccessibleOutlineView& ); 121 AccessibleOutlineView& operator= ( const AccessibleOutlineView& ); 122 123 // This method is called from the component helper base class while disposing. 124 virtual void SAL_CALL disposing (void); 125 126 // Create an accessible name that contains the current view mode. 127 virtual ::rtl::OUString 128 CreateAccessibleName (); 129 130 // Create an accessible description that contains the current 131 // view mode. 132 virtual ::rtl::OUString 133 CreateAccessibleDescription (); 134 135 private: 136 137 // Invalidate text helper, updates visible children 138 void UpdateChildren(); 139 140 AccessibleTextHelper maTextHelper; 141 142 }; 143 144 } // end of namespace accessibility 145 146 #endif 147 148 /* vim: set noet sw=4 ts=4: */ 149