openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1541847 [8/18] - in /openoffice/trunk: ./ main/accessibility/inc/accessibility/extended/ main/accessibility/inc/accessibility/helper/ main/accessibility/inc/accessibility/standard/ main/accessibility/source/extended/ main/accessibility/sou...
Date Thu, 14 Nov 2013 08:18:14 GMT
Modified: openoffice/trunk/main/sd/inc/glob.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/inc/glob.hxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/inc/glob.hxx (original)
+++ openoffice/trunk/main/sd/inc/glob.hxx Thu Nov 14 08:18:05 2013
@@ -38,6 +38,9 @@
 #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
+//IAccessibility2 Implementation 2009-----
+#define SD_IF_SDSLIDEVIEWSHELL          SFX_INTERFACE_SD_START + 4
+//-----IAccessibility2 Implementation 2009
 #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

Modified: openoffice/trunk/main/sd/source/core/drawdoc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/core/drawdoc.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/core/drawdoc.cxx (original)
+++ openoffice/trunk/main/sd/source/core/drawdoc.cxx Thu Nov 14 08:18:05 2013
@@ -148,6 +148,7 @@ PresentationSettings::PresentationSettin
 
 SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
 : FmFormModel( SvtPathOptions().GetPalettePath(), NULL, pDrDocSh )
+, bReadOnly(sal_False)
 , mpOutliner(NULL)
 , mpInternalOutliner(NULL)
 , mpWorkStartupTimer(NULL)

Modified: openoffice/trunk/main/sd/source/core/drawdoc2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/core/drawdoc2.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/core/drawdoc2.cxx (original)
+++ openoffice/trunk/main/sd/source/core/drawdoc2.cxx Thu Nov 14 08:18:05 2013
@@ -1198,6 +1198,17 @@ IMapObject* SdDrawDocument::GetHitIMapOb
 	return pIMapObj;
 }
 
+//IAccessibility2 Implementation 2009-----
+ImageMap* SdDrawDocument::GetImageMapForObject(SdrObject* pObj)
+{
+	SdIMapInfo* pIMapInfo = GetIMapInfo( pObj );
+	if ( pIMapInfo )
+	{
+		return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
+	}
+	return NULL;
+}
+//-----IAccessibility2 Implementation 2009
 /** 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. #

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx Thu Nov 14 08:18:05 2013
@@ -37,7 +37,10 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <rtl/ustring.h>
 #include<sfx2/viewfrm.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#include <sfx2/objsh.hxx>
+//-----IAccessibility2 Implementation 2009
 #include <svx/AccessibleShape.hxx>
 
 #include <svx/svdobj.hxx>
@@ -46,8 +49,16 @@
 #include <toolkit/helper/vclunohelper.hxx>
 #include "Window.hxx"
 #include <vcl/svapp.hxx>
+//IAccessibility2 Implementation 2009-----
+#include "OutlineViewShell.hxx"
 
+#include "SlideViewShell.hxx"
 
+#include <svx/svdlayer.hxx>
+#include <editeng/editobj.hxx>
+#include "LayerTabBar.hxx"
+#include <svtools/colorcfg.hxx>
+//-----IAccessibility2 Implementation 2009
 #include "ViewShell.hxx"
 #include "View.hxx"
 #include <memory>
@@ -88,6 +99,9 @@ AccessibleDocumentViewBase::AccessibleDo
     maShapeTreeInfo.SetViewForwarder (&maViewForwarder);
 
     mxWindow = ::VCLUnoHelper::GetInterface (pSdWindow);
+//IAccessibility2 Implementation 2009-----
+	mpViewShell = pViewShell;
+//-----IAccessibility2 Implementation 2009
 }
 
 
@@ -159,6 +173,11 @@ void AccessibleDocumentViewBase::Init (v
             }
         }
     }
+//IAccessibility2 Implementation 2009-----
+	SfxObjectShell* pObjShell = mpViewShell->GetViewFrame()->GetObjectShell();
+	if(!pObjShell->IsReadOnly())
+		SetState(AccessibleStateType::EDITABLE);
+//-----IAccessibility2 Implementation 2009
 }
 
 
@@ -434,6 +453,10 @@ uno::Any SAL_CALL
             static_cast<beans::XPropertyChangeListener*>(this),
             static_cast<awt::XWindowListener*>(this),
             static_cast<awt::XFocusListener*>(this)
+//IAccessibility2 Implementation 2009-----
+		   ,static_cast<XAccessibleExtendedAttributes*>(this)
+		   ,static_cast<XAccessibleGetAccFlowTo*>(this)
+//-----IAccessibility2 Implementation 2009
             );
     return aReturn;
 }
@@ -835,4 +858,150 @@ void
 {
 }
 
+//IAccessibility2 Implementation 2009-----
+uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes() 
+		throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 
+{
+	uno::Any anyAtrribute;
+	rtl::OUString sValue;
+	if (mpViewShell && mpViewShell->ISA(::sd::DrawViewShell))
+	{
+		::sd::DrawViewShell* pDrViewSh = (::sd::DrawViewShell*) mpViewShell;
+		rtl::OUString sName;
+		String sDisplay;
+			sName = rtl::OUString::createFromAscii("page-name:");
+			// MT IA2: Not used...
+			// SdPage*	pCurrPge = pDrViewSh->getCurrentPage();
+			SdDrawDocument* pDoc = pDrViewSh->GetDoc();
+			sDisplay = pDrViewSh->getCurrentPage()->GetName();
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ) );
+			sValue = sName + sDisplay ;
+			sName = rtl::OUString::createFromAscii(";page-number:");
+			sValue += sName;
+			sValue += String::CreateFromInt32((sal_Int16)((sal_uInt16)((pDrViewSh->getCurrentPage()->GetPageNum()-1)>>1) + 1)) ;
+			sName = rtl::OUString::createFromAscii(";total-pages:");
+			sValue += sName;
+			sValue += String::CreateFromInt32(pDrViewSh->GetPageTabControl()->GetPageCount()) ;
+			sValue +=  rtl::OUString::createFromAscii(";");
+		if(pDrViewSh->IsLayerModeActive() )
+		{
+			sName = rtl::OUString::createFromAscii("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 )
+				{
+					String layerAltText = aSdrLayer->GetTitle();
+					if(  layerAltText.Len() > 0)
+					{
+						sName = rtl::OUString::createFromAscii(" ");
+						sDisplay = sDisplay + sName; 
+						sDisplay += layerAltText;
+					}
+				}
+			}
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ));
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ));
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ));
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ));
+			sValue +=  sDisplay;
+			sName = rtl::OUString::createFromAscii(";page-number:");
+			sValue += sName;
+			sValue += String::CreateFromInt32(pDrViewSh->GetActiveTabLayerIndex()+1) ;
+			sName = rtl::OUString::createFromAscii(";total-pages:");
+			sValue += sName;
+			sValue += String::CreateFromInt32(pDrViewSh->GetLayerTabControl()->GetPageCount()) ;
+			sValue +=  rtl::OUString::createFromAscii(";");
+		}
+	}	
+	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 += rtl::OUString::createFromAscii("note:");
+					const EditTextObject& rEdit = pPara->GetTextObject();
+					for (sal_uInt16 i=0;i<rEdit.GetParagraphCount();i++)
+					{
+						String strNote = rEdit.GetText(i);
+						strNote.SearchAndReplace( String::CreateFromAscii( "\\" ), String::CreateFromAscii("\\\\" ));
+						strNote.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ));
+						strNote.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ));
+						strNote.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ));
+						strNote.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ));
+						sValue += rtl::OUString( strNote );
+						sValue += rtl::OUString::createFromAscii(";");//to divide each paragraph
+					}
+				}
+			}
+		}
+	}
+	if (mpViewShell && mpViewShell->ISA(::sd::OutlineViewShell) )
+	{
+		rtl::OUString sName;
+		String sDisplay;
+		SdPage*	pCurrPge = mpViewShell->GetActualPage();
+		SdDrawDocument* pDoc = mpViewShell->GetDoc();
+		if(pCurrPge && pDoc)
+		{
+			sName = rtl::OUString::createFromAscii("page-name:");
+			sDisplay = pCurrPge->GetName();
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "=" ), String::CreateFromAscii("\\=" ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ";" ), String::CreateFromAscii("\\;" ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( "," ), String::CreateFromAscii("\\," ) );
+			sDisplay.SearchAndReplace( String::CreateFromAscii( ":" ), String::CreateFromAscii("\\:" ) );
+			sValue = sName + sDisplay ;
+			sName = rtl::OUString::createFromAscii(";page-number:");
+			sValue += sName;
+			sValue += String::CreateFromInt32((sal_Int16)((sal_uInt16)((pCurrPge->GetPageNum()-1)>>1) + 1)) ;
+			sName = rtl::OUString::createFromAscii(";total-pages:");
+			sValue += sName;
+			sValue += String::CreateFromInt32(pDoc->GetSdPageCount(PK_STANDARD)) ;
+			sValue +=  rtl::OUString::createFromAscii(";");
+		}
+	}	
+	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;
+}
+//-----IAccessibility2 Implementation 2009
 } // end of namespace accessibility

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx Thu Nov 14 08:18:05 2013
@@ -52,6 +52,14 @@
 
 #include "ViewShell.hxx"
 #include "View.hxx"
+//IAccessibility2 Implementation 2009-----
+#include "DrawDocShell.hxx"
+#include <drawdoc.hxx>
+#include <algorithm>
+#include "sdpage.hxx"
+#include "slideshow.hxx"
+#include "anminfo.hxx"
+//-----IAccessibility2 Implementation 2009
 #include <memory>
 
 #include "accessibility.hrc"
@@ -70,6 +78,22 @@ class SfxViewFrame;
 namespace accessibility {
 
 
+//IAccessibility2 Implementation 2009-----
+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;
+	}
+};
+//-----IAccessibility2 Implementation 2009
 //=====  internal  ============================================================
 
 AccessibleDrawDocumentView::AccessibleDrawDocumentView (
@@ -78,6 +102,7 @@ AccessibleDrawDocumentView::AccessibleDr
     const uno::Reference<frame::XController>& rxController,
     const uno::Reference<XAccessible>& rxParent)
     : AccessibleDocumentViewBase (pSdWindow, pViewShell, rxController, rxParent),
+      mpSdViewSh( pViewShell ),
       mpChildrenManager (NULL)
 {
     OSL_TRACE ("AccessibleDrawDocumentView");
@@ -260,9 +285,44 @@ uno::Reference<XAccessible> SAL_CALL
             static_cast<uno::XWeak*>(this));
 }
 
+//IAccessibility2 Implementation 2009-----
+OUString SAL_CALL
+	AccessibleDrawDocumentView::getAccessibleName(void)
+	throw (::com::sun::star::uno::RuntimeException)
+{
+	OUString sName = String( SdResId(SID_SD_A11Y_D_PRESENTATION) );
+	::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+	if ( pSdView )
+	{
+		SdDrawDocument* pDoc = pSdView->GetDoc();
+		if ( pDoc )
+		{
+			rtl::OUString sFileName = pDoc->getDocAccTitle();
+			if ( !sFileName.getLength() )
+			{
+				::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+				if ( pDocSh )
+				{
+					sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+				}			
+			}
+
+			OUString sReadOnly;
+			if(pDoc->getDocReadOnly())
+			{				
+				sReadOnly = String(SdResId(SID_SD_A11Y_D_PRESENTATION_READONLY));				
+			}
+
+			if ( sFileName.getLength() )
+			{
+				sName = sFileName + sReadOnly + OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+			}			
+		}
+	}
 
-
-
+	return sName;
+}
+//-----IAccessibility2 Implementation 2009
 //=====  XEventListener  ======================================================
 
 void SAL_CALL
@@ -295,7 +355,9 @@ void SAL_CALL
     AccessibleDocumentViewBase::propertyChange (rEventObject);
 
     OSL_TRACE ("AccessibleDrawDocumentView::propertyChange");
-    if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")))
+    // add page switch event for slide show mode
+    if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")) ||
+		rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("PageChange")) )
     {
         OSL_TRACE ("    current page changed");
 
@@ -329,6 +391,9 @@ void SAL_CALL
         }
         else
             OSL_TRACE ("View invalid");
+//IAccessibility2 Implementation 2009-----
+		CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+//-----IAccessibility2 Implementation 2009
     }
     else if (rEventObject.PropertyName == OUString (RTL_CONSTASCII_USTRINGPARAM("VisibleArea")))
     {
@@ -338,6 +403,59 @@ void SAL_CALL
                 IAccessibleViewForwarderListener::VISIBLE_AREA, 
                 &maViewForwarder);
     }
+//IAccessibility2 Implementation 2009-----
+	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();
+            }
+	}
+    }
+//-----IAccessibility2 Implementation 2009
     else
     {
         OSL_TRACE ("  unhandled");
@@ -379,9 +497,137 @@ void SAL_CALL
     return aServiceNames;
 }
 
+//IAccessibility2 Implementation 2009-----
+//=====  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;
+}
+::rtl::OUString AccessibleDrawDocumentView::getObjectLink( const uno::Any& rAny )
+	throw (uno::RuntimeException)
+{
+	::rtl::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 = (::rtl::OUString)pInfo->GetBookmark();
+	}
+	return aRet;
+}
+//-----IAccessibility2 Implementation 2009
 ///	Create a name for this view.
 ::rtl::OUString
     AccessibleDrawDocumentView::CreateAccessibleName (void)
@@ -637,13 +883,25 @@ void AccessibleDrawDocumentView::Activat
 {
     if (mpChildrenManager != NULL)
     {
-        mpChildrenManager->UpdateSelection();
+//IAccessibility2 Implementation 2009-----
+        //mpChildrenManager->UpdateSelection();
+	sal_Bool bChange = sal_False;
+//-----IAccessibility2 Implementation 2009
         // 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);
+//IAccessibility2 Implementation 2009-----
+	mpChildrenManager->UpdateSelection();
+	// if the child gets focus in UpdateSelection(), needs to reset the focus on document.
+	if (mpChildrenManager->HasFocus() && bChange)
+		ResetState (AccessibleStateType::FOCUSED);
+//-----IAccessibility2 Implementation 2009
     }
 }
 
@@ -690,8 +948,158 @@ void SAL_CALL AccessibleDrawDocumentView
     AccessibleDocumentViewBase::disposing ();
 }
 
+//IAccessibility2 Implementation 2009-----
+::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;
+}
+//-----IAccessibility2 Implementation 2009
 
 void AccessibleDrawDocumentView::UpdateAccessibleName (void)
 {

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx Thu Nov 14 08:18:05 2013
@@ -48,7 +48,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);
     }
 
@@ -61,14 +62,22 @@ namespace accessibility 
 
     SvxEditSource* AccessibleOutlineEditSource::Clone() const
     {
-        return NULL;
+		//IAccessibility2 Implementation 2009-----
+        /*return NULL;*/
+		return new AccessibleOutlineEditSource(*mpOutliner, mrView, *mpOutlinerView, mrWindow);
+		//-----IAccessibility2 Implementation 2009
     }
 
     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;
     }

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineView.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineView.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineView.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleOutlineView.cxx Thu Nov 14 08:18:05 2013
@@ -150,6 +150,37 @@ uno::Reference<XAccessible> SAL_CALL
     return maTextHelper.GetChild(nIndex);
 }
 
+//IAccessibility2 Implementation 2009-----
+#include <drawdoc.hxx>
+::rtl::OUString SAL_CALL
+	AccessibleOutlineView::getAccessibleName(void)
+	throw (::com::sun::star::uno::RuntimeException)
+{
+	::rtl::OUString sName = String( SdResId(SID_SD_A11Y_D_PRESENTATION) );
+	::sd::View* pSdView = static_cast< ::sd::View* >( maShapeTreeInfo.GetSdrView() );
+	if ( pSdView )
+	{
+		SdDrawDocument* pDoc = pSdView->GetDoc();
+		if ( pDoc )
+		{
+			rtl::OUString sFileName = pDoc->getDocAccTitle();
+			if ( !sFileName.getLength() )
+			{
+				::sd::DrawDocShell* pDocSh = pSdView->GetDocSh();
+				if ( pDocSh )
+				{
+					sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
+				}			
+			}
+			if ( sFileName.getLength() )
+			{
+				sName = sFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - ")) + sName;
+			}
+		}
+	}
+	return sName;
+}
+//-----IAccessibility2 Implementation 2009
 //=====  XAccessibleEventBroadcaster  ========================================
 
 void SAL_CALL AccessibleOutlineView::addEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -157,6 +188,9 @@ void SAL_CALL AccessibleOutlineView::add
     // delegate listener handling to children manager.
     if ( ! IsDisposed())
         maTextHelper.AddEventListener(xListener);
