Bump for 3.6-28
[LibreOffice.git] / editeng / source / accessibility / AccessibleImageBullet.cxx
blob08072a628d9a5c1a8db37dc78bf72087d6773015
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
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.
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).
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.
27 ************************************************************************/
29 #include <tools/gen.hxx>
30 #include <osl/mutex.hxx>
31 #include <vcl/svapp.hxx>
32 #include <rtl/ustring.hxx>
33 #include <com/sun/star/awt/Point.hpp>
34 #include <com/sun/star/awt/Rectangle.hpp>
35 #include <com/sun/star/lang/DisposedException.hpp>
36 #include <com/sun/star/accessibility/AccessibleRole.hpp>
37 #include <com/sun/star/accessibility/AccessibleTextType.hpp>
38 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
39 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
40 #include <comphelper/accessibleeventnotifier.hxx>
41 #include <unotools/accessiblestatesethelper.hxx>
42 #include <editeng/unolingu.hxx>
43 #include "editeng/AccessibleEditableTextPara.hxx"
44 #include "editeng/AccessibleImageBullet.hxx"
45 #include <editeng/eerdll.hxx>
47 #include <editeng/editdata.hxx>
48 #include <editeng/editeng.hxx>
49 #include <editeng/outliner.hxx>
50 #include "editeng.hrc"
51 #include <svtools/colorcfg.hxx>
54 using namespace ::com::sun::star;
55 using namespace ::com::sun::star::accessibility;
57 namespace accessibility
59 DBG_NAME( AccessibleImageBullet )
61 AccessibleImageBullet::AccessibleImageBullet ( const uno::Reference< XAccessible >& rParent ) :
62 mnParagraphIndex( 0 ),
63 mnIndexInParent( 0 ),
64 mpEditSource( NULL ),
65 maEEOffset( 0, 0 ),
66 mxParent( rParent ),
67 // well, that's strictly (UNO) exception safe, though not
68 // really robust. We rely on the fact that this member is
69 // constructed last, and that the constructor body catches
70 // exceptions, thus no chance for exceptions once the Id is
71 // fetched. Nevertheless, normally should employ RAII here...
72 mnNotifierClientId(::comphelper::AccessibleEventNotifier::registerClient())
74 #ifdef DBG_UTIL
75 DBG_CTOR( AccessibleImageBullet, NULL );
76 OSL_TRACE( "Received ID: %d", mnNotifierClientId );
77 #endif
79 try
81 // Create the state set.
82 ::utl::AccessibleStateSetHelper* pStateSet = new ::utl::AccessibleStateSetHelper ();
83 mxStateSet = pStateSet;
85 // these are always on
86 pStateSet->AddState( AccessibleStateType::VISIBLE );
87 pStateSet->AddState( AccessibleStateType::SHOWING );
88 pStateSet->AddState( AccessibleStateType::ENABLED );
89 pStateSet->AddState( AccessibleStateType::SENSITIVE );
91 catch( const uno::Exception& ) {}
94 AccessibleImageBullet::~AccessibleImageBullet()
96 DBG_DTOR( AccessibleImageBullet, NULL );
98 // sign off from event notifier
99 if( getNotifierClientId() != -1 )
103 ::comphelper::AccessibleEventNotifier::revokeClient( getNotifierClientId() );
104 #ifdef DBG_UTIL
105 OSL_TRACE( "AccessibleImageBullet revoked ID: %d", mnNotifierClientId );
106 #endif
108 catch( const uno::Exception& ) {}
112 uno::Any SAL_CALL AccessibleImageBullet::queryInterface (const uno::Type & rType) throw (uno::RuntimeException)
114 DBG_CHKTHIS( AccessibleImageBullet, NULL );
116 return AccessibleImageBulletInterfaceBase::queryInterface(rType);
119 uno::Reference< XAccessibleContext > SAL_CALL AccessibleImageBullet::getAccessibleContext( ) throw (uno::RuntimeException)
121 DBG_CHKTHIS( AccessibleImageBullet, NULL );
123 // We implement the XAccessibleContext interface in the same object
124 return uno::Reference< XAccessibleContext > ( this );
127 sal_Int32 SAL_CALL AccessibleImageBullet::getAccessibleChildCount() throw (uno::RuntimeException)
129 DBG_CHKTHIS( AccessibleImageBullet, NULL );
131 return 0;
134 uno::Reference< XAccessible > SAL_CALL AccessibleImageBullet::getAccessibleChild( sal_Int32 i ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
136 DBG_CHKTHIS( AccessibleImageBullet, NULL );
137 (void)i;
139 throw lang::IndexOutOfBoundsException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No children available")),
140 uno::Reference< uno::XInterface >
141 ( static_cast< ::cppu::OWeakObject* > (this) ) ); // static_cast: disambiguate hierarchy
144 uno::Reference< XAccessible > SAL_CALL AccessibleImageBullet::getAccessibleParent() throw (uno::RuntimeException)
146 DBG_CHKTHIS( AccessibleImageBullet, NULL );
148 return mxParent;
151 sal_Int32 SAL_CALL AccessibleImageBullet::getAccessibleIndexInParent() throw (uno::RuntimeException)
153 DBG_CHKTHIS( AccessibleImageBullet, NULL );
155 return mnIndexInParent;
158 sal_Int16 SAL_CALL AccessibleImageBullet::getAccessibleRole() throw (uno::RuntimeException)
160 DBG_CHKTHIS( AccessibleImageBullet, NULL );
162 return AccessibleRole::GRAPHIC;
165 ::rtl::OUString SAL_CALL AccessibleImageBullet::getAccessibleDescription() throw (uno::RuntimeException)
167 DBG_CHKTHIS( AccessibleImageBullet, NULL );
169 SolarMutexGuard aGuard;
171 // Get the string from the resource for the specified id.
172 return EE_RESSTR(RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION);
175 ::rtl::OUString SAL_CALL AccessibleImageBullet::getAccessibleName() throw (uno::RuntimeException)
177 DBG_CHKTHIS( AccessibleImageBullet, NULL );
179 SolarMutexGuard aGuard;
181 // Get the string from the resource for the specified id.
182 return EE_RESSTR(RID_SVXSTR_A11Y_IMAGEBULLET_NAME);
185 uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleImageBullet::getAccessibleRelationSet() throw (uno::RuntimeException)
187 DBG_CHKTHIS( AccessibleImageBullet, NULL );
189 // no relations, therefore empty
190 return uno::Reference< XAccessibleRelationSet >();
193 uno::Reference< XAccessibleStateSet > SAL_CALL AccessibleImageBullet::getAccessibleStateSet() throw (uno::RuntimeException)
195 DBG_CHKTHIS( AccessibleImageBullet, NULL );
197 SolarMutexGuard aGuard;
199 // Create a copy of the state set and return it.
200 ::utl::AccessibleStateSetHelper* pStateSet = static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
202 if( !pStateSet )
203 return uno::Reference<XAccessibleStateSet>();
205 return uno::Reference<XAccessibleStateSet>( new ::utl::AccessibleStateSetHelper (*pStateSet) );
208 lang::Locale SAL_CALL AccessibleImageBullet::getLocale() throw (IllegalAccessibleComponentStateException, uno::RuntimeException)
210 DBG_CHKTHIS( AccessibleImageBullet, NULL );
212 SolarMutexGuard aGuard;
214 lang::Locale aLocale;
216 DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
217 "AccessibleImageBullet::getLocale: paragraph index value overflow");
219 // return locale of first character in the paragraph
220 return SvxLanguageToLocale(aLocale, GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 ));
223 void SAL_CALL AccessibleImageBullet::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
225 DBG_CHKTHIS( AccessibleImageBullet, NULL );
227 if( getNotifierClientId() != -1 )
228 ::comphelper::AccessibleEventNotifier::addEventListener( getNotifierClientId(), xListener );
231 void SAL_CALL AccessibleImageBullet::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
233 DBG_CHKTHIS( AccessibleImageBullet, NULL );
235 if( getNotifierClientId() != -1 )
236 ::comphelper::AccessibleEventNotifier::removeEventListener( getNotifierClientId(), xListener );
239 sal_Bool SAL_CALL AccessibleImageBullet::containsPoint( const awt::Point& rPoint ) throw (uno::RuntimeException)
241 DBG_CHKTHIS( AccessibleImageBullet, NULL );
243 SolarMutexGuard aGuard;
245 DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
246 "AccessibleEditableTextPara::contains: index value overflow");
248 awt::Rectangle aTmpRect = getBounds();
249 Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) );
250 Point aPoint( rPoint.X, rPoint.Y );
252 return aRect.IsInside( aPoint );
255 uno::Reference< XAccessible > SAL_CALL AccessibleImageBullet::getAccessibleAtPoint( const awt::Point& /*aPoint*/ ) throw (uno::RuntimeException)
257 DBG_CHKTHIS( AccessibleImageBullet, NULL );
259 // as we have no children, empty reference
260 return uno::Reference< XAccessible >();
263 awt::Rectangle SAL_CALL AccessibleImageBullet::getBounds( ) throw (uno::RuntimeException)
265 DBG_CHKTHIS( AccessibleImageBullet, NULL );
267 SolarMutexGuard aGuard;
269 DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
270 "AccessibleEditableTextPara::getBounds: index value overflow");
272 SvxTextForwarder& rCacheTF = GetTextForwarder();
273 EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 > (GetParagraphIndex()) );
274 Rectangle aParentRect = rCacheTF.GetParaBounds( static_cast< sal_uInt16 >( GetParagraphIndex() ) );
276 if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
277 aBulletInfo.bVisible &&
278 aBulletInfo.nType == SVX_NUM_BITMAP )
280 Rectangle aRect = aBulletInfo.aBounds;
282 // subtract paragraph position (bullet pos is absolute in EditEngine/Outliner)
283 aRect.Move( -aParentRect.Left(), -aParentRect.Top() );
285 // convert to screen coordinates
286 Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
287 rCacheTF.GetMapMode(),
288 GetViewForwarder() );
290 // offset from shape/cell
291 Point aOffset = GetEEOffset();
293 return awt::Rectangle( aScreenRect.Left() + aOffset.X(),
294 aScreenRect.Top() + aOffset.Y(),
295 aScreenRect.GetSize().Width(),
296 aScreenRect.GetSize().Height() );
299 return awt::Rectangle();
302 awt::Point SAL_CALL AccessibleImageBullet::getLocation( ) throw (uno::RuntimeException)
304 DBG_CHKTHIS( AccessibleImageBullet, NULL );
306 SolarMutexGuard aGuard;
308 awt::Rectangle aRect = getBounds();
310 return awt::Point( aRect.X, aRect.Y );
313 awt::Point SAL_CALL AccessibleImageBullet::getLocationOnScreen( ) throw (uno::RuntimeException)
315 DBG_CHKTHIS( AccessibleImageBullet, NULL );
317 SolarMutexGuard aGuard;
319 // relate us to parent
320 uno::Reference< XAccessible > xParent = getAccessibleParent();
321 if( xParent.is() )
323 uno::Reference< XAccessibleComponent > xParentComponent( xParent, uno::UNO_QUERY );
324 if( xParentComponent.is() )
326 awt::Point aRefPoint = xParentComponent->getLocationOnScreen();
327 awt::Point aPoint = getLocation();
328 aPoint.X += aRefPoint.X;
329 aPoint.Y += aRefPoint.Y;
331 return aPoint;
335 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot access parent")),
336 uno::Reference< uno::XInterface >
337 ( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
340 awt::Size SAL_CALL AccessibleImageBullet::getSize( ) throw (uno::RuntimeException)
342 DBG_CHKTHIS( AccessibleImageBullet, NULL );
344 SolarMutexGuard aGuard;
346 awt::Rectangle aRect = getBounds();
348 return awt::Size( aRect.Width, aRect.Height );
351 void SAL_CALL AccessibleImageBullet::grabFocus( ) throw (uno::RuntimeException)
353 DBG_CHKTHIS( AccessibleImageBullet, NULL );
355 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not focusable")),
356 uno::Reference< uno::XInterface >
357 ( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
360 sal_Int32 SAL_CALL AccessibleImageBullet::getForeground( ) throw (::com::sun::star::uno::RuntimeException)
362 DBG_CHKTHIS( AccessibleImageBullet, NULL );
364 // #104444# Added to XAccessibleComponent interface
365 svtools::ColorConfig aColorConfig;
366 sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
367 return static_cast<sal_Int32>(nColor);
370 sal_Int32 SAL_CALL AccessibleImageBullet::getBackground( ) throw (::com::sun::star::uno::RuntimeException)
372 DBG_CHKTHIS( AccessibleImageBullet, NULL );
374 // #104444# Added to XAccessibleComponent interface
375 Color aColor( Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor() );
377 // the background is transparent
378 aColor.SetTransparency( 0xFF);
380 return static_cast<sal_Int32>( aColor.GetColor() );
383 ::rtl::OUString SAL_CALL AccessibleImageBullet::getImplementationName (void) throw (uno::RuntimeException)
385 DBG_CHKTHIS( AccessibleImageBullet, NULL );
387 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("AccessibleImageBullet"));
390 sal_Bool SAL_CALL AccessibleImageBullet::supportsService (const ::rtl::OUString& sServiceName) throw (uno::RuntimeException)
392 DBG_CHKTHIS( AccessibleImageBullet, NULL );
394 // Iterate over all supported service names and return true if on of them
395 // matches the given name.
396 uno::Sequence< ::rtl::OUString> aSupportedServices (
397 getSupportedServiceNames ());
398 for (int i=0; i<aSupportedServices.getLength(); i++)
399 if (sServiceName == aSupportedServices[i])
400 return sal_True;
401 return sal_False;
404 uno::Sequence< ::rtl::OUString> SAL_CALL AccessibleImageBullet::getSupportedServiceNames (void) throw (uno::RuntimeException)
406 DBG_CHKTHIS( AccessibleImageBullet, NULL );
408 const ::rtl::OUString sServiceName (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.accessibility.AccessibleContext"));
409 return uno::Sequence< ::rtl::OUString > (&sServiceName, 1);
412 ::rtl::OUString SAL_CALL AccessibleImageBullet::getServiceName (void) throw (uno::RuntimeException)
414 DBG_CHKTHIS( AccessibleImageBullet, NULL );
416 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.AccessibleContext"));
419 void AccessibleImageBullet::SetIndexInParent( sal_Int32 nIndex )
421 DBG_CHKTHIS( AccessibleImageBullet, NULL );
423 mnIndexInParent = nIndex;
426 void AccessibleImageBullet::SetEEOffset( const Point& rOffset )
428 DBG_CHKTHIS( AccessibleImageBullet, NULL );
430 maEEOffset = rOffset;
433 void AccessibleImageBullet::Dispose()
435 DBG_CHKTHIS( AccessibleImageBullet, NULL );
437 int nClientId( getNotifierClientId() );
439 // #108212# drop all references before notifying dispose
440 mxParent = NULL;
441 mnNotifierClientId = -1;
442 mpEditSource = NULL;
444 // notify listeners
445 if( nClientId != -1 )
449 uno::Reference < XAccessibleContext > xThis = getAccessibleContext();
451 // #106234# Delegate to EventNotifier
452 ::comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing( nClientId, xThis );
453 #ifdef DBG_UTIL
454 OSL_TRACE( "AccessibleImageBullet disposed ID: %d", nClientId );
455 #endif
457 catch( const uno::Exception& ) {}
461 void AccessibleImageBullet::SetEditSource( SvxEditSource* pEditSource )
463 DBG_CHKTHIS( AccessibleImageBullet, NULL );
465 mpEditSource = pEditSource;
467 if( !mpEditSource )
469 // going defunc
470 UnSetState( AccessibleStateType::SHOWING );
471 UnSetState( AccessibleStateType::VISIBLE );
472 SetState( AccessibleStateType::INVALID );
473 SetState( AccessibleStateType::DEFUNC );
475 Dispose();
479 void AccessibleImageBullet::FireEvent(const sal_Int16 nEventId, const uno::Any& rNewValue, const uno::Any& rOldValue ) const
481 DBG_CHKTHIS( AccessibleImageBullet, NULL );
483 uno::Reference < XAccessibleContext > xThis( const_cast< AccessibleImageBullet* > (this)->getAccessibleContext() );
485 AccessibleEventObject aEvent(xThis, nEventId, rNewValue, rOldValue);
487 // #106234# Delegate to EventNotifier
488 ::comphelper::AccessibleEventNotifier::addEvent( getNotifierClientId(),
489 aEvent );
492 void AccessibleImageBullet::GotPropertyEvent( const uno::Any& rNewValue, const sal_Int16 nEventId ) const
494 DBG_CHKTHIS( AccessibleImageBullet, NULL );
496 FireEvent( nEventId, rNewValue );
499 void AccessibleImageBullet::LostPropertyEvent( const uno::Any& rOldValue, const sal_Int16 nEventId ) const
501 DBG_CHKTHIS( AccessibleImageBullet, NULL );
503 FireEvent( nEventId, uno::Any(), rOldValue );
506 void AccessibleImageBullet::SetState( const sal_Int16 nStateId )
508 DBG_CHKTHIS( AccessibleImageBullet, NULL );
510 ::utl::AccessibleStateSetHelper* pStateSet = static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
511 if( pStateSet != NULL &&
512 !pStateSet->contains(nStateId) )
514 pStateSet->AddState( nStateId );
515 GotPropertyEvent( uno::makeAny( nStateId ), AccessibleEventId::STATE_CHANGED );
519 void AccessibleImageBullet::UnSetState( const sal_Int16 nStateId )
521 DBG_CHKTHIS( AccessibleImageBullet, NULL );
523 ::utl::AccessibleStateSetHelper* pStateSet = static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
524 if( pStateSet != NULL &&
525 pStateSet->contains(nStateId) )
527 pStateSet->RemoveState( nStateId );
528 LostPropertyEvent( uno::makeAny( nStateId ), AccessibleEventId::STATE_CHANGED );
532 int AccessibleImageBullet::getNotifierClientId() const
534 DBG_CHKTHIS( AccessibleImageBullet, NULL );
536 return mnNotifierClientId;
539 void AccessibleImageBullet::SetParagraphIndex( sal_Int32 nIndex )
541 DBG_CHKTHIS( AccessibleImageBullet, NULL );
543 uno::Any aOldDesc;
544 uno::Any aOldName;
548 aOldDesc <<= getAccessibleDescription();
549 aOldName <<= getAccessibleName();
551 catch( const uno::Exception& ) {} // optional behaviour
553 sal_Int32 nOldIndex = mnParagraphIndex;
555 mnParagraphIndex = nIndex;
559 if( nOldIndex != nIndex )
561 // index and therefore description changed
562 FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::makeAny( getAccessibleDescription() ), aOldDesc );
563 FireEvent( AccessibleEventId::NAME_CHANGED, uno::makeAny( getAccessibleName() ), aOldName );
566 catch( const uno::Exception& ) {} // optional behaviour
569 sal_Int32 AccessibleImageBullet::GetParagraphIndex() const SAL_THROW((uno::RuntimeException))
571 DBG_CHKTHIS( AccessibleImageBullet, NULL );
573 return mnParagraphIndex;
576 SvxEditSource& AccessibleImageBullet::GetEditSource() const SAL_THROW((uno::RuntimeException))
578 DBG_CHKTHIS( AccessibleImageBullet, NULL );
580 if( mpEditSource )
581 return *mpEditSource;
582 else
583 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No edit source, object is defunct")),
584 uno::Reference< uno::XInterface >
585 ( static_cast< ::cppu::OWeakObject* >
586 ( const_cast< AccessibleImageBullet* > (this) ) ) ); // disambiguate hierarchy
589 SvxTextForwarder& AccessibleImageBullet::GetTextForwarder() const SAL_THROW((uno::RuntimeException))
591 DBG_CHKTHIS( AccessibleImageBullet, NULL );
593 SvxEditSource& rEditSource = GetEditSource();
594 SvxTextForwarder* pTextForwarder = rEditSource.GetTextForwarder();
596 if( !pTextForwarder )
597 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to fetch text forwarder, object is defunct")),
598 uno::Reference< uno::XInterface >
599 ( static_cast< ::cppu::OWeakObject* >
600 ( const_cast< AccessibleImageBullet* > (this) ) ) ); // disambiguate hierarchy
602 if( pTextForwarder->IsValid() )
603 return *pTextForwarder;
604 else
605 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text forwarder is invalid, object is defunct")),
606 uno::Reference< uno::XInterface >
607 ( static_cast< ::cppu::OWeakObject* >
608 ( const_cast< AccessibleImageBullet* > (this) ) ) ); // disambiguate hierarchy
611 SvxViewForwarder& AccessibleImageBullet::GetViewForwarder() const SAL_THROW((uno::RuntimeException))
613 DBG_CHKTHIS( AccessibleImageBullet, NULL );
615 SvxEditSource& rEditSource = GetEditSource();
616 SvxViewForwarder* pViewForwarder = rEditSource.GetViewForwarder();
618 if( !pViewForwarder )
620 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to fetch view forwarder, object is defunct")),
621 uno::Reference< uno::XInterface >
622 ( static_cast< ::cppu::OWeakObject* >
623 ( const_cast< AccessibleImageBullet* > (this) ) ) ); // disambiguate hierarchy
626 if( pViewForwarder->IsValid() )
627 return *pViewForwarder;
628 else
629 throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("View forwarder is invalid, object is defunct")),
630 uno::Reference< uno::XInterface >
631 ( static_cast< ::cppu::OWeakObject* >
632 ( const_cast< AccessibleImageBullet* > (this) ) ) ); // disambiguate hierarchy
635 const Point& AccessibleImageBullet::GetEEOffset() const
637 DBG_CHKTHIS( AccessibleImageBullet, NULL );
639 return maEEOffset;
642 } // end of namespace accessibility
644 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */