[Libreoffice-commits] core.git: 3 commits - include/svx sc/inc sd/inc sd/source svx/source

Steve Yin steve_y at apache.org
Thu Nov 28 05:33:01 PST 2013


 include/svx/svdmrkv.hxx                                           |    2 
 include/svx/svdpntv.hxx                                           |    2 
 sc/inc/sc.hrc                                                     |    1 
 sd/inc/drawdoc.hxx                                                |   11 
 sd/inc/glob.hxx                                                   |    1 
 sd/source/core/drawdoc.cxx                                        |    1 
 sd/source/core/drawdoc2.cxx                                       |   12 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx         |  159 +++-
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx         |  396 +++++++++-
 sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx        |   10 
 sd/source/ui/accessibility/AccessibleOutlineView.cxx              |   35 
 sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx |    5 
 sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx     |    7 
 sd/source/ui/accessibility/AccessiblePresentationShape.cxx        |   97 +-
 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx        |    4 
 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx          |   37 
 sd/source/ui/accessibility/accessibility.hrc                      |   38 
 sd/source/ui/accessibility/accessibility.src                      |  190 ++++
 sd/source/ui/dlg/navigatr.cxx                                     |   33 
 sd/source/ui/dlg/sdtreelb.cxx                                     |  321 +++++++-
 sd/source/ui/docshell/docshel4.cxx                                |  285 +++++++
 sd/source/ui/func/fudraw.cxx                                      |   12 
 sd/source/ui/func/fuediglu.cxx                                    |  100 ++
 sd/source/ui/func/fusel.cxx                                       |   92 ++
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx                   |   27 
 sd/source/ui/inc/AccessibleDrawDocumentView.hxx                   |   35 
 sd/source/ui/inc/AccessibleOutlineView.hxx                        |    4 
 sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx           |    3 
 sd/source/ui/inc/AccessiblePresentationOLEShape.hxx               |    3 
 sd/source/ui/inc/AccessiblePresentationShape.hxx                  |    1 
 sd/source/ui/inc/AccessibleSlideSorterView.hxx                    |    2 
 sd/source/ui/inc/DrawController.hxx                               |    9 
 sd/source/ui/inc/DrawDocShell.hxx                                 |   11 
 sd/source/ui/inc/DrawViewShell.hxx                                |   17 
 sd/source/ui/inc/OutlineViewShell.hxx                             |    2 
 sd/source/ui/inc/SdUnoDrawView.hxx                                |    4 
 sd/source/ui/inc/SlideSorterViewShell.hxx                         |    2 
 sd/source/ui/inc/TabControl.hxx                                   |    2 
 sd/source/ui/inc/ViewShell.hxx                                    |    5 
 sd/source/ui/inc/Window.hxx                                       |    1 
 sd/source/ui/inc/fuediglu.hxx                                     |    6 
 sd/source/ui/inc/fusel.hxx                                        |    8 
 sd/source/ui/inc/navigatr.hxx                                     |    5 
 sd/source/ui/inc/sdtreelb.hxx                                     |   29 
 sd/source/ui/slideshow/showwin.cxx                                |   22 
 sd/source/ui/slideshow/showwindow.hxx                             |    4 
 sd/source/ui/slideshow/slideshow.cxx                              |   11 
 sd/source/ui/slideshow/slideshowimpl.cxx                          |   10 
 sd/source/ui/slidesorter/controller/SlsFocusManager.cxx           |    3 
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx           |   17 
 sd/source/ui/unoidl/DrawController.cxx                            |   46 +
 sd/source/ui/view/Outliner.cxx                                    |   11 
 sd/source/ui/view/drviews4.cxx                                    |   38 
 sd/source/ui/view/drviews5.cxx                                    |    6 
 sd/source/ui/view/outlnvsh.cxx                                    |    8 
 sd/source/ui/view/sdwindow.cxx                                    |   29 
 sd/source/ui/view/tabcontr.cxx                                    |    5 
 sd/source/ui/view/viewshel.cxx                                    |   35 
 svx/source/svdraw/svdmrkv.cxx                                     |   19 
 svx/source/svdraw/svdpntv.cxx                                     |    5 
 60 files changed, 2226 insertions(+), 70 deletions(-)

New commits:
commit cc5518ca61b209408a9d5262bbdcc39efccdd72d
Author: Steve Yin <steve_y at apache.org>
Date:   Thu Nov 28 12:09:19 2013 +0000

    Integrate branch of IAccessible2
    
    Change-Id: Ibf3be46e8619c2dce9636e8a90a6703f3e28ba33

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index d8e2de7..695cf6b 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -141,6 +141,16 @@ namespace sd
 class SdDrawDocument : public FmFormModel
 {
 private:
+    OUString msDocAccTitle;
+public:
+    virtual void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
+    virtual const OUString getDocAccTitle() const { return msDocAccTitle; }
+private:
+    sal_Bool bReadOnly;
+public:
+    virtual void setDocReadOnly( sal_Bool b){ bReadOnly = b; }
+    virtual sal_Bool getDocReadOnly() const { return bReadOnly; }
+private:
     ::sd::Outliner*     mpOutliner;          ///< local outliner for outline mode
     ::sd::Outliner*     mpInternalOutliner;  ///< internal outliner for creation of text objects
     Timer*              mpWorkStartupTimer;
@@ -654,6 +664,7 @@ private:
 
     virtual void PageListChanged();
     virtual void MasterPageListChanged();
+    virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
 };
 
 namespace sd
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index f5e1565..4261774 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -30,6 +30,7 @@
 #define SD_IF_SDDRAWDOCSHELL            SFX_INTERFACE_SD_START + 1
 #define SD_IF_SDVIEWSHELL               SFX_INTERFACE_SD_START + 2
 #define SD_IF_SDDRAWVIEWSHELL           SFX_INTERFACE_SD_START + 3
+#define SD_IF_SDSLIDEVIEWSHELL          SFX_INTERFACE_SD_START + 4
 #define SD_IF_SDOUTLINEVIEWSHELL        SFX_INTERFACE_SD_START + 5
 #define SD_IF_SDDRAWSTDOBJECTBAR        SFX_INTERFACE_SD_START + 6
 #define SD_IF_SDDRAWTEXTOBJECTBAR       SFX_INTERFACE_SD_START + 7
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index f0c14c6..21b8ae9 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -147,6 +147,7 @@ PresentationSettings::PresentationSettings( const PresentationSettings& r )
 
 SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
 : FmFormModel( SvtPathOptions().GetPalettePath(), NULL, pDrDocSh )
+, bReadOnly(sal_False)
 , mpOutliner(NULL)
 , mpInternalOutliner(NULL)
 , mpWorkStartupTimer(NULL)
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index c02da25..6b29aa0 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -1037,14 +1037,22 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
     return pIMapObj;
 }
 
+ImageMap* SdDrawDocument::GetImageMapForObject(SdrObject* pObj)
+{
+    SdIMapInfo* pIMapInfo = GetIMapInfo( pObj );
+    if ( pIMapInfo )
+    {
+        return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+    }
+    return NULL;
+}
+
 /** this method enforces that the masterpages are in the currect order,
     that is at position 1 is a PK_STANDARD masterpage followed by a
     PK_NOTES masterpage and so on. #
 */
 void SdDrawDocument::CheckMasterPages()
 {
-//  RemoveMasterPage(2); // code to test the creation of notes pages
-
     sal_uInt16 nMaxPages = GetMasterPageCount();
 
     // we need at least a handout master and one master page
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 42758e1..cd41a1e 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -31,7 +31,8 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <rtl/ustring.h>
 #include<sfx2/viewfrm.hxx>
-
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <sfx2/objsh.hxx>
 #include <svx/AccessibleShape.hxx>
 
 #include <svx/svdobj.hxx>
@@ -40,8 +41,12 @@
 #include <toolkit/helper/vclunohelper.hxx>
 #include "Window.hxx"
 #include <vcl/svapp.hxx>
+#include "OutlineViewShell.hxx"
 
-
+#include <svx/svdlayer.hxx>
+#include <editeng/editobj.hxx>
+#include "LayerTabBar.hxx"
+#include <svtools/colorcfg.hxx>
 #include "ViewShell.hxx"
 #include "View.hxx"
 #include <memory>
@@ -79,6 +84,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
     maShapeTreeInfo.SetViewForwarder (&maViewForwarder);
 
     mxWindow = ::VCLUnoHelper::GetInterface (pSdWindow);
+    mpViewShell = pViewShell;
 }
 
 
@@ -150,6 +156,9 @@ void AccessibleDocumentViewBase::Init (void)
             }
         }
     }
+    SfxObjectShell* pObjShell = mpViewShell->GetViewFrame()->GetObjectShell();
+    if(!pObjShell->IsReadOnly())
+        SetState(AccessibleStateType::EDITABLE);
 }
 
 
@@ -422,6 +431,8 @@ uno::Any SAL_CALL
             static_cast<beans::XPropertyChangeListener*>(this),
             static_cast<awt::XWindowListener*>(this),
             static_cast<awt::XFocusListener*>(this)
+           ,static_cast<XAccessibleExtendedAttributes*>(this)
+           ,static_cast<XAccessibleGetAccFlowTo*>(this)
             );
     return aReturn;
 }
@@ -818,6 +829,150 @@ void
 {
 }
 
+uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+{
+    uno::Any anyAtrribute;
+    OUString sValue;
+    if (mpViewShell && mpViewShell->ISA(::sd::DrawViewShell))
+    {
+        ::sd::DrawViewShell* pDrViewSh = (::sd::DrawViewShell*) mpViewShell;
+        OUString sDisplay;
+        OUString sName = "page-name:";
+        // MT IA2: Not used...
+        // SdPage*  pCurrPge = pDrViewSh->getCurrentPage();
+        SdDrawDocument* pDoc = pDrViewSh->GetDoc();
+        sDisplay = pDrViewSh->getCurrentPage()->GetName();
+        sDisplay = sDisplay.replaceFirst( "\\", "\\\\" );
+        sDisplay = sDisplay.replaceFirst( "=", "\\=" );
+        sDisplay = sDisplay.replaceFirst( ";", "\\;" );
+        sDisplay = sDisplay.replaceFirst( ",", "\\," );
+        sDisplay = sDisplay.replaceFirst( ":", "\\:" );
+        sValue = sName + sDisplay ;
+        sName = ";page-number:";
+        sValue += sName;
+        sValue += OUString::number((sal_Int16)((sal_uInt16)((pDrViewSh->getCurrentPage()->GetPageNum()-1)>>1) + 1)) ;
+        sName = ";total-pages:";
+        sValue += sName;
+        sValue += OUString::number(pDrViewSh->GetPageTabControl()->GetPageCount()) ;
+        sValue += ";";
+        if(pDrViewSh->IsLayerModeActive() )
+        {
+            sName = "page-name:";
+            sValue = sName;
+            sDisplay = pDrViewSh->GetLayerTabControl()->GetPageText(pDrViewSh->GetLayerTabControl()->GetCurPageId());
+            if( pDoc )
+            {
+                SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
+                SdrLayer* aSdrLayer = rLayerAdmin.GetLayer(sDisplay, sal_False);
+                if( aSdrLayer )
+                {
+                    OUString layerAltText = aSdrLayer->GetTitle();
+                    if (!layerAltText.isEmpty())
+                    {
+                        sName = " ";
+                        sDisplay = sDisplay + sName;
+                        sDisplay += layerAltText;
+                    }
+                }
+            }
+            sDisplay = sDisplay.replaceFirst( "\\", "\\\\" );
+            sDisplay = sDisplay.replaceFirst( "=", "\\=" );
+            sDisplay = sDisplay.replaceFirst( ";", "\\;" );
+            sDisplay = sDisplay.replaceFirst( ",", "\\," );
+            sDisplay = sDisplay.replaceFirst( ":", "\\:" );
+            sValue +=  sDisplay;
+            sName = ";page-number:";
+            sValue += sName;
+            sValue += OUString::number(pDrViewSh->GetActiveTabLayerIndex()+1) ;
+            sName = ";total-pages:";
+            sValue += sName;
+            sValue += OUString::number(pDrViewSh->GetLayerTabControl()->GetPageCount()) ;
+            sValue += ";";
+        }
+    }
+    if (mpViewShell && mpViewShell->ISA(::sd::PresentationViewShell))
+    {
+        ::sd::PresentationViewShell* pPresViewSh = (::sd::PresentationViewShell*) mpViewShell;
+        SdPage* pCurrPge = pPresViewSh->getCurrentPage();
+        SdDrawDocument* pDoc = pPresViewSh->GetDoc();
+        SdPage* pNotesPge = (SdPage*)pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PK_NOTES);
+        if (pNotesPge)
+        {
+            SdrObject* pNotesObj = pNotesPge->GetPresObj(PRESOBJ_NOTES);
+            if (pNotesObj)
+            {
+                OutlinerParaObject* pPara = pNotesObj->GetOutlinerParaObject();
+                if (pPara)
+                {
+                    sValue += "note:";
+                    const EditTextObject& rEdit = pPara->GetTextObject();
+                    for (sal_uInt16 i=0;i<rEdit.GetParagraphCount();i++)
+                    {
+                        OUString strNote = rEdit.GetText(i);
+                        strNote = strNote.replaceFirst( "\\", "\\\\" );
+                        strNote = strNote.replaceFirst( "=", "\\=" );
+                        strNote = strNote.replaceFirst( ";", "\\;" );
+                        strNote = strNote.replaceFirst( ",", "\\," );
+                        strNote = strNote.replaceFirst( ":", "\\:" );
+                        sValue += strNote;
+                        sValue += ";";//to divide each paragraph
+                    }
+                }
+            }
+        }
+    }
+    if (mpViewShell && mpViewShell->ISA(::sd::OutlineViewShell) )
+    {
+        OUString sName;
+        OUString sDisplay;
+        SdPage* pCurrPge = mpViewShell->GetActualPage();
+        SdDrawDocument* pDoc = mpViewShell->GetDoc();
+        if(pCurrPge && pDoc)
+        {
+            sName = "page-name:";
+            sDisplay = pCurrPge->GetName();
+            sDisplay = sDisplay.replaceFirst( "=", "\\=" );
+            sDisplay = sDisplay.replaceFirst( ";", "\\;" );
+            sDisplay = sDisplay.replaceFirst( ",", "\\," );
+            sDisplay = sDisplay.replaceFirst( ":", "\\:" );
+            sValue = sName + sDisplay ;
+            sName = ";page-number:";
+            sValue += sName;
+            sValue += OUString::number((sal_Int16)((sal_uInt16)((pCurrPge->GetPageNum()-1)>>1) + 1)) ;
+            sName = ";total-pages:";
+            sValue += sName;
+            sValue += OUString::number(pDoc->GetSdPageCount(PK_STANDARD)) ;
+            sValue += ";";
+        }
+    }
+    if (sValue.getLength())
+        anyAtrribute <<= sValue;
+    return anyAtrribute;
+}
+
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+        SAL_CALL AccessibleDocumentViewBase::get_AccFlowTo(const ::com::sun::star::uno::Any&, sal_Int32 )
+        throw ( ::com::sun::star::uno::RuntimeException )
+{
+    ::com::sun::star::uno::Sequence< uno::Any> aRet;
+
+    return aRet;
+}
+
+sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground(  )
+        throw (uno::RuntimeException)
+{
+    return COL_BLACK;
+}
+
+sal_Int32 SAL_CALL AccessibleDocumentViewBase::getBackground(  )
+        throw (uno::RuntimeException)
+{
+     ThrowIfDisposed ();
+    ::osl::MutexGuard aGuard (maMutex);
+    return mpViewShell->GetView()->getColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
+}
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 7e9d9ee..5dd336d 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -46,6 +46,12 @@
 
 #include "ViewShell.hxx"
 #include "View.hxx"
+#include "DrawDocShell.hxx"
+#include <drawdoc.hxx>
+#include <algorithm>
+#include "sdpage.hxx"
+#include "slideshow.hxx"
+#include "anminfo.hxx"
 #include <memory>
 
 #include "accessibility.hrc"
@@ -59,6 +65,20 @@ using namespace ::com::sun::star::accessibility;
 namespace accessibility {
 
 
+struct XShapePosCompareHelper
+{
+    bool operator() ( const uno::Reference<drawing::XShape>& xshape1,
+        const uno::Reference<drawing::XShape>& xshape2 ) const
+    {
+        // modify the compare method to return the Z-Order, not layout order
+        SdrObject* pObj1 = GetSdrObjectFromXShape(xshape1);
+        SdrObject* pObj2 = GetSdrObjectFromXShape(xshape2);
+        if(pObj1 && pObj2)
+            return pObj1->GetOrdNum() < pObj2->GetOrdNum();
+        else
+            return 0;
+    }
+};
 //=====  internal  ============================================================
 
 AccessibleDrawDocumentView::AccessibleDrawDocumentView (
@@ -67,6 +87,7 @@ AccessibleDrawDocumentView::AccessibleDrawDocumentView (
     const uno::Reference<frame::XController>& rxController,
     const uno::Reference<XAccessible>& rxParent)
     : AccessibleDocumentViewBase (pSdWindow, pViewShell, rxController, rxParent),
+      mpSdViewSh( pViewShell ),
       mpChildrenManager (NULL)
 {
     OSL_TRACE ("AccessibleDrawDocumentView");
@@ -245,8 +266,39 @@ uno::Reference<XAccessible> SAL_CALL
             static_cast<uno::XWeak*>(this));
 }
 
+OUString SAL_CALL
+    AccessibleDrawDocumentView::getAccessibleName(void)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    OUString sName = SdResId(SID_SD_A11Y_D_PRESENTATION);
+    ::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+    if ( pSdView )
+    {
+        SdDrawDocument& rDoc = pSdView->GetDoc();
+        OUString sFileName = rDoc.getDocAccTitle();
+        if ( !sFileName.getLength() )
+        {
+            ::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+            if ( pDocSh )
+            {
+                sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+            }
+        }
 
+        OUString sReadOnly;
+        if(rDoc.getDocReadOnly())
+        {
+            sReadOnly = SdResId(SID_SD_A11Y_D_PRESENTATION_READONLY);
+        }
 
+        if ( sFileName.getLength() )
+        {
+            sName = sFileName + sReadOnly + " - " + sName;
+        }
+    }
+
+    return sName;
+}
 
 //=====  XEventListener  ======================================================
 
@@ -280,7 +332,9 @@ void SAL_CALL
     AccessibleDocumentViewBase::propertyChange (rEventObject);
 
     OSL_TRACE ("AccessibleDrawDocumentView::propertyChange");
-    if ( rEventObject.PropertyName == "CurrentPage" )
+    // add page switch event for slide show mode
+    if (rEventObject.PropertyName == "CurrentPage" ||
+        rEventObject.PropertyName == "PageChange")
     {
         OSL_TRACE ("    current page changed");
 
@@ -316,6 +370,7 @@ void SAL_CALL
         }
         else
             OSL_TRACE ("View invalid");
+        CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
     }
     else if ( rEventObject.PropertyName == "VisibleArea" )
     {
@@ -325,6 +380,57 @@ void SAL_CALL
                 IAccessibleViewForwarderListener::VISIBLE_AREA,
                 &maViewForwarder);
     }
+    else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("ActiveLayer")))
+    {
+        CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+    }
+    else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("UpdateAcc")))
+    {
+        OSL_TRACE ("    acc on current page should be updated");
+
+        // The current page changed.  Update the children manager accordingly.
+        uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
+        if (xView.is() && mpChildrenManager!=NULL)
+        {
+            // Inform the children manager to forget all children and give
+            // him the new ones.
+            mpChildrenManager->ClearAccessibleShapeList ();
+            // update the slide show page's accessible info
+            //mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
+            //    xView->getCurrentPage(), uno::UNO_QUERY));
+            rtl::Reference< sd::SlideShow > xSlideshow( sd::SlideShow::GetSlideShow( mpSdViewSh->GetViewShellBase() ) );
+            if( xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->isFullScreen() )
+            {
+                ::com::sun::star::uno::Reference< drawing::XDrawPage > xSlide;
+                // MT IA2: Not used...
+                // sal_Int32 currentPageIndex = xSlideshow->getCurrentPageIndex();
+                ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XSlideShowController > mpSlideController = xSlideshow->getController();
+                if( mpSlideController.is() )
+                {
+                    xSlide = mpSlideController->getCurrentSlide();
+                    if (xSlide.is())
+                    {
+                        mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
+                                    xSlide, uno::UNO_QUERY));
+                    }
+                }
+            }
+            // Create the page shape and initialize it.  The shape is
+            // acquired before initialization and released after
+            // transferring ownership to the children manager to prevent
+            // premature disposing of the shape.
+            AccessiblePageShape* pPage = CreateDrawPageShape ();
+            if (pPage != NULL)
+            {
+                pPage->acquire();
+                pPage->Init();
+                mpChildrenManager->AddAccessibleShape (
+                    std::auto_ptr<AccessibleShape>(pPage));
+                mpChildrenManager->Update (false);
+                pPage->release();
+            }
+        }
+    }
     else
     {
         OSL_TRACE ("  unhandled");
@@ -364,12 +470,139 @@ OUString SAL_CALL
     return aServiceNames;
 }
 
+//=====  XInterface  ==========================================================
 
+uno::Any SAL_CALL
+    AccessibleDrawDocumentView::queryInterface (const uno::Type & rType)
+    throw (uno::RuntimeException)
+{
+    uno::Any aReturn = AccessibleDocumentViewBase::queryInterface (rType);
+    if ( ! aReturn.hasValue())
+        aReturn = ::cppu::queryInterface (rType,
+            static_cast<XAccessibleGroupPosition*>(this)
+            );
+    return aReturn;
+}
 
+void SAL_CALL
+    AccessibleDrawDocumentView::acquire (void)
+    throw ()
+{
+    AccessibleDocumentViewBase::acquire ();
+}
+void SAL_CALL
+    AccessibleDrawDocumentView::release (void)
+    throw ()
+{
+    AccessibleDocumentViewBase::release ();
+}
+//=====  XAccessibleGroupPosition  =========================================
+uno::Sequence< sal_Int32 > SAL_CALL
+    AccessibleDrawDocumentView::getGroupPosition( const uno::Any& rAny )
+    throw (uno::RuntimeException)
+{
+    // we will return the:
+    // [0] group level(always be 0 now)
+    // [1] similar items counts in the group
+    // [2] the position of the object in the group
+    uno::Sequence< sal_Int32 > aRet( 3 );
+    //get the xShape of the current selected drawing object
+    uno::Reference<XAccessibleContext> xAccContent;
+    rAny >>= xAccContent;
+    if ( !xAccContent.is() )
+    {
+        return aRet;
+    }
+    AccessibleShape* pAcc = AccessibleShape::getImplementation( xAccContent );
+    if ( !pAcc )
+    {
+        return aRet;
+    }
+    uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
+    if ( !xCurShape.is() )
+    {
+        return aRet;
+    }
+    //find all the child in the page, insert them into a vector and sort
+    if ( mpChildrenManager == NULL )
+    {
+        return aRet;
+    }
+    std::vector< uno::Reference<drawing::XShape> > vXShapes;
+    sal_Int32 nCount = mpChildrenManager->GetChildCount();
+    //get pointer of SdView & SdrPageView for further use.
+    SdrPageView* pPV = NULL;
+    ::sd::View* pSdView = NULL;
+    if ( mpSdViewSh )
+    {
+        pSdView = mpSdViewSh->GetView();
+        pPV = pSdView->GetSdrPageView();
+    }
+    for ( sal_Int32 i = 0; i < nCount; i++ )
+    {
+        uno::Reference< drawing::XShape > xShape = mpChildrenManager->GetChildShape(i);
+        if ( xShape.is() )
+        {
+            //if the object is visable in the page, we add it into the group list.
+            SdrObject* pObj = GetSdrObjectFromXShape(xShape);
+            if ( pObj && pPV && pSdView && pSdView->IsObjMarkable( pObj, pPV ) )
+            {
+                vXShapes.push_back( xShape );
+            }
+        }
+    }
+    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() == xCurShape.get() )
+        {
+            sal_Int32* pArray = aRet.getArray();
+            pArray[0] = 1; //it should be 1 based, not 0 based.
+            pArray[1] = vXShapes.size();
+            pArray[2] = nPos;
+            break;
+        }
+    }
+    return aRet;
+}
+
+OUString AccessibleDrawDocumentView::getObjectLink( const uno::Any& rAny )
+    throw (uno::RuntimeException)
+{
+    OUString aRet;
+    //get the xShape of the current selected drawing object
+    uno::Reference<XAccessibleContext> xAccContent;
+    rAny >>= xAccContent;
+    if ( !xAccContent.is() )
+    {
+        return aRet;
+    }
+    AccessibleShape* pAcc = AccessibleShape::getImplementation( xAccContent );
+    if ( !pAcc )
+    {
+        return aRet;
+    }
+    uno::Reference< drawing::XShape > xCurShape = pAcc->GetXShape();
+    if ( !xCurShape.is() )
+    {
+        return aRet;
+    }
+    SdrObject* pObj = GetSdrObjectFromXShape(xCurShape);
+    if (pObj)
+    {
+        SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
+        if( pInfo && (pInfo->meClickAction == presentation::ClickAction_DOCUMENT) )
+            aRet = pInfo->GetBookmark();
+    }
+    return aRet;
+}
 
 /// Create a name for this view.
-OUString
-    AccessibleDrawDocumentView::CreateAccessibleName (void)
+OUString AccessibleDrawDocumentView::CreateAccessibleName (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
     OUString sName;
@@ -615,13 +848,20 @@ void AccessibleDrawDocumentView::Activated (void)
 {
     if (mpChildrenManager != NULL)
     {
-        mpChildrenManager->UpdateSelection();
+        sal_Bool bChange = sal_False;
         // When none of the children has the focus then claim it for the
         // view.
         if ( ! mpChildrenManager->HasFocus())
+        {
             SetState (AccessibleStateType::FOCUSED);
+            bChange = sal_True;
+        }
         else
             ResetState (AccessibleStateType::FOCUSED);
+    mpChildrenManager->UpdateSelection();
+    // if the child gets focus in UpdateSelection(), needs to reset the focus on document.
+    if (mpChildrenManager->HasFocus() && bChange)
+        ResetState (AccessibleStateType::FOCUSED);
     }
 }
 
@@ -668,8 +908,156 @@ void SAL_CALL AccessibleDrawDocumentView::disposing (void)
     AccessibleDocumentViewBase::disposing ();
 }
 
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+        SAL_CALL AccessibleDrawDocumentView::get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+        throw ( ::com::sun::star::uno::RuntimeException )
+{
+    const sal_Int32 SPELLCHECKFLOWTO = 1;
+    const sal_Int32 FINDREPLACEFLOWTO = 2;
+    if ( nType == SPELLCHECKFLOWTO )
+    {
+        uno::Reference< ::com::sun::star::drawing::XShape > xShape;
+        rAny >>= xShape;
+        if ( mpChildrenManager && xShape.is() )
+        {
+            uno::Reference < XAccessible > xAcc = mpChildrenManager->GetChild(xShape);
+            uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
+            if ( xAccSelection.is() )
+            {
+                if ( xAccSelection->getSelectedAccessibleChildCount() )
+                {
+                    uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
+                    if ( xSel.is() )
+                    {
+                        uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
+                        if ( xSelContext.is() )
+                        {
+                            //if in sw we find the selected paragraph here
+                            if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+                            {
+                                uno::Sequence<uno::Any> aRet( 1 );
+                                aRet[0] = uno::makeAny( xSel );
+                                return aRet;
+                            }
+                        }
+                    }
+                }
+            }
+            uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
+            if ( xPara.is() )
+            {
+                uno::Sequence<uno::Any> aRet( 1 );
+                aRet[0] = uno::makeAny( xPara );
+                return aRet;
+            }
+        }
+        else
+        {
+            goto Rt;
+        }
+    }
+    else if ( nType == FINDREPLACEFLOWTO )
+    {
+        sal_Int32 nChildCount = getSelectedAccessibleChildCount();
+        if ( nChildCount )
+        {
+            uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 );
+            if ( xSel.is() )
+            {
+                uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY );
+                if ( xAccChildSelection.is() )
+                {
+                    if ( xAccChildSelection->getSelectedAccessibleChildCount() )
+                    {
+                        uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 );
+                        if ( xChildSel.is() )
+                        {
+                            uno::Reference < XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() );
+                            if ( xChildSelContext.is() &&
+                                xChildSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+                            {
+                                uno::Sequence<uno::Any> aRet( 1 );
+                                aRet[0] = uno::makeAny( xChildSel );
+                                return aRet;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        else
+        {
+            uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
+            if ( xPara.is() )
+            {
+                uno::Sequence<uno::Any> aRet( 1 );
+                aRet[0] = uno::makeAny( xPara );
+                return aRet;
+            }
+        }
+    }
 
+Rt:
+    ::com::sun::star::uno::Sequence< uno::Any> aRet;
+    return aRet;
+}
+uno::Reference<XAccessible> AccessibleDrawDocumentView::GetSelAccContextInTable()
+{
+    uno::Reference<XAccessible> xRet;
+    sal_Int32 nCount = mpChildrenManager ? mpChildrenManager->GetChildCount() : 0;
+    if ( nCount )
+    {
+        for ( sal_Int32 i = 0; i < nCount; i++ )
+        {
+            try
+            {
+                uno::Reference<XAccessible> xObj = mpChildrenManager->GetChild(i);
+                if ( xObj.is() )
+                {
+                    uno::Reference<XAccessibleContext> xObjContext( xObj, uno::UNO_QUERY );
+                    if ( xObjContext.is() && xObjContext->getAccessibleRole() == AccessibleRole::TABLE )
+                    {
+                        uno::Reference<XAccessibleSelection> xObjSelection( xObj, uno::UNO_QUERY );
+                        if ( xObjSelection.is() && xObjSelection->getSelectedAccessibleChildCount() )
+                        {
+                            uno::Reference<XAccessible> xCell = xObjSelection->getSelectedAccessibleChild(0);
+                            if ( xCell.is() )
+                            {
+                                uno::Reference<XAccessibleSelection> xCellSel( xCell, uno::UNO_QUERY );
+                                if ( xCellSel.is() && xCellSel->getSelectedAccessibleChildCount() )
+                                {
+                                    uno::Reference<XAccessible> xPara = xCellSel->getSelectedAccessibleChild( 0 );
+                                    if ( xPara.is() )
+                                    {
+                                        uno::Reference<XAccessibleContext> xParaContext( xPara, uno::UNO_QUERY );
+                                        if ( xParaContext.is() &&
+                                            xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
+                                        {
+                                            xRet = xPara;
+                                            return xRet;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            catch ( lang::IndexOutOfBoundsException )
+            {
+                uno::Reference<XAccessible> xEmpty;
+                return xEmpty;
+            }
+            catch ( uno::RuntimeException )
+            {
+                uno::Reference<XAccessible> xEmpty;
+                return xEmpty;
+            }
+        }
+    }
 
+    return xRet;
+}
 
 void AccessibleDrawDocumentView::UpdateAccessibleName (void)
 {
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index bb1bcff..981ee3b 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -40,7 +40,8 @@ namespace accessibility
           mViewForwarder( rOutlView )
     {
         // register as listener - need to broadcast state change messages
-        rOutliner.SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
+        // Moved to ::GetTextForwarder()
+        //rOutliner.SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
         StartListening(rOutliner);
     }
 
@@ -53,14 +54,19 @@ namespace accessibility
 
     SvxEditSource* AccessibleOutlineEditSource::Clone() const
     {
-        return NULL;
+        return new AccessibleOutlineEditSource(*mpOutliner, mrView, *mpOutlinerView, mrWindow);
     }
 
     SvxTextForwarder* AccessibleOutlineEditSource::GetTextForwarder()
     {
         // TODO: maybe suboptimal
         if( IsValid() )
+        {
+            // Moved here to make sure that
+            // the NotifyHandler was set on the current object.
+            mpOutliner->SetNotifyHdl( LINK(this, AccessibleOutlineEditSource, NotifyHdl) );
             return &mTextForwarder;
+        }
         else
             return NULL;
     }
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index 724c4d9..981f03c 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -140,6 +140,34 @@ uno::Reference<XAccessible> SAL_CALL
     return maTextHelper.GetChild(nIndex);
 }
 
+#include <drawdoc.hxx>
+
+OUString SAL_CALL
+    AccessibleOutlineView::getAccessibleName(void)
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    OUString sName = SdResId(SID_SD_A11Y_D_PRESENTATION);
+    ::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+    if ( pSdView )
+    {
+        SdDrawDocument& rDoc = pSdView->GetDoc();
+        rtl::OUString sFileName = rDoc.getDocAccTitle();
+        if (sFileName.isEmpty())
+        {
+            ::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+            if ( pDocSh )
+            {
+                sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+            }
+        }
+        if (!sFileName.isEmpty())
+        {
+            sName = sFileName + " - " + sName;
+        }
+    }
+    return sName;
+}
+
 //=====  XAccessibleEventBroadcaster  ========================================
 
 void SAL_CALL AccessibleOutlineView::addAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -147,6 +175,7 @@ void SAL_CALL AccessibleOutlineView::addAccessibleEventListener( const uno::Refe
     // delegate listener handling to children manager.
     if ( ! IsDisposed())
         maTextHelper.AddEventListener(xListener);
+    AccessibleContextBase::addEventListener(xListener);
 }
 
 void SAL_CALL AccessibleOutlineView::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -154,6 +183,7 @@ void SAL_CALL AccessibleOutlineView::removeAccessibleEventListener( const uno::R
     // forward
     if ( ! IsDisposed())
         maTextHelper.RemoveEventListener(xListener);
+    AccessibleContextBase::removeEventListener(xListener);
 }
 
 //=====  XServiceInfo  ========================================================
@@ -218,12 +248,15 @@ void SAL_CALL
     AccessibleDocumentViewBase::propertyChange (rEventObject);
 
     OSL_TRACE ("AccessibleOutlineView::propertyChange");
-    if ( rEventObject.PropertyName == "CurrentPage" )
+    //add page switch event for slide show mode
+    if (rEventObject.PropertyName == "CurrentPage" ||
+        rEventObject.PropertyName == "PageChange")
     {
         OSL_TRACE ("    current page changed");
 
         // The current page changed. Update the children accordingly.
         UpdateChildren();
+        CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue, rEventObject.OldValue);
     }
     else if ( rEventObject.PropertyName == "VisibleArea" )
     {
diff --git a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
index 220792d..d8600b0 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
@@ -112,6 +112,11 @@ OUString
     return aDG();
 }
 
+sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole ()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    return  AccessibleRole::GRAPHIC ;
+}
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
index 64e14d9..c3f2be9 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
@@ -118,6 +118,13 @@ OUString
     return aDG();
 }
 
+//  Return this object's role.
+sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole ()
+    throw (::com::sun::star::uno::RuntimeException)
+{
+    return  AccessibleRole::EMBEDDED_OBJECT ;
+}
+
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
index 2b48c2b..c4ff853 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
@@ -21,6 +21,9 @@
 
 #include "SdShapeTypes.hxx"
 
+#include "accessibility.hrc"
+#include "sdresid.hxx"
+#include <tools/string.hxx>
 #include <svx/DescriptionGenerator.hxx>
 #include <rtl/ustring.h>
 
@@ -62,8 +65,7 @@ OUString SAL_CALL
 
 
 /// Set this object's name if is different to the current name.
-OUString
-    AccessiblePresentationShape::CreateAccessibleBaseName (void)
+OUString AccessiblePresentationShape::CreateAccessibleBaseName (void)
     throw (::com::sun::star::uno::RuntimeException)
 {
     OUString sName;
@@ -72,37 +74,37 @@ OUString
     switch (nShapeType)
     {
         case PRESENTATION_TITLE:
-            sName = "ImpressTitle";
+            sName = SdResId(SID_SD_A11Y_P_TITLE_N);
             break;
         case PRESENTATION_OUTLINER:
-            sName = "ImpressOutliner";
+            sName = SdResId(SID_SD_A11Y_P_OUTLINER_N);
             break;
         case PRESENTATION_SUBTITLE:
-            sName = "ImpressSubtitle";
+            sName = SdResId(SID_SD_A11Y_P_SUBTITLE_N);
             break;
         case PRESENTATION_PAGE:
-            sName = "ImpressPage";
+            sName = SdResId(SID_SD_A11Y_P_PAGE_N);
             break;
         case PRESENTATION_NOTES:
-            sName = "ImpressNotes";
+            sName = SdResId(SID_SD_A11Y_P_NOTES_N);
             break;
         case PRESENTATION_HANDOUT:
-            sName = "ImpressHandout";
+            sName = SdResId(SID_SD_A11Y_P_HANDOUT_N);
             break;
         case PRESENTATION_HEADER:
-            sName = "ImpressHeader";
+            sName = SdResId(SID_SD_A11Y_P_HEADER_N);
             break;
         case PRESENTATION_FOOTER:
-            sName = "ImpressFooter";
+            sName = SdResId(SID_SD_A11Y_P_FOOTER_N);
             break;
         case PRESENTATION_DATETIME:
-            sName = "ImpressDateAndTime";
+            sName = SdResId(SID_SD_A11Y_P_DATE_N);
             break;
         case PRESENTATION_PAGENUMBER:
-            sName = "ImpressPageNumber";
+            sName = SdResId(SID_SD_A11Y_P_NUMBER_N);
             break;
         default:
-            sName = "UnknownAccessibleImpressShape";
+            sName = SdResId(SID_SD_A11Y_P_UNKNOWN_N);
             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
             if (xDescriptor.is())
                 sName += ": " + xDescriptor->getShapeType();
@@ -124,37 +126,37 @@ OUString
     switch (nShapeType)
     {
         case PRESENTATION_TITLE:
-            aDG.Initialize ("PresentationTitleShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_TITLE_D));
             break;
         case PRESENTATION_OUTLINER:
-            aDG.Initialize ("PresentationOutlinerShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_OUTLINER_D));
             break;
         case PRESENTATION_SUBTITLE:
-            aDG.Initialize ("PresentationSubtitleShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_SUBTITLE_D));
             break;
         case PRESENTATION_PAGE:
-            aDG.Initialize ("PresentationPageShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_PAGE_D));
             break;
         case PRESENTATION_NOTES:
-            aDG.Initialize ("PresentationNotesShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_NOTES_D));
             break;
         case PRESENTATION_HANDOUT:
-            aDG.Initialize ("PresentationHandoutShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_HANDOUT_D));
             break;
         case PRESENTATION_HEADER:
-            aDG.Initialize ("PresentationHeaderShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_HEADER_D));
             break;
         case PRESENTATION_FOOTER:
-            aDG.Initialize ("PresentationFooterShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_FOOTER_D));
             break;
         case PRESENTATION_DATETIME:
-            aDG.Initialize ("PresentationDateAndTimeShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_DATE_D));
             break;
         case PRESENTATION_PAGENUMBER:
-            aDG.Initialize ("PresentationPageNumberShape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_NUMBER_D));
             break;
         default:
-            aDG.Initialize ("Unknown accessible presentation shape");
+            aDG.Initialize (SdResId(SID_SD_A11Y_P_UNKNOWN_D));
             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
             if (xDescriptor.is())
             {
@@ -166,6 +168,53 @@ OUString
     return aDG();
 }
 
+OUString AccessiblePresentationShape::GetStyle()
+{
+    OUString sName;
+
+    ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+    switch (nShapeType)
+    {
+        case PRESENTATION_TITLE:
+            sName = SdResId(SID_SD_A11Y_P_TITLE_N_STYLE);
+            break;
+        case PRESENTATION_OUTLINER:
+            sName = SdResId(SID_SD_A11Y_P_OUTLINER_N_STYLE);
+            break;
+        case PRESENTATION_SUBTITLE:
+            sName = SdResId(SID_SD_A11Y_P_SUBTITLE_N_STYLE);
+            break;
+        case PRESENTATION_PAGE:
+            sName = SdResId(SID_SD_A11Y_P_PAGE_N_STYLE);
+            break;
+        case PRESENTATION_NOTES:
+            sName = SdResId(SID_SD_A11Y_P_NOTES_N_STYLE);
+            break;
+        case PRESENTATION_HANDOUT:
+            sName = SdResId(SID_SD_A11Y_P_HANDOUT_N_STYLE);
+            break;
+        case PRESENTATION_FOOTER:
+            sName = SdResId(SID_SD_A11Y_P_FOOTER_N_STYLE);
+            break;
+        case PRESENTATION_HEADER:
+            sName = SdResId(SID_SD_A11Y_P_HEADER_N_STYLE);
+            break;
+        case PRESENTATION_DATETIME:
+            sName = SdResId(SID_SD_A11Y_P_DATE_N_STYLE);
+            break;
+        case PRESENTATION_PAGENUMBER:
+            sName = SdResId(SID_SD_A11Y_P_NUMBER_N_STYLE);
+            break;
+        default:
+            sName = SdResId(SID_SD_A11Y_P_UNKNOWN_N_STYLE);
+            uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
+            if (xDescriptor.is())
+                sName += ": " + xDescriptor->getShapeType();
+    }
+
+    return sName;
+
+}
 } // end of namespace accessibility
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index c5177c1..f157711 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -192,7 +192,9 @@ sal_Int16 SAL_CALL AccessibleSlideSorterObject::getAccessibleRole (void)
     throw (uno::RuntimeException)
 {
     ThrowIfDisposed();
-    static sal_Int16 nRole = AccessibleRole::LIST_ITEM;
+    //set Role = Shape
+    //static sal_Int16 nRole = AccessibleRole::LIST_ITEM;
+    static sal_Int16 nRole = AccessibleRole::SHAPE;
     return nRole;
 }
 
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index e682668..f9ba34e 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -86,6 +86,7 @@ public:
     DECL_LINK(VisibilityChangeListener, void*);
     DECL_LINK(UpdateChildrenCallback, void*);
 
+    void Activated(void);
 private:
     AccessibleSlideSorterView& mrAccessibleSlideSorter;
     ::sd::slidesorter::SlideSorter& mrSlideSorter;
@@ -833,6 +834,11 @@ void AccessibleSlideSorterView::Implementation::RequestUpdateChildren (void)
 
 void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
 {
+      //By default, all children should be accessable. So here workaround is to make all children visible.
+      // MT: THis was in UpdateVisibility, which has some similarity, and hg merge automatically has put it here. Correct?!
+      // In the IA2 CWS, also setting mnFirst/LastVisibleChild was commented out!
+      mnLastVisibleChild = maPageObjects.size();
+
     if (mbModelChangeLocked)
     {
         // Do nothing right now.  When the flag is reset, this method is
@@ -1028,6 +1034,22 @@ void AccessibleSlideSorterView::Implementation::Notify (
 }
 
 
+void AccessibleSlideSorterView::SwitchViewActivated (void)
+{
+    // Firstly, set focus to view
+    this->FireAccessibleEvent(AccessibleEventId::STATE_CHANGED,
+                    Any(),
+                    Any(AccessibleStateType::FOCUSED));
+
+    mpImpl->Activated();
+}
+
+void AccessibleSlideSorterView::Implementation::Activated()
+{
+    mrSlideSorter.GetController().GetFocusManager().ShowFocus();
+
+}
+
 
 
 IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWindowEvent*, pEvent)
@@ -1084,27 +1106,40 @@ IMPL_LINK_NOARG(AccessibleSlideSorterView::Implementation, FocusChangeListener)
     sal_Int32 nNewFocusedIndex (
         mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex());
 
+    sal_Bool bHasFocus = mrSlideSorter.GetController().GetFocusManager().IsFocusShowing();
+    if (!bHasFocus)
+        nNewFocusedIndex = -1;
+
+    // add a checker whether the focus event is sent out. Only after sent, the mnFocusedIndex should be updated.
+    sal_Bool bSentFocus = sal_False;
     if (nNewFocusedIndex != mnFocusedIndex)
     {
         if (mnFocusedIndex >= 0)
         {
             AccessibleSlideSorterObject* pObject = GetAccessibleChild(mnFocusedIndex);
             if (pObject != NULL)
+            {
                 pObject->FireAccessibleEvent(
                     AccessibleEventId::STATE_CHANGED,
                     Any(AccessibleStateType::FOCUSED),
                     Any());
+                bSentFocus = sal_True;
+            }
         }
         if (nNewFocusedIndex >= 0)
         {
             AccessibleSlideSorterObject* pObject = GetAccessibleChild(nNewFocusedIndex);
             if (pObject != NULL)
+            {
                 pObject->FireAccessibleEvent(
                     AccessibleEventId::STATE_CHANGED,
                     Any(),
                     Any(AccessibleStateType::FOCUSED));
+                bSentFocus = sal_True;
+            }
         }
-        mnFocusedIndex = nNewFocusedIndex;
+        if (bSentFocus == sal_True)
+            mnFocusedIndex = nNewFocusedIndex;
     }
     return 1;
 }
diff --git a/sd/source/ui/accessibility/accessibility.hrc b/sd/source/ui/accessibility/accessibility.hrc
index 4e58278..b3145f0 100644
--- a/sd/source/ui/accessibility/accessibility.hrc
+++ b/sd/source/ui/accessibility/accessibility.hrc
@@ -38,7 +38,45 @@
 #define SID_SD_A11Y_I_HANDOUTVIEW_N     (SID_SD_A11Y_START + 10)
 #define SID_SD_A11Y_I_HANDOUTVIEW_D     (SID_SD_A11Y_START + 11)
 
+#define SID_SD_A11Y_P_TITLE_N           (SID_SD_A11Y_START + 12)
+#define SID_SD_A11Y_P_TITLE_D           (SID_SD_A11Y_START + 13)
+#define SID_SD_A11Y_P_OUTLINER_N        (SID_SD_A11Y_START + 14)
+#define SID_SD_A11Y_P_OUTLINER_D        (SID_SD_A11Y_START + 15)
+#define SID_SD_A11Y_P_SUBTITLE_N        (SID_SD_A11Y_START + 16)
+#define SID_SD_A11Y_P_SUBTITLE_D        (SID_SD_A11Y_START + 17)
+#define SID_SD_A11Y_P_PAGE_N            (SID_SD_A11Y_START + 18)
+#define SID_SD_A11Y_P_PAGE_D            (SID_SD_A11Y_START + 19)
+#define SID_SD_A11Y_P_NOTES_N           (SID_SD_A11Y_START + 20)
+#define SID_SD_A11Y_P_NOTES_D           (SID_SD_A11Y_START + 21)
+#define SID_SD_A11Y_P_HANDOUT_N         (SID_SD_A11Y_START + 22)
+#define SID_SD_A11Y_P_HANDOUT_D         (SID_SD_A11Y_START + 23)
+#define SID_SD_A11Y_P_UNKNOWN_N         (SID_SD_A11Y_START + 24)
+#define SID_SD_A11Y_P_UNKNOWN_D         (SID_SD_A11Y_START + 25)
+#define SID_SD_A11Y_P_FOOTER_N          (SID_SD_A11Y_START + 26)
+#define SID_SD_A11Y_P_FOOTER_D          (SID_SD_A11Y_START + 27)
+#define SID_SD_A11Y_P_HEADER_N          (SID_SD_A11Y_START + 28)
+#define SID_SD_A11Y_P_HEADER_D          (SID_SD_A11Y_START + 29)
+#define SID_SD_A11Y_P_DATE_N            (SID_SD_A11Y_START + 30)
+#define SID_SD_A11Y_P_DATE_D            (SID_SD_A11Y_START + 31)
+#define SID_SD_A11Y_P_NUMBER_N          (SID_SD_A11Y_START + 32)
+#define SID_SD_A11Y_P_NUMBER_D          (SID_SD_A11Y_START + 33)
+#define SID_SD_A11Y_D_PRESENTATION      (SID_SD_A11Y_START + 34)
+#define SID_SD_A11Y_P_TITLE_N_STYLE       (SID_SD_A11Y_START + 35)
+#define SID_SD_A11Y_P_OUTLINER_N_STYLE    (SID_SD_A11Y_START + 36)
+#define SID_SD_A11Y_P_SUBTITLE_N_STYLE    (SID_SD_A11Y_START + 37)
+#define SID_SD_A11Y_P_PAGE_N_STYLE        (SID_SD_A11Y_START + 38)
+#define SID_SD_A11Y_P_NOTES_N_STYLE       (SID_SD_A11Y_START + 39)
+#define SID_SD_A11Y_P_HANDOUT_N_STYLE     (SID_SD_A11Y_START + 40)
+#define SID_SD_A11Y_P_UNKNOWN_N_STYLE     (SID_SD_A11Y_START + 41)
+#define SID_SD_A11Y_P_FOOTER_N_STYLE      (SID_SD_A11Y_START + 42)
+#define SID_SD_A11Y_P_HEADER_N_STYLE      (SID_SD_A11Y_START + 43)
+#define SID_SD_A11Y_P_DATE_N_STYLE        (SID_SD_A11Y_START + 44)
+#define SID_SD_A11Y_P_NUMBER_N_STYLE      (SID_SD_A11Y_START + 45)
 
+#define SID_SD_A11Y_I_PREVIEW_N (SID_SD_A11Y_START + 46)
+#define SID_SD_A11Y_I_PREVIEW_D (SID_SD_A11Y_START + 47)
+#define SID_SD_A11Y_I_PREVIEW_SUFFIX (SID_SD_A11Y_START + 48)
+#define SID_SD_A11Y_D_PRESENTATION_READONLY (SID_SD_A11Y_START + 49)
 #endif /* _SD_ACCESSIBILITY_HRC */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/accessibility.src b/sd/source/ui/accessibility/accessibility.src
index 76598e2..0d22039 100644
--- a/sd/source/ui/accessibility/accessibility.src
+++ b/sd/source/ui/accessibility/accessibility.src
@@ -83,4 +83,194 @@ String SID_SD_A11Y_I_HANDOUTVIEW_D
     Text [ en-US ] = "This is where you decide on the layout for handouts.";
 };
 
+String SID_SD_A11Y_P_TITLE_N
+{
+    Text [ en-US ] = "PresentationTitle";
+};
+
+String SID_SD_A11Y_P_OUTLINER_N
+{
+    Text [ en-US ] = "PresentationOutliner";
+};
+
+String SID_SD_A11Y_P_SUBTITLE_N
+{
+    Text [ en-US ] = "PresentationSubtitle";
+};
+
+String SID_SD_A11Y_P_PAGE_N
+{
+    Text [ en-US ] = "PresentationPage";
+};
+
+String SID_SD_A11Y_P_NOTES_N
+{
+    Text [ en-US ] = "PresentationNotes";
+};
+
+String SID_SD_A11Y_P_HANDOUT_N
+{
+    Text [ en-US ] = "Handout";
+};
+
+String SID_SD_A11Y_P_UNKNOWN_N
+{
+    Text [ en-US ] = "UnknownAccessiblePresentationShape";
+};
+
+String SID_SD_A11Y_P_TITLE_D
+{
+    Text [ en-US ] = "PresentationTitleShape";
+};
+
+String SID_SD_A11Y_P_OUTLINER_D
+{
+    Text [ en-US ] = "PresentationOutlinerShape";
+};
+
+String SID_SD_A11Y_P_SUBTITLE_D
+{
+    Text [ en-US ] = "PresentationSubtitleShape";
+};
+
+String SID_SD_A11Y_P_PAGE_D
+{
+    Text [ en-US ] = "PresentationPageShape";
+};
+
+String SID_SD_A11Y_P_NOTES_D
+{
+    Text [ en-US ] = "PresentationNotesShape";
+};
+
+String SID_SD_A11Y_P_HANDOUT_D
+{
+    Text [ en-US ] = "PresentationHandoutShape";
+};
+
+String SID_SD_A11Y_P_UNKNOWN_D
+{
+    Text [ en-US ] = "Unknown accessible presentation shape";
+};
+
+String SID_SD_A11Y_P_FOOTER_N
+{
+    Text [ en-US ] = "PresentationFooter";
+};
+
+String SID_SD_A11Y_P_FOOTER_D
+{
+    Text [ en-US ] = "PresentationFooterShape";
+};
+
+String SID_SD_A11Y_P_HEADER_N
+{
+    Text [ en-US ] = "PresentationHeader";
+};
+
+String SID_SD_A11Y_P_HEADER_D
+{
+    Text [ en-US ] = "PresentationHeaderShape";
+};
+
+String SID_SD_A11Y_P_DATE_N
+{
+    Text [ en-US ] = "PresentationDateAndTime";
+};
+
+String SID_SD_A11Y_P_DATE_D
+{
+    Text [ en-US ] = "PresentationDateAndTimeShape";
+};
+
+String SID_SD_A11Y_P_NUMBER_N
+{
+    Text [ en-US ] = "PresentationPageNumber";
+};
+
+String SID_SD_A11Y_P_NUMBER_D
+{
+    Text [ en-US ] = "PresentationPageNumberShape";
+};
+
+String SID_SD_A11Y_D_PRESENTATION
+{
+    Text [ en-US ] = "%PRODUCTNAME Presentation";
+};
+
+String SID_SD_A11Y_P_TITLE_N_STYLE
+{
+    Text [ en-US ] = "Title";
+};
+
+String  SID_SD_A11Y_P_OUTLINER_N_STYLE
+{
+    Text [ en-US ] = "Outliner";
+};
+
+String  SID_SD_A11Y_P_SUBTITLE_N_STYLE
+{
+    Text [ en-US ] = "Sub Title";
+};
+
+String  SID_SD_A11Y_P_PAGE_N_STYLE
+{
+    Text [ en-US ] = "Page";
+};
+
+String  SID_SD_A11Y_P_NOTES_N_STYLE
+{
+    Text [ en-US ] = "Notes";
+};
+
+String  SID_SD_A11Y_P_HANDOUT_N_STYLE
+{
+    Text [ en-US ] = "Handout";
+};
+
+String  SID_SD_A11Y_P_UNKNOWN_N_STYLE
+{
+    Text [ en-US ] = "Unknown Accessible Presentation Shape";
+};
+
+String  SID_SD_A11Y_P_FOOTER_N_STYLE
+{
+    Text [ en-US ] = "Footer";
+};
+
+String  SID_SD_A11Y_P_HEADER_N_STYLE
+{
+    Text [ en-US ] = "Header";
+};
+
+String  SID_SD_A11Y_P_DATE_N_STYLE
+{
+    Text [ en-US ] = "Date";
+};
+
+String  SID_SD_A11Y_P_NUMBER_N_STYLE
+{
+    Text [ en-US ] = "Number";
+};
+
+String  SID_SD_A11Y_I_PREVIEW_N
+{
+    Text [ en-US ] = "Preview View";
+};
+
+String  SID_SD_A11Y_I_PREVIEW_D
+{
+    Text [ en-US ] = "This is where you print preview pages.";
+};
+
+String  SID_SD_A11Y_I_PREVIEW_SUFFIX
+{
+    Text [ en-US ] = "(Preview mode)";
+};
+
+String SID_SD_A11Y_D_PRESENTATION_READONLY
+{
+    Text [ en-US ] = "(read-only)";
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index eb7fbd7..a5cb425 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -108,6 +108,7 @@ SdNavigatorWin::SdNavigatorWin(
     // set focus to listbox, otherwise it is in the toolbox which is only useful
     // for keyboard navigation
     maTlbObjects.GrabFocus();
+    maTlbObjects.SetSdNavigatorWinFlag(sal_True);
 
     // DragTypeListBox
     maLbDocs.SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) );
@@ -157,6 +158,26 @@ SdNavigatorWin::~SdNavigatorWin()
 
 // -----------------------------------------------------------------------
 
+//when object is marked , fresh the corresponding entry tree .
+void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc )
+{
+    SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
+    sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh();
+    OUString aDocShName( pDocShell->GetName() );
+    OUString aDocName = pDocShell->GetMedium()->GetName();
+    maTlbObjects.SetSaveTreeItemStateFlag(sal_True); //Added by yanjun for sym2_6385
+    maTlbObjects.Clear();
+    maTlbObjects.Fill( pDoc, sal_False, aDocName ); // Nur normale Seiten
+    maTlbObjects.SetSaveTreeItemStateFlag(sal_False); //Added by yanjun for sym2_6385
+    RefreshDocumentLB();
+    maLbDocs.SelectEntry( aDocShName );
+}
+
+void SdNavigatorWin::FreshEntry( )
+{
+    maTlbObjects.FreshCurEntry();
+}
+
 void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
 {
     SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
@@ -222,8 +243,14 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
     return( eDT );
 }
 
-// -----------------------------------------------------------------------
-
+//Get SdDrawDocShell
+sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc )
+{
+    if( !pDoc )
+        return NULL; // const as const can...
+    sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
+    return pDocShell;
+}
 
 IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl)
 {
@@ -379,6 +406,8 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl)
                 SfxStringItem aItem( SID_NAVIGATOR_OBJECT, aStr );
                 mpBindings->GetDispatcher()->Execute(
                     SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
+                //set sign variable
+                maTlbObjects.MarkCurEntry(aStr);
 
                 // moved here from SetGetFocusHdl. Reset the
                 // focus only if something has been selected in the
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 311d178..da8f014 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -50,7 +50,8 @@
 #include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/XFramesSupplier.hpp>
 #include <svtools/embedtransfer.hxx>
-#include "svtools/treelistentry.hxx"
+#include <svtools/svlbitm.hxx>
+#include <svtools/treelistentry.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <tools/diagnose_ex.h>
@@ -222,6 +223,7 @@ sal_uInt32 SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId (void)
 
 SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId )
 :   SvTreeListBox       ( pParentWin, rSdResId )
+,   bisInSdNavigatorWin  ( sal_False )
 ,   mpParent            ( pParentWin )
 ,   mpDoc               ( NULL )
 ,   mpBookmarkDoc       ( NULL )
@@ -233,7 +235,6 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId )
 ,   mpDropNavWin        ( NULL )
 ,   mbShowAllShapes     ( false )
 ,   mbShowAllPages      ( false )
-
 {
     // add lines to Tree-ListBox
     SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
@@ -288,6 +289,146 @@ SdPageObjsTLB::~SdPageObjsTLB()
         delete mpMedium;
 }
 
+// helper function for  GetEntryAltText and GetEntryLongDescription
+OUString SdPageObjsTLB::getAltLongDescText(SvTreeListEntry* pEntry , sal_Bool isAltText) const
+{
+    sal_uInt16 maxPages = mpDoc->GetPageCount();
+    sal_uInt16 pageNo;
+    SdrObject*   pObj = NULL;
+    SdPage* pPage = NULL;
+
+
+    OUString ParentName = GetEntryText( GetRootLevelParent( pEntry ) );
+
+    for( pageNo = 0;  pageNo < maxPages; pageNo++ )
+    {
+        pPage = (SdPage*) mpDoc->GetPage( pageNo );
+        if( pPage->GetPageKind() != PK_STANDARD ) continue;
+        if( pPage->GetName() !=  ParentName ) continue;
+        SdrObjListIter aIter( *pPage, IM_FLAT );
+        while( aIter.IsMore() )
+        {
+            pObj = aIter.Next();
+            if( GetEntryText(pEntry) ==  GetObjectName( pObj )  )
+            {
+                if( isAltText )
+                    return pObj->GetTitle();
+                else
+                    return pObj->GetDescription();
+            }
+        }
+    }
+    return OUString();
+
+}
+
+OUString SdPageObjsTLB::GetEntryAltText( SvTreeListEntry* pEntry ) const
+{
+    return getAltLongDescText( pEntry, sal_True );
+}
+
+OUString SdPageObjsTLB::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
+{
+    return getAltLongDescText( pEntry, sal_False);
+}
+
+void  SdPageObjsTLB::MarkCurEntry( const OUString& rName )
+{
+
+    if (!rName.isEmpty())
+    {
+        SvTreeListEntry* pCurEntry =GetCurEntry();
+        SvTreeListEntry* pEntry =NULL;
+        OUString aTmp1;
+        OUString aTmp2;
+
+        if( GetParent(pCurEntry)==NULL )
+        {
+            aTmp1 = GetEntryText( pCurEntry );
+            for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+            {
+               if(GetParent( pEntry )==NULL)
+                   continue;
+                aTmp2 = GetEntryText( GetParent( pEntry ));
+                if( aTmp1 != aTmp2)
+                {
+                    // IA2 CWS. MT: Removed in SvTreeListEntry for now - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+                    pEntry->SetMarked(sal_False);
+                }
+            }
+        }
+        else
+        {
+            for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+            {
+                aTmp2 = GetEntryText( pEntry );
+                if( aTmp2 == rName)
+                {
+                    pEntry->SetMarked(sal_True);
+                }
+                else
+                {
+                    pEntry->SetMarked(sal_False);
+                }
+            }
+        }
+    }
+    Invalidate();
+}
+
+void  SdPageObjsTLB:: FreshCurEntry()
+{
+    SvTreeListEntry* pEntry =NULL;
+    for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+    {
+                pEntry->SetMarked(sal_False);
+    }
+    Invalidate();
+}
+
+void SdPageObjsTLB::InitEntry(SvTreeListEntry* pEntry,
+    const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind)
+{
+    sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+    SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
+    SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
+    SvLBoxString* pStr = new SvLBoxString( pEntry, 0, pCol->GetText() );
+    pEntry->ReplaceItem( pStr, nColToHilite );
+}
+
+void SdPageObjsTLB::SaveExpandedTreeItemState(SvTreeListEntry* pEntry, vector<OUString>& vectTreeItem)
+{
+    if (pEntry)
+    {
+        SvTreeListEntry* pListEntry = pEntry;
+        while (pListEntry)
+        {
+            if (pListEntry->HasChildren())
+            {
+                if (IsExpanded(pListEntry))
+                    vectTreeItem.push_back(GetEntryText(pListEntry));
+                SvTreeListEntry* pChildEntry = FirstChild(pListEntry);
+                SaveExpandedTreeItemState(pChildEntry, vectTreeItem);
+            }
+            pListEntry = NextSibling(pListEntry);
+        }
+    }
+}
+void SdPageObjsTLB::Clear()
+{
+    //Save the expanded tree item
+    if (mbSaveTreeItemState)
+    {
+        maSelectionEntryText = OUString();
+        maTreeItem.clear();
+        if (GetCurEntry())
+            maSelectionEntryText = GetSelectEntry();
+        SvTreeListEntry* pEntry = FirstChild(NULL);
+        SaveExpandedTreeItemState(pEntry, maTreeItem);
+    }
+    return SvTreeListBox::Clear();
+}
+
 OUString SdPageObjsTLB::GetObjectName(
     const SdrObject* pObject,
     const bool bCreate) const
@@ -426,6 +567,10 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, sal_Bool bAllPages,
     }
     if( !aSelection.isEmpty() )
         SelectEntry( aSelection );
+    else if (mbSaveTreeItemState && !maSelectionEntryText.isEmpty())
+    {
+        SelectEntry(maSelectionEntryText);
+    }
 }
 
 /**
@@ -485,6 +630,28 @@ void SdPageObjsTLB::AddShapeList (
         IM_FLAT,
         sal_False /*not reverse*/);
 
+    sal_Bool  bMarked=sal_False;
+    if(bisInSdNavigatorWin)
+    {
+        Window* pWindow=NULL;
+        SdNavigatorWin* pSdNavigatorWin=NULL;
+        sd::DrawDocShell* pSdDrawDocShell = NULL;
+        if(pEntry)
+            pWindow=(Window*)GetParent(pEntry);
+        if(pWindow)
+            pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+        if( pSdNavigatorWin )
+            pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+        if(pSdDrawDocShell)
+            bMarked=pSdDrawDocShell->IsMarked(pShape);
+        if(pEntry)
+        {
+            if(bMarked)
+                pEntry->SetMarked(sal_True);
+            else
+                pEntry->SetMarked( sal_False );
+        }
+    }
     while( aIter.IsMore() )
     {
         SdrObject* pObj = aIter.Next();
@@ -497,7 +664,7 @@ void SdPageObjsTLB::AddShapeList (
         {
             if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_OLE2 )
             {
-                InsertEntry(
+                SvTreeListEntry *pNewEntry = InsertEntry(
                     aStr,
                     maImgOle,
                     maImgOle,
@@ -506,10 +673,32 @@ void SdPageObjsTLB::AddShapeList (
                     LIST_APPEND,
                     pObj
                 );
+
+                if(bisInSdNavigatorWin)
+                {
+                    Window* pWindow=NULL;
+                    SdNavigatorWin* pSdNavigatorWin=NULL;
+                    sd::DrawDocShell* pSdDrawDocShell = NULL;
+                    if(pNewEntry)
+                        pWindow=(Window*)GetParent(pNewEntry);
+                    if(pWindow)
+                        pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+                    if( pSdNavigatorWin )
+                        pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+                    if(pSdDrawDocShell)
+                        bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+                    if(pNewEntry)
+                    {
+                        if(bMarked)
+                            pNewEntry->SetMarked(sal_True);
+                        else
+                            pNewEntry->SetMarked( sal_False );
+                    }
+                }
             }
             else if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_GRAF )
             {
-                InsertEntry(
+                SvTreeListEntry *pNewEntry = InsertEntry(
                     aStr,
                     maImgGraphic,
                     maImgGraphic,
@@ -518,6 +707,32 @@ void SdPageObjsTLB::AddShapeList (
                     LIST_APPEND,
                     pObj
                 );
+
+                if(bisInSdNavigatorWin)
+                {
+                    Window* pWindow=NULL;
+                    SdNavigatorWin* pSdNavigatorWin=NULL;
+                    sd::DrawDocShell* pSdDrawDocShell = NULL;
+                    if(pNewEntry)
+                        pWindow=(Window*)GetParent(pNewEntry);
+                    if(pWindow)
+                        pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+                    if( pSdNavigatorWin )
+                        pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+                    if(pSdDrawDocShell)
+                        bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+                    if(pNewEntry)
+                    {
+                        if(bMarked)
+                        {
+                            pNewEntry->SetMarked(sal_True);
+                        }
+                        else
+                        {
+                            pNewEntry->SetMarked( sal_False );
+                        }
+                    }
+                }
             }
             else if (pObj->IsGroupObject())
             {
@@ -532,7 +747,7 @@ void SdPageObjsTLB::AddShapeList (
             }
             else
             {
-                InsertEntry(
+                SvTreeListEntry *pNewEntry = InsertEntry(
                     aStr,
                     rIconProvider.maImgObjects,
                     rIconProvider.maImgObjects,
@@ -541,6 +756,32 @@ void SdPageObjsTLB::AddShapeList (
                     LIST_APPEND,
                     pObj
                 );
+
+                if(bisInSdNavigatorWin)
+                {
+                    Window* pWindow=NULL;
+                    SdNavigatorWin* pSdNavigatorWin=NULL;
+                    sd::DrawDocShell* pSdDrawDocShell = NULL;
+                    if(pNewEntry)
+                        pWindow=(Window*)GetParent(pNewEntry);
+                    if(pWindow)
+                        pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+                    if( pSdNavigatorWin )
+                        pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+                    if(pSdDrawDocShell)
+                        bMarked=pSdDrawDocShell->IsMarked((SdrObject*)pObj);
+                    if(pNewEntry)
+                    {
+                        if(bMarked)
+                        {
+                            pNewEntry->SetMarked(sal_True);
+                        }
+                        else
+                        {
+                            pNewEntry->SetMarked( sal_False );
+                        }
+                    }
+                }
             }
         }
     }
@@ -553,6 +794,22 @@ void SdPageObjsTLB::AddShapeList (
         SetCollapsedEntryBmp(
             pEntry,
             bIsExcluded ? rIconProvider.maImgPageObjsExcl : rIconProvider.maImgPageObjs);
+        if (mbSaveTreeItemState)
+        {
+            vector<OUString>::iterator iteStart = maTreeItem.begin();
+            while (iteStart != maTreeItem.end())
+            {
+                OUString strEntry = GetEntryText(pEntry);
+                if (*iteStart == strEntry)
+                {
+                    Expand( pEntry );
+                    break;
+                }
+                ++iteStart;
+            }
+        }
+        else
+            Expand( pEntry );
     }
 }
 
@@ -876,6 +1133,60 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
 
         DoubleClickHdl();
     }
+    else if (rKEvt.GetKeyCode().GetCode() == KEY_SPACE)
+    {
+       if(bisInSdNavigatorWin)
+       {
+           sal_Bool bMarked=sal_False;
+           SvTreeListEntry* pNewEntry = GetCurEntry();
+           if( GetParent(pNewEntry) == NULL )
+               return;
+           OUString  aStr=GetSelectEntry();
+           Window* pWindow=NULL;
+           SdNavigatorWin* pSdNavigatorWin=NULL;
+           sd::DrawDocShell* pSdDrawDocShell = NULL;
+           if(pNewEntry)
+               pWindow=(Window*)GetParent(pNewEntry);
+           if(pWindow)
+               pSdNavigatorWin = (SdNavigatorWin*)pWindow;
+           if( pSdNavigatorWin )
+               pSdDrawDocShell = pSdNavigatorWin->GetDrawDocShell(mpDoc);
+           if(pSdDrawDocShell)
+           {
+               pSdDrawDocShell->GotoTreeBookmark(aStr);
+               bMarked=pSdDrawDocShell->GetObjectIsmarked(aStr);
+           }
+           //Removed by yanjun for sym2_6385
+           //The symphony2.0 can support morn than one level tree list, also support to select tow or more items in different level.
+           /*
+           SvTreeListEntry* pBeginEntry = First();
+           if( pBeginEntry )
+           {
+               if( GetParent(pBeginEntry) !=  GetParent(pNewEntry) )
+                   pBeginEntry->SetMarked( sal_False );
+               SvTreeListEntry* pNextEntry = Next( pBeginEntry );
+               while( pNextEntry )
+               {
+                   if( GetParent(pNextEntry) !=  GetParent(pNewEntry) )
+                       pNextEntry->SetMarked( sal_False );
+                   pNextEntry =  Next( pNextEntry );
+               }
+           }
+           End*/
+           if(pNewEntry)
+           {
+               if(bMarked)
+               {
+                   pNewEntry->SetMarked(sal_True);
+               }
+               else
+               {
+                   pNewEntry->SetMarked( sal_False );
+               }
+           }
+           Invalidate();
+       }
+    }
     else
         SvTreeListBox::KeyInput( rKEvt );
 }
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 514d8fc..b9a5a5c 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -75,6 +75,9 @@
 #include "sdhtmlfilter.hxx"
 #include "framework/FrameworkHelper.hxx"
 
+#include <sfx2/viewfrm.hxx>
+#include "SdUnoDrawView.hxx"
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using ::sd::framework::FrameworkHelper;
@@ -519,6 +522,20 @@ sal_Bool DrawDocShell::Save()
  */
 sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
 {
+    mpDoc->setDocAccTitle(OUString());
+    SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+    if (pFrame1)
+    {
+        ::Window* pWindow = &pFrame1->GetWindow();
+        if ( pWindow )
+        {
+            ::Window* pSysWin = pWindow->GetSystemWindow();
+            if ( pSysWin )
+            {
+                pSysWin->SetAccessibleName(OUString());
+            }
+        }
+    }
     mpDoc->StopWorkStartupDelay();
 
     //TODO/LATER: why this?!
@@ -829,6 +846,238 @@ sal_Bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
     return (bFound);
 }
 
+//If  object  is marked , return true , else return false .
+sal_Bool DrawDocShell::IsMarked(  SdrObject* pObject  )
+{
+       sal_Bool bisMarked =sal_False;
+
+     if (mpViewShell && mpViewShell->ISA(DrawViewShell))
+    {
+        DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+        if (pObject )
+        {
+              bisMarked = pDrViewSh->GetView()->IsObjMarked(pObject);
+        }
+     }
+    return  bisMarked;
+}
+//If  object  is marked , return true , else return false .
+sal_Bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark)
+{
+    OSL_TRACE("GotoBookmark %s",
+        OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+     sal_Bool bUnMark = sal_False;
+
+    if (mpViewShell && mpViewShell->ISA(DrawViewShell))
+    {
+        DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+
+        OUString aBookmark( rBookmark );
+
+        if( !rBookmark.isEmpty() && rBookmark[0] == sal_Unicode('#') )
+            aBookmark = rBookmark.copy( 1 );
+
+        // Ist das Bookmark eine Seite?
+        sal_Bool        bIsMasterPage;
+        sal_uInt16      nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
+        SdrObject*  pObj = NULL;
+
+        if (nPgNum == SDRPAGE_NOTFOUND)
+        {
+            // Ist das Bookmark ein Objekt?
+            pObj = mpDoc->GetObj(aBookmark);
+
+            if (pObj)
+            {
+                nPgNum = pObj->GetPage()->GetPageNum();
+            }
+        }
+
+        if (nPgNum != SDRPAGE_NOTFOUND)
+        {
+            /**********************************************************
+            * Zur Seite springen
+            **********************************************************/
+
+            SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+
+            PageKind eNewPageKind = pPage->GetPageKind();
+
+            if (eNewPageKind != pDrViewSh->GetPageKind())
+            {
+                // Arbeitsbereich wechseln
+                GetFrameView()->SetPageKind(eNewPageKind);
+                ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+                  mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
+                  GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+
+                // Die aktuelle ViewShell hat sich geaendert!
+                pDrViewSh = (DrawViewShell*) mpViewShell;
+            }
+
+            EditMode eNewEditMode = EM_PAGE;
+
+            if( bIsMasterPage )
+            {
+                eNewEditMode = EM_MASTERPAGE;
+            }
+
+            if (eNewEditMode != pDrViewSh->GetEditMode())
+            {
+                // EditMode setzen
+                pDrViewSh->ChangeEditMode(eNewEditMode, sal_False);
+            }
+
+            // Jump to the page.  This is done by using the API because this
+            // takes care of all the little things to be done.  Especially
+            // writing the view data to the frame view (see bug #107803#).
+            sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
+            SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
+                *pDrViewSh,
+                *pDrViewSh->GetView());
+            if (pUnoDrawView != NULL)
+            {
+                ::com::sun::star::uno::Reference<
+                      ::com::sun::star::drawing::XDrawPage> xDrawPage (
+                          pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
+                pUnoDrawView->setCurrentPage (xDrawPage);
+            }
+            else
+            {
+                // As a fall back switch to the page via the core.
+                DBG_ASSERT (pUnoDrawView!=NULL,
+                    "SdDrawDocShell::GotoBookmark: can't switch page via API");
+                pDrViewSh->SwitchPage(nSdPgNum);
+            }
+            delete pUnoDrawView;
+
+
+            if (pObj)
+            {
+                // Objekt einblenden und selektieren
+                pDrViewSh->MakeVisible(pObj->GetLogicRect(),
+                                       *pDrViewSh->GetActiveWindow());
+
+                 bUnMark = pDrViewSh->GetView()->IsObjMarked(pObj);
+
+
+            }
+        }
+    }
+
+    return ( bUnMark);
+}
+//realize multi-selection of objects
+sal_Bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark)
+{
+    OSL_TRACE("GotoBookmark %s",
+        OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+    sal_Bool bFound = sal_False;
+
+    if (mpViewShell && mpViewShell->ISA(DrawViewShell))
+    {
+        DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+
+        OUString aBookmark( rBookmark );
+
+        if( !rBookmark.isEmpty() && rBookmark[0] == sal_Unicode('#') )
+            aBookmark = rBookmark.copy( 1 );
+
+        // Ist das Bookmark eine Seite?
+        sal_Bool        bIsMasterPage;
+        sal_uInt16      nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
+        SdrObject*  pObj = NULL;
+
+        if (nPgNum == SDRPAGE_NOTFOUND)
+        {
+            // Ist das Bookmark ein Objekt?
+            pObj = mpDoc->GetObj(aBookmark);
+
+            if (pObj)
+            {
+                nPgNum = pObj->GetPage()->GetPageNum();
+            }
+        }
+
+        if (nPgNum != SDRPAGE_NOTFOUND)
+        {
+            /**********************************************************
+            * Zur Seite springen
+            **********************************************************/
+            bFound = sal_True;
+            SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+
+            PageKind eNewPageKind = pPage->GetPageKind();
+
+            if (eNewPageKind != pDrViewSh->GetPageKind())
+            {
+                // Arbeitsbereich wechseln
+                GetFrameView()->SetPageKind(eNewPageKind);
+                ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+                  mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->
+                  GetDispatcher()->Execute( SID_VIEWSHELL0, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+
+                // Die aktuelle ViewShell hat sich geaendert!
+                pDrViewSh = (DrawViewShell*) mpViewShell;
+            }
+
+            EditMode eNewEditMode = EM_PAGE;
+
+            if( bIsMasterPage )
+            {
+                eNewEditMode = EM_MASTERPAGE;
+            }
+
+            if (eNewEditMode != pDrViewSh->GetEditMode())
+            {
+                // EditMode setzen
+                pDrViewSh->ChangeEditMode(eNewEditMode, sal_False);
+            }
+
+            // Jump to the page.  This is done by using the API because this
+            // takes care of all the little things to be done.  Especially
+            // writing the view data to the frame view (see bug #107803#).
+            sal_uInt16 nSdPgNum = (nPgNum - 1) / 2;
+            SdUnoDrawView* pUnoDrawView = new SdUnoDrawView (
+                *pDrViewSh,
+                *pDrViewSh->GetView());
+            if (pUnoDrawView != NULL)
+            {
+                ::com::sun::star::uno::Reference<
+                      ::com::sun::star::drawing::XDrawPage> xDrawPage (
+                          pPage->getUnoPage(), ::com::sun::star::uno::UNO_QUERY);
+                pUnoDrawView->setCurrentPage (xDrawPage);
+            }
+            else
+            {
+                // As a fall back switch to the page via the core.
+                DBG_ASSERT (pUnoDrawView!=NULL,
+                    "SdDrawDocShell::GotoBookmark: can't switch page via API");
+                pDrViewSh->SwitchPage(nSdPgNum);
+            }
+            delete pUnoDrawView;
+
+
+            if (pObj)
+            {
+                // Objekt einblenden und selektieren
+                pDrViewSh->MakeVisible(pObj->GetLogicRect(),
+                                       *pDrViewSh->GetActiveWindow());
+                      sal_Bool bUnMark = pDrViewSh->GetView()->IsObjMarked(pObj);
+                pDrViewSh->GetView()->MarkObj(pObj, pDrViewSh->GetView()->GetSdrPageView(), bUnMark);
+            }
+        }
+
+        SfxBindings& rBindings = ( ( mpViewShell && mpViewShell->GetViewFrame() ) ?
+                                 mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings();
+
+        rBindings.Invalidate(SID_NAVIGATOR_STATE, sal_True, sal_False);
+        rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
+    }
+
+    return (bFound);
+}
+
 /**
  * If it should become a document template.
  */
@@ -955,6 +1204,42 @@ SfxDocumentInfoDialog* DrawDocShell::CreateDocumentInfoDialog( ::Window *pParent
     return pDlg;
 }
 
+void DrawDocShell::setDocAccTitle( const OUString& rTitle )
+{
+    if (mpDoc )
+    {
+        mpDoc->setDocAccTitle( rTitle );
+    }
+}
+
+const OUString DrawDocShell::getDocAccTitle() const
+{
+    OUString sRet;
+    if (mpDoc)
+    {
+        sRet =  mpDoc->getDocAccTitle();
+    }
+
+    return sRet;
+}
+
+void DrawDocShell::setDocReadOnly( sal_Bool bReadOnly)
+{
+    if (mpDoc )
+    {
+        mpDoc->setDocReadOnly( bReadOnly );
+    }
+}
+
+sal_Bool DrawDocShell::getDocReadOnly() const
+{
+    if  (mpDoc)
+    {
+        return mpDoc->getDocReadOnly();
+    }
+
+    return sal_False;
+}
 } // end of namespace sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 0acb1ec..d19f9f8 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -426,10 +426,14 @@ sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 // changeover to the next object
                 if(!mpView->MarkNextObj( !aCode.IsShift() ))
                 {
-                    // No next object: go over open end and
-                    // get first from the other side
-                    mpView->UnmarkAllObj();
-                    mpView->MarkNextObj(!aCode.IsShift());
+                    //If there is only one object, don't do the UnmarkAlllObj() & MarkNextObj().
+                    if ( mpView->GetMarkableObjCount() > 1 && mpView->AreObjectsMarked() )
+                    {
+                        // No next object: go over open end and get first from
+                        // the other side
+                        mpView->UnmarkAllObj();
+                        mpView->MarkNextObj(!aCode.IsShift());
+                    }
                 }
 
                 if(mpView->AreObjectsMarked())
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index d00e190..690f59b 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -48,6 +48,10 @@ FuEditGluePoints::FuEditGluePoints (
     SdDrawDocument* pDoc,
     SfxRequest& rReq)
     : FuDraw(pViewSh, pWin, pView, pDoc, rReq)
+     //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+     //and SHIFT+ENTER key to decide the postion and draw the new insert point
+     ,bBeginInsertPoint(sal_False),
+    oldPoint(0,0)
 {
 }
 
@@ -265,11 +269,105 @@ sal_Bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
 {
     mpView->SetActualWin( mpWindow );
 
-    sal_Bool bReturn = FuDraw::KeyInput(rKEvt);
+    //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+    //and SHIFT+ENTER key to decide the postion and draw the new insert point
+
+    sal_Bool bReturn = sal_False;
+
+    switch (rKEvt.GetKeyCode().GetCode())
+    {
+        case KEY_UP:
+        case KEY_DOWN:
+        case KEY_LEFT:
+        case KEY_RIGHT:
+        {
+            if(rKEvt.GetKeyCode().IsShift()&& mpView->IsInsGluePointMode() ){
+                long nX = 0;
+                long nY = 0;
+                sal_uInt16  nCode = rKEvt.GetKeyCode().GetCode();
+                if (nCode == KEY_UP)
+                {
+                    // Scroll nach oben
+                    nX = 0;
+                    nY =-1;
+                }
+                else if (nCode == KEY_DOWN)
+                {
+                    // Scroll nach unten
+                    nX = 0;
+                    nY = 1;
+                }
+                else if (nCode == KEY_LEFT)
+                {
+                    // Scroll nach links
+                    nX =-1;
+                    nY = 0;
+                }
+                else if (nCode == KEY_RIGHT)
+                {
+                    // Scroll nach rechts
+                    nX = 1;
+                    nY = 0;
+                }
+                Point centerPoint;
+                Rectangle rect = mpView->GetMarkedObjRect();
+                centerPoint = mpWindow->LogicToPixel(rect.Center());
+                Point aPoint = bBeginInsertPoint? oldPoint:centerPoint;
+                Point ePoint = aPoint + Point(nX,nY);
+                mpWindow->SetPointerPosPixel(ePoint);
+                //simulate mouse move action
+                MouseEvent eMevt(ePoint,1,2,MOUSE_LEFT, 0);
+                MouseMove(eMevt);
+                         Point aPix(eMevt.GetPosPixel());
+                oldPoint = ePoint;
+                bBeginInsertPoint = sal_True;
+                bReturn = sal_True;
+            }
+        }
+        break;
+        case KEY_RETURN:
+            if(rKEvt.GetKeyCode().IsShift() && mpView->IsInsGluePointMode() )
+            {
+                if(bBeginInsertPoint)
+                {
+                    mpWindow->SetPointerPosPixel(oldPoint);
+                    //simulate mouse button down action
+                    MouseEvent aMevt(oldPoint,1,3,MOUSE_LEFT,KEY_SHIFT);
+                    // MT IA2: Not used?
+                    // sal_uInt16 ubuttons = aMevt.GetButtons();
+                    // sal_uInt16 uMod      = aMevt.GetModifier();
+                    MouseButtonDown(aMevt);
+                    mpWindow->CaptureMouse();
+                    //simulate mouse button up action
+                    MouseEvent rMEvt(oldPoint+Point(0,0),1,17, MOUSE_LEFT, KEY_SHIFT);
+                    MouseButtonUp(rMEvt);
+                    bReturn= sal_True;
+                }
+            }
+            break;
+    }
+
+    if(!bReturn)
+        bReturn = FuDraw::KeyInput(rKEvt);
 
     return bReturn;
 }
 
+//Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point, and
+//SHIFT+ENTER key to decide the postion and draw the new insert point
+void FuEditGluePoints::ForcePointer(const MouseEvent* pMEvt)
+{
+    if(bBeginInsertPoint && pMEvt)
+    {
+        MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
+            pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
+        FuDraw::ForcePointer(&aMEvt);
+    }
+    else
+    {
+        FuDraw::ForcePointer(pMEvt);
+    }
+}
 
 sal_Bool FuEditGluePoints::Command(const CommandEvent& rCEvt)
 {
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 7e95f38..b1cfce3 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -91,6 +91,11 @@ FuSelection::FuSelection (
       bMirrorSide0(sal_False),
       nEditMode(SID_BEZIER_MOVE),
       pWaterCanCandidate(NULL)
+     //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
+     //and SHIFT+ENTER key to decide the postion and draw the new insert point
+    ,bBeginInsertPoint(sal_False),
+      oldPoint(0,0)
+  ,bMovedToCenterPoint(sal_False)
 {
 }
 
@@ -907,8 +912,78 @@ sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt)
             bReturn = FuSelection::cancel();
         }
         break;
-    }
+        //add keyboard operation for insert points in drawing curve
+        case KEY_UP:
+        case KEY_DOWN:
+        case KEY_LEFT:
+        case KEY_RIGHT:
+        {
+            if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT)){
+                long nX = 0;
+                long nY = 0;
+                sal_uInt16  nCode = rKEvt.GetKeyCode().GetCode();
+                if (nCode == KEY_UP)
+                {
+                    // Scroll nach oben
+                    nX = 0;
+                    nY =-1;
+                }
+                else if (nCode == KEY_DOWN)
+                {
+                    // Scroll nach unten
+                    nX = 0;
+                    nY = 1;
+                }
+                else if (nCode == KEY_LEFT)
+                {
+                    // Scroll nach links
+                    nX =-1;
+                    nY = 0;
+                }
+                else if (nCode == KEY_RIGHT)
+                {
+                    // Scroll nach rechts
+                    nX = 1;
+                    nY = 0;
+                }
 
+                Point centerPoint;
+                Rectangle rect = mpView->GetMarkedObjRect();
+                centerPoint = mpWindow->LogicToPixel(rect.Center());
+                Point aPoint = bMovedToCenterPoint? oldPoint:centerPoint;
+                Point ePoint = aPoint + Point(nX,nY);
+                mpWindow->SetPointerPosPixel(ePoint);
+                //simulate mouse move action
+                MouseEvent eMevt(ePoint,1,2, MOUSE_LEFT, 0);
+                MouseMove(eMevt);
+                oldPoint = ePoint;
+                bMovedToCenterPoint = sal_True;
+                bReturn = sal_True;
+            }
+        }
+        break;
+        case KEY_RETURN:
+            if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT))
+            {
+                if(!bBeginInsertPoint)
+                {
+                    //simulate mouse button down action
+                    MouseEvent aMevt(oldPoint,1,3, MOUSE_LEFT, KEY_SHIFT);
+                    MouseButtonDown(aMevt);
+                    mpWindow->CaptureMouse();
+                    bBeginInsertPoint = sal_True;
+                }
+                else
+                {
+                    //simulate mouse button up action
+                    MouseEvent rMEvt(oldPoint,1,17, MOUSE_LEFT, KEY_SHIFT);
+                    MouseButtonUp(rMEvt);
+                    bBeginInsertPoint = sal_False;
+                }
+                bReturn= sal_True;
+            }
+            break;
+    }
     if (!bReturn)
     {
         bReturn = FuDraw::KeyInput(rKEvt);
@@ -1425,6 +1500,21 @@ SdrObject* FuSelection::pickObject (const Point& rTestPoint)
     mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SDRSEARCH_PICKMARKABLE);
     return pObject;
 }
+
+void FuSelection::ForcePointer(const MouseEvent* pMEvt)
+{
+    if(bMovedToCenterPoint && !bBeginInsertPoint && pMEvt)
+    {
+        MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
+            pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
+        FuDraw::ForcePointer(&aMEvt);
+    }
+    else
+    {
+        FuDraw::ForcePointer(pMEvt);
+    }
+}
+
 } // end of namespace sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 602b5b4..2ffee94 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -34,6 +34,15 @@
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <tools/link.hxx>
 
+#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
+#include "DrawViewShell.hxx"
+#include "sdpage.hxx"
+#include "drawdoc.hxx"
+#include "FrameView.hxx"
+#include "PresentationViewShell.hxx"
+#include <editeng/outlobj.hxx>
+#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
+class SdViewShell;
 namespace sd {
 class ViewShell;
 class Window;
@@ -82,6 +91,8 @@ class AccessibleDocumentViewBase
         public ::com::sun::star::beans::XPropertyChangeListener,
         public ::com::sun::star::awt::XWindowListener,
         public ::com::sun::star::awt::XFocusListener
+        ,public ::com::sun::star::accessibility::XAccessibleExtendedAttributes
+        ,public com::sun::star::accessibility::XAccessibleGetAccFlowTo
 {
 public:
     //=====  internal  ========================================================
@@ -246,7 +257,10 @@ public:
         throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL focusLost (const ::com::sun::star::awt::FocusEvent& e)
         throw (::com::sun::star::uno::RuntimeException);
-
+    //----------------------------xAttribute----------------------------
+    virtual com::sun::star::uno::Any SAL_CALL getExtendedAttributes()
+        throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) ;
+     ::sd::ViewShell* mpViewShell;
 private:
 
     // return the member maMutex;
@@ -355,7 +369,18 @@ protected:
     virtual void SetAccessibleOLEObject (
         const ::com::sun::star::uno::Reference <
         ::com::sun::star::accessibility::XAccessible>& xOLEObject);
+    //=====  XAccessibleGetAccFromXShape  ============================================
+    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+        SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+        throw ( ::com::sun::star::uno::RuntimeException );
+
+public:
+    virtual void SwitchViewActivated (void) { Activated(); }
+     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 impl_dispose (void);
 };
 
diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
index 440f3ff..e82275c 100644
--- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
+++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
@@ -22,6 +22,8 @@
 
 #include "AccessibleDocumentViewBase.hxx"
 
+#include <com/sun/star/accessibility/XAccessibleGroupPosition.hpp>
+
 namespace accessibility {
 
 
@@ -35,6 +37,7 @@ namespace accessibility {
 */
 class AccessibleDrawDocumentView :
     public AccessibleDocumentViewBase
+    ,public ::com::sun::star::accessibility::XAccessibleGroupPosition
 {
 public:
     //=====  internal  ========================================================
@@ -69,6 +72,9 @@ public:
         throw (::com::sun::star::uno::RuntimeException,
             ::com::sun::star::lang::IndexOutOfBoundsException);
 
+    virtual OUString SAL_CALL
+        getAccessibleName(void)
+        throw (::com::sun::star::uno::RuntimeException);
 
     //=====  lang::XEventListener  ============================================
 
@@ -82,6 +88,26 @@ public:
     virtual void SAL_CALL
         propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject)
         throw (::com::sun::star::uno::RuntimeException);
+    //=====  XInterface  ======================================================
+
+    virtual com::sun::star::uno::Any SAL_CALL
+        queryInterface (const com::sun::star::uno::Type & rType)
+        throw (::com::sun::star::uno::RuntimeException);
+
+    virtual void SAL_CALL
+        acquire (void)
+        throw ();
+
+    virtual void SAL_CALL
+        release (void)
+        throw ();
+
+    //=====  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);
 
 protected:
 
@@ -116,6 +142,8 @@ protected:
     virtual void
         implSelect( sal_Int32 nAccessibleChildIndex, sal_Bool bSelect )
         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+private:
+    ::sd::ViewShell* mpSdViewSh;
 
 protected:
     /** This object manages the shapes of the represented draw page.  It is
@@ -156,6 +184,13 @@ protected:
 
     virtual void impl_dispose (void);
 
+    //=====  XAccessibleGetAccFromXShape  ============================================
+    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+        SAL_CALL get_AccFlowTo(const ::com::sun::star::uno::Any& rAny, sal_Int32 nType)
+        throw ( ::com::sun::star::uno::RuntimeException );
+    ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+        GetSelAccContextInTable();
+
 private:
     void UpdateAccessibleName (void);
 };
diff --git a/sd/source/ui/inc/AccessibleOutlineView.hxx b/sd/source/ui/inc/AccessibleOutlineView.hxx
index 732ff4b..237b326 100644
--- a/sd/source/ui/inc/AccessibleOutlineView.hxx
+++ b/sd/source/ui/inc/AccessibleOutlineView.hxx
@@ -71,7 +71,9 @@ public:
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
         getAccessibleChild (sal_Int32 nIndex)
         throw (::com::sun::star::uno::RuntimeException);
-
+    virtual OUString SAL_CALL
+        getAccessibleName(void)
+        throw (::com::sun::star::uno::RuntimeException);
     //=====  XAccessibleEventBroadcaster  ========================================
 
     virtual void SAL_CALL
diff --git a/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx b/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
index dc935a7..b3b987d 100644
--- a/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationGraphicShape.hxx
@@ -23,6 +23,7 @@
 
 #include <svx/AccessibleGraphicShape.hxx>
 
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
 namespace accessibility {
 
 /** This class makes Impress shapes accessible.
@@ -56,6 +57,8 @@ public:
     virtual OUString
         CreateAccessibleDescription ()
         throw (::com::sun::star::uno::RuntimeException);
+    /// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole () throw (::com::sun::star::uno::RuntimeException);
 };
 
 } // end of namespace accessibility
diff --git a/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx b/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
index ba5ccec..df639a0 100644
--- a/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationOLEShape.hxx
@@ -23,6 +23,7 @@
 
 #include <svx/AccessibleOLEShape.hxx>
 
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
 namespace accessibility {
 
 /** This class makes Impress shapes accessible.
@@ -56,6 +57,8 @@ public:
     virtual OUString
         CreateAccessibleDescription ()
         throw (::com::sun::star::uno::RuntimeException);
+    /// Return this object's role.
+    virtual sal_Int16 SAL_CALL getAccessibleRole () throw (::com::sun::star::uno::RuntimeException);
 };
 
 } // end of namespace accessibility
diff --git a/sd/source/ui/inc/AccessiblePresentationShape.hxx b/sd/source/ui/inc/AccessiblePresentationShape.hxx
index 4f651a4..860be7a 100644
--- a/sd/source/ui/inc/AccessiblePresentationShape.hxx
+++ b/sd/source/ui/inc/AccessiblePresentationShape.hxx
@@ -55,6 +55,7 @@ public:
     virtual OUString
         CreateAccessibleDescription ()
         throw (::com::sun::star::uno::RuntimeException);
+    OUString GetStyle();
 
 private:
     /** Don't use the default constructor.  Use the public constructor that
diff --git a/sd/source/ui/inc/AccessibleSlideSorterView.hxx b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
index 6b539fd..3a231f0 100644
--- a/sd/source/ui/inc/AccessibleSlideSorterView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideSorterView.hxx
@@ -290,7 +290,7 @@ public:
         getSupportedServiceNames (void)
         throw (::com::sun::star::uno::RuntimeException);
 
-
+    virtual void SwitchViewActivated (void);
 private:
     class Implementation;
     ::std::auto_ptr<Implementation> mpImpl;
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index 4a839b0..6806847 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -40,6 +40,7 @@
 #include <memory>
 #include <vector>
 #include <boost/scoped_ptr.hpp>
+#include <com/sun/star/drawing/XLayer.hpp>
 
 namespace sd {
 
@@ -92,6 +93,8 @@ public:
         PROPERTY_ZOOMVALUE = 7,
         PROPERTY_VIEWOFFSET = 8,
         PROPERTY_DRAWVIEWMODE = 9
+        ,PROPERTY_UPDATEACC = 10
+        ,PROPERTY_PAGE_CHANGE = 11
     };
 
     /** Create a new DrawController object for the given ViewShellBase.
@@ -137,6 +140,12 @@ public:
         switch.
     */
     void BroadcastContextChange (void) const;
+    void NotifyAccUpdate();
+    void fireChangeLayer( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XLayer>* pCurrentLayer ) throw();
+    // change the parameter to int
+    //void fireSwitchCurrentPage( String pageName) throw();

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list