+//IAccessibility2 Implementation 2009-----
+	AccessibleContextBase::addEventListener(xListener);
+//-----IAccessibility2 Implementation 2009
 }
 
 void SAL_CALL AccessibleOutlineView::removeEventListener( const uno::Reference< XAccessibleEventListener >& xListener ) throw (uno::RuntimeException)
@@ -164,6 +198,9 @@ void SAL_CALL AccessibleOutlineView::rem
     // forward
     if ( ! IsDisposed())
         maTextHelper.RemoveEventListener(xListener);
+//IAccessibility2 Implementation 2009-----
+	AccessibleContextBase::removeEventListener(xListener);
+//-----IAccessibility2 Implementation 2009
 }
 
 //=====  XServiceInfo  ========================================================
@@ -228,12 +265,17 @@ void SAL_CALL
     AccessibleDocumentViewBase::propertyChange (rEventObject);
 
     OSL_TRACE ("AccessibleOutlineView::propertyChange");
-    if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")))
+	//add page switch event for slide show mode
+    if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("CurrentPage")) ||
+		rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("PageChange")) )
     {
         OSL_TRACE ("    current page changed");
 
         // The current page changed. Update the children accordingly.
         UpdateChildren();
+//IAccessibility2 Implementation 2009-----
+    	CommitChange(AccessibleEventId::PAGE_CHANGED,rEventObject.NewValue,rEventObject.OldValue);
+//-----IAccessibility2 Implementation 2009
     }
     else if (rEventObject.PropertyName == ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("VisibleArea")))
     {

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx Thu Nov 14 08:18:05 2013
@@ -119,5 +119,12 @@ AccessiblePresentationGraphicShape::~Acc
 
     return aDG();
 }
+//IAccessibility2 Implementation 2009-----
+sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole () 
+	throw (::com::sun::star::uno::RuntimeException)
+{
 
+	return  AccessibleRole::GRAPHIC ;
+}
+//-----IAccessibility2 Implementation 2009
 } // end of namespace accessibility

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx Thu Nov 14 08:18:05 2013
@@ -140,5 +140,13 @@ AccessiblePresentationOLEShape::~Accessi
 
     return aDG();
 }
+//IAccessibility2 Implementation 2009-----
+//	Return this object's role.
+sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole () 
+	throw (::com::sun::star::uno::RuntimeException)
+{
 
+	return  AccessibleRole::EMBEDDED_OBJECT ;
+}
+//-----IAccessibility2 Implementation 2009
 } // end of namespace accessibility

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationShape.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationShape.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessiblePresentationShape.cxx Thu Nov 14 08:18:05 2013
@@ -27,6 +27,11 @@
 
 #include "SdShapeTypes.hxx"
 
+//IAccessibility2 Implementation 2009-----
+#include "accessibility.hrc"
+#include "sdresid.hxx"
+#include <tools/string.hxx>
+//-----IAccessibility2 Implementation 2009
 #include <svx/DescriptionGenerator.hxx>
 #include <rtl/ustring.h>
 
@@ -77,38 +82,51 @@ AccessiblePresentationShape::~Accessible
     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
     switch (nShapeType)
     {
+    //IAccessibility2 Implementation 2009-----
         case PRESENTATION_TITLE:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressTitle"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressTitle"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_TITLE_N)));
             break;
         case PRESENTATION_OUTLINER:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressOutliner"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressOutliner"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_OUTLINER_N)));
             break;
         case PRESENTATION_SUBTITLE:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressSubtitle"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressSubtitle"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_SUBTITLE_N)));
             break;
         case PRESENTATION_PAGE:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPage"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPage"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_PAGE_N)));
             break;
         case PRESENTATION_NOTES:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressNotes"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressNotes"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_NOTES_N)));
             break;
         case PRESENTATION_HANDOUT:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHandout"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHandout"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_HANDOUT_N)));
             break;
 		case PRESENTATION_HEADER:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHeader"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressHeader"));
+	    sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_N)) );
             break;
 		case PRESENTATION_FOOTER:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressFooter"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressFooter"));
+	    sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_N)) );
             break;
 		case PRESENTATION_DATETIME:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressDateAndTime"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressDateAndTime"));
+	    sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_N)) );
             break;
 		case PRESENTATION_PAGENUMBER:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPageNumber"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("ImpressPageNumber"));
+	    sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_N)) );
             break;
         default:
-            sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("UnknownAccessibleImpressShape"));
+            //sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("UnknownAccessibleImpressShape"));
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_UNKNOWN_N)));
+	//-----IAccessibility2 Implementation 2009
             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
             if (xDescriptor.is())
                 sName += ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM(": "))
@@ -126,42 +144,67 @@ AccessiblePresentationShape::~Accessible
     throw (::com::sun::star::uno::RuntimeException)
 {
     //    return createAccessibleName ();
+    ::rtl::OUString sDescription;
     DescriptionGenerator aDG (mxShape);
     ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
     switch (nShapeType)
     {
+    //IAccessibility2 Implementation 2009-----
         case PRESENTATION_TITLE:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationTitleShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationTitleShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_TITLE_D)) );
+	    aDG.Initialize (sDescription);		
             break;
         case PRESENTATION_OUTLINER:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationOutlinerShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationOutlinerShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_OUTLINER_D)) );
