Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #ifndef _SVXRECTACCESSIBLECONTEXT_HXX
31 : : #define _SVXRECTACCESSIBLECONTEXT_HXX
32 : :
33 : : #include <com/sun/star/accessibility/XAccessible.hpp>
34 : : #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
35 : : #include <com/sun/star/accessibility/XAccessibleContext.hpp>
36 : : #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
37 : : #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
38 : : #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
39 : : #include <com/sun/star/accessibility/XAccessibleValue.hpp>
40 : : #include <com/sun/star/beans/XPropertyChangeListener.hpp>
41 : : #include <com/sun/star/uno/Reference.hxx>
42 : : #include <cppuhelper/weak.hxx>
43 : : #include <com/sun/star/lang/XServiceInfo.hpp>
44 : : #include <com/sun/star/lang/XTypeProvider.hpp>
45 : : #include <com/sun/star/lang/XServiceName.hpp>
46 : : #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
47 : : #include <com/sun/star/lang/DisposedException.hpp>
48 : : #include <osl/mutex.hxx>
49 : : #include <cppuhelper/interfacecontainer.h>
50 : : #include <cppuhelper/compbase6.hxx>
51 : : #include <comphelper/broadcasthelper.hxx>
52 : : #include <cppuhelper/implbase6.hxx>
53 : : #include <comphelper/servicehelper.hxx>
54 : : #include <svx/rectenum.hxx>
55 : :
56 : : namespace com { namespace sun { namespace star { namespace awt {
57 : : struct Point;
58 : : struct Rectangle;
59 : : struct Size;
60 : : class XFocusListener;
61 : : } } } }
62 : :
63 : : class Rectangle;
64 : : class SvxRectCtl;
65 : : class SvxRectCtlChildAccessibleContext;
66 : : class Window;
67 : :
68 : :
69 : : typedef ::cppu::WeakAggComponentImplHelper6<
70 : : ::com::sun::star::accessibility::XAccessible,
71 : : ::com::sun::star::accessibility::XAccessibleComponent,
72 : : ::com::sun::star::accessibility::XAccessibleContext,
73 : : ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
74 : : ::com::sun::star::accessibility::XAccessibleSelection,
75 : : ::com::sun::star::lang::XServiceInfo >
76 : : SvxRectCtlAccessibleContext_Base;
77 : :
78 : : class SvxRectCtlAccessibleContext : public ::comphelper::OBaseMutex, public SvxRectCtlAccessibleContext_Base
79 : : {
80 : : public:
81 : : //===== internal ========================================================
82 : : SvxRectCtlAccessibleContext(
83 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
84 : : SvxRectCtl& rRepresentation,
85 : : const ::rtl::OUString* pName = NULL,
86 : : const ::rtl::OUString* pDescription = NULL );
87 : : protected:
88 : : virtual ~SvxRectCtlAccessibleContext();
89 : : public:
90 : : //===== XAccessible =====================================================
91 : :
92 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
93 : : getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
94 : :
95 : : //===== XAccessibleComponent ============================================
96 : :
97 : : virtual sal_Bool SAL_CALL
98 : : containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
99 : :
100 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
101 : : getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
102 : :
103 : : virtual ::com::sun::star::awt::Rectangle SAL_CALL
104 : : getBounds() throw( ::com::sun::star::uno::RuntimeException );
105 : :
106 : : virtual ::com::sun::star::awt::Point SAL_CALL
107 : : getLocation() throw( ::com::sun::star::uno::RuntimeException );
108 : :
109 : : virtual ::com::sun::star::awt::Point SAL_CALL
110 : : getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
111 : :
112 : : virtual ::com::sun::star::awt::Size SAL_CALL
113 : : getSize() throw( ::com::sun::star::uno::RuntimeException );
114 : :
115 : : virtual sal_Bool SAL_CALL
116 : : isShowing() throw( ::com::sun::star::uno::RuntimeException );
117 : :
118 : : virtual sal_Bool SAL_CALL
119 : : isVisible() throw( ::com::sun::star::uno::RuntimeException );
120 : :
121 : : virtual sal_Bool SAL_CALL
122 : : isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
123 : :
124 : : virtual void SAL_CALL
125 : : addFocusListener(
126 : : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
127 : : throw( ::com::sun::star::uno::RuntimeException );
128 : :
129 : : virtual void SAL_CALL
130 : : removeFocusListener(
131 : : const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
132 : : throw( ::com::sun::star::uno::RuntimeException );
133 : :
134 : : virtual void SAL_CALL
135 : : grabFocus() throw( ::com::sun::star::uno::RuntimeException );
136 : :
137 : : virtual ::com::sun::star::uno::Any SAL_CALL
138 : : getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
139 : : virtual sal_Int32 SAL_CALL
140 : : getForeground( ) throw (::com::sun::star::uno::RuntimeException);
141 : : virtual sal_Int32 SAL_CALL
142 : : getBackground( ) throw (::com::sun::star::uno::RuntimeException);
143 : :
144 : : //===== XAccessibleContext ==============================================
145 : :
146 : : virtual sal_Int32 SAL_CALL
147 : : getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
148 : :
149 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
150 : : getAccessibleChild( sal_Int32 nIndex )
151 : : throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
152 : :
153 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
154 : : getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
155 : :
156 : : virtual sal_Int32 SAL_CALL
157 : : getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
158 : :
159 : : virtual sal_Int16 SAL_CALL
160 : : getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
161 : :
162 : : virtual ::rtl::OUString SAL_CALL
163 : : getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
164 : :
165 : : virtual ::rtl::OUString SAL_CALL
166 : : getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
167 : :
168 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
169 : : getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
170 : :
171 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
172 : : getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
173 : :
174 : : virtual ::com::sun::star::lang::Locale SAL_CALL
175 : : getLocale( void )
176 : : throw( ::com::sun::star::uno::RuntimeException,
177 : : ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
178 : :
179 : : //===== XComponent =====================================================
180 : :
181 : : using ::cppu::WeakAggComponentImplHelperBase::addEventListener;
182 : : using ::cppu::WeakAggComponentImplHelperBase::removeEventListener;
183 : :
184 : : //===== XAccessibleEventBroadcaster =====================================
185 : :
186 : : virtual void SAL_CALL
187 : : addEventListener(
188 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
189 : : throw( com::sun::star::uno::RuntimeException );
190 : :
191 : : virtual void SAL_CALL
192 : : removeEventListener(
193 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
194 : : throw( com::sun::star::uno::RuntimeException );
195 : :
196 : : //===== XServiceInfo ====================================================
197 : :
198 : : virtual ::rtl::OUString SAL_CALL
199 : : getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
200 : :
201 : : virtual sal_Bool SAL_CALL
202 : : supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
203 : :
204 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
205 : : getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
206 : :
207 : : //===== XTypeProvider ===================================================
208 : :
209 : : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
210 : : getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
211 : :
212 : : //===== XAccessibleSelection =============================================
213 : :
214 : : virtual void SAL_CALL
215 : : selectAccessibleChild( sal_Int32 nChildIndex )
216 : : throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
217 : :
218 : : virtual sal_Bool SAL_CALL
219 : : isAccessibleChildSelected( sal_Int32 nChildIndex )
220 : : throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
221 : :
222 : : virtual void SAL_CALL
223 : : clearAccessibleSelection() throw( ::com::sun::star::uno::RuntimeException );
224 : :
225 : : virtual void SAL_CALL
226 : : selectAllAccessibleChildren() throw( ::com::sun::star::uno::RuntimeException );
227 : :
228 : : virtual sal_Int32 SAL_CALL
229 : : getSelectedAccessibleChildCount() throw( ::com::sun::star::uno::RuntimeException );
230 : :
231 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
232 : : getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
233 : : throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
234 : :
235 : : virtual void SAL_CALL
236 : : deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
237 : : throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
238 : :
239 : :
240 : : protected:
241 : : //===== internals ========================================================
242 : :
243 : : void checkChildIndex( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
244 : :
245 : : void checkChildIndexOnSelection( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
246 : :
247 : : /** Selects a new child by index.
248 : :
249 : : <p>If the child was not selected before, the state of the child will
250 : : be updated. If the index is invalid, the index will internaly set to NOCHILDSELECTED</p>
251 : :
252 : : @param nIndexOfChild
253 : : Index of the new child which should be selected.
254 : : */
255 : : void selectChild( long nIndexOfChild );
256 : :
257 : : public:
258 : : /** Selects a new child by point.
259 : :
260 : : <p>If the child was not selected before, the state of the child will
261 : : be updated. If the point is not invalid, the index will internaly set to NOCHILDSELECTED</p>
262 : :
263 : : @param eButton
264 : : Button which belongs to the child which should be selected.
265 : : */
266 : : void selectChild( RECT_POINT ePoint );
267 : :
268 : : private:
269 : : static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
270 : : protected:
271 : :
272 : : /// @Return the object's current bounding box relative to the desktop.
273 : : virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
274 : :
275 : : /// @Return the object's current bounding box relative to the parent object.
276 : : virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
277 : :
278 : : virtual void SAL_CALL disposing();
279 : :
280 : : /// @returns true if it's disposed or in disposing
281 : : inline sal_Bool IsAlive( void ) const;
282 : :
283 : : /// @returns true if it's not disposed and no in disposing
284 : : inline sal_Bool IsNotAlive( void ) const;
285 : :
286 : : /// throws the exception DisposedException if it's not alive
287 : : void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
288 : :
289 : : private:
290 : : /** Description of this object. This is not a constant because it can
291 : : be set from the outside.
292 : : */
293 : : ::rtl::OUString msDescription;
294 : :
295 : : /** Name of this object.
296 : : */
297 : : ::rtl::OUString msName;
298 : :
299 : : /// Reference to the parent object.
300 : : ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
301 : : mxParent;
302 : :
303 : : /// pointer to internal representation
304 : : SvxRectCtl* mpRepr;
305 : :
306 : : /// array for all possible children
307 : : SvxRectCtlChildAccessibleContext** mpChildren;
308 : :
309 : : /// client id in the AccessibleEventNotifier queue
310 : : sal_uInt32 mnClientId;
311 : :
312 : : /// actual selected child
313 : : long mnSelectedChild;
314 : :
315 : : /// mode of control (true -> 8 points, false -> 9 points)
316 : : sal_Bool mbAngleMode;
317 : : };
318 : :
319 : 0 : inline sal_Bool SvxRectCtlAccessibleContext::IsAlive( void ) const
320 : : {
321 [ # # ][ # # ]: 0 : return !rBHelper.bDisposed && !rBHelper.bInDispose;
322 : : }
323 : :
324 : 0 : inline sal_Bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
325 : : {
326 [ # # ][ # # ]: 0 : return rBHelper.bDisposed || rBHelper.bInDispose;
327 : : }
328 : :
329 : :
330 : : typedef ::cppu::WeakAggComponentImplHelper6<
331 : : ::com::sun::star::accessibility::XAccessible,
332 : : ::com::sun::star::accessibility::XAccessibleComponent,
333 : : ::com::sun::star::accessibility::XAccessibleContext,
334 : : ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
335 : : ::com::sun::star::accessibility::XAccessibleValue,
336 : : ::com::sun::star::lang::XServiceInfo >
337 : : SvxRectCtlChildAccessibleContext_Base;
338 : :
339 : :
340 : : class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
341 : : {
342 : : public:
343 : : SvxRectCtlChildAccessibleContext(
344 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
345 : : const Window& rParentWindow,
346 : : const ::rtl::OUString& rName, const ::rtl::OUString& rDescription,
347 : : const Rectangle& rBoundingBox,
348 : : long nIndexInParent );
349 : : protected:
350 : : virtual ~SvxRectCtlChildAccessibleContext();
351 : : public:
352 : : //===== XAccessible =====================================================
353 : :
354 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
355 : : getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
356 : :
357 : : //===== XAccessibleComponent ============================================
358 : :
359 : : virtual sal_Bool SAL_CALL
360 : : containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
361 : :
362 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
363 : : getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
364 : :
365 : : virtual ::com::sun::star::awt::Rectangle SAL_CALL
366 : : getBounds() throw( ::com::sun::star::uno::RuntimeException );
367 : :
368 : : virtual ::com::sun::star::awt::Point SAL_CALL
369 : : getLocation() throw( ::com::sun::star::uno::RuntimeException );
370 : :
371 : : virtual ::com::sun::star::awt::Point SAL_CALL
372 : : getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
373 : :
374 : : virtual ::com::sun::star::awt::Size SAL_CALL
375 : : getSize() throw( ::com::sun::star::uno::RuntimeException );
376 : :
377 : : virtual sal_Bool SAL_CALL
378 : : isShowing() throw( ::com::sun::star::uno::RuntimeException );
379 : :
380 : : virtual sal_Bool SAL_CALL
381 : : isVisible() throw( ::com::sun::star::uno::RuntimeException );
382 : :
383 : : virtual sal_Bool SAL_CALL
384 : : isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
385 : :
386 : : virtual void SAL_CALL
387 : : addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
388 : : throw( ::com::sun::star::uno::RuntimeException );
389 : :
390 : : virtual void SAL_CALL
391 : : removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
392 : : throw (::com::sun::star::uno::RuntimeException);
393 : :
394 : : virtual void SAL_CALL
395 : : grabFocus() throw( ::com::sun::star::uno::RuntimeException );
396 : :
397 : : virtual ::com::sun::star::uno::Any SAL_CALL
398 : : getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
399 : : virtual sal_Int32 SAL_CALL
400 : : getForeground( ) throw (::com::sun::star::uno::RuntimeException);
401 : : virtual sal_Int32 SAL_CALL
402 : : getBackground( ) throw (::com::sun::star::uno::RuntimeException);
403 : :
404 : : //===== XAccessibleContext ==============================================
405 : :
406 : : virtual sal_Int32 SAL_CALL
407 : : getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
408 : :
409 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
410 : : getAccessibleChild( sal_Int32 nIndex )
411 : : throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
412 : :
413 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
414 : : getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
415 : :
416 : : virtual sal_Int32 SAL_CALL
417 : : getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
418 : :
419 : : virtual sal_Int16 SAL_CALL
420 : : getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
421 : :
422 : : virtual ::rtl::OUString SAL_CALL
423 : : getAccessibleDescription( void ) throw( ::com::sun::star::uno::RuntimeException );
424 : :
425 : : virtual ::rtl::OUString SAL_CALL
426 : : getAccessibleName( void ) throw( ::com::sun::star::uno::RuntimeException );
427 : :
428 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
429 : : getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
430 : :
431 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
432 : : getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
433 : :
434 : : virtual ::com::sun::star::lang::Locale SAL_CALL
435 : : getLocale( void )
436 : : throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
437 : :
438 : : //===== XComponent =====================================================
439 : :
440 : : using ::cppu::WeakAggComponentImplHelperBase::addEventListener;
441 : : using ::cppu::WeakAggComponentImplHelperBase::removeEventListener;
442 : :
443 : : //===== XAccessibleEventBroadcaster =====================================
444 : :
445 : : virtual void SAL_CALL
446 : : addEventListener(
447 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
448 : : throw( ::com::sun::star::uno::RuntimeException );
449 : :
450 : : virtual void SAL_CALL
451 : : removeEventListener(
452 : : const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
453 : : throw( com::sun::star::uno::RuntimeException );
454 : :
455 : : //===== XAccessibleValue ================================================
456 : :
457 : : virtual ::com::sun::star::uno::Any SAL_CALL
458 : : getCurrentValue() throw( ::com::sun::star::uno::RuntimeException );
459 : :
460 : : virtual sal_Bool SAL_CALL
461 : : setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw( ::com::sun::star::uno::RuntimeException );
462 : :
463 : : virtual ::com::sun::star::uno::Any SAL_CALL
464 : : getMaximumValue() throw( ::com::sun::star::uno::RuntimeException );
465 : :
466 : : virtual ::com::sun::star::uno::Any SAL_CALL
467 : : getMinimumValue() throw( ::com::sun::star::uno::RuntimeException );
468 : :
469 : : //===== XServiceInfo ====================================================
470 : :
471 : : virtual ::rtl::OUString SAL_CALL
472 : : getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
473 : :
474 : : virtual sal_Bool SAL_CALL
475 : : supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
476 : :
477 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
478 : : getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
479 : :
480 : :
481 : : //===== XTypeProvider ===================================================
482 : :
483 : : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
484 : : getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
485 : :
486 : : //===== internal ==========================================================
487 : :
488 : : /// Sets the checked status
489 : : void setStateChecked( sal_Bool bChecked );
490 : :
491 : : protected:
492 : : virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
493 : :
494 : : virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
495 : :
496 : : void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
497 : :
498 : : virtual void SAL_CALL disposing();
499 : :
500 : : /// @returns true if it's disposed or in disposing
501 : : inline sal_Bool IsAlive( void ) const;
502 : :
503 : : /// @returns true if it's not disposed and no in disposing
504 : : inline sal_Bool IsNotAlive( void ) const;
505 : :
506 : : /// throws the exception DisposedException if it's not alive
507 : : void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
508 : :
509 : : /// Mutex guarding this object.
510 : : ::osl::Mutex maMutex;
511 : :
512 : : private:
513 : :
514 : : /** Description of this object. This is not a constant because it can
515 : : be set from the outside. Furthermore, it changes according the the
516 : : draw page's display mode.
517 : : */
518 : : ::rtl::OUString msDescription;
519 : :
520 : : /** Name of this object. It changes according the the draw page's
521 : : display mode.
522 : : */
523 : : ::rtl::OUString msName;
524 : :
525 : : /// Reference to the parent object.
526 : : ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
527 : : mxParent;
528 : :
529 : : /// Bounding box
530 : : Rectangle* mpBoundingBox;
531 : :
532 : : /// window of parent
533 : : const Window& mrParentWindow;
534 : :
535 : : /// client id in the AccessibleEventNotifier queue
536 : : sal_uInt32 mnClientId;
537 : :
538 : : /// index of child in parent
539 : : long mnIndexInParent;
540 : :
541 : : /// Indicates, if object is checked
542 : : sal_Bool mbIsChecked;
543 : : };
544 : :
545 : 0 : inline sal_Bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
546 : : {
547 [ # # ][ # # ]: 0 : return !rBHelper.bDisposed && !rBHelper.bInDispose;
548 : : }
549 : :
550 : 0 : inline sal_Bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
551 : : {
552 [ # # ][ # # ]: 0 : return rBHelper.bDisposed || rBHelper.bInDispose;
553 : : }
554 : :
555 : :
556 : : #endif
557 : :
558 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|