[Libreoffice-commits] core.git: 3 commits - include/svx offapi/com offapi/UnoApi_offapi.mk svx/Library_svx.mk svx/source

Steve Yin steve_y at apache.org
Wed Nov 27 07:39:27 PST 2013


 include/svx/AccessibleControlShape.hxx                              |    2 
 include/svx/AccessibleGraphicShape.hxx                              |    3 
 include/svx/AccessibleOLEShape.hxx                                  |    3 
 include/svx/AccessibleShape.hxx                                     |   94 
 include/svx/AccessibleShapeTreeInfo.hxx                             |    6 
 include/svx/AccessibleSvxFindReplaceDialog.hxx                      |   55 
 include/svx/AccessibleTableShape.hxx                                |  120 +
 include/svx/ChildrenManager.hxx                                     |    3 
 include/svx/EnhancedCustomShapeTypeNames.hxx                        |    1 
 include/svx/IAccessibleParent.hxx                                   |   12 
 include/svx/dlgctrl.hxx                                             |   23 
 include/svx/nbdtmg.hxx                                              |    4 
 include/svx/sdr/table/tablecontroller.hxx                           |   12 
 include/svx/srchdlg.hxx                                             |   10 
 include/svx/svdmodel.hxx                                            |    4 
 include/svx/svdmrkv.hxx                                             |    1 
 include/svx/svdoashp.hxx                                            |    2 
 include/svx/svdobj.hxx                                              |    2 
 include/svx/svdoole2.hxx                                            |    1 
 offapi/UnoApi_offapi.mk                                             |    1 
 offapi/com/sun/star/accessibility/AccessibleEventId.idl             |    2 
 offapi/com/sun/star/accessibility/MSAAService.idl                   |   35 
 offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl |   39 
 offapi/com/sun/star/accessibility/XAccessibleGetAccFlowTo.idl       |   38 
 offapi/com/sun/star/accessibility/XAccessibleGroupPosition.idl      |   39 
 offapi/com/sun/star/accessibility/XAccessibleTableSelection.idl     |   39 
 offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl      |   45 
 offapi/com/sun/star/accessibility/XMSAAService.idl                  |   36 
 svx/Library_svx.mk                                                  |    2 
 svx/source/accessibility/AccessibleControlShape.cxx                 |   78 
 svx/source/accessibility/AccessibleFrameSelector.cxx                |   17 
 svx/source/accessibility/AccessibleGraphicShape.cxx                 |   29 
 svx/source/accessibility/AccessibleOLEShape.cxx                     |   19 
 svx/source/accessibility/AccessibleShape.cxx                        |  606 +++++
 svx/source/accessibility/AccessibleShapeTreeInfo.cxx                |    9 
 svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx         |   96 
 svx/source/accessibility/AccessibleTextHelper.cxx                   |  110 -
 svx/source/accessibility/ChildrenManager.cxx                        |   14 
 svx/source/accessibility/ChildrenManagerImpl.cxx                    |  166 +
 svx/source/accessibility/ChildrenManagerImpl.hxx                    |   31 
 svx/source/accessibility/ShapeTypeHandler.cxx                       |   36 
 svx/source/accessibility/charmapacc.cxx                             |   47 
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx           | 1043 ++++++++++
 svx/source/accessibility/svxrectctaccessiblecontext.cxx             |  164 +
 svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx            |  249 ++
 svx/source/dialog/_bmpmask.cxx                                      |   73 
 svx/source/dialog/charmap.cxx                                       |   16 
 svx/source/dialog/dlgctrl.cxx                                       |  240 ++
 svx/source/dialog/frmsel.cxx                                        |   57 
 svx/source/dialog/srchdlg.cxx                                       |   20 
 svx/source/inc/AccessibleFrameSelector.hxx                          |    5 
 svx/source/inc/svxpixelctlaccessiblecontext.hxx                     |  304 ++
 svx/source/inc/svxrectctaccessiblecontext.hxx                       |   26 
 svx/source/sidebar/nbdtmg.cxx                                       |    2 
 svx/source/svdraw/svdoashp.cxx                                      |   16 
 svx/source/svdraw/svdobj.cxx                                        |    5 
 svx/source/svdraw/svdoole2.cxx                                      |   12 
 svx/source/table/accessiblecell.cxx                                 |  109 +
 svx/source/table/accessiblecell.hxx                                 |    8 
 svx/source/table/accessibletableshape.cxx                           |  716 ++++++
 svx/source/table/tablecontroller.cxx                                |   89 
 svx/source/unodraw/unoprov.cxx                                      |    1 
 svx/source/unodraw/unoshtxt.cxx                                     |   25 
 63 files changed, 4699 insertions(+), 373 deletions(-)

New commits:
commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366
Author: Steve Yin <steve_y at apache.org>
Date:   Wed Nov 27 13:03:45 2013 +0000

    Integrate branch of IAccessible2
    
    Change-Id: I8327fb4ba2a86d4caa52b875221175b80464842a

diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx
index c84391b..3f901e1 100644
--- a/include/svx/AccessibleControlShape.hxx
+++ b/include/svx/AccessibleControlShape.hxx
@@ -59,6 +59,8 @@ public:
         const AccessibleShapeTreeInfo& rShapeTreeInfo);
     virtual ~AccessibleControlShape( );
 