+	    aDG.Initialize (sDescription);				//PresentationOutlinerShape
             break;
         case PRESENTATION_SUBTITLE:
             aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationSubtitleShape"));
+ 	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_SUBTITLE_D)) );
+	    aDG.Initialize (sDescription);				//PresentationSubtitleShape
             break;
         case PRESENTATION_PAGE:
             aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageShape"));
+            sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_PAGE_D)) );
+	    aDG.Initialize (sDescription);				//PresentationPageShape
             break;
         case PRESENTATION_NOTES:
             aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationNotesShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NOTES_D)) );
+	    aDG.Initialize (sDescription);				//PresentationNotesShape
             break;
         case PRESENTATION_HANDOUT:
             aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHandoutShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HANDOUT_D)) );
+	    aDG.Initialize (sDescription);				//PresentationHandoutShape
             break;
 		case PRESENTATION_HEADER:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHeaderShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationHeaderShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_D)) );
+	    aDG.Initialize (sDescription);				//PresentationHeaderShape
             break;
 		case PRESENTATION_FOOTER:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationFooterShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationFooterShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_D)) );
+	    aDG.Initialize (sDescription);				//PresentationFooterShape
             break;
 		case PRESENTATION_DATETIME:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationDateAndTimeShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationDateAndTimeShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_D)) );
+	    aDG.Initialize (sDescription);				//PresentationDateShape
             break;
 		case PRESENTATION_PAGENUMBER:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageNumberShape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("PresentationPageNumberShape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_D)) );
+	    aDG.Initialize (sDescription);				//PresentationNumberShape
             break;
         default:
-            aDG.Initialize (::rtl::OUString::createFromAscii ("Unknown accessible presentation shape"));
+            //aDG.Initialize (::rtl::OUString::createFromAscii ("Unknown accessible presentation shape"));
+	    sDescription = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_UNKNOWN_D)) );
+	    aDG.Initialize (sDescription);				//Unknown accessible presentation shape
+	    //-----IAccessibility2 Implementation 2009
             uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
             if (xDescriptor.is())
             {
@@ -172,5 +215,54 @@ AccessiblePresentationShape::~Accessible
 
     return aDG();
 }
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString AccessiblePresentationShape::GetStyle()
+{
+    ::rtl::OUString sName;
+
+    ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+    switch (nShapeType)
+    {
+        case PRESENTATION_TITLE:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_TITLE_N_STYLE)));
+            break;
+        case PRESENTATION_OUTLINER:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_OUTLINER_N_STYLE)));
+            break;
+        case PRESENTATION_SUBTITLE:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_SUBTITLE_N_STYLE)));
+            break;
+        case PRESENTATION_PAGE:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_PAGE_N_STYLE)));
+            break;
+        case PRESENTATION_NOTES:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_NOTES_N_STYLE)));
+            break;
+        case PRESENTATION_HANDOUT:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_HANDOUT_N_STYLE)));
+            break;
+        case PRESENTATION_FOOTER:
+		sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_FOOTER_N_STYLE)) );
+            break;
+	case PRESENTATION_HEADER:
+		sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_HEADER_N_STYLE)) );
+            break;
+        case PRESENTATION_DATETIME:
+			sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_DATE_N_STYLE)) );
+            break;
+        case PRESENTATION_PAGENUMBER:
+			sName = ::rtl::OUString ( String(SdResId(SID_SD_A11Y_P_NUMBER_N_STYLE)) );
+            break;			
+        default:
+            sName = ::rtl::OUString (String(SdResId(SID_SD_A11Y_P_UNKNOWN_N_STYLE)));
+            uno::Reference<drawing::XShapeDescriptor> xDescriptor (mxShape, uno::UNO_QUERY);
+            if (xDescriptor.is())
+                sName += ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM(": "))
+                    + xDescriptor->getShapeType();
+    }
 
+    return sName;
+
+}
+//-----IAccessibility2 Implementation 2009
 } // end of namespace accessibility	

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx Thu Nov 14 08:18:05 2013
@@ -199,7 +199,9 @@ sal_Int16 SAL_CALL AccessibleSlideSorter
     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;
 }
 

Modified: openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx Thu Nov 14 08:18:05 2013
@@ -91,6 +91,7 @@ public:
     DECL_LINK(FocusChangeListener, void*);
     DECL_LINK(UpdateChildrenCallback, void*);
 
+    void Activated(void);
 private:
     AccessibleSlideSorterView& mrAccessibleSlideSorter;
     ::sd::slidesorter::SlideSorter& mrSlideSorter;
@@ -833,6 +834,11 @@ void AccessibleSlideSorterView::Implemen
 
 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
@@ -1023,6 +1029,22 @@ void AccessibleSlideSorterView::Implemen
 }
 
 
+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)
@@ -1079,27 +1101,40 @@ IMPL_LINK(AccessibleSlideSorterView::Imp
     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;
 }

Modified: openoffice/trunk/main/sd/source/ui/accessibility/accessibility.hrc
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/accessibility.hrc?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/accessibility.hrc (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/accessibility.hrc Thu Nov 14 08:18:05 2013
@@ -44,6 +44,46 @@
 #define SID_SD_A11Y_I_HANDOUTVIEW_N		(SID_SD_A11Y_START + 10)
 #define SID_SD_A11Y_I_HANDOUTVIEW_D		(SID_SD_A11Y_START + 11)
 
+//IAccessibility2 Implementation 2009-----
+#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)
+//-----IAccessibility2 Implementation 2009
 #endif /* _SD_ACCESSIBILITY_HRC */
 

Modified: openoffice/trunk/main/sd/source/ui/accessibility/accessibility.src
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/accessibility/accessibility.src?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/accessibility/accessibility.src (original)
+++ openoffice/trunk/main/sd/source/ui/accessibility/accessibility.src Thu Nov 14 08:18:05 2013
@@ -87,25 +87,174 @@ String SID_SD_A11Y_I_HANDOUTVIEW_D
 	Text [ en-US ] = "This is where you decide on the layout for handouts.";
 };
 
