1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleOutlineView.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
32 #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
34 #include "AccessibleDocumentViewBase.hxx"
35 #include <svx/AccessibleTextHelper.hxx>
38 class OutlineViewShell
;
42 namespace accessibility
{
45 /** This class makes the Impress outline view accessible.
47 Please see the documentation of the base class for further
48 explanations of the individual methods. This class is a mere
49 wrapper around the AccessibleTextHelper class; as basically the
50 Outline View is a big Outliner.
52 class AccessibleOutlineView
53 : public AccessibleDocumentViewBase
56 AccessibleOutlineView (
57 ::sd::Window
* pSdWindow
,
58 ::sd::OutlineViewShell
* pViewShell
,
59 const ::com::sun::star::uno::Reference
<
60 ::com::sun::star::frame::XController
>& rxController
,
61 const ::com::sun::star::uno::Reference
<
62 ::com::sun::star::accessibility::XAccessible
>& rxParent
);
64 virtual ~AccessibleOutlineView (void);
66 /** Complete the initialization begun in the constructor.
68 virtual void Init (void);
71 //===== IAccessibleViewForwarderListener ================================
73 virtual void ViewForwarderChanged (ChangeType aChangeType
,
74 const IAccessibleViewForwarder
* pViewForwarder
);
76 //===== XAccessibleContext ==============================================
78 virtual sal_Int32 SAL_CALL
79 getAccessibleChildCount (void)
80 throw (::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
83 getAccessibleChild (sal_Int32 nIndex
)
84 throw (::com::sun::star::uno::RuntimeException
);
86 //===== XAccessibleEventBroadcaster ========================================
90 const ::com::sun::star::uno::Reference
<
91 ::com::sun::star::accessibility::XAccessibleEventListener
>& xListener
)
92 throw (::com::sun::star::uno::RuntimeException
);
96 const ::com::sun::star::uno::Reference
<
97 ::com::sun::star::accessibility::XAccessibleEventListener
>& xListener
)
98 throw (::com::sun::star::uno::RuntimeException
);
100 using cppu::WeakComponentImplHelperBase::addEventListener
;
101 using cppu::WeakComponentImplHelperBase::removeEventListener
;
103 //===== XServiceInfo ====================================================
105 /** Returns an identifier for the implementation of this object.
107 virtual ::rtl::OUString SAL_CALL
108 getImplementationName (void)
109 throw (::com::sun::star::uno::RuntimeException
);
111 //===== lang::XEventListener ============================================
113 virtual void SAL_CALL
114 disposing (const ::com::sun::star::lang::EventObject
& rEventObject
)
115 throw (::com::sun::star::uno::RuntimeException
);
117 //===== XPropertyChangeListener =========================================
119 virtual void SAL_CALL
120 propertyChange (const ::com::sun::star::beans::PropertyChangeEvent
& rEventObject
)
121 throw (::com::sun::star::uno::RuntimeException
);
126 // overridden, as we hold the listeners ourselves
127 virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject
& aEvent
);
129 // overridden to detect focus changes
130 virtual void Activated (void);
132 // overridden to detect focus changes
133 virtual void Deactivated (void);
135 // declared, but not defined
136 AccessibleOutlineView( const AccessibleOutlineView
& );
137 AccessibleOutlineView
& operator= ( const AccessibleOutlineView
& );
139 // This method is called from the component helper base class while disposing.
140 virtual void SAL_CALL
disposing (void);
142 /// Create an accessible name that contains the current view mode.
143 virtual ::rtl::OUString
144 CreateAccessibleName ()
145 throw (::com::sun::star::uno::RuntimeException
);
147 /// Create an accessible description that contains the current
149 virtual ::rtl::OUString
150 CreateAccessibleDescription ()
151 throw (::com::sun::star::uno::RuntimeException
);
155 /// Invalidate text helper, updates visible children
156 void UpdateChildren();
158 AccessibleTextHelper maTextHelper
;
162 } // end of namespace accessibility