+    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL  GetControlModel( ) { return m_xControlModel;} ;
+    AccessibleControlShape* SAL_CALL GetLabeledByControlShape();
 protected:
     //---  XAccessible  ----------------------------------------
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/include/svx/AccessibleGraphicShape.hxx b/include/svx/AccessibleGraphicShape.hxx
index b558baa..6347c75 100644
--- a/include/svx/AccessibleGraphicShape.hxx
+++ b/include/svx/AccessibleGraphicShape.hxx
@@ -85,7 +85,8 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
         getTypes (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+/// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
 protected:
     /// Create a name string that contains the accessible name.
     virtual OUString
diff --git a/include/svx/AccessibleOLEShape.hxx b/include/svx/AccessibleOLEShape.hxx
index 18b6ed2..ce213bb 100644
--- a/include/svx/AccessibleOLEShape.hxx
+++ b/include/svx/AccessibleOLEShape.hxx
@@ -91,7 +91,8 @@ public:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL
         getTypes (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+// ====== XAccessibleExtendedAttributes =====================================
+    virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes() throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
 protected:
     /// Create a name string that contains the accessible name.
     virtual OUString
diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx
index 56a36d5..a684887 100644
--- a/include/svx/AccessibleShape.hxx
+++ b/include/svx/AccessibleShape.hxx
@@ -28,6 +28,12 @@
 #include <com/sun/star/accessibility/XAccessible.hpp>
 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -70,6 +76,10 @@ class IAccessibleParent;
 class SVX_DLLPUBLIC AccessibleShape
     :   public AccessibleContextBase,
         public AccessibleComponentBase,
+        public ::com::sun::star::accessibility::XAccessibleSelection,
+        public ::com::sun::star::accessibility::XAccessibleExtendedAttributes,
+        public ::com::sun::star::accessibility::XAccessibleGroupPosition,
+        public com::sun::star::accessibility::XAccessibleHypertext,
         public IAccessibleViewForwarderListener,
         public ::com::sun::star::document::XEventListener,
         public ::com::sun::star::lang::XUnoTunnel
@@ -95,7 +105,54 @@ public:
     AccessibleShape (
         const AccessibleShapeInfo& rShapeInfo,
         const AccessibleShapeTreeInfo& rShapeTreeInfo);
-
+    AccessibleShape (
+        const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape, const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent, const AccessibleShapeTreeInfo& rShapeTreeInfo, sal_Int32 nIndex = -1);
+     //Solution: Overwrite the object's current name.
+    virtual OUString SAL_CALL    getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL    getAccessibleDescription() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL getAccessibleRelationSet (void) throw (::com::sun::star::uno::RuntimeException);
+//=====  XAccessibleSelection  ============================================
+
+    virtual void SAL_CALL selectAccessibleChild(
+        sal_Int32 nChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    virtual sal_Bool SAL_CALL isAccessibleChildSelected(
+        sal_Int32 nChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    virtual void SAL_CALL clearAccessibleSelection(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual void SAL_CALL selectAllAccessibleChildren(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  )
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(
+        sal_Int32 nSelectedChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL deselectAccessibleChild(
+        sal_Int32 nSelectedChildIndex )
+        throw ( ::com::sun::star::lang::IndexOutOfBoundsException,
+        ::com::sun::star::uno::RuntimeException );
+
+    // ====== XAccessibleExtendedAttributes =====================================
+    virtual ::com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+    throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    /// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole (void) throw (::com::sun::star::uno::RuntimeException);
+    //=====  XAccessibleGroupPosition  =========================================
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+        getGroupPosition( const ::com::sun::star::uno::Any& rAny )
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getObjectLink( const ::com::sun::star::uno::Any& accoject )
+        throw (::com::sun::star::uno::RuntimeException);
     /** The destructor releases its children manager and text engine if
         still existent.  These are responsible to send appropriate events.
     */
@@ -301,6 +358,32 @@ public:
     static AccessibleShape*                                     getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw();
     sal_Int64                                                   SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
 
+    //===== XAccessibleHypertext ========================================================
+    virtual sal_Int32 SAL_CALL getHyperLinkCount()  throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink >
+        SAL_CALL getHyperLink( sal_Int32 nLinkIndex )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getHyperLinkIndex( sal_Int32 nCharIndex )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    //=====  XAccesibleText  ==================================================
+        virtual sal_Int32 SAL_CALL getCaretPosition(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);//Shen Zhen Jie changed sal_Unicode to sal_uInt32; change back to sal_Unicode
+        virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getCharacterCount(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getSelectedText(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getSelectionStart(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Int32 SAL_CALL getSelectionEnd(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getText(  ) throw (::com::sun::star::uno::RuntimeException);
+        virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+        virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
     //===== Misc ========================================================
 
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
@@ -367,7 +450,12 @@ protected:
     virtual OUString
         CreateAccessibleDescription (void)
         throw (::com::sun::star::uno::RuntimeException);
-
+    virtual OUString
+       GetFullAccessibleName(AccessibleShape *shape)
+       throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString GetStyle();
+    void UpdateDocumentAllSelState(::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessibleStateSet > &xStateSet);
     /** Update the <const>OPAQUE</const> and <const>SELECTED</const> state.
     */
     virtual void UpdateStates (void);
@@ -381,6 +469,8 @@ private:
     SVX_DLLPRIVATE explicit AccessibleShape (const AccessibleShape&);
     /// Don't use the assignment operator.  Do we need this?
     SVX_DLLPRIVATE AccessibleShape& operator= (const AccessibleShape&);
+    //Old accessible name
+    OUString aAccName;
 
     /** Call this method when the title, name, or description of the mxShape
         member (may) have been changed.
diff --git a/include/svx/AccessibleSvxFindReplaceDialog.hxx b/include/svx/AccessibleSvxFindReplaceDialog.hxx
new file mode 100644
index 0000000..5c82f57
--- /dev/null
+++ b/include/svx/AccessibleSvxFindReplaceDialog.hxx
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#define _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <toolkit/awt/vclxwindows.hxx>
+
+
+class VCLXAccessibleSvxFindReplaceDialog : public VCLXAccessibleComponent
+{
+public:
+    VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow);
+    virtual ~VCLXAccessibleSvxFindReplaceDialog();
+    virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet );
+    // XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+class VCLXSvxFindReplaceDialog : public VCLXDialog
+{
+public:
+    VCLXSvxFindReplaceDialog(Window* pSplDlg)
+    {
+        SetWindow(pSplDlg);
+    }
+    virtual ~VCLXSvxFindReplaceDialog()
+    {};
+private:
+    virtual ::com::sun::star::uno::Reference<
+        ::com::sun::star::accessibility::XAccessibleContext >  CreateAccessibleContext()
+    {
+        return new VCLXAccessibleSvxFindReplaceDialog(this);
+    }
+};
+#endif // _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
diff --git a/include/svx/AccessibleTableShape.hxx b/include/svx/AccessibleTableShape.hxx
index e3d3484..a9309ef 100644
--- a/include/svx/AccessibleTableShape.hxx
+++ b/include/svx/AccessibleTableShape.hxx
@@ -30,6 +30,9 @@
 #include <cppuhelper/implbase2.hxx>
 
 #include <svx/AccessibleShape.hxx>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/accessibility/XAccessibleTableSelection.hpp>
+#include <cppuhelper/compbase5.hxx>
 
 #include <boost/noncopyable.hpp>
 
@@ -40,14 +43,15 @@ namespace sdr { namespace table {
 namespace accessibility
 {
     class AccessibleTableShapeImpl;
+    class AccessibleCell;
 
     typedef ::cppu::ImplInheritanceHelper2< AccessibleShape,
-                                            ::com::sun::star::accessibility::XAccessibleSelection,
-                                            ::com::sun::star::accessibility::XAccessibleTable
+                                            ::com::sun::star::accessibility::XAccessibleTable,
+                                            ::com::sun::star::view::XSelectionChangeListener
                                           > AccessibleTableShape_Base;
 /** @descr
 */
-class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base
+class AccessibleTableShape : boost::noncopyable, public AccessibleTableShape_Base, public ::com::sun::star::accessibility::XAccessibleTableSelection
 {
 public:
     AccessibleTableShape( const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo );
@@ -98,6 +102,15 @@ public:
     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  ) throw ( ::com::sun::star::uno::RuntimeException );
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex )  throw ( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+    //=====  XAccessibleTableSelection ============================================
+    virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
@@ -105,7 +118,26 @@ public:
     // XComponent
     virtual void SAL_CALL disposing( );
 
+    // XSelectionChangeListener
+    virtual void SAL_CALL
+        disposing (const ::com::sun::star::lang::EventObject& Source)
+        throw (::com::sun::star::uno::RuntimeException);
+    virtual void  SAL_CALL
+        selectionChanged (const ::com::sun::star::lang::EventObject& rEvent)
+        throw (::com::sun::star::uno::RuntimeException);
+    sal_Int32 mnPreviousSelectionCount;
     using AccessibleShape::disposing;
+    friend class AccessibleTableHeaderShape;
+
+    void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
+    // overwrite the SetState & ResetState to do special operation for table cell's internal text
+    virtual sal_Bool SetState (sal_Int16 aState);
+    virtual sal_Bool ResetState (sal_Int16 aState);
+    // The following two methods are used to set state directly on table object, instread of the internal cell or paragraph.
+    sal_Bool SetStateDirectly (sal_Int16 aState);
+    sal_Bool ResetStateDirectly (sal_Int16 aState);
+    // Get the currently active cell which is text editing
+    AccessibleCell* GetActiveAccessibleCell();
 
 protected:
     virtual OUString CreateAccessibleBaseName(void) throw (::com::sun::star::uno::RuntimeException);
@@ -113,10 +145,90 @@ protected:
     sdr::table::SvxTableController* getTableController();
 
     void checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) throw ( ::com::sun::star::lang::IndexOutOfBoundsException );
-    void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
 
 private:
     rtl::Reference< AccessibleTableShapeImpl > mxImpl;
+    sal_Int32 GetIndexOfSelectedChild( sal_Int32 nSelectedChildIndex ) const;
+};
+
+typedef ::cppu::WeakImplHelper5<
+            ::com::sun::star::accessibility::XAccessible,
+            ::com::sun::star::accessibility::XAccessibleComponent,
+            ::com::sun::star::accessibility::XAccessibleContext,
+            ::com::sun::star::accessibility::XAccessibleTable,
+            ::com::sun::star::accessibility::XAccessibleTableSelection >
+            AccessibleTableHeaderShape_BASE;
+
+class AccessibleTableHeaderShape : boost::noncopyable,
+    public MutexOwner,
+    public AccessibleTableHeaderShape_BASE
+{
+public:
+    // bRow, sal_True means rowheader, sal_False means columnheader
+    AccessibleTableHeaderShape( AccessibleTableShape* pTable, sal_Bool bRow );
+    virtual ~AccessibleTableHeaderShape();
+
+    // XAccessible
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext( ) throw(::com::sun::star::uno::RuntimeException);
+
+    // XAccessibleContext
+    virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleDescription(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::lang::Locale SAL_CALL getLocale(  ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException);
+
+    //XAccessibleComponent
+    virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocation(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::awt::Size SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getForeground(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getBackground(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL grabFocus(  ) throw (::com::sun::star::uno::RuntimeException);
+
+    // XAccessibleTable
+    virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumnCount(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleCaption(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleSummary(  ) throw (::com::sun::star::uno::RuntimeException);
+    virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+    //=====  XAccessibleTableSelection  ============================================
+    virtual sal_Bool SAL_CALL selectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL selectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+    virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column )
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+private:
+    SVX_DLLPRIVATE explicit AccessibleTableHeaderShape( const ::com::sun::star::uno::Reference<
+            ::com::sun::star::accessibility::XAccessible>& rxParent );
+    sal_Bool mbRow;
+    rtl::Reference< AccessibleTableShape > mpTable;
 };
 
 } // end of namespace accessibility
diff --git a/include/svx/ChildrenManager.hxx b/include/svx/ChildrenManager.hxx
index 8de19aa..c2e6df8 100644
--- a/include/svx/ChildrenManager.hxx
+++ b/include/svx/ChildrenManager.hxx
@@ -126,6 +126,8 @@ public:
         GetChild (long nIndex)
         throw (::com::sun::star::uno::RuntimeException,
                ::com::sun::star::lang::IndexOutOfBoundsException);
+        ::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);
+        ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape> GetChildShape (long nIndex) 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
@@ -189,7 +191,6 @@ public:
     */
     void RemoveFocus (void);
 
-    //=====  IAccessibleViewForwarderListener  ================================
     virtual void ViewForwarderChanged (ChangeType aChangeType,
         const IAccessibleViewForwarder* pViewForwarder);
 
diff --git a/include/svx/EnhancedCustomShapeTypeNames.hxx b/include/svx/EnhancedCustomShapeTypeNames.hxx
index 82ebe96..b91e1eb 100644
--- a/include/svx/EnhancedCustomShapeTypeNames.hxx
+++ b/include/svx/EnhancedCustomShapeTypeNames.hxx
@@ -26,6 +26,7 @@ namespace EnhancedCustomShapeTypeNames
 {
     SVX_DLLPUBLIC MSO_SPT Get( const OUString& );
     SVX_DLLPUBLIC OUString Get( const MSO_SPT );
+    SVX_DLLPUBLIC OUString GetAccName( const OUString& );
 }
 
 #endif
diff --git a/include/svx/IAccessibleParent.hxx b/include/svx/IAccessibleParent.hxx
index f50d024..23e2aa5 100644
--- a/include/svx/IAccessibleParent.hxx
+++ b/include/svx/IAccessibleParent.hxx
@@ -23,7 +23,7 @@
 #include <com/sun/star/uno/RuntimeException.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <sal/types.h>
-
+#include "AccessibleControlShape.hxx"
 namespace accessibility {
 
 class AccessibleShape;
@@ -80,6 +80,16 @@ public:
         const long _nIndex,
         const AccessibleShapeTreeInfo& _rShapeTreeInfo
     )   throw (::com::sun::star::uno::RuntimeException) = 0;
+    //Add this method to support Form Controls
+    virtual AccessibleControlShape* GetAccControlShapeFromModel
+        (::com::sun::star::beans::XPropertySet*)
+        throw (::com::sun::star::uno::RuntimeException){return NULL;};
+    virtual  ::com::sun::star::uno::Reference<
+            ::com::sun::star::accessibility::XAccessible>
+        GetAccessibleCaption (const ::com::sun::star::uno::Reference<
+            ::com::sun::star::drawing::XShape>&)
+            throw (::com::sun::star::uno::RuntimeException){return NULL;};
+    virtual sal_Bool IsDocumentSelAll(){ return sal_False; }
 };
 
 } // end of namespace accessibility
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 829400f..882da38 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -63,6 +63,7 @@ typedef sal_uInt16 CTL_STATE;
 #define CS_NOVERT   2       // no vertikal input information is used
 
 class SvxRectCtlAccessibleContext;
+class SvxPixelCtlAccessible;
 
 class SVX_DLLPUBLIC SvxRectCtl : public Control
 {
@@ -175,7 +176,9 @@ protected:
     Size        aRectSize;
     sal_uInt16*     pPixel;
     sal_Bool        bPaintable;
-
+    //Add member identifying position
+    Point       aFocusPosition;
+    Rectangle   implCalFocusRect( const Point& aPosition );
     void    ChangePixel( sal_uInt16 nPixel );
 
 public:
@@ -203,6 +206,23 @@ public:
 
     void    SetPaintable( sal_Bool bTmp ) { bPaintable = bTmp; }
     void    Reset();
+    SvxPixelCtlAccessible*  m_pAccess;
+    ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >        m_xAccess;
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+    long GetSquares() const { return nSquares ; }
+    long GetWidth() const { return aRectSize.getWidth() ; }
+    long GetHeight() const { return aRectSize.getHeight() ; }
+
+    //Device Pixel .
+    long ShowPosition( const Point &pt);
+
+    long PointToIndex(const Point &pt) const;
+    Point IndexToPoint(long nIndex) const ;
+    long GetFoucsPosIndex() const ;
+    //Keyboard function for key input and focus handling function
+    virtual void        KeyInput( const KeyEvent& rKEvt );
+    virtual void        GetFocus();
+    virtual void        LoseFocus();
 };
 
 /************************************************************************/
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index b780495..bad5c14 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -185,7 +185,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
     private:
         const SfxItemSet*   pSet;
         SfxMapUnit      eCoreUnit;
-        //Sym3_2508    store the attributes passed from pSet
+        // store the attributes passed from pSet
         OUString        aNumCharFmtName;
         void            StoreBulCharFmtName_impl();
         void            StoreMapUnit_impl();
@@ -222,7 +222,7 @@ class SVX_DLLPUBLIC NBOTypeMgrBase
         virtual sal_Bool IsCustomized(sal_uInt16 nIndex)=0;
         sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel);
         const SfxItemSet* GetItems() { return pSet;}
-        //Sym3_2508    store the attributes passed from pSet
+        // store the attributes passed from pSet
         void SetItems(const SfxItemSet* pArg) { pSet = pArg;StoreBulCharFmtName_impl();StoreMapUnit_impl();}
     protected:
         OUString GetBulCharFmtName();
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index af613d8..908c531 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -28,7 +28,6 @@
 #include <svx/selectioncontroller.hxx>
 #include <svx/svdotable.hxx>
 #include <svx/svdview.hxx>
-//#include <tablemodel.hxx>
 
 class SdrObjEditView;
 class SdrObject;
@@ -102,6 +101,17 @@ public:
 
     SVX_DLLPRIVATE void onTableModified();
 
+    sal_Bool selectRow( sal_Int32 row );
+    sal_Bool selectColumn( sal_Int32 column );
+    sal_Bool deselectRow( sal_Int32 row );
+    sal_Bool deselectColumn( sal_Int32 column );
+    sal_Bool isRowSelected( sal_Int32 nRow );
+    sal_Bool isColumnSelected( sal_Int32 nColumn );
+    sal_Bool isRowHeader();
+    sal_Bool isColumnHeader();
+    ::sdr::table::SdrTableObj* GetTableObj() { return dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); }
+    //declare event notification method
+    void NotifySelection( const CellPos& firstPos, const CellPos& lastPos, const CellPos& newPos );
 private:
     SvxTableController(SvxTableController &); // not defined
     void operator =(SvxTableController &); // not defined
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 8797115..316a977 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -130,9 +130,19 @@ public:
 
     sal_Int32       GetTransliterationFlags() const;
 
+    void SetDocWin( Window* pDocWin ) { mpDocWin = pDocWin; }
+    Window* GetDocWin() { return mpDocWin; }
+    void SetSrchFlag( sal_Bool bSuccess = sal_False ) { mbSuccess = bSuccess; }
+    sal_Bool GetSrchFlag() { return mbSuccess; }
+    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+        GetComponentInterface( sal_Bool bCreate );
+
     void            SetSaveToModule(bool b);
 
 private:
+    Window*         mpDocWin;
+    sal_Bool        mbSuccess;
+
     VclFrame*       m_pSearchFrame;
     ComboBox*       m_pSearchLB;
     ListBox*        m_pSearchTmplLB;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index c2fbacf..81df0c4 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -75,6 +75,7 @@ class SotStorage;
 class SdrOutlinerCache;
 class SotStorageRef;
 class SdrUndoFactory;
+class ImageMap;
 namespace comphelper
 {
     class IEmbeddedHelper;
@@ -665,6 +666,9 @@ public:
 
     static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId();
 
+    virtual ImageMap* GetImageMapForObject(SdrObject*){return NULL;};
+    virtual sal_Int32 GetHyperlinkCount(SdrObject*){return 0;}
+
     /** enables (true) or disables (false) recording of undo actions
         If undo actions are added while undo is disabled, they are deleted.
         Disabling undo does not clear the current undo buffer! */
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 55eb579..d3efe66 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -456,6 +456,7 @@ public:
     // End point of the axis of reflextion
     const Point& GetRef2() const { return aRef1; }
     void SetRef2(const Point& rPt);
+    void UnmarkObj(SdrObject* pObj);
 };
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 414ce15..ac78bc5 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -256,6 +256,8 @@ public:
     static bool doConstructOrthogonal(const OUString& rName);
 
     using SdrTextObj::NbcSetOutlinerParaObject;
+
+    OUString GetCustomShapeName();
 };
 
 #endif // INCLUDED_SVX_SVDOASHP_HXX
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index f1b3dbb..ee08d6b 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -357,6 +357,7 @@ protected:
     SdrObjUserCall*             pUserCall;
     SdrObjPlusData*             pPlusData;    // Broadcaster, UserData, Konnektoren, ... (Das ist der Bitsack)
 
+    SdrObject*  pCaptionObj;
     sal_uInt32                  nOrdNum;      // Rangnummer des Obj in der Liste
 
     SfxGrabBagItem*             pGrabBagItem; // Holds the GrabBagItem property
@@ -1035,6 +1036,7 @@ public:
     // #i121917#
     virtual bool HasText() const;
 
+    const SdrObject* GetCaptionObj() const;
 protected:
     /** Sets a new UNO shape
       *
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 7a93f4b..e909990 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -80,6 +80,7 @@ protected:
     void Init();
 
 public:
+    OUString GetStyleString();
     TYPEINFO();
 
     SdrOle2Obj(bool bFrame_ = false);
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index e1e7f45..df2aab6 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/accessibility/AccessibleShape \
     svx/source/accessibility/AccessibleShapeInfo \
     svx/source/accessibility/AccessibleShapeTreeInfo \
+    svx/source/accessibility/AccessibleSvxFindReplaceDialog \
     svx/source/accessibility/AccessibleTextEventQueue \
     svx/source/accessibility/AccessibleTextHelper \
     svx/source/accessibility/ChildrenManager \
@@ -92,6 +93,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/accessibility/SvxShapeTypes \
     svx/source/accessibility/charmapacc \
     svx/source/accessibility/lookupcolorname \
+	svx/source/accessibility/svxpixelctlaccessiblecontext \
     svx/source/accessibility/svxrectctaccessiblecontext \
     svx/source/customshapes/EnhancedCustomShape3d \
     svx/source/customshapes/EnhancedCustomShapeEngine \
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index ebbd599..0c958e4 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -21,13 +21,18 @@
 #include <svx/AccessibleShapeInfo.hxx>
 #include "svx/DescriptionGenerator.hxx"
 #include <com/sun/star/drawing/XControlShape.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/form/FormComponentType.hpp>
 #include <com/sun/star/reflection/ProxyFactory.hpp>
 #include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/container/XChild.hpp>
 #include <comphelper/processfactory.hxx>
+#include <comphelper/property.hxx>
+#include <comphelper/types.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
 #include <svx/svdouno.hxx>
 #include "svx/unoapi.hxx"
 #include <svx/ShapeTypeHandler.hxx>
@@ -67,6 +72,11 @@ namespace
         static OUString s_sLabelPropertyLabel( "Label" );
         return s_sLabelPropertyLabel;
     }
+    const OUString& lcl_getLabelControlPropertyName( )
+    {
+        static OUString s_sLabelControlPropertyLabel("LabelControl");
+        return s_sLabelControlPropertyLabel;
+    }
     // return the property which should be used as AccessibleName
     const OUString& lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI )
     {
@@ -581,21 +591,52 @@ Reference< XAccessible > SAL_CALL AccessibleControlShape::getAccessibleChild( sa
 
 Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessibleRelationSet(  ) throw (RuntimeException)
 {
-    // TODO
-    return AccessibleShape::getAccessibleRelationSet( );
+    utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+    ensureControlModelAccess();
+    AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape();
+    if(pCtlAccShape)
+    {
+        Reference < XAccessible > xAcc (pCtlAccShape->getAccessibleContext(), UNO_QUERY);
+
+        ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > aSequence(1);
+        aSequence[0] = xAcc;
+        if( getAccessibleRole() == AccessibleRole::RADIO_BUTTON )
+        {
+            pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::MEMBER_OF, aSequence ) );
+        }
+        else
+        {
+            pRelationSetHelper->AddRelation( AccessibleRelation( AccessibleRelationType::LABELED_BY, aSequence ) );
+        }
+    }
+    Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
+    return xSet;
 }
 
 OUString AccessibleControlShape::CreateAccessibleName (void) throw (RuntimeException)
 {
     ensureControlModelAccess();
 
-    // check if we can obtain the "Name" resp. "Label" property from the model
-    const OUString& rAccNameProperty = lcl_getPreferredAccNameProperty( m_xModelPropsMeta );
+    OUString sName;
+    if ( getAccessibleRole() != AccessibleRole::SHAPE
+        && getAccessibleRole() != AccessibleRole::RADIO_BUTTON  )
+    {
+        AccessibleControlShape* pCtlAccShape = GetLabeledByControlShape();
+        if(pCtlAccShape)
+        {
+            sName = pCtlAccShape->CreateAccessibleName();
+        }
+    }
 
-    OUString sName( getControlModelStringProperty( rAccNameProperty ) );
-    if ( sName.isEmpty() )
-    {   // no -> use the default
-        sName = AccessibleShape::CreateAccessibleName();
+    if (sName.isEmpty())
+    {
+        // check if we can obtain the "Name" resp. "Label" property from the model
+        const OUString& rAccNameProperty = lcl_getPreferredAccNameProperty( m_xModelPropsMeta );
+        sName = getControlModelStringProperty( rAccNameProperty );
+        if ( !sName.getLength() )
+        {   // no -> use the default
+            sName = AccessibleShape::CreateAccessibleName();
+        }
     }
 
     // now that somebody first asked us for our name, ensure that we are listening to name changes on the model
@@ -853,4 +894,25 @@ void SAL_CALL AccessibleControlShape::elementReplaced( const ::com::sun::star::c
     // not interested in
 }
 
+AccessibleControlShape* SAL_CALL AccessibleControlShape::GetLabeledByControlShape( )
+{
+    if(m_xControlModel.is())
+    {
+        const OUString& rAccLabelControlProperty = lcl_getLabelControlPropertyName();
+        Any sCtlLabelBy;
+        // get the "label by" property value of the control
+        if (::comphelper::hasProperty(rAccLabelControlProperty, m_xControlModel))
+        {
+            m_xControlModel->getPropertyValue( rAccLabelControlProperty ) >>= sCtlLabelBy;
+            if( sCtlLabelBy.hasValue() )
+            {
+                Reference< XPropertySet >  xAsSet (sCtlLabelBy, UNO_QUERY);
+                AccessibleControlShape* pCtlAccShape = mpParent->GetAccControlShapeFromModel(xAsSet.get());
+                return pCtlAccShape;
+            }
+        }
+    }
+    return NULL;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index c6e4794..9dee0d5 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -181,7 +181,7 @@ sal_Int32 AccFrameSelector::getAccessibleIndexInParent(  )
 
 sal_Int16 AccFrameSelector::getAccessibleRole(  ) throw (RuntimeException)
 {
-    return AccessibleRole::OPTION_PANE;
+    return meBorder == FRAMEBORDER_NONE ? AccessibleRole::OPTION_PANE : AccessibleRole::CHECK_BOX;
 }
 
 // ----------------------------------------------------------------------------
@@ -216,15 +216,24 @@ Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet(
     if(meBorder == FRAMEBORDER_NONE)
     {
         //add the label relation
-        Window* pPrev = mpFrameSel->GetWindow( WINDOW_PREV );
-        if(pPrev && WINDOW_FIXEDTEXT == pPrev->GetType())
+        Window *pLabeledBy = mpFrameSel->GetAccessibleRelationLabeledBy();
+        if ( pLabeledBy && pLabeledBy != mpFrameSel )
         {
             AccessibleRelation aLabelRelation;
             aLabelRelation.RelationType = AccessibleRelationType::LABELED_BY;
             aLabelRelation.TargetSet.realloc(1);
-            aLabelRelation.TargetSet.getArray()[0]  = pPrev->GetAccessible();
+            aLabelRelation.TargetSet.getArray()[0]  = pLabeledBy->GetAccessible();
             pHelper->AddRelation(aLabelRelation);
         }
+        Window* pMemberOf = mpFrameSel->GetAccessibleRelationMemberOf();
+        if ( pMemberOf && pMemberOf != mpFrameSel )
+        {
+            AccessibleRelation aMemberOfRelation;
+            aMemberOfRelation.RelationType = AccessibleRelationType::MEMBER_OF;
+            aMemberOfRelation.TargetSet.realloc(1);
+            aMemberOfRelation.TargetSet.getArray()[0]  = pMemberOf->GetAccessible();
+            pHelper->AddRelation(aMemberOfRelation);
+        }
     }
     return xRet;
 }
diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx
index eb021c3..91cded2 100644
--- a/svx/source/accessibility/AccessibleGraphicShape.cxx
+++ b/svx/source/accessibility/AccessibleGraphicShape.cxx
@@ -21,6 +21,8 @@
 
 #include <svx/ShapeTypeHandler.hxx>
 #include <svx/SvxShapeTypes.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdmodel.hxx>
 
 using namespace ::accessibility;
 using namespace ::rtl;
@@ -51,6 +53,8 @@ AccessibleGraphicShape::~AccessibleGraphicShape (void)
 OUString SAL_CALL AccessibleGraphicShape::getAccessibleImageDescription (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
+    if (m_pShape)
+        return m_pShape->GetTitle();
     return AccessibleShape::getAccessibleDescription ();
 }
 
@@ -187,13 +191,28 @@ OUString
     return sName;
 }
 
-
-
-OUString
-    AccessibleGraphicShape::CreateAccessibleDescription (void)
+OUString AccessibleGraphicShape::CreateAccessibleDescription (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
-    return CreateAccessibleName ();
+    //Don't use the same information for accessible name and accessible description.
+    OUString sDesc;
+    if (m_pShape)
+        sDesc =  m_pShape->GetTitle();
+    if (!sDesc.isEmpty())
+        return sDesc;
+    return CreateAccessibleBaseName();
+}
+
+//  Return this object's role.
+sal_Int16 SAL_CALL AccessibleGraphicShape::getAccessibleRole (void)
+        throw (::com::sun::star::uno::RuntimeException)
+{
+    sal_Int16 nAccessibleRole =  AccessibleRole::SHAPE;
+    if( m_pShape->GetModel()->GetImageMapForObject(m_pShape) != NULL )
+        return AccessibleRole::IMAGE_MAP;
+    else
+        return AccessibleShape::getAccessibleRole();
+    return nAccessibleRole;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx
index d8b742c..14ed894 100644
--- a/svx/source/accessibility/AccessibleOLEShape.cxx
+++ b/svx/source/accessibility/AccessibleOLEShape.cxx
@@ -21,6 +21,7 @@
 
 #include <svx/ShapeTypeHandler.hxx>
 #include <svx/SvxShapeTypes.hxx>
+#include <svx/svdoole2.hxx>
 
 using namespace accessibility;
 using namespace ::com::sun::star;
@@ -171,8 +172,22 @@ uno::Sequence<uno::Type> SAL_CALL
     return aTypeList;
 }
 
-
-
+//=====  XAccessibleExtendedAttributes  ========================================================
+uno::Any SAL_CALL AccessibleOLEShape::getExtendedAttributes()
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    uno::Any strRet;
+    ::rtl::OUString style;
+    if( m_pShape )
+    {
+        //style = ::rtl::OUString::createFromAscii("style=");
+        style = ::rtl::OUString::createFromAscii("style:");
+        style += ((SdrOle2Obj*)m_pShape)->GetStyleString();
+    }
+    style += ::rtl::OUString::createFromAscii(";");
+    strRet <<= style;
+    return strRet;
+}
 
 /// Set this object's name if is different to the current name.
 OUString
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 426ab51..fa36b9c 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -22,7 +22,9 @@
 #include <svx/AccessibleShapeInfo.hxx>
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
+#include <com/sun/star/accessibility/AccessibleTextType.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
@@ -36,7 +38,8 @@
 #include <svx/unoshtxt.hxx>
 #include <svx/svdobj.hxx>
 #include <svx/svdmodel.hxx>
-#include "svx/unoapi.hxx"
+#include <svx/unoapi.hxx>
+#include <svx/svdpage.hxx>
 #include <com/sun/star/uno/Exception.hpp>
 #include <svx/ShapeTypeHandler.hxx>
 #include <svx/SvxShapeTypes.hxx>
@@ -46,13 +49,18 @@
 #include <svx/dialmgr.hxx>
 #include <vcl/svapp.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
 #include <svx/svdview.hxx>
 #include <comphelper/servicehelper.hxx>
 #include "AccessibleEmptyEditSource.hxx"
 
+#include <algorithm>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 using ::com::sun::star::uno::Reference;
+using ::com::sun::star::lang::IndexOutOfBoundsException;
+using ::com::sun::star::uno::RuntimeException;
 
 namespace accessibility {
 
@@ -94,7 +102,7 @@ OUString GetOptionalProperty (
 AccessibleShape::AccessibleShape (
     const AccessibleShapeInfo& rShapeInfo,
     const AccessibleShapeTreeInfo& rShapeTreeInfo)
-    : AccessibleContextBase (rShapeInfo.mxParent,AccessibleRole::LIST_ITEM),
+    : AccessibleContextBase (rShapeInfo.mxParent,AccessibleRole::SHAPE),
       mpChildrenManager(NULL),
       mxShape (rShapeInfo.mxShape),
       maShapeTreeInfo (rShapeTreeInfo),
@@ -107,8 +115,24 @@ AccessibleShape::AccessibleShape (
     UpdateNameAndDescription();
 }
 
-
-
+AccessibleShape::AccessibleShape (
+        const ::com::sun::star::uno::Reference<
+            ::com::sun::star::drawing::XShape>& rxShape,
+        const ::com::sun::star::uno::Reference<
+            ::com::sun::star::accessibility::XAccessible>& rxParent,
+        const AccessibleShapeTreeInfo& rShapeTreeInfo,
+        sal_Int32 nIndex)
+    : AccessibleContextBase (rxParent,AccessibleRole::SHAPE),
+      mpChildrenManager(NULL),
+      mxShape (rxShape),
+      maShapeTreeInfo (rShapeTreeInfo),
+      mnIndex (nIndex),
+      m_nIndexInParent(-1),
+      mpText (NULL),
+      mpParent (NULL)
+{
+    m_pShape = GetSdrObjectFromXShape(mxShape);
+}
 
 AccessibleShape::~AccessibleShape (void)
 {
@@ -121,9 +145,6 @@ AccessibleShape::~AccessibleShape (void)
     // broadcasters would still hold a strong reference to this object.
 }
 
-
-
-
 void AccessibleShape::Init (void)
 {
     // Update the OPAQUE and SELECTED shape.
@@ -248,8 +269,10 @@ void AccessibleShape::UpdateStates (void)
         pStateSet->RemoveState (AccessibleStateType::SELECTED);
 }
 
-
-
+OUString AccessibleShape::GetStyle()
+{
+    return ShapeTypeHandler::CreateAccessibleBaseName( mxShape );
+}
 
 bool AccessibleShape::operator== (const AccessibleShape& rShape)
 {
@@ -313,8 +336,26 @@ sal_Bool AccessibleShape::GetState (sal_Int16 aState)
         return AccessibleContextBase::GetState (aState);
 }
 
+// OverWrite the parent's getAccessibleName method
+OUString SAL_CALL AccessibleShape::getAccessibleName (void)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+        ThrowIfDisposed ();
+    if (m_pShape && !m_pShape->GetTitle().isEmpty())
+        return CreateAccessibleName() + " " + m_pShape->GetTitle();
+    else
+        return CreateAccessibleName();
+}
 
-
+OUString SAL_CALL AccessibleShape::getAccessibleDescription (void)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    ThrowIfDisposed ();
+    if( m_pShape && !m_pShape->GetDescription().isEmpty())
+        return m_pShape->GetDescription() ;
+    else
+        return OUString(" ");
+}
 
 //=====  XAccessibleContext  ==================================================
 
@@ -375,8 +416,43 @@ uno::Reference<XAccessible> SAL_CALL
     return xChild;
 }
 
-
-
+uno::Reference<XAccessibleRelationSet> SAL_CALL
+    AccessibleShape::getAccessibleRelationSet (void)
+        throw (::com::sun::star::uno::RuntimeException)
+{
+    ::osl::MutexGuard aGuard (maMutex);
+    ::utl::AccessibleRelationSetHelper* pRelationSet =
+        new utl::AccessibleRelationSetHelper;
+    SdrObject* pCaptionSdr = const_cast < SdrObject* > ( m_pShape->GetCaptionObj() )  ;
+    if(pCaptionSdr!=NULL)
+    {
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+            uno::Reference<drawing::XShape> xCaptionShape ( pCaptionSdr->getUnoShape(),uno::UNO_QUERY);
+            if(xCaptionShape.is())
+            {
+                aSequence[0] = mpParent->GetAccessibleCaption(xCaptionShape);
+                pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
+        }
+    }
+    else
+    {
+        //this mxshape is the captioned shape, only for sw
+        if(mpParent->GetAccessibleCaption(mxShape).get())
+        {
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+            aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
+            pRelationSet->AddRelation( AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, aSequence ) );
+        }
+    }
+   if (pRelationSet != NULL)
+    {
+        return uno::Reference<XAccessibleRelationSet> (
+            new ::utl::AccessibleRelationSetHelper (*pRelationSet));
+    }
+    else
+        return uno::Reference<XAccessibleRelationSet>(NULL);
+    return uno::Reference<XAccessibleRelationSet>();
+}
 
 /** Return a copy of the state set.
     Possible states are:
@@ -393,8 +469,38 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
 
     if (rBHelper.bDisposed || mpText == NULL)
         // Return a minimal state set that only contains the DEFUNC state.
+    {
         xStateSet = AccessibleContextBase::getAccessibleStateSet ();
-    else
+        ::utl::AccessibleStateSetHelper* pStateSet =
+              static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
+            ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+            if( xTempAcc.is() )
+            {
+                ::com::sun::star::uno::Reference<XAccessibleContext>
+                                        xTempAccContext = xTempAcc->getAccessibleContext();
+                if( xTempAccContext.is() )
+                {
+                    ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+                        xTempAccContext->getAccessibleStateSet();
+                    if( rState.is() )           {
+                        com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+                        int count = pStates.getLength();
+                        for( int iIndex = 0;iIndex < count;iIndex++ )
+                        {
+                            if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+                            {
+                                pStateSet->AddState (AccessibleStateType::EDITABLE);
+                                pStateSet->AddState (AccessibleStateType::RESIZABLE);
+                                pStateSet->AddState (AccessibleStateType::MOVEABLE);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+            xStateSet = Reference<XAccessibleStateSet>(
+                new ::utl::AccessibleStateSetHelper (*pStateSet));
+    }else
     {
         ::utl::AccessibleStateSetHelper* pStateSet =
               static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get());
@@ -409,14 +515,39 @@ uno::Reference<XAccessibleStateSet> SAL_CALL
                 else
                     pStateSet->RemoveState (AccessibleStateType::FOCUSED);
             }
-
+            //Just when the document is not read-only,set states EDITABLE,RESIZABLE,MOVEABLE
+            ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+            if( xTempAcc.is() )
+            {
+                ::com::sun::star::uno::Reference<XAccessibleContext>
+                                        xTempAccContext = xTempAcc->getAccessibleContext();
+                if( xTempAccContext.is() )
+                {
+                    ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+                        xTempAccContext->getAccessibleStateSet();
+                    if( rState.is() )           {
+                        com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+                        int count = pStates.getLength();
+                        for( int iIndex = 0;iIndex < count;iIndex++ )
+                        {
+                            if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+                            {
+                                pStateSet->AddState (AccessibleStateType::EDITABLE);
+                                pStateSet->AddState (AccessibleStateType::RESIZABLE);
+                                pStateSet->AddState (AccessibleStateType::MOVEABLE);
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
             // Create a copy of the state set that may be modified by the
             // caller without affecting the current state set.
             xStateSet = Reference<XAccessibleStateSet>(
                 new ::utl::AccessibleStateSetHelper (*pStateSet));
         }
     }
-
+    UpdateDocumentAllSelState(xStateSet);
     return xStateSet;
 }
 
@@ -670,6 +801,20 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void)
             uno::Any aColor;
             aColor = aSet->getPropertyValue ("FillColor");
             aColor >>= nColor;
+            aColor = aSet->getPropertyValue (OUString::createFromAscii ("FillTransparence"));
+            short nTrans=0;
+            aColor >>= nTrans;
+            Color crBk(nColor);
+            if (nTrans == 0 )
+            {
+                crBk.SetTransparency(0xff);
+            }
+            else
+            {
+                nTrans = short(256 - nTrans / 100. * 256);
+                crBk.SetTransparency(sal_uInt8(nTrans));
+            }
+            nColor = crBk.GetColor();
         }
     }
     catch (const ::com::sun::star::beans::UnknownPropertyException &)
@@ -728,9 +873,13 @@ com::sun::star::uno::Any SAL_CALL
         aReturn = ::cppu::queryInterface (rType,
             static_cast<XAccessibleComponent*>(this),
             static_cast<XAccessibleExtendedComponent*>(this),
+            static_cast< ::com::sun::star::accessibility::XAccessibleSelection* >(this),
+            static_cast< ::com::sun::star::accessibility::XAccessibleExtendedAttributes* >(this),
             static_cast<lang::XEventListener*>(this),
             static_cast<document::XEventListener*>(this),
-            static_cast<lang::XUnoTunnel*>(this)
+            static_cast<lang::XUnoTunnel*>(this),
+            static_cast<XAccessibleGroupPosition*>(this),
+            static_cast<XAccessibleHypertext*>(this)
             );
     return aReturn;
 }
@@ -755,8 +904,122 @@ void SAL_CALL
     AccessibleContextBase::release ();
 }
 
+//=====  XAccessibleSelection  ============================================
+//
+
+//--------------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::selectAccessibleChild( sal_Int32 )
+throw ( IndexOutOfBoundsException, RuntimeException )
+{
+}
+
+//----------------------------------------------------------------------------------
+sal_Bool SAL_CALL AccessibleShape::isAccessibleChildSelected( sal_Int32 nChildIndex )
+throw ( IndexOutOfBoundsException,
+       RuntimeException )
+{
+    uno::Reference<XAccessible> xAcc = getAccessibleChild( nChildIndex );
+    uno::Reference<XAccessibleContext> xContext;
+    if( xAcc.is() )
+    {
+        xContext = xAcc->getAccessibleContext();
+    }
+
+    if( xContext.is() )
+    {
+        if( xContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+        {
+            uno::Reference< ::com::sun::star::accessibility::XAccessibleText >
+                xText(xAcc, uno::UNO_QUERY);
+            if( xText.is() )
+            {
+                if( xText->getSelectionStart() >= 0 ) return sal_True;
+            }
+        }
+        else if( xContext->getAccessibleRole() == AccessibleRole::SHAPE )
+        {
+            Reference< XAccessibleStateSet > pRState = xContext->getAccessibleStateSet();
+            if( !pRState.is() )
+                return sal_False;
+
+            uno::Sequence<short> pStates = pRState->getStates();
+            int nCount = pStates.getLength();
+            for( int i = 0; i < nCount; i++ )
+            {
+                if(pStates[i] == AccessibleStateType::SELECTED)
+                    return sal_True;
+            }
+            return sal_False;
+        }
+    }
+
+    return sal_False;
+}
+
+//---------------------------------------------------------------------
+void SAL_CALL AccessibleShape::clearAccessibleSelection(  )
+throw ( RuntimeException )
+{
+}
 
+//-------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::selectAllAccessibleChildren(  )
+throw ( RuntimeException )
+{
+}
 
+//----------------------------------------------------------------------------
+sal_Int32 SAL_CALL AccessibleShape::getSelectedAccessibleChildCount()
+throw ( RuntimeException )
+{
+    sal_Int32 nCount = 0;
+    sal_Int32 TotalCount = getAccessibleChildCount();
+    for( sal_Int32 i = 0; i < TotalCount; i++ )
+        if( isAccessibleChildSelected(i) ) nCount++;
+
+    return nCount;
+}
+
+//--------------------------------------------------------------------------------------
+Reference<XAccessible> SAL_CALL AccessibleShape::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+throw ( IndexOutOfBoundsException, RuntimeException)
+{
+    if ( nSelectedChildIndex > getSelectedAccessibleChildCount() )
+        throw IndexOutOfBoundsException();
+    sal_Int32 i1, i2;
+    for( i1 = 0, i2 = 0; i1 < getAccessibleChildCount(); i1++ )
+        if( isAccessibleChildSelected(i1) )
+        {
+            if( i2 == nSelectedChildIndex )
+                return getAccessibleChild( i1 );
+            i2++;
+        }
+    return Reference<XAccessible>();
+}
+
+//----------------------------------------------------------------------------------
+void SAL_CALL AccessibleShape::deselectAccessibleChild( sal_Int32 )
+                                                            throw ( IndexOutOfBoundsException,
+                                                            RuntimeException )
+{
+
+}
+
+//=====  XAccessibleExtendedAttributes  ========================================================
+uno::Any SAL_CALL AccessibleShape::getExtendedAttributes()
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    uno::Any strRet;
+    OUString style;
+    if( getAccessibleRole() != AccessibleRole::SHAPE ) return strRet;
+    if( m_pShape )
+    {
+        style = "style:" + GetStyle();
+    }
+    style += ";";
+    strRet <<= style;
+    return strRet;
+}
 
 //=====  XServiceInfo  ========================================================
 
@@ -878,6 +1141,11 @@ void SAL_CALL
     {
         if (rEventObject.EventName.equals (sShapeModified))
         {
+            //Need to update text children when receiving ShapeModified hint when exiting edit mode for text box
+            if (mpText)
+                mpText->UpdateChildren();
+
+
             // Some property of a shape has been modified.  Send an event
             // that indicates a change of the visible data to all listeners.
             CommitChange (
@@ -958,59 +1226,55 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType,
 
 //=====  protected internal  ==================================================
 /// Set this object's name if is different to the current name.
-OUString
-    AccessibleShape::CreateAccessibleBaseName (void)
+OUString AccessibleShape::CreateAccessibleBaseName (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
     return ShapeTypeHandler::CreateAccessibleBaseName( mxShape );
 }
 
 
-OUString
-    AccessibleShape::CreateAccessibleName (void)
+OUString AccessibleShape::CreateAccessibleName (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
-    OUString sName (CreateAccessibleBaseName());
+    return GetFullAccessibleName(this);
+}
 
+OUString AccessibleShape::GetFullAccessibleName (AccessibleShape *shape)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    OUString sName (shape->CreateAccessibleBaseName());
     // Append the shape's index to the name to disambiguate between shapes
     // of the same type.  If such an index where not given to the
     // constructor then use the z-order instead.  If even that does not exist
     // we throw an exception.
-    long nIndex = mnIndex;
-    if (nIndex == -1)
+    OUString nameStr;
+    if (shape->m_pShape)
+        nameStr = shape->m_pShape->GetName();
+    if (nameStr.isEmpty())
     {
-        try
-        {
-            uno::Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY);
-            if (xSet.is())
-            {
-                uno::Any aZOrder (xSet->getPropertyValue ("ZOrder"));
-                aZOrder >>= nIndex;
-
-                // Add one to be not zero based.
-                nIndex += 1;
-            }
-        }
-        catch (const beans::UnknownPropertyException &)
-        {
-            // We throw our own exception that is a bit more informative.
-            throw uno::RuntimeException (OUString (
-                "AccessibleShape has invalid index and no ZOrder property"),
-                static_cast<uno::XWeak*>(this));
-        }
-
+        sName += " ";
+    }
+    else
+    {
+        sName = nameStr;
     }
 
-    // Put a space between name and index because of Gnopernicus othewise
-    // spells the name.
-    sName += " " + OUString::number (nIndex);
-
+    //If the new produced name if not the same with last,notify name changed
+    //Event
+    if (aAccName != sName && !aAccName.isEmpty())
+    {
+        uno::Any aOldValue, aNewValue;
+        aOldValue <<= aAccName;
+        aNewValue <<= sName;
+        CommitChange(
+            AccessibleEventId::NAME_CHANGED,
+            aNewValue,
+            aOldValue);
+    }
+    aAccName = sName;
     return sName;
 }
 
-
-
-
 OUString
     AccessibleShape::CreateAccessibleDescription (void)
     throw (::com::sun::star::uno::RuntimeException)
@@ -1178,6 +1442,248 @@ void AccessibleShape::UpdateNameAndDescription (void)
     }
 }
 
+//  Return this object's role.
+sal_Int16 SAL_CALL AccessibleShape::getAccessibleRole (void)
+        throw (::com::sun::star::uno::RuntimeException)
+{
+    sal_Int16 nAccessibleRole =  AccessibleRole::SHAPE ;
+    switch (ShapeTypeHandler::Instance().GetTypeId (mxShape))
+    {
+        case     DRAWING_GRAPHIC_OBJECT:
+                 nAccessibleRole =  AccessibleRole::GRAPHIC ;               break;
+        case     DRAWING_OLE:
+                 nAccessibleRole =  AccessibleRole::EMBEDDED_OBJECT ;       break;
+
+        default:
+            nAccessibleRole = AccessibleContextBase::getAccessibleRole();
+            break;
+    }
+
+    return nAccessibleRole;
+}
+
+
+void AccessibleShape::UpdateDocumentAllSelState(Reference<XAccessibleStateSet> &xStateSet)
+{
+    if (mpParent && mpParent->IsDocumentSelAll())
+    {
+        ::utl::AccessibleStateSetHelper* pStateSet =
+            static_cast< ::utl::AccessibleStateSetHelper*>(xStateSet.get());
+        pStateSet->AddState (AccessibleStateType::SELECTED);
+
+        //uno::Any NewValue;
+        //NewValue <<= AccessibleStateType::SELECTED;
+
+        //CommitChange(AccessibleEventId::STATE_CHANGED,NewValue,uno::Any());
+    }
+}
+
+//sort the drawing objects from up to down, from left to right
+struct XShapePosCompareHelper
+{
+    bool operator() ( const uno::Reference<drawing::XShape>& xshape1,
+        const uno::Reference<drawing::XShape>& xshape2 ) const
+    {
+        SdrObject* pObj1 = GetSdrObjectFromXShape(xshape1);
+        SdrObject* pObj2 = GetSdrObjectFromXShape(xshape2);
+        if(pObj1 && pObj2)
+            return pObj1->GetOrdNum() < pObj2->GetOrdNum();
+        else
+            return 0;
+    }
+};
+//end of group position
+
+//=====  XAccessibleGroupPosition  =========================================
+uno::Sequence< sal_Int32 > SAL_CALL
+AccessibleShape::getGroupPosition( const uno::Any& )
+throw (uno::RuntimeException)
+{
+    // we will return the:
+    // [0] group level
+    // [1] similar items counts in the group
+    // [2] the position of the object in the group
+    uno::Sequence< sal_Int32 > aRet( 3 );
+    aRet[0] = 0;
+    aRet[1] = 0;
+    aRet[2] = 0;
+
+    ::com::sun::star::uno::Reference<XAccessible> xParent = getAccessibleParent();
+    if (!xParent.is())
+    {
+        return aRet;
+    }
+    SdrObject *pObj = GetSdrObjectFromXShape(mxShape);
+
+
+    if(pObj == NULL )
+    {
+        return aRet;
+    }
+
+    // Compute object's group level.
+    sal_Int32 nGroupLevel = 0;
+    SdrObject * pUper = pObj->GetUpGroup();
+    while( pUper )
+    {
+        ++nGroupLevel;
+        pUper = pUper->GetUpGroup();
+    }
+
+    ::com::sun::star::uno::Reference<XAccessibleContext> xParentContext = xParent->getAccessibleContext();
+    if( xParentContext->getAccessibleRole()  == AccessibleRole::DOCUMENT)//Document
+    {
+        Reference< XAccessibleGroupPosition > xGroupPosition( xParent,uno::UNO_QUERY );
+        if ( xGroupPosition.is() )
+        {
+            aRet = xGroupPosition->getGroupPosition( uno::makeAny( getAccessibleContext() ) );
+        }
+        return aRet;
+    }
+    if (xParentContext->getAccessibleRole() != AccessibleRole::SHAPE)
+    {
+        return aRet;
+    }
+
+    SdrObjList *pGrpList = NULL;
+    if( pObj->GetUpGroup() )
+        pGrpList = pObj->GetUpGroup()->GetSubList();
+    else
+        return aRet;
+
+    std::vector< uno::Reference<drawing::XShape> > vXShapes;
+    if (pGrpList)
+    {
+        const sal_Int32 nObj = pGrpList->GetObjCount();
+        for(sal_Int32 i = 0 ; i < nObj ; ++i)
+        {
+            SdrObject *pSubObj = pGrpList->GetObj(i);
+            if (pSubObj &&
+                xParentContext->getAccessibleChild(i)->getAccessibleContext()->getAccessibleRole() != AccessibleRole::GROUP_BOX)
+            {
+                vXShapes.push_back( GetXShapeForSdrObject(pSubObj) );
+            }
+        }
+    }
+
+    std::sort( vXShapes.begin(), vXShapes.end(), XShapePosCompareHelper() );
+
+    //get the the index of the selected object in the group
+    std::vector< uno::Reference<drawing::XShape> >::iterator aIter;
+    //we start counting position from 1
+    sal_Int32 nPos = 1;
+    for ( aIter = vXShapes.begin(); aIter != vXShapes.end(); aIter++, nPos++ )
+    {
+        if ( (*aIter).get() == mxShape.get() )
+        {
+            sal_Int32* pArray = aRet.getArray();
+            pArray[0] = nGroupLevel;
+            pArray[1] = vXShapes.size();
+            pArray[2] = nPos;
+            break;
+        }
+    }
+
+    return aRet;
+}
+
+OUString AccessibleShape::getObjectLink( const uno::Any& )
+    throw (uno::RuntimeException)
+{
+    OUString aRet;
+
+    SdrObject *pObj = GetSdrObjectFromXShape(mxShape);
+    if(pObj == NULL )
+    {
+        return aRet;
+    }
+    if (maShapeTreeInfo.GetDocumentWindow().is())
+    {
+        Reference< XAccessibleGroupPosition > xGroupPosition( maShapeTreeInfo.GetDocumentWindow(), uno::UNO_QUERY );
+        if (xGroupPosition.is())
+        {
+            aRet = xGroupPosition->getObjectLink( uno::makeAny( getAccessibleContext() ) );
+        }
+    }
+    return aRet;
+}
+
+//=====  XAccesibleHypertext  ==================================================
+sal_Int32 SAL_CALL AccessibleShape::getHyperLinkCount()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    // MT: Introduced with IA2 CWS, but SvxAccessibleHyperlink was redundant to svx::AccessibleHyperlink which we introduced meanwhile.
+    // Code need to be adapted....
+    return 0;
+
+    /*
+    SvxAccessibleHyperlink* pLink = new SvxAccessibleHyperlink(m_pShape,this);
+    if (pLink->IsValidHyperlink())
+        return 1;
+    else
+        return 0;
+    */
+}
+uno::Reference< XAccessibleHyperlink > SAL_CALL
+    AccessibleShape::getHyperLink( sal_Int32 )
+    throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    uno::Reference< XAccessibleHyperlink > xRet;
+    // MT: Introduced with IA2 CWS, but SvxAccessibleHyperlink was redundant to svx::AccessibleHyperlink which we introduced meanwhile.
+    // Code need to be adapted....
+    /*
+    SvxAccessibleHyperlink* pLink = new SvxAccessibleHyperlink(m_pShape,this);
+    if (pLink->IsValidHyperlink())
+        xRet = pLink;
+    if( !xRet.is() )
+        throw ::com::sun::star::lang::IndexOutOfBoundsException();
+    */
+    return xRet;
+}
+sal_Int32 SAL_CALL AccessibleShape::getHyperLinkIndex( sal_Int32 )
+throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    sal_Int32 nRet = 0;
+    return nRet;
+}
+//=====  XAccesibleText  ==================================================
+sal_Int32 SAL_CALL AccessibleShape::getCaretPosition(  ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL AccessibleShape::setCaretPosition( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+sal_Unicode SAL_CALL AccessibleShape::getCharacter( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return 0;}
+::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL AccessibleShape::getCharacterAttributes( sal_Int32, const ::com::sun::star::uno::Sequence< OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    uno::Sequence< ::com::sun::star::beans::PropertyValue > aValues(0);
+    return aValues;
+}
+::com::sun::star::awt::Rectangle SAL_CALL AccessibleShape::getCharacterBounds( sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    return com::sun::star::awt::Rectangle(0, 0, 0, 0 );
+}
+sal_Int32 SAL_CALL AccessibleShape::getCharacterCount(  ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL AccessibleShape::getIndexAtPoint( const ::com::sun::star::awt::Point& ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+OUString SAL_CALL AccessibleShape::getSelectedText(  ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+sal_Int32 SAL_CALL AccessibleShape::getSelectionStart(  ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Int32 SAL_CALL AccessibleShape::getSelectionEnd(  ) throw (::com::sun::star::uno::RuntimeException){return 0;}
+sal_Bool SAL_CALL AccessibleShape::setSelection( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+OUString SAL_CALL AccessibleShape::getText(  ) throw (::com::sun::star::uno::RuntimeException){return OUString();}
+OUString SAL_CALL AccessibleShape::getTextRange( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return OUString();}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextAtIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+    ::com::sun::star::accessibility::TextSegment aResult;
+    return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextBeforeIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+    ::com::sun::star::accessibility::TextSegment aResult;
+    return aResult;
+}
+::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleShape::getTextBehindIndex( sal_Int32, sal_Int16 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
+{
+    ::com::sun::star::accessibility::TextSegment aResult;
+    return aResult;
+}
+sal_Bool SAL_CALL AccessibleShape::copyText( sal_Int32, sal_Int32 ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException){return sal_True;}
+
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
new file mode 100644
index 0000000..c710f13
--- /dev/null
+++ b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
@@ -0,0 +1,96 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#include <svx/AccessibleSvxFindReplaceDialog.hxx>
+#include <svx/srchdlg.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+VCLXAccessibleSvxFindReplaceDialog::VCLXAccessibleSvxFindReplaceDialog(VCLXWindow* pVCLXindow)
+    :VCLXAccessibleComponent( pVCLXindow )
+{
+
+}
+
+VCLXAccessibleSvxFindReplaceDialog::~VCLXAccessibleSvxFindReplaceDialog()
+{
+}
+
+void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
+{
+    VCLXAccessibleComponent::FillAccessibleRelationSet( rRelationSet );
+    Window* pDlg = GetWindow();
+    if ( pDlg )
+    {
+        SvxSearchDialog* pSrchDlg = static_cast<SvxSearchDialog*>( pDlg );
+        Window* pDocWin = pSrchDlg->GetDocWin();
+        if ( !pDocWin )
+        {
+            return;
+        }
+        Reference < accessibility::XAccessible > xDocAcc = pDocWin->GetAccessible();
+        if ( !xDocAcc.is() )
+        {
+            return;
+        }
+        Reference< accessibility::XAccessibleGetAccFlowTo > xGetAccFlowTo( xDocAcc, UNO_QUERY );
+        if ( !xGetAccFlowTo.is() )
+        {
+            return;
+        }
+        Any aAny;
+        aAny <<= ( pSrchDlg->GetSrchFlag() );
+
+        const sal_Int32 FORFINDREPLACEFLOWTO = 2;
+        uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->get_AccFlowTo( aAny,  FORFINDREPLACEFLOWTO );
+
+        sal_Int32 nLen = aAnySeq.getLength();
+        if ( nLen )
+        {
+            uno::Sequence< uno::Reference< uno::XInterface > > aSequence( nLen );
+            for ( sal_Int32 i = 0; i < nLen; i++ )
+            {
+                uno::Reference < accessibility::XAccessible > xAcc;
+                aAnySeq[i] >>= xAcc;
+                aSequence[i] = xAcc;
+            }
+            rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence ) );
+        }
+    }
+}
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+OUString VCLXAccessibleSvxFindReplaceDialog::getImplementationName() throw (RuntimeException)
+{
+    return OUString( "VCLXAccessibleSvxFindReplaceDialog" );
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< OUString > VCLXAccessibleSvxFindReplaceDialog::getSupportedServiceNames() throw (RuntimeException)
+{
+    Sequence< OUString > aNames(1);
+    aNames[0] = OUString( "VCLXAccessibleSvxFindReplaceDialog" );
+    return aNames;
+}
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 89ccb3e..8bbef58 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -42,8 +42,11 @@
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <comphelper/accessibleeventnotifier.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
-#include <vcl/unohelp.hxx>
 #include <vcl/svapp.hxx>
+#include <vcl/textdata.hxx>
+#include <vcl/unohelp.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/viewsh.hxx>
 
 //------------------------------------------------------------------------
 //
@@ -62,6 +65,8 @@
 #include "editeng/AccessibleEditableTextPara.hxx"
 #include <svx/svdmodel.hxx>
 #include <svx/svdpntv.hxx>
+#include "../table/cell.hxx"
+#include "../table/accessiblecell.hxx"
 #include <editeng/editdata.hxx>
 #include <editeng/editeng.hxx>
 #include <editeng/editview.hxx>
@@ -71,6 +76,20 @@ using namespace ::com::sun::star::accessibility;
 
 namespace accessibility
 {
+    Window* GetCurrentEditorWnd()
+    {
+        Window* pWin = NULL;
+        SfxViewFrame* pFrame = SfxViewFrame::Current();
+        if (pFrame)
+        {
+            const SfxViewShell * pViewShell = pFrame->GetViewShell();
+            if(pViewShell)
+            {
+                pWin = pViewShell->GetWindow();
+            }
+        }
+        return pWin;
+    }
 
 //------------------------------------------------------------------------
 //
@@ -474,12 +493,36 @@ namespace accessibility
         {
             if( bHaveFocus )
             {
-                GotPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+                if( mxFrontEnd.is() )
+                {
+                    AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+                    if ( !pAccessibleCell )
+                        GotPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+                    else    // the focus event on cell should be fired on table directly
+                    {
+                        AccessibleTableShape* pAccTable = pAccessibleCell->GetParentTable();
+                        if (pAccTable)
+                            pAccTable->SetStateDirectly(AccessibleStateType::FOCUSED);
+                    }
+                }
                 OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object received focus" );
             }
             else
             {
-                LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+                // The focus state should be reset directly on table.
+                //LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+                if( mxFrontEnd.is() )
+                {
+                    AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+                    if ( !pAccessibleCell )
+                            LostPropertyEvent( uno::makeAny(AccessibleStateType::FOCUSED), AccessibleEventId::STATE_CHANGED );
+                    else
+                    {
+                        AccessibleTableShape* pAccTable = pAccessibleCell->GetParentTable();
+                        if (pAccTable)
+                            pAccTable->ResetStateDirectly(AccessibleStateType::FOCUSED);
+                    }
+                }
                 OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object lost focus" );
             }
         }
@@ -533,6 +576,16 @@ namespace accessibility
             if( !pViewForwarder )
                 return sal_False;
 
+            if( mxFrontEnd.is() )
+            {
+                AccessibleCell* pAccessibleCell = dynamic_cast< AccessibleCell* > ( mxFrontEnd.get() );
+                if ( pAccessibleCell )
+                {
+                    sdr::table::CellRef xCell = pAccessibleCell->getCellRef();
+                    if ( xCell.is() )
+                        return xCell->IsTextEditActive();
+                }
+            }
             if( pViewForwarder->IsValid() )
                 return sal_True;
             else
@@ -839,42 +892,25 @@ namespace accessibility
 
                 // convert to screen coordinates
                 aParaBB = ::accessibility::AccessibleEditableTextPara::LogicToPixel( aTmpBB, rCacheTF.GetMapMode(), rCacheVF );
-
-                if( aParaBB.IsOver( aViewArea ) )
+                // at least partially visible
+                if( bFirstChild )
                 {
-                    // at least partially visible
-                    if( bFirstChild )
-                    {
-                        bFirstChild = sal_False;
-                        mnFirstVisibleChild = nCurrPara;
-                    }
+                    bFirstChild = sal_False;
+                    mnFirstVisibleChild = nCurrPara;
+                }
 
-                    mnLastVisibleChild = nCurrPara;
+                mnLastVisibleChild = nCurrPara;
 
-                    // child not yet created?
-                    ::accessibility::AccessibleParaManager::WeakChild aChild( maParaManager.GetChild(nCurrPara) );
-                    if( aChild.second.Width == 0 &&
-                        aChild.second.Height == 0 &&
-                        mxFrontEnd.is() &&
-                        bBroadcastEvents )
-                    {
-                        GotPropertyEvent( uno::makeAny( maParaManager.CreateChild( nCurrPara - mnFirstVisibleChild,
-                                                                                   mxFrontEnd, GetEditSource(), nCurrPara ).first ),
-                                          AccessibleEventId::CHILD );
-                    }
-                }
-                else
+                // child not yet created?
+                ::accessibility::AccessibleParaManager::WeakChild aChild( maParaManager.GetChild(nCurrPara) );
+                if( aChild.second.Width == 0 &&
+                    aChild.second.Height == 0 &&
+                    mxFrontEnd.is() &&
+                    bBroadcastEvents )
                 {
-                    // not or no longer visible
-                    if( maParaManager.IsReferencable( nCurrPara ) )
-                    {
-                        if( bBroadcastEvents )
-                            LostPropertyEvent( uno::makeAny( maParaManager.GetChild( nCurrPara ).first.get().getRef() ),
-                                               AccessibleEventId::CHILD );
-
-                        // clear reference
-                        maParaManager.Release( nCurrPara );
-                    }
+                    GotPropertyEvent( uno::makeAny( maParaManager.CreateChild( nCurrPara - mnFirstVisibleChild,
+                                                                               mxFrontEnd, GetEditSource(), nCurrPara ).first ),
+                                      AccessibleEventId::CHILD );
                 }
             }
         }
@@ -1356,6 +1392,10 @@ namespace accessibility
                         {
                             case HINT_BEGEDIT:
                             {
+                                if(!IsActive())
+                                {
+                                    break;
+                                }
                                 // change children state
                                 maParaManager.SetActive();
 
diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx
index c2cfdcb..658e1cb 100644
--- a/svx/source/accessibility/ChildrenManager.cxx
+++ b/svx/source/accessibility/ChildrenManager.cxx
@@ -77,8 +77,20 @@ long ChildrenManager::GetChildCount (void) const throw ()
     return mpImpl->GetChild (nIndex);
 }
 
+Reference<XAccessible> ChildrenManager::GetChild (const Reference<drawing::XShape>& xShape)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    OSL_ASSERT (mpImpl != NULL);
+    return mpImpl->GetChild (xShape);
+}
 
-
+::com::sun::star::uno::Reference<
+        ::com::sun::star::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    OSL_ASSERT (mpImpl != NULL);
+    return mpImpl->GetChildShape(nIndex);
+}
 
 void ChildrenManager::Update (bool bCreateNewObjectsOnDemand)
 {
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 0cb097b..3abce2e 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -29,12 +29,13 @@
 
 #include <rtl/ustring.hxx>
 #include <tools/debug.hxx>
+#include <svx/SvxShapeTypes.hxx>
+#include <vcl/window.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 using ::com::sun::star::uno::Reference;
 
-
 namespace accessibility {
 
 namespace
@@ -109,7 +110,19 @@ long ChildrenManagerImpl::GetChildCount (void) const throw ()
 }
 
 
-
+::com::sun::star::uno::Reference<
+        ::com::sun::star::drawing::XShape> ChildrenManagerImpl::GetChildShape(long nIndex)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    uno::Reference<XAccessible> xAcc = GetChild(nIndex);
+    ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end();
+    for (I = maVisibleChildren.begin(); I != aEnd; ++I)
+    {
+        if (I->mxAccessibleShape == xAcc)
+            return I->mxShape;
+    }
+    return uno::Reference< drawing::XShape > ();
+}
 
 /** Return the requested accessible child object.  Create it if it is not
     yet in the cache.
@@ -838,8 +851,34 @@ sal_Bool ChildrenManagerImpl::ReplaceChild (
     return bResult;
 }
 
-
-
+// Add the impl method for IAccessibleParent interface
+AccessibleControlShape * ChildrenManagerImpl::GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet* pSet) throw (::com::sun::star::uno::RuntimeException)
+{
+    sal_Int32 count = GetChildCount();
+    for (sal_Int32 index=0;index<count;index++)
+    {
+        AccessibleShape* pAccShape = maVisibleChildren[index].GetAccessibleShape();
+            if (pAccShape  && ::accessibility::ShapeTypeHandler::Instance().GetTypeId (pAccShape->GetXShape()) == DRAWING_CONTROL)
+            {
+            ::accessibility::AccessibleControlShape *pCtlAccShape = static_cast < ::accessibility::AccessibleControlShape* >(pAccShape);
+            if (pCtlAccShape && pCtlAccShape->GetControlModel() == pSet)
+                return pCtlAccShape;
+                }
+    }
+    return NULL;
+}
+uno::Reference<XAccessible>
+    ChildrenManagerImpl::GetAccessibleCaption (const uno::Reference<drawing::XShape>& 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<XAccessible> ();
+}
 
 /** Update the <const>SELECTED</const> and the <const>FOCUSED</const> state
     of all visible children.  Maybe this should be changed to all children.
@@ -872,13 +911,26 @@ void ChildrenManagerImpl::UpdateSelection (void)
     // Remember the current and new focused shape.
     AccessibleShape* pCurrentlyFocusedShape = NULL;
     AccessibleShape* pNewFocusedShape = NULL;
-
+    typedef std::pair< AccessibleShape* , sal_Bool > PAIR_SHAPE;//sal_Bool Selected,UnSelected.
+    typedef std::vector< PAIR_SHAPE > VEC_SHAPE;
+    VEC_SHAPE vecSelect;
+    int nAddSelect=0;
+    int nRemoveSelect=0;
+    sal_Bool bHasSelectedShape=sal_False;
     ChildDescriptorListType::iterator I, aEnd = maVisibleChildren.end();
     for (I=maVisibleChildren.begin(); I != aEnd; ++I)
     {
         AccessibleShape* pAccessibleShape = I->GetAccessibleShape();
         if (I->mxAccessibleShape.is() && I->mxShape.is() && pAccessibleShape!=NULL)
         {
+            short nRole = pAccessibleShape->getAccessibleRole();
+            bool bDrawShape = (
+                nRole == AccessibleRole::GRAPHIC ||
+                nRole == AccessibleRole::EMBEDDED_OBJECT ||
+                nRole == AccessibleRole::SHAPE ||
+                nRole == AccessibleRole::IMAGE_MAP ||
+                nRole == AccessibleRole::TABLE_CELL ||
+                nRole == AccessibleRole::TABLE );
             bool bShapeIsSelected = false;
 
             // Look up the shape in the (single or multi-) selection.
@@ -905,35 +957,99 @@ void ChildrenManagerImpl::UpdateSelection (void)
 
             // Set or reset the SELECTED state.
             if (bShapeIsSelected)
-                pAccessibleShape->SetState (AccessibleStateType::SELECTED);
+            {
+                if (pAccessibleShape->SetState (AccessibleStateType::SELECTED))
+                {
+                    if (bDrawShape)
+                    {
+                        vecSelect.push_back(std::make_pair(pAccessibleShape,sal_True));
+                        ++nAddSelect;
+                    }
+                }
+                else
+                {//Selected not change,has selected shape before
+                    bHasSelectedShape=sal_True;
+                }
+            }
             else
-                pAccessibleShape->ResetState (AccessibleStateType::SELECTED);
-
+                //pAccessibleShape->ResetState (AccessibleStateType::SELECTED);
+            {
+                if(pAccessibleShape->ResetState (AccessibleStateType::SELECTED))
+                {
+                    if(bDrawShape)
+                    {
+                        vecSelect.push_back(std::make_pair(pAccessibleShape,sal_False));
+                        ++nRemoveSelect;
+                    }
+                }
+            }
             // Does the shape have the current selection?
             if (pAccessibleShape->GetState (AccessibleStateType::FOCUSED))
                 pCurrentlyFocusedShape = pAccessibleShape;
         }
     }
 
-    // Check if the frame we are in is currently active.  If not then make
-    // sure to not send a FOCUSED state change.
-    if (xController.is())
+    Window *pParentWidow = maShapeTreeInfo.GetWindow();
+    bool bShapeActive= false;
+    // For table cell, the table's parent must be checked to make sure it has focus.
+    Window *pPWindow = pParentWidow->GetParent();
+    if (pParentWidow && ( pParentWidow->HasFocus() || (pPWindow && pPWindow->HasFocus())))
     {
-        Reference<frame::XFrame> xFrame (xController->getFrame());
-        if (xFrame.is())
-            if ( ! xFrame->isActive())
-                pNewFocusedShape = NULL;
+        bShapeActive =true;
     }
-
     // Move focus from current to newly focused shape.
     if (pCurrentlyFocusedShape != pNewFocusedShape)
     {
         if (pCurrentlyFocusedShape != NULL)
             pCurrentlyFocusedShape->ResetState (AccessibleStateType::FOCUSED);
-        if (pNewFocusedShape != NULL)
+        if (pNewFocusedShape != NULL && bShapeActive)
             pNewFocusedShape->SetState (AccessibleStateType::FOCUSED);
     }
 
+    if (nAddSelect >= 10 )//fire selection  within
+    {
+        mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_WITHIN,uno::Any(),uno::Any());
+        nAddSelect =0 ;//not fire selection event
+    }
+    //VEC_SHAPE::iterator vi = vecSelect.begin();
+    //for (; vi != vecSelect.end() ;++vi)
+    VEC_SHAPE::reverse_iterator vi = vecSelect.rbegin();
+    for (; vi != vecSelect.rend() ;++vi)
+
+    {
+        PAIR_SHAPE &pairShape= *vi;
+        Reference< XAccessible > xShape(pairShape.first);
+        uno::Any anyShape;
+        anyShape <<= xShape;
+
+        if (pairShape.second)//Selection add
+        {
+            if (bHasSelectedShape)
+            {
+                if (  nAddSelect > 0 )
+                {
+                    mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED_ADD,anyShape,uno::Any());
+                }
+            }
+            else
+            {
+                //if has not selected shape ,first selected shape is fire selection event;
+                if (nAddSelect > 0 )
+                {
+                    mrContext.CommitChange(AccessibleEventId::SELECTION_CHANGED,anyShape,uno::Any());
+                }
+                if (nAddSelect > 1 )//check other selected shape fire selection add event
+                {
+                    bHasSelectedShape=sal_True;
+                }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list