+//IAccessibility2 Implementation 2009-----
+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)";
+};
+//-----IAccessibility2 Implementation 2009

Modified: openoffice/trunk/main/sd/source/ui/dlg/navigatr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/dlg/navigatr.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/dlg/navigatr.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/dlg/navigatr.cxx Thu Nov 14 08:18:05 2013
@@ -119,6 +119,9 @@ SdNavigatorWin::SdNavigatorWin(
     // set focus to listbox, otherwise it is in the toolbox which is only useful
     // for keyboard navigation
     maTlbObjects.GrabFocus();
+//IAccessibility2 Implementation 2009-----
+       maTlbObjects.SetSdNavigatorWinFlag(sal_True);
+//-----IAccessibility2 Implementation 2009
 
     // DragTypeListBox
     maLbDocs.SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) );
@@ -175,6 +178,28 @@ SdNavigatorWin::~SdNavigatorWin()
 
 // -----------------------------------------------------------------------
 
+//IAccessibility2 Implementation 2009-----
+//Solution: 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();
+	String aDocShName( pDocShell->GetName() );
+	String 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();
+}
+//==================================================
+//-----IAccessibility2 Implementation 2009
 void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
 {
 	SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can...
@@ -245,7 +270,16 @@ NavigatorDragType SdNavigatorWin::GetNav
 }
 
 // -----------------------------------------------------------------------
-
+//IAccessibility2 Implementation 2009-----
+//Solution: Get  SdDrawDocShell 
+sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc )
+{
+	if( !pDoc )
+		return NULL; // const as const can...
+	sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
+	return pDocShell;
+}
+//-----IAccessibility2 Implementation 2009
 
 IMPL_LINK( SdNavigatorWin, SelectToolboxHdl, void *, EMPTYARG )
 {
@@ -403,6 +437,10 @@ IMPL_LINK( SdNavigatorWin, ClickObjectHd
 				SfxStringItem aItem( SID_NAVIGATOR_OBJECT, aStr );
 				mpBindings->GetDispatcher()->Execute(
 					SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
+//IAccessibility2 Implementation 2009-----
+				//Solution: set sign variable
+				maTlbObjects.MarkCurEntry(aStr);
+//-----IAccessibility2 Implementation 2009
 
                 // #98821# moved here from SetGetFocusHdl. Reset the
                 // focus only if something has been selected in the

Modified: openoffice/trunk/main/sd/source/ui/dlg/sdtreelb.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/dlg/sdtreelb.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/dlg/sdtreelb.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/dlg/sdtreelb.cxx Thu Nov 14 08:18:05 2013
@@ -247,6 +247,7 @@ sal_uInt32 SdPageObjsTLB::SdPageObjsTran
 
 SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId ) 
 :	SvTreeListBox       ( pParentWin, rSdResId )
+,   bisInSdNavigatorWin  ( sal_False )
 ,	mpParent 		    ( pParentWin )
 ,	mpDoc			    ( NULL )
 ,	mpBookmarkDoc	    ( NULL )
@@ -260,7 +261,6 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pP
 ,	mpDropNavWin		( NULL )
 ,   mbShowAllShapes     ( false )
 ,   mbShowAllPages      ( false )
-
 {
 	// Tree-ListBox mit Linien versehen
 	SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
@@ -295,6 +295,184 @@ SdPageObjsTLB::~SdPageObjsTLB()
         delete mpMedium;
 }
 
+//IAccessibility2 Implementation 2009-----
+// helper function for 	GetEntryAltText and GetEntryLongDescription
+String SdPageObjsTLB::getAltLongDescText( SvLBoxEntry* pEntry , sal_Bool isAltText) const
+{
+	sal_uInt16 maxPages = mpDoc->GetPageCount();
+	sal_uInt16 pageNo;
+	SdrObject*	 pObj = NULL;
+	SdPage* pPage = NULL;
+
+
+	String 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 String();
+
+}
+
+String SdPageObjsTLB::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+	return getAltLongDescText( pEntry, sal_True );
+}
+
+String SdPageObjsTLB::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+	return getAltLongDescText( pEntry, sal_False);
+}
+
+void  SdPageObjsTLB::MarkCurEntry( const String& rName )
+{
+	
+	if( rName.Len() )
+	{
+		SvLBoxEntry* pCurEntry =GetCurEntry();
+		SvLBoxEntry* pEntry =NULL;
+		String aTmp1;
+		String 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 SvLBoxEntry 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()
+{
+       SvLBoxEntry* pEntry =NULL;
+       for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
+	{
+		        pEntry->SetMarked(sal_False);
+	}
+	Invalidate();
+}
+
+class SdContentLBoxString : public SvLBoxString
+{
+public:
+	SdContentLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
+		const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr)	{}
+
+	virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+		SvLBoxEntry* pEntry);
+};
+
+void SdPageObjsTLB::InitEntry(SvLBoxEntry* pEntry,
+		const XubString& 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 );
+	SdContentLBoxString* pStr = new SdContentLBoxString( pEntry, 0, pCol->GetText() );
+	pEntry->ReplaceItem( pStr, nColToHilite );
+}
+
+void SdContentLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
+	SvLBoxEntry* pEntry )
+{
+	// IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+	/*
+	if (pEntry->IsMarked())
+	{
+			rDev.DrawText( rPos, GetText() );
+			XubString str;
+			str = XubString::CreateFromAscii("*");
+			Point rPosStar(rPos.X()-6,rPos.Y());
+			Font aOldFont( rDev.GetFont());
+			Font aFont(aOldFont);
+			Color aCol( aOldFont.GetColor() );
+			aCol.DecreaseLuminance( 200 );
+			aFont.SetColor( aCol );
+			rDev.SetFont( aFont );
+			rDev.DrawText( rPosStar, str);
+			rDev.SetFont( aOldFont );
+	}
+	else 
+	*/
+		SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
+
+}
+
+void SdPageObjsTLB::SaveExpandedTreeItemState(SvLBoxEntry* pEntry, vector<String>& vectTreeItem)
+{
+	if (pEntry)
+	{
+		SvLBoxEntry* pListEntry = pEntry;
+		while (pListEntry)
+		{
+			if (pListEntry->HasChilds())
+			{
+				if (IsExpanded(pListEntry))
+					vectTreeItem.push_back(GetEntryText(pListEntry));
+				SvLBoxEntry* pChildEntry = FirstChild(pListEntry);
+				SaveExpandedTreeItemState(pChildEntry, vectTreeItem);
+			}
+			pListEntry = NextSibling(pListEntry);
+		}
+	}
+}
+void SdPageObjsTLB::Clear()
+{
+	//Save the expanded tree item
+	if (mbSaveTreeItemState)
+	{
+		maSelectionEntryText = String();
+		maTreeItem.clear();
+		if (GetCurEntry())
+			maSelectionEntryText = GetSelectEntry();
+		SvLBoxEntry* pEntry = FirstChild(NULL);
+		SaveExpandedTreeItemState(pEntry, maTreeItem);
+	}
+	return SvTreeListBox::Clear();
+}
+//-----IAccessibility2 Implementation 2009
 /*************************************************************************
 |*
 |* return name of object
@@ -448,6 +626,10 @@ void SdPageObjsTLB::Fill( const SdDrawDo
 	}
 	if( aSelection.Len() )
 		SelectEntry( aSelection );
+	else if (mbSaveTreeItemState && maSelectionEntryText.Len())
+	{
+		SelectEntry(maSelectionEntryText);
+	}
 }
 
 /*************************************************************************
@@ -528,6 +710,30 @@ void SdPageObjsTLB::AddShapeList (
         IM_FLAT,
         sal_False /*not reverse*/);
 
