1*c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c45d927aSAndrew Rist * distributed with this work for additional information 6*c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9*c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10*c45d927aSAndrew Rist * 11*c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c45d927aSAndrew Rist * 13*c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c45d927aSAndrew Rist * software distributed under the License is distributed on an 15*c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17*c45d927aSAndrew Rist * specific language governing permissions and limitations 18*c45d927aSAndrew Rist * under the License. 19*c45d927aSAndrew Rist * 20*c45d927aSAndrew Rist *************************************************************/ 21*c45d927aSAndrew Rist 22*c45d927aSAndrew 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); 78cdf0e10cSrcweir 79cdf0e10cSrcweir //===== XAccessibleEventBroadcaster ======================================== 80cdf0e10cSrcweir 81cdf0e10cSrcweir virtual void SAL_CALL 82cdf0e10cSrcweir addEventListener ( 83cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 84cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) 85cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 86cdf0e10cSrcweir 87cdf0e10cSrcweir virtual void SAL_CALL 88cdf0e10cSrcweir removeEventListener ( 89cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 90cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) 91cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 92cdf0e10cSrcweir 93cdf0e10cSrcweir using cppu::WeakComponentImplHelperBase::addEventListener; 94cdf0e10cSrcweir using cppu::WeakComponentImplHelperBase::removeEventListener; 95cdf0e10cSrcweir 96cdf0e10cSrcweir //===== XServiceInfo ==================================================== 97cdf0e10cSrcweir 98cdf0e10cSrcweir /** Returns an identifier for the implementation of this object. 99cdf0e10cSrcweir */ 100cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL 101cdf0e10cSrcweir getImplementationName (void) 102cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 103cdf0e10cSrcweir 104cdf0e10cSrcweir //===== lang::XEventListener ============================================ 105cdf0e10cSrcweir 106cdf0e10cSrcweir virtual void SAL_CALL 107cdf0e10cSrcweir disposing (const ::com::sun::star::lang::EventObject& rEventObject) 108cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir 110cdf0e10cSrcweir //===== XPropertyChangeListener ========================================= 111cdf0e10cSrcweir 112cdf0e10cSrcweir virtual void SAL_CALL 113cdf0e10cSrcweir propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject) 114cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir 116cdf0e10cSrcweir 117cdf0e10cSrcweir protected: 118cdf0e10cSrcweir 119cdf0e10cSrcweir // overridden, as we hold the listeners ourselves 120cdf0e10cSrcweir virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent); 121cdf0e10cSrcweir 122cdf0e10cSrcweir // overridden to detect focus changes 123cdf0e10cSrcweir virtual void Activated (void); 124cdf0e10cSrcweir 125cdf0e10cSrcweir // overridden to detect focus changes 126cdf0e10cSrcweir virtual void Deactivated (void); 127cdf0e10cSrcweir 128cdf0e10cSrcweir // declared, but not defined 129cdf0e10cSrcweir AccessibleOutlineView( const AccessibleOutlineView& ); 130cdf0e10cSrcweir AccessibleOutlineView& operator= ( const AccessibleOutlineView& ); 131cdf0e10cSrcweir 132cdf0e10cSrcweir // This method is called from the component helper base class while disposing. 133cdf0e10cSrcweir virtual void SAL_CALL disposing (void); 134cdf0e10cSrcweir 135cdf0e10cSrcweir /// Create an accessible name that contains the current view mode. 136cdf0e10cSrcweir virtual ::rtl::OUString 137cdf0e10cSrcweir CreateAccessibleName () 138cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 139cdf0e10cSrcweir 140cdf0e10cSrcweir /// Create an accessible description that contains the current 141cdf0e10cSrcweir /// view mode. 142cdf0e10cSrcweir virtual ::rtl::OUString 143cdf0e10cSrcweir CreateAccessibleDescription () 144cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 145cdf0e10cSrcweir 146cdf0e10cSrcweir private: 147cdf0e10cSrcweir 148cdf0e10cSrcweir /// Invalidate text helper, updates visible children 149cdf0e10cSrcweir void UpdateChildren(); 150cdf0e10cSrcweir 151cdf0e10cSrcweir AccessibleTextHelper maTextHelper; 152cdf0e10cSrcweir 153cdf0e10cSrcweir }; 154cdf0e10cSrcweir 155cdf0e10cSrcweir } // end of namespace accessibility 156cdf0e10cSrcweir 157cdf0e10cSrcweir #endif 158