1c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5c45d927aSAndrew Rist * distributed with this work for additional information 6c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10c45d927aSAndrew Rist * 11c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12c45d927aSAndrew Rist * 13c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14c45d927aSAndrew Rist * software distributed under the License is distributed on an 15c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17c45d927aSAndrew Rist * specific language governing permissions and limitations 18c45d927aSAndrew Rist * under the License. 19c45d927aSAndrew Rist * 20c45d927aSAndrew Rist *************************************************************/ 21c45d927aSAndrew Rist 22c45d927aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX 25cdf0e10cSrcweir #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "AccessibleDocumentViewBase.hxx" 28cdf0e10cSrcweir #include <svx/AccessibleTextHelper.hxx> 29cdf0e10cSrcweir 30cdf0e10cSrcweir namespace sd { 31cdf0e10cSrcweir class OutlineViewShell; 32cdf0e10cSrcweir class Window; 33cdf0e10cSrcweir } 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace accessibility { 36cdf0e10cSrcweir 37cdf0e10cSrcweir 38cdf0e10cSrcweir /** This class makes the Impress outline view accessible. 39cdf0e10cSrcweir 40cdf0e10cSrcweir Please see the documentation of the base class for further 41cdf0e10cSrcweir explanations of the individual methods. This class is a mere 42cdf0e10cSrcweir wrapper around the AccessibleTextHelper class; as basically the 43cdf0e10cSrcweir Outline View is a big Outliner. 44cdf0e10cSrcweir */ 45cdf0e10cSrcweir class AccessibleOutlineView 46cdf0e10cSrcweir : public AccessibleDocumentViewBase 47cdf0e10cSrcweir { 48cdf0e10cSrcweir public: 49cdf0e10cSrcweir AccessibleOutlineView ( 50cdf0e10cSrcweir ::sd::Window* pSdWindow, 51cdf0e10cSrcweir ::sd::OutlineViewShell* pViewShell, 52cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 53cdf0e10cSrcweir ::com::sun::star::frame::XController>& rxController, 54cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 55cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessible>& rxParent); 56cdf0e10cSrcweir 57cdf0e10cSrcweir virtual ~AccessibleOutlineView (void); 58cdf0e10cSrcweir 59cdf0e10cSrcweir /** Complete the initialization begun in the constructor. 60cdf0e10cSrcweir */ 61cdf0e10cSrcweir virtual void Init (void); 62cdf0e10cSrcweir 63cdf0e10cSrcweir 64cdf0e10cSrcweir //===== IAccessibleViewForwarderListener ================================ 65cdf0e10cSrcweir 66cdf0e10cSrcweir virtual void ViewForwarderChanged (ChangeType aChangeType, 67cdf0e10cSrcweir const IAccessibleViewForwarder* pViewForwarder); 68cdf0e10cSrcweir 69cdf0e10cSrcweir //===== XAccessibleContext ============================================== 70cdf0e10cSrcweir 71cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 72cdf0e10cSrcweir getAccessibleChildCount (void) 73cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 74cdf0e10cSrcweir 75cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL 76cdf0e10cSrcweir getAccessibleChild (sal_Int32 nIndex) 77cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 78*0deba7fbSSteve Yin //IAccessibility2 Implementation 2009----- 79*0deba7fbSSteve Yin virtual ::rtl::OUString SAL_CALL 80*0deba7fbSSteve Yin getAccessibleName(void) 81*0deba7fbSSteve Yin throw (::com::sun::star::uno::RuntimeException); 82*0deba7fbSSteve Yin //-----IAccessibility2 Implementation 2009 83cdf0e10cSrcweir //===== XAccessibleEventBroadcaster ======================================== 84cdf0e10cSrcweir 85cdf0e10cSrcweir virtual void SAL_CALL 86cdf0e10cSrcweir addEventListener ( 87cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 88cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) 89cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 90cdf0e10cSrcweir 91cdf0e10cSrcweir virtual void SAL_CALL 92cdf0e10cSrcweir removeEventListener ( 93cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 94cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) 95cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 96cdf0e10cSrcweir 97cdf0e10cSrcweir using cppu::WeakComponentImplHelperBase::addEventListener; 98cdf0e10cSrcweir using cppu::WeakComponentImplHelperBase::removeEventListener; 99cdf0e10cSrcweir 100cdf0e10cSrcweir //===== XServiceInfo ==================================================== 101cdf0e10cSrcweir 102cdf0e10cSrcweir /** Returns an identifier for the implementation of this object. 103cdf0e10cSrcweir */ 104cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL 105cdf0e10cSrcweir getImplementationName (void) 106cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 107cdf0e10cSrcweir 108cdf0e10cSrcweir //===== lang::XEventListener ============================================ 109cdf0e10cSrcweir 110cdf0e10cSrcweir virtual void SAL_CALL 111cdf0e10cSrcweir disposing (const ::com::sun::star::lang::EventObject& rEventObject) 112cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 113cdf0e10cSrcweir 114cdf0e10cSrcweir //===== XPropertyChangeListener ========================================= 115cdf0e10cSrcweir 116cdf0e10cSrcweir virtual void SAL_CALL 117cdf0e10cSrcweir propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject) 118cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 119cdf0e10cSrcweir 120cdf0e10cSrcweir 121cdf0e10cSrcweir protected: 122cdf0e10cSrcweir 123cdf0e10cSrcweir // overridden, as we hold the listeners ourselves 124cdf0e10cSrcweir virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent); 125cdf0e10cSrcweir 126cdf0e10cSrcweir // overridden to detect focus changes 127cdf0e10cSrcweir virtual void Activated (void); 128cdf0e10cSrcweir 129cdf0e10cSrcweir // overridden to detect focus changes 130cdf0e10cSrcweir virtual void Deactivated (void); 131cdf0e10cSrcweir 132cdf0e10cSrcweir // declared, but not defined 133cdf0e10cSrcweir AccessibleOutlineView( const AccessibleOutlineView& ); 134cdf0e10cSrcweir AccessibleOutlineView& operator= ( const AccessibleOutlineView& ); 135cdf0e10cSrcweir 136cdf0e10cSrcweir // This method is called from the component helper base class while disposing. 137cdf0e10cSrcweir virtual void SAL_CALL disposing (void); 138cdf0e10cSrcweir 139cdf0e10cSrcweir /// Create an accessible name that contains the current view mode. 140cdf0e10cSrcweir virtual ::rtl::OUString 141cdf0e10cSrcweir CreateAccessibleName () 142cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 143cdf0e10cSrcweir 144cdf0e10cSrcweir /// Create an accessible description that contains the current 145cdf0e10cSrcweir /// view mode. 146cdf0e10cSrcweir virtual ::rtl::OUString 147cdf0e10cSrcweir CreateAccessibleDescription () 148cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 149cdf0e10cSrcweir 150cdf0e10cSrcweir private: 151cdf0e10cSrcweir 152cdf0e10cSrcweir /// Invalidate text helper, updates visible children 153cdf0e10cSrcweir void UpdateChildren(); 154cdf0e10cSrcweir 155cdf0e10cSrcweir AccessibleTextHelper maTextHelper; 156cdf0e10cSrcweir 157cdf0e10cSrcweir }; 158cdf0e10cSrcweir 159cdf0e10cSrcweir } // end of namespace accessibility 160cdf0e10cSrcweir 161cdf0e10cSrcweir #endif 162