+	//IAccessibility2 Implementation 2009-----
+	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 );
+		}
+	}
+	//-----IAccessibility2 Implementation 2009
     while( aIter.IsMore() )
     {
         SdrObject* pObj = aIter.Next();
@@ -542,7 +748,29 @@ void SdPageObjsTLB::AddShapeList (
             {
                 SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgOle, maImgOle, pEntry,
                     sal_False, LIST_APPEND, pObj);
-
+				//IAccessibility2 Implementation 2009-----
+				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 );
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
                 SetExpandedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST );
                 SetCollapsedEntryBmp( pNewEntry, maImgOleH, BMP_COLOR_HIGHCONTRAST );
             }
@@ -550,7 +778,33 @@ void SdPageObjsTLB::AddShapeList (
             {
                 SvLBoxEntry* pNewEntry = InsertEntry( aStr, maImgGraphic, maImgGraphic, pEntry,
                     sal_False, LIST_APPEND, pObj );
-
+				//IAccessibility2 Implementation 2009-----
+				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 );
+						}
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
                 SetExpandedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST );
                 SetCollapsedEntryBmp( pNewEntry, maImgGraphicH, BMP_COLOR_HIGHCONTRAST );
             }
@@ -568,7 +822,33 @@ void SdPageObjsTLB::AddShapeList (
             {
                 SvLBoxEntry* pNewEntry = InsertEntry( aStr, rIconProvider.maImgObjects, rIconProvider.maImgObjects, pEntry,
                     sal_False, LIST_APPEND, pObj );
-
+				//IAccessibility2 Implementation 2009-----
+				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 );
+						}
+					}
+				}
+				//-----IAccessibility2 Implementation 2009
                 SetExpandedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST );
                 SetCollapsedEntryBmp( pNewEntry, rIconProvider.maImgObjectsH, BMP_COLOR_HIGHCONTRAST );
             }
@@ -591,6 +871,24 @@ void SdPageObjsTLB::AddShapeList (
             pEntry,
             bIsExcluded ? rIconProvider.maImgPageObjsExclH : rIconProvider.maImgPageObjsH,
             BMP_COLOR_HIGHCONTRAST);
+		//IAccessibility2 Implementation 2009-----
+		if (mbSaveTreeItemState)
+		{
+			vector<String>:: iterator iteStart = maTreeItem.begin();
+			while (iteStart != maTreeItem.end())
+			{
+				String strEntry = GetEntryText(pEntry);
+				if (*iteStart == strEntry)
+				{
+					Expand( pEntry );
+					break;
+				}
+				++iteStart;
+			}
+		}
+		else
+			Expand( pEntry );
+		//-----IAccessibility2 Implementation 2009
     }
 }
 
@@ -968,6 +1266,62 @@ void SdPageObjsTLB::KeyInput( const KeyE
 
 		DoubleClickHdl();
 	}
