From cd0de0c77d28c5421938cd83ee8b88465a3640f5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 27 Nov 2013 13:07:25 +0000 Subject: restore GetChild, etc. we will need them again Change-Id: Ic6da34e58975d85c84ded96fa90873558589f54a --- svx/source/accessibility/AccessibleShapeTreeInfo.cxx | 9 +++++++++ svx/source/accessibility/ChildrenManagerImpl.cxx | 16 ++++++++++++++++ svx/source/accessibility/ChildrenManagerImpl.hxx | 18 ++++++++++++++++++ .../accessibility/svxrectctaccessiblecontext.cxx | 6 ++++++ svx/source/dialog/dlgctrl.cxx | 7 +++++++ svx/source/inc/svxrectctaccessiblecontext.hxx | 3 +++ 6 files changed, 59 insertions(+) (limited to 'svx/source') diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx index 4526f48e0bb6..1e98cd553b76 100644 --- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx +++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx @@ -86,6 +86,15 @@ void AccessibleShapeTreeInfo::SetDocumentWindow ( +uno::Reference + AccessibleShapeTreeInfo::GetDocumentWindow (void) const +{ + return mxDocumentWindow; +} + + + + void AccessibleShapeTreeInfo::SetControllerBroadcaster ( const uno::Reference& rxControllerBroadcaster) { diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 04ae222f1fb0..6c8bc854d26f 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -188,6 +188,22 @@ uno::Reference +uno::Reference + ChildrenManagerImpl::GetChild (const uno::Reference& xShape) + throw (uno::RuntimeException) +{ + ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end(); + for (I = maVisibleChildren.begin(); I != aEnd; ++I) + { + if ( I->mxShape.get() == xShape.get() ) + return I->mxAccessibleShape; + } + return uno::Reference (); +} + + + + /** Find all shapes among the specified shapes that lie fully or partially inside the visible area. Put those shapes into the cleared cache. The corresponding accessible objects will be created on demand. diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index 23a8901deffd..fcc9d7b3c6ed 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -158,6 +158,24 @@ public: GetChild (ChildDescriptor& aChildDescriptor,sal_Int32 _nIndex) throw (::com::sun::star::uno::RuntimeException); + /** Return the requested accessible child given a shape. This method + searches the list of descriptors for the one that holds the + association of the given shape to the requested accessible object + and returns that. If no such descriptor is found that is + interpreted so that the specified shape is not visible at the moment. + @param xShape + The shape for which to return the associated accessible object. + @return + Returns a reference to the requested accessible child. The + reference is empty if there is no shape descriptor that + associates the shape with an accessible object. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible> + GetChild (const ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape>& xShape) + throw (::com::sun::star::uno::RuntimeException); + /** Update the child manager. Take care of a modified set of children and modified visible area. This method can optimize the update process with respect separate updates of a modified children list diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index d6864f716c6a..cda769a039d8 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -706,6 +706,12 @@ void SvxRectCtlAccessibleContext::selectChild(RECT_POINT eButton, sal_Bool bFire selectChild(PointToIndex( eButton, mbAngleMode ), bFireFocus); } +void SvxRectCtlAccessibleContext::CommitChange( const AccessibleEventObject& rEvent ) +{ + if (mnClientId) + comphelper::AccessibleEventNotifier::addEvent( mnClientId, rEvent ); +} + void SAL_CALL SvxRectCtlAccessibleContext::disposing() { if( !rBHelper.bDisposed ) diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 9224c992f65c..9927004396cc 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1123,6 +1123,13 @@ void SvxPixelCtl::SetXBitmap( const BitmapEx& rBitmapEx ) } } +// Returns a specific pixel + +sal_uInt16 SvxPixelCtl::GetBitmapPixel( const sal_uInt16 nPixel ) +{ + return( *( pPixel + nPixel ) ); +} + // Resets to the original state of the control void SvxPixelCtl::Reset() diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 3170a0c8dddd..7357b1c0f4bc 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -267,6 +267,9 @@ protected: /// @Return the object's current bounding box relative to the parent object. virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException ); + /// Calls all Listener to tell they the change. + void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent ); + virtual void SAL_CALL disposing(); /// @returns true if it's disposed or in disposing -- cgit v1.2.3