+//IAccessibility2 Implementation 2009-----
+	else if (rKEvt.GetKeyCode().GetCode() == KEY_SPACE)
+	{
+	   if(bisInSdNavigatorWin)
+	   {
+		   sal_Bool bMarked=sal_False;
+		   SvLBoxEntry* pNewEntry = GetCurEntry();
+		   if( GetParent(pNewEntry) == NULL )
+			   return;
+		   String  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.
+		   /*
+		   SvLBoxEntry* pBeginEntry = First();
+		   if( pBeginEntry )
+		   {
+			   if( GetParent(pBeginEntry) !=  GetParent(pNewEntry) )
+				   pBeginEntry->SetMarked( sal_False );
+			   SvLBoxEntry* 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();
+	   }
+	}
+//-----IAccessibility2 Implementation 2009
 	else
 		SvTreeListBox::KeyInput( rKEvt );
 }

Modified: openoffice/trunk/main/sd/source/ui/docshell/docshel4.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/docshell/docshel4.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/docshell/docshel4.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/docshell/docshel4.cxx Thu Nov 14 08:18:05 2013
@@ -93,6 +93,10 @@
 #include "sdhtmlfilter.hxx"
 #include "framework/FrameworkHelper.hxx"
 
+//IAccessibility2 Implementation 2009-----
+#include <sfx2/viewfrm.hxx>
+#include "SdUnoDrawView.hxx"
+//-----IAccessibility2 Implementation 2009
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using ::sd::framework::FrameworkHelper;
@@ -574,6 +578,22 @@ sal_Bool DrawDocShell::Save()
 
 sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
 {
+//IAccessibility2 Implementation 2009-----
+	mpDoc->setDocAccTitle(String());
+	SfxViewFrame* pFrame1 = SfxViewFrame::GetFirst( this );
+	if (pFrame1)
+	{
+		::Window* pWindow = &pFrame1->GetWindow();
+		if ( pWindow )
+		{
+			::Window* pSysWin = pWindow->GetSystemWindow();
+			if ( pSysWin )
+			{
+				pSysWin->SetAccessibleName(String());
+			}
+		}
+	}
+//-----IAccessibility2 Implementation 2009
 	mpDoc->StopWorkStartupDelay();
 
     //TODO/LATER: why this?!
@@ -908,6 +928,241 @@ sal_Bool DrawDocShell::GotoBookmark(cons
 	return (bFound);
 }
 
+//IAccessibility2 Implementation 2009-----
+//Solution: 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;
+}
+//Solution: If  object  is marked , return true , else return false . 
+sal_Bool DrawDocShell::GetObjectIsmarked(const String& rBookmark)
+{
+    OSL_TRACE("GotoBookmark %s",
+        ::rtl::OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+     sal_Bool bUnMark = sal_False;
+
+	if (mpViewShell && mpViewShell->ISA(DrawViewShell))
+	{
+		DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+
+		String aBookmark( rBookmark );
+
+		if( rBookmark.Len() && rBookmark.GetChar( 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->GetViewShellBase().GetDrawController(),
+                *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);
+}
+//Solution: realize multi-selection of objects
+sal_Bool DrawDocShell::GotoTreeBookmark(const String& rBookmark)
+{
+    OSL_TRACE("GotoBookmark %s",
+        ::rtl::OUStringToOString(rBookmark, RTL_TEXTENCODING_UTF8).getStr());
+	sal_Bool bFound = sal_False;
+
+	if (mpViewShell && mpViewShell->ISA(DrawViewShell))
+	{
+		DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+
+		String aBookmark( rBookmark );
+
+		if( rBookmark.Len() && rBookmark.GetChar( 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->GetViewShellBase().GetDrawController(),
+                *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);
+}
+//-----IAccessibility2 Implementation 2009
 /*************************************************************************
 |*
 |* SaveAsOwnFormat: wenn es eine Dokumentvorlage werden soll,
@@ -1031,4 +1286,39 @@ void DrawDocShell::OpenBookmark( const S
 	( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
 }
 
+//IAccessibility2 Implementation 2009-----
+void DrawDocShell::setDocAccTitle( const String& rTitle )
+{ 
+	if (mpDoc ) 
+	{
+		mpDoc->setDocAccTitle( rTitle );
+	}
+}
+const String DrawDocShell::getDocAccTitle() const
+{
+	String 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;
+}
+//-----IAccessibility2 Implementation 2009
 } // end of namespace sd

Modified: openoffice/trunk/main/sd/source/ui/func/fudraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/func/fudraw.cxx?rev=1541847&r1=1541846&r2=1541847&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/func/fudraw.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/func/fudraw.cxx Thu Nov 14 08:18:05 2013
@@ -470,10 +470,16 @@ sal_Bool FuDraw::KeyInput(const KeyEvent
 				// changeover to the next object
 				if(!mpView->MarkNextObj( !aCode.IsShift() ))
 				{
-					// #97016# No next object: go over open end and
-					// get first from the other side
-					mpView->UnmarkAllObj();
-					mpView->MarkNextObj(!aCode.IsShift());
+					//IAccessibility2 Implementation 2009-----
+					//If there is only one object, don't do the UnmarkAlllObj() & MarkNextObj(). 
+					if ( mpView->GetMarkableObjCount() > 1 && mpView->AreObjectsMarked() )
+					{
+						// #97016# No next object: go over open end and
+						// get first from the other side
+						mpView->UnmarkAllObj();
+						mpView->MarkNextObj(!aCode.IsShift());
+					}
+					//-----IAccessibility2 Implementation 2009
 				}
 
 				// #97016# II



Mime
View raw message