openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1543609 [31/32] - in /openoffice/branches/l10n40/main: ./ accessibility/inc/accessibility/extended/ accessibility/inc/accessibility/helper/ accessibility/inc/accessibility/standard/ accessibility/source/extended/ accessibility/source/helpe...
Date Tue, 19 Nov 2013 22:39:57 GMT
Modified: openoffice/branches/l10n40/main/sw/source/ui/uiview/viewstat.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/uiview/viewstat.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/uiview/viewstat.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/uiview/viewstat.cxx Tue Nov 19 22:39:40 2013
@@ -77,35 +77,43 @@ void SwView::GetState(SfxItemSet &rSet)
 	int bGetFrmType = sal_False;
 	sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
 
-	while(nWhich)
-	{
-		switch(nWhich)
-		{
-			case FN_EDIT_LINK_DLG:
-				if( !pWrtShell->GetLinkManager().GetLinks().Count()	)
-					rSet.DisableItem(nWhich);
-				else if( pWrtShell->IsSelFrmMode() &&
-							pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
-						rSet.DisableItem(nWhich);
-				break;
+    while(nWhich)
+    {
+        switch(nWhich)
+        {
+        case FN_EDIT_LINK_DLG:
+            if( !pWrtShell->GetLinkManager().GetLinks().Count()	)
+                rSet.DisableItem(nWhich);
+            else if( pWrtShell->IsSelFrmMode() &&
+                pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT))
+                rSet.DisableItem(nWhich);
+            break;
 
-			case FN_INSERT_CAPTION:
-			{
-				// Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
-				if( !bGetFrmType )
-					eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
-				if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
-						nSelectionType & nsSelectionType::SEL_TBL ||
-						nSelectionType & nsSelectionType::SEL_DRW) )
-					rSet.DisableItem(nWhich);
-                else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
+        case SID_INSERT_GRAPHIC:
+            if( pWrtShell->CrsrInsideInputFld() )
+            {
+                rSet.DisableItem(nWhich);
+            }
+            break;
+
+            case FN_INSERT_CAPTION:
+                {
+                    // Captions gibt's fuer Grafiken, OLE-Objekte, Rahmen und Tabellen
+                    if( !bGetFrmType )
+                        eFrmType = pWrtShell->GetFrmType(0,sal_True), bGetFrmType = sal_True;
+                    if (! ( ((eFrmType & FRMTYPE_FLY_ANY) && nSelectionType != nsSelectionType::SEL_DRW_TXT)||
+                        nSelectionType & nsSelectionType::SEL_TBL ||
+                        nSelectionType & nsSelectionType::SEL_DRW) )
+                        rSet.DisableItem(nWhich);
+                    else if((pWrtShell->IsObjSelected()||pWrtShell->IsFrmSelected()) &&
                         (pWrtShell->IsSelObjProtected( FLYPROTECT_PARENT)||
-                            pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
-                    rSet.DisableItem(nWhich);
-                else if( pWrtShell->IsTableMode() )
-					rSet.DisableItem(nWhich);
-			}
-			break;
+                        pWrtShell->IsSelObjProtected( FLYPROTECT_CONTENT )))
+                        rSet.DisableItem(nWhich);
+                    else if( pWrtShell->IsTableMode()
+                        || pWrtShell->CrsrInsideInputFld() )
+                        rSet.DisableItem(nWhich);
+                }
+                break;
 
 			case FN_EDIT_FOOTNOTE:
 			{
@@ -184,24 +192,29 @@ void SwView::GetState(SfxItemSet &rSet)
                 rSet.Put(aImgItem);
             }
             break;
-			case FN_INSERT_OBJ_CTRL:
-			if(bWeb)
-				rSet.DisableItem(nWhich);
-			else
-            {
-                SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
-                SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
-                const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
-                if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+
+            case FN_INSERT_OBJ_CTRL:
+                if( bWeb
+                    || pWrtShell->CrsrInsideInputFld() )
                 {
-                    if(pWrtShell->IsInVerticalText())
-                        aImgItem.SetRotation(2700);
-                    if(pWrtShell->IsInRightToLeftText())
-                        aImgItem.SetMirrored(sal_True);
+                    rSet.DisableItem(nWhich);
                 }
-                rSet.Put(aImgItem);
-            }
-			break;
+                else
+                {
+                    SfxImageItem aImgItem(nWhich, SwView::nInsertObjectCtrlState);
+                    SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() );
+                    const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() );
+                    if(pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ))
+                    {
+                        if(pWrtShell->IsInVerticalText())
+                            aImgItem.SetRotation(2700);
+                        if(pWrtShell->IsInRightToLeftText())
+                            aImgItem.SetMirrored(sal_True);
+                    }
+                    rSet.Put(aImgItem);
+                }
+                break;
+
 			case FN_UPDATE_TOX:
 				if(!pWrtShell->GetTOXCount())
 					rSet.DisableItem(nWhich);

Modified: openoffice/branches/l10n40/main/sw/source/ui/uiview/viewtab.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/uiview/viewtab.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/uiview/viewtab.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/uiview/viewtab.cxx Tue Nov 19 22:39:40 2013
@@ -692,7 +692,7 @@ void SwView::ExecTabWin( SfxRequest& rRe
                 rSh.AutoUpdatePara( pColl, aTmp );
             }
             else
-                rSh.SetAttr( aTabStops );
+                rSh.SetAttrItem( aTabStops );
             break;
         }
 
@@ -750,7 +750,7 @@ void SwView::ExecTabWin( SfxRequest& rRe
                 rSh.AutoUpdatePara( pColl, aSet);
             }
             else
-                rSh.SetAttr( aParaMargin );
+                rSh.SetAttrItem( aParaMargin );
 
             if ( aParaMargin.GetTxtFirstLineOfst() < 0 )
             {
@@ -789,7 +789,7 @@ void SwView::ExecTabWin( SfxRequest& rRe
                         rSh.AutoUpdatePara( pColl, aSetTmp );
                     }
                     else
-                        rSh.SetAttr( aTabStops );
+                        rSh.SetAttrItem( aTabStops );
                 }
             }
         }
@@ -814,7 +814,7 @@ void SwView::ExecTabWin( SfxRequest& rRe
 			rSh.AutoUpdatePara( pColl, aSet);
 		}
 		else
-			rSh.SetAttr( aParaMargin );
+			rSh.SetAttrItem( aParaMargin );
 	}
 	break;
 
@@ -1076,7 +1076,7 @@ void SwView::StateTabWin(SfxItemSet& rSe
                                     RES_LR_SPACE, 		 RES_UL_SPACE, 0 );
     // get also the list level indent values merged as LR-SPACE item, if needed.
     rSh.GetCurAttr( aCoreSet, true );
-    SelectionType nSelType = rSh.GetSelectionType();
+    const SelectionType nSelType = rSh.GetSelectionType();
 
     SfxWhichIter aIter( rSet );
     sal_uInt16 nWhich = aIter.FirstWhich();

Modified: openoffice/branches/l10n40/main/sw/source/ui/utlui/content.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/utlui/content.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/utlui/content.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/utlui/content.cxx Tue Nov 19 22:39:40 2013
@@ -85,7 +85,15 @@
 #include <numrule.hxx>
 #include <swundo.hxx>
 #include <ndtxt.hxx>
+//IAccessibility2 Implementation 2009-----
+//#include <ndgrf.hxx>
+#include <fmtcntnt.hxx>
 #include <PostItMgr.hxx>
+//#include <../../core/inc/flyfrm.hxx>
+//#include <../../core/inc/cntfrm.hxx>
+//#include <ndnotxt.hxx>
+//-----IAccessibility2 Implementation 2009
+//#include <postit.hxx>
 #include <postithelper.hxx>
 #include <redline.hxx>
 #include <docary.hxx>
@@ -890,7 +898,8 @@ SwContentTree::SwContentTree(Window* pPa
 		bIsLastReadOnly(sal_False),
 		bIsOutlineMoveable(sal_True),
 		bViewHasChanged(sal_False),
-		bIsImageListInitialized(sal_False)
+		bIsImageListInitialized(sal_False),
+		bIsKeySpace(sal_False) //IAccessibility2 Implementation 2009
 {
 	sal_uInt16 i;
 
@@ -927,6 +936,179 @@ SwContentTree::~SwContentTree()
 	bIsInDrag = sal_False;
 }
 
+//IAccessibility2 Implementation 2009-----
+String SwContentTree::GetEntryAltText( SvLBoxEntry* pEntry ) const
+{
+	if( pEntry == NULL)
+		return String();
+
+	SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+	if( pCnt == NULL || pCnt->GetParent() == NULL)
+		return String();
+	
+	sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+	SdrObject* pTemp;
+	
+	switch(nJumpType)
+	{
+		case CONTENT_TYPE_DRAWOBJECT:
+			{
+				SdrView* pDrawView = pActiveShell->GetDrawView();
+				if (pDrawView)
+				{
+                    SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+                    SdrPage* pPage = pDrawModel->GetPage(0);
+                    const sal_uInt32 nCount = pPage->GetObjCount();
+					for( sal_uInt32 i=0; i< nCount; i++ )
+					{
+						pTemp = pPage->GetObj(i);						
+						sal_uInt16 nCmpId;		
+						switch( pTemp->GetObjIdentifier() )
+						{
+						case OBJ_GRUP:
+						case OBJ_TEXT:
+						case OBJ_TEXTEXT:
+						case OBJ_wegFITTEXT:
+						case OBJ_LINE:
+						case OBJ_RECT:
+							//caoxueqin added custom shape
+						case OBJ_CUSTOMSHAPE:
+							//end 2005/08/05
+						case OBJ_CIRC:
+						case OBJ_SECT:
+						case OBJ_CARC:
+						case OBJ_CCUT:
+						case OBJ_POLY:
+						case OBJ_PLIN:
+						case OBJ_PATHLINE:
+						case OBJ_PATHFILL:
+						case OBJ_FREELINE:
+						case OBJ_FREEFILL:
+						case OBJ_PATHPOLY:
+						case OBJ_PATHPLIN:
+						case OBJ_CAPTION:
+							nCmpId = OBJ_GRUP;
+							break;
+						default:
+							nCmpId = pTemp->GetObjIdentifier();
+						}
+						if(nCmpId == OBJ_GRUP /*pTemp->ISA(SdrObjGroup)*/ && pTemp->GetName() == pCnt->GetName())
+						{
+							return pTemp->GetTitle();
+						}
+						//Commented End
+					}
+				}
+			}
+			break;		
+		case CONTENT_TYPE_GRAPHIC   :
+			{
+				if( pActiveShell && pActiveShell->GetDoc() )
+				{
+					const SwFlyFrmFmt* pFrmFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+					if( pFrmFmt )
+					{
+//                        SwNodeIndex aIdx( *(pFrmFmt->GetCntnt().GetCntntIdx()), 1 );
+//                        const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
+//                        if( pGrfNd )
+//                            return pGrfNd->GetAlternateText(); 
+                        return pFrmFmt->GetObjTitle();
+					}
+				}
+			}
+			break;
+		case CONTENT_TYPE_OLE       :
+		case CONTENT_TYPE_FRAME     :
+			{
+				//Can't find the GetAlternateText function. Need to verify again.
+				const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+				if( pFlyFmt )
+					return pFlyFmt->/*GetAlternateText*/GetName();
+			}
+			break;
+	}
+	return String();
+}
+
+String SwContentTree::GetEntryLongDescription( SvLBoxEntry* pEntry ) const
+{
+	if( pEntry == NULL)
+		return String();
+
+	SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+	if( pCnt == NULL || pCnt->GetParent() == NULL)
+		return String();
+
+	sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+	SdrObject* pTemp;
+	
+	switch(nJumpType)
+	{
+		case CONTENT_TYPE_DRAWOBJECT:
+			{
+				SdrView* pDrawView = pActiveShell->GetDrawView();
+				if (pDrawView)
+				{
+                    SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+                    SdrPage* pPage = pDrawModel->GetPage(0);
+					sal_uInt32 nCount = pPage->GetObjCount();
+					for( sal_uInt32 i=0; i< nCount; i++ )
+					{
+						pTemp = pPage->GetObj(i);						
+						sal_uInt16 nCmpId;		
+						switch( pTemp->GetObjIdentifier() )
+						{
+						case OBJ_GRUP:
+						case OBJ_TEXT:
+						case OBJ_TEXTEXT:
+						case OBJ_wegFITTEXT:
+						case OBJ_LINE:
+						case OBJ_RECT:
+							//caoxueqin added custom shape
+						case OBJ_CUSTOMSHAPE:
+							//end 2005/08/05
+						case OBJ_CIRC:
+						case OBJ_SECT:
+						case OBJ_CARC:
+						case OBJ_CCUT:
+						case OBJ_POLY:
+						case OBJ_PLIN:
+						case OBJ_PATHLINE:
+						case OBJ_PATHFILL:
+						case OBJ_FREELINE:
+						case OBJ_FREEFILL:
+						case OBJ_PATHPOLY:
+						case OBJ_PATHPLIN:
+						case OBJ_CAPTION:
+							nCmpId = OBJ_GRUP;
+							break;
+						default:
+							nCmpId = pTemp->GetObjIdentifier();
+						}
+						if(nCmpId == OBJ_GRUP /*pTemp->ISA(SdrObjGroup)*/ && pTemp->GetName() == pCnt->GetName())
+						{
+							return pTemp->GetDescription();
+						}
+						//Commented End
+					}
+				}
+			}
+			break;		
+		case CONTENT_TYPE_GRAPHIC   :
+		case CONTENT_TYPE_OLE       :
+		case CONTENT_TYPE_FRAME     :
+			{
+				//Can't find the function "GetLongDescription". Need to verify again.
+				const SwFlyFrmFmt* pFlyFmt = pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName(), 0);
+				if( pFlyFmt )
+					return pFlyFmt->GetDescription();				
+			}
+			break;
+	}
+	return String();
+}
+
+//-----IAccessibility2 Implementation 2009
 /***************************************************************************
 	Drag&Drop methods
 ***************************************************************************/
@@ -1210,10 +1392,32 @@ void  SwContentTree::RequestingChilds( S
 					String sEntry = pCnt->GetName();
 					if(!sEntry.Len())
 						sEntry = sSpace;
-                    InsertEntry(sEntry, pParent,
+					SvLBoxEntry* pChild = InsertEntry(sEntry, pParent,
 							sal_False, LIST_APPEND, (void*)pCnt);
-				}
+					//IAccessibility2 Implementation 2009-----
+					//Solution: If object is marked , the corresponding entry is set true ,
+					//else the corresponding entry is set false .
+					//==================================================
+					SdrObject * pObj = GetDrawingObjectsByContent(pCnt);
+					if(pChild)
+					      pChild->SetMarked(sal_False);
+					if(pObj)
+					{
+						SdrView* pDrawView = pActiveShell->GetDrawView();
+						SdrPageView* pPV = pDrawView->/*GetPageViewPvNum*/GetSdrPageView(/*0*/);
+						if( pPV )
+						{
+							sal_Bool Marked = pDrawView->IsObjMarked(pObj);
+							if(Marked)
+							{
+								//sEntry += String::CreateFromAscii(" *");
+								pChild->SetMarked(sal_True);
+							}
 
+						}
+					}
+					//-----IAccessibility2 Implementation 2009
+				}
 			}
 		}
 	}
@@ -1222,6 +1426,41 @@ void  SwContentTree::RequestingChilds( S
 	Beschreibung:	Expand - Zustand fuer Inhaltstypen merken
 ***************************************************************************/
 
+//IAccessibility2 Implementation 2009-----
+//Solution: Get drawing Objects by content .
+SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
+{
+	SdrObject *pRetObj = NULL;
+	sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+	switch(nJumpType)
+	{
+		case CONTENT_TYPE_DRAWOBJECT:
+		{
+			SdrView* pDrawView = pActiveShell->GetDrawView();
+			if (pDrawView)
+			{
+                SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+                SdrPage* pPage = pDrawModel->GetPage(0);
+				sal_uInt32 nCount = pPage->GetObjCount();
+				
+				for( sal_uInt32 i=0; i< nCount; i++ )
+				{
+					SdrObject* pTemp = pPage->GetObj(i);
+					if( pTemp->GetName() == pCnt->GetName())
+					{
+						pRetObj = pTemp;
+						break;
+					}
+				}
+			}
+			break;
+		}
+		default:
+			pRetObj = NULL;
+	}
+	return pRetObj;
+}
+//-----IAccessibility2 Implementation 2009
 
 sal_Bool  SwContentTree::Expand( SvLBoxEntry* pParent )
 {
@@ -2221,6 +2460,15 @@ IMPL_LINK( SwContentTree, TimerUpdate, T
 		{
 			FindActiveTypeAndRemoveUserData();
 			Display(sal_True);
+			//IAccessibility2 Implementation 2009-----
+			//Solution: Set focus
+			if( bIsKeySpace )
+			{
+				HideFocus();
+				ShowFocus( oldRectangle);
+				bIsKeySpace = sal_False;
+			}
+			//-----IAccessibility2 Implementation 2009
 		}
 	}
 	else if(!pView && bIsActive && !bIsIdleClear)
@@ -2443,6 +2691,128 @@ void  SwContentTree::KeyInput(const KeyE
             GrabFocus();
         }
 	}
+	//IAccessibility2 Implementation 2009-----
+	//Solution: Make KEY_SPACE has same function as DoubleClick ,
+	//and realize multi-selection .
+	else if(aCode.GetCode() == KEY_SPACE && 0 == aCode.GetModifier())
+	{
+		
+		SvLBoxEntry* pEntry = GetCurEntry();
+		if( GetChildCount( pEntry ) == 0 )
+			bIsKeySpace = sal_True;
+		Point tempPoint = GetEntryPosition( pEntry );//Change from "GetEntryPos" to "GetEntryPosition" for acc migration
+		oldRectangle = GetFocusRect( pEntry,tempPoint.Y() );
+		
+		if(pEntry)
+		{
+			if(bIsActive || bIsConstant)
+			{
+				if(bIsConstant)
+				{
+					pActiveShell->GetView().GetViewFrame()->GetWindow().ToTop();
+				}
+
+				SwContent* pCnt = (SwContent*)pEntry->GetUserData();
+
+				sal_Bool bSel = sal_False;
+				sal_uInt16 nJumpType = pCnt->GetParent()->GetType();
+				switch(nJumpType)
+				{
+					case CONTENT_TYPE_DRAWOBJECT:
+					{
+						SdrView* pDrawView = pActiveShell->GetDrawView();
+						if (pDrawView)
+						{
+							pDrawView->SdrEndTextEdit();//Change from "EndTextEdit" to "SdrEndTextEdit" for acc migration
+							
+                            SdrModel* pDrawModel = pActiveShell->GetDoc()->GetDrawModel();
+                            SdrPage* pPage = pDrawModel->GetPage(0);
+							sal_uInt32 nCount = pPage->GetObjCount();
+							sal_Bool hasObjectMarked = sal_False;
+
+							SdrObject* pObject = NULL;
+							pObject = GetDrawingObjectsByContent( pCnt );
+							if( pObject )
+							{
+								SdrPageView* pPV = pDrawView->GetSdrPageView/*GetPageViewPvNum*/(/*0*/);
+								if( pPV )
+								{
+									sal_Bool bUnMark = pDrawView->IsObjMarked(pObject);
+									pDrawView->MarkObj( pObject, pPV, bUnMark);
+									
+								}
+							}
+							for( sal_uInt32 i=0; i< nCount; i++ )
+							{
+								SdrObject* pTemp = pPage->GetObj(i);
+								sal_uInt16 nCmpId;
+								sal_Bool bMark = pDrawView->IsObjMarked(pTemp);
+								switch( pTemp->GetObjIdentifier() )
+								{
+									case OBJ_GRUP:
+									case OBJ_TEXT:
+									case OBJ_TEXTEXT:
+									case OBJ_wegFITTEXT:
+									case OBJ_LINE:
+									case OBJ_RECT:
+									case OBJ_CIRC:
+									case OBJ_SECT:
+									case OBJ_CARC:
+									case OBJ_CCUT:
+									case OBJ_POLY:
+									case OBJ_PLIN:
+									case OBJ_PATHLINE:
+									case OBJ_PATHFILL:
+									case OBJ_FREELINE:
+									case OBJ_FREEFILL:
+									case OBJ_PATHPOLY:
+									case OBJ_PATHPLIN:
+									case OBJ_CAPTION:
+									case OBJ_CUSTOMSHAPE:
+										nCmpId = OBJ_GRUP;
+										if( bMark )
+											hasObjectMarked = sal_True;
+										break;
+									default:
+										nCmpId = pTemp->GetObjIdentifier();
+										//IAccessibility2 Implementation 2009-----
+										if ( bMark )
+										{
+											SdrPageView* pPV = pDrawView->GetSdrPageView/*GetPageViewPvNum*/(/*0*/);
+											if (pPV)
+											{
+												pDrawView->MarkObj(pTemp, pPV, sal_True);
+											}
+										}
+										//-----IAccessibility2 Implementation 2009
+								}
+								//mod end							
+							}
+							if ( pActiveShell && !hasObjectMarked )
+							{
+								SwEditWin& pEditWindow = 
+									pActiveShell->GetView().GetEditWin();
+								if( &pEditWindow )
+								{
+									KeyCode tempKeycode( KEY_ESCAPE );
+									KeyEvent rKEvt( 0 , tempKeycode );
+									((Window*)&pEditWindow)->KeyInput( rKEvt );
+									
+								}
+								//rView.GetEditWin().GrabFocus();
+							}
+						}
+					}
+					break;
+				}
+				
+								
+				bViewHasChanged = sal_True;
+			}
+		}		
+
+	}	
+	//-----IAccessibility2 Implementation 2009
 	else
 		SvTreeListBox::KeyInput(rEvent);
 
@@ -3205,7 +3575,27 @@ void SwContentLBoxString::Paint( const P
 		rDev.DrawText( rPos, GetText() );
 		rDev.SetFont( aOldFont );
 	}
-	else
+	//IAccessibility2 Implementation 2009-----
+	// IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
+	/*
+	else 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 );
+	}
+	//-----IAccessibility2 Implementation 2009
+	*/
+	else 
 		SvLBoxString::Paint( rPos, rDev, nFlags, pEntry);
 }
 /* -----------------------------06.05.2002 10:20------------------------------
@@ -3225,3 +3615,18 @@ void    SwContentTree::DataChanged( cons
 }
 
 
+//IAccessibility2 Implementation 2009-----
+sal_Int32  SwContentTree::GetEntryRealChildsNum( SvLBoxEntry* pParent ) const
+{
+	// ist es ein Inhaltstyp?
+	if(lcl_IsContentType(pParent))
+	{
+		if(!pParent->HasChilds())
+		{
+			SwContentType* pCntType = (SwContentType*)pParent->GetUserData();
+			return pCntType->GetMemberCount();
+		}
+	}
+	return 0;
+}
+//-----IAccessibility2 Implementation 2009

Modified: openoffice/branches/l10n40/main/sw/source/ui/utlui/navipi.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/utlui/navipi.hrc?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/utlui/navipi.hrc (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/utlui/navipi.hrc Tue Nov 19 22:39:40 2013
@@ -84,3 +84,8 @@
 #define ST_POSTIT_SHOW				(ST_GLOBAL_CONTEXT_FIRST +35)
 #define ST_POSTIT_HIDE				(ST_GLOBAL_CONTEXT_FIRST +36)
 #define ST_POSTIT_DELETE			(ST_GLOBAL_CONTEXT_FIRST +37)
+
+//IAccessibility2 Implementation 2009-----
+#define ST_TL_GLOBAL			ST_GLOBAL_CONTEXT_FIRST +38
+#define ST_TL_CONTENT			ST_GLOBAL_CONTEXT_FIRST +39
+//-----IAccessibility2 Implementation 2009

Modified: openoffice/branches/l10n40/main/sw/source/ui/wrtsh/delete.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/wrtsh/delete.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/wrtsh/delete.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/wrtsh/delete.cxx Tue Nov 19 22:39:40 2013
@@ -89,7 +89,7 @@ sal_Bool SwWrtShell::TryRemoveIndent()
     if (bResult)
     {
         aAttrSet.Put(aItem);
-        SetAttr(aAttrSet);
+        SetAttrSet(aAttrSet);
     }
 
     return bResult;

Modified: openoffice/branches/l10n40/main/sw/source/ui/wrtsh/select.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/wrtsh/select.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/wrtsh/select.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/wrtsh/select.cxx Tue Nov 19 22:39:40 2013
@@ -46,6 +46,11 @@
 #include <swdtflvr.hxx>
 #include <crsskip.hxx>
 
+//IAccessibility2 Implementation 2009-----
+#ifndef _DOC_HXX
+#include <doc.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
 #if OSL_DEBUG_LEVEL > 1
 #include <pam.hxx>
 #endif
@@ -166,6 +171,14 @@ long SwWrtShell::SelAll()
         }
         SttSelect();
         GoEnd(sal_True, &bMoveTable);
+
+		//IAccessibility2 Implementation 2009-----
+		SwDoc *pDoc = GetDoc();
+		if ( pDoc )
+		{
+			pDoc->SetPrepareSelAll();
+		}
+		//-----IAccessibility2 Implementation 2009
         if( pStartPos )
         {
             pTmpCrsr = getShellCrsr( false );

Modified: openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh1.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh1.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh1.cxx Tue Nov 19 22:39:40 2013
@@ -417,28 +417,8 @@ void SwWrtShell::InsertObject( const svt
 				}
 
                 // TODO/LATER: recording! Convert properties to items
-				case SID_INSERT_PLUGIN:
-                    /*
-                    if(pReq)
-                    {
-						INetURLObject* pURL = aDlg.GetURL();
-						if(pURL)
-                            pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE)));
-						pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
-                    } */
-				case SID_INSERT_FLOATINGFRAME:
-                    /*
-                    if(pReq && xFloatingFrame.Is())
-                    {
-                        const SfxFrameDescriptor* pDescriptor = xFloatingFrame->GetFrameDescriptor();
-                        pReq->AppendItem(SfxStringItem(FN_PARAM_1, pDescriptor->GetName()));
-                        pReq->AppendItem(
-                                SfxStringItem( FN_PARAM_2,
-                                    pDescriptor->GetURL().GetMainURL(INetURLObject::NO_DECODE)));
-                        pReq->AppendItem(SvxSizeItem(FN_PARAM_3, pDescriptor->GetMargin()));
-                        pReq->AppendItem(SfxByteItem(FN_PARAM_4, pDescriptor->GetScrollingMode()));
-                        pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder()));
-                    }*/
+                case SID_INSERT_PLUGIN:
+                case SID_INSERT_FLOATINGFRAME:
                 {
                     SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
                     const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
@@ -959,10 +939,10 @@ void SwWrtShell::InsertPageBreak(const S
 		{
 			SwFmtPageDesc aDesc( pDesc );
 			aDesc.SetNumOffset( nPgNum );
-			SetAttr( aDesc );
+			SetAttrItem( aDesc );
 		}
 		else
-            SetAttr( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
+            SetAttrItem( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
         EndUndo(UNDO_UI_INSERT_PAGE_BREAK);
 	}
 }
@@ -1008,7 +988,7 @@ void SwWrtShell::InsertColumnBreak()
 				DelRight();
 			SwFEShell::SplitNode( sal_False, sal_False );
 		}
-        SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
+        SetAttrItem(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
 
         EndUndo(UNDO_UI_INSERT_COLUMN_BREAK);
 	}
@@ -1037,7 +1017,7 @@ void SwWrtShell::InsertFootnote(const St
 		if(rStr.Len())
 			aFootNote.SetNumStr( rStr );
 
-		SetAttr(aFootNote);
+		SetAttrItem(aFootNote);
 
 		if( bEdit )
 		{
@@ -1506,94 +1486,86 @@ void SwWrtShell::BulletOn()
 --------------------------------------------------*/
 SelectionType SwWrtShell::GetSelectionType() const
 {
-	// ContentType kann nicht ermittelt werden innerhalb einer
-	// Start-/Endactionklammerung.
-	// Da es keinen ungueltigen Wert gibt, wird TEXT geliefert.
-	// Der Wert ist egal, da in EndAction ohnehin aktualisiert wird.
+    // ContentType kann nicht ermittelt werden innerhalb einer
+    // Start-/Endactionklammerung.
+    // Da es keinen ungueltigen Wert gibt, wird TEXT geliefert.
+    // Der Wert ist egal, da in EndAction ohnehin aktualisiert wird.
 
-	if ( BasicActionPend() )
+    if ( BasicActionPend() )
         return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT;
 
-//	if ( IsTableMode() )
-//      return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
-
-	SwView &_rView = ((SwView&)GetView());
+    SwView &_rView = ((SwView&)GetView());
     if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
-		return nsSelectionType::SEL_POSTIT;
- 	int nCnt;
+        return nsSelectionType::SEL_POSTIT;
 
-	// Rahmen einfuegen ist kein DrawMode
+    int nCnt;
+    // Insertion of a text frame is not a DrawMode
     if ( !_rView.GetEditWin().IsFrmAction() &&
-            (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
-	{
-		if (GetDrawView()->IsTextEdit())
+        (IsObjSelected() || (_rView.IsDrawMode() && !IsFrmSelected()) ))
+    {
+        if (GetDrawView()->IsTextEdit())
             nCnt = nsSelectionType::SEL_DRW_TXT;
-		else
-		{
-			if (GetView().IsFormMode())	// Nur Forms selektiert
+        else
+        {
+            if (GetView().IsFormMode())	// Nur Forms selektiert
                 nCnt = nsSelectionType::SEL_DRW_FORM;
-			else
+            else
                 nCnt = nsSelectionType::SEL_DRW;            // Irgendein Draw-Objekt
 
             if (_rView.IsBezierEditMode())
                 nCnt |= nsSelectionType::SEL_BEZ;
-			else if( GetDrawView()->GetContext() == SDRCONTEXT_MEDIA )
+            else if( GetDrawView()->GetContext() == SDRCONTEXT_MEDIA )
                 nCnt |= nsSelectionType::SEL_MEDIA;
 
             if (svx::checkForSelectedCustomShapes(
-                    const_cast<SdrView *>(GetDrawView()),
-                    true /* bOnlyExtruded */ ))
+                const_cast<SdrView *>(GetDrawView()),
+                true /* bOnlyExtruded */ ))
             {
                 nCnt |= nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE;
             }
             sal_uInt32 nCheckStatus = 0;
             if (svx::checkForSelectedFontWork(
-                    const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
+                const_cast<SdrView *>(GetDrawView()), nCheckStatus ))
             {
                 nCnt |= nsSelectionType::SEL_FONTWORK;
             }
-		}
+        }
 
-		return nCnt;
-	}
+        return nCnt;
+    }
 
-	nCnt = GetCntType();
+    nCnt = GetCntType();
 
-	if ( IsFrmSelected() )
-	{
+    if ( IsFrmSelected() )
+    {
         if (_rView.IsDrawMode())
             _rView.LeaveDrawCreate();   // Aufraeumen (Bug #45639)
-		if ( !(nCnt & (CNT_GRF | CNT_OLE)) )
+        if ( !(nCnt & (CNT_GRF | CNT_OLE)) )
             return nsSelectionType::SEL_FRM;
-	}
+    }
 
-	if ( IsCrsrInTbl() )
+    if ( IsCrsrInTbl() )
         nCnt |= nsSelectionType::SEL_TBL;
 
-	if ( IsTableMode() )
+    if ( IsTableMode() )
         nCnt |= (nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS);
 
-    // --> FME 2005-01-12 #i39855#
-    // Do not pop up numbering toolbar, if the text node has a numbering
-    // of type SVX_NUM_NUMBER_NONE.
+    // Do not pop up numbering toolbar, if the text node has a numbering of type SVX_NUM_NUMBER_NONE.
     const SwNumRule* pNumRule = GetCurNumRule();
     if ( pNumRule )
     {
         const SwTxtNode* pTxtNd =
             GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
 
-        // --> OD 2008-03-19 #refactorlists#
         if ( pTxtNd && pTxtNd->IsInList() )
-        // <--
         {
             const SwNumFmt& rFmt = pNumRule->Get(sal::static_int_cast< sal_uInt8, sal_Int32>(pTxtNd->GetActualListLevel()));
             if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() )
                 nCnt |= nsSelectionType::SEL_NUM;
         }
     }
-    // <--
 
-	return nCnt;
+    return nCnt;
 }
 
 /*------------------------------------------------------------------------
@@ -1738,7 +1710,7 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmt
 	if(bReset)
 	{
 		ResetAttr();
-		SetAttr(aCoreSet);
+		SetAttrSet(aCoreSet);
 	}
 	pDoc->ChgFmt(*pColl, rStyleSet );
 	EndAction();
@@ -1853,11 +1825,6 @@ sal_Bool SwWrtShell::CanInsert()
     return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
 }
 
-// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
-void SwWrtShell::NewCoreSelection()
-{
-	SttSelect();
-}
 
 // --------------
 void SwWrtShell::ChgDBData(const SwDBData& aDBData)

Modified: openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh2.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh2.cxx (original)
+++ openoffice/branches/l10n40/main/sw/source/ui/wrtsh/wrtsh2.cxx Tue Nov 19 22:39:40 2013
@@ -103,40 +103,37 @@ void SwWrtShell::Insert(SwField &rFld)
 
 
 
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst )
 {
-	// ueber die Liste der Eingabefelder gehen und Updaten
-	SwInputFieldList* pTmp = pLst;
-	if( !pTmp )
-		pTmp = new SwInputFieldList( this );
+    // ueber die Liste der Eingabefelder gehen und Updaten
+    SwInputFieldList* pTmp = pLst;
+    if( !pTmp )
+        pTmp = new SwInputFieldList( this );
 
-	if (bOnlyInSel)
-		pTmp->RemoveUnselectedFlds();
-
-	const sal_uInt16 nCnt = pTmp->Count();
-	if(nCnt)
-	{
-		pTmp->PushCrsr();
+    const sal_uInt16 nCnt = pTmp->Count();
+    if(nCnt)
+    {
+        pTmp->PushCrsr();
 
-		sal_Bool bCancel = sal_False;
+        sal_Bool bCancel = sal_False;
         ByteString aDlgPos;
-		for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i )
-		{
-			pTmp->GotoFieldPos( i );
+        for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i )
+        {
+            pTmp->GotoFieldPos( i );
             SwField* pField = pTmp->GetField( i );
             if(pField->GetTyp()->Which() == RES_DROPDOWN)
                 bCancel = StartDropDownFldDlg( pField, sal_True, &aDlgPos );
             else
                 bCancel = StartInputFldDlg( pField, sal_True, 0, &aDlgPos);
 
-			// Sonst Updatefehler bei Multiselektion:
-			pTmp->GetField( i )->GetTyp()->UpdateFlds();
-		}
-		pTmp->PopCrsr();
-	}
+            // Sonst Updatefehler bei Multiselektion:
+            pTmp->GetField( i )->GetTyp()->UpdateFlds();
+        }
+        pTmp->PopCrsr();
+    }
 
-	if( !pLst )
-		delete pTmp;
+    if( !pLst )
+        delete pTmp;
 }
 
 
@@ -304,24 +301,29 @@ void SwWrtShell::ClickToField( const SwF
 		EndAllAction();
 		break;
 
-	case RES_INPUTFLD:
-		StartInputFldDlg( (SwField*)&rFld, sal_False );
-		break;
+    case RES_INPUTFLD:
+        {
+            const SwInputField* pInputField = dynamic_cast<const SwInputField*>(&rFld);
+            if ( pInputField == NULL )
+            {
+                StartInputFldDlg( (SwField*)&rFld, sal_False );
+            }
+        }
+        break;
 
-	case RES_SETEXPFLD:
-		if( ((SwSetExpField&)rFld).GetInputFlag() )
-			StartInputFldDlg( (SwField*)&rFld, sal_False );
-		break;
+    case RES_SETEXPFLD:
+        if( ((SwSetExpField&)rFld).GetInputFlag() )
+            StartInputFldDlg( (SwField*)&rFld, sal_False );
+        break;
     case RES_DROPDOWN :
         StartDropDownFldDlg( (SwField*)&rFld, sal_False );
     break;
-	}
+    }
 
 	bIsInClickToEdit = sal_False;
 }
 
 
-
 void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
 {
 	if( !rItem.GetValue().Len() )

Modified: openoffice/branches/l10n40/main/toolkit/inc/toolkit/awt/vclxwindows.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/toolkit/inc/toolkit/awt/vclxwindows.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/toolkit/inc/toolkit/awt/vclxwindows.hxx (original)
+++ openoffice/branches/l10n40/main/toolkit/inc/toolkit/awt/vclxwindows.hxx Tue Nov 19 22:39:40 2013
@@ -876,6 +876,10 @@ public:
 class TOOLKIT_DLLPUBLIC VCLXDateField :	public ::com::sun::star::awt::XDateField,
 						public VCLXFormattedSpinField
 {
+//IAccessibility2 Impplementaton 2009-----
+protected:
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
 public:
 					VCLXDateField();
 					~VCLXDateField();
@@ -922,6 +926,10 @@ public:
 class VCLXTimeField :	public ::com::sun::star::awt::XTimeField,
 						public VCLXFormattedSpinField
 {
+//IAccessibility2 Impplementaton 2009-----
+protected:
+	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
 public:
 					VCLXTimeField();
 					~VCLXTimeField();

Modified: openoffice/branches/l10n40/main/toolkit/source/awt/vclxaccessiblecomponent.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/toolkit/source/awt/vclxaccessiblecomponent.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/toolkit/source/awt/vclxaccessiblecomponent.cxx (original)
+++ openoffice/branches/l10n40/main/toolkit/source/awt/vclxaccessiblecomponent.cxx Tue Nov 19 22:39:40 2013
@@ -37,6 +37,10 @@
 #include <toolkit/awt/vclxfont.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/window.hxx>
+//IAccessibility2 Implementation 2009-----
+//Solution:Need methods in Edit.
+#include <vcl/edit.hxx>
+//-----IAccessibility2 Implementation 2009
 #include <tools/debug.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <unotools/accessiblerelationsethelper.hxx>
@@ -441,7 +445,9 @@ void VCLXAccessibleComponent::FillAccess
 	Window* pWindow = GetWindow();
 	if ( pWindow )
 	{
+//IAccessibility2 Implementation 2009-----
 		Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+//-----IAccessibility2 Implementation 2009
 		if ( pLabeledBy && pLabeledBy != pWindow )
 		{
 			uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -456,6 +462,20 @@ void VCLXAccessibleComponent::FillAccess
 			aSequence[0] = pLabelFor->GetAccessible();
 			rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
 		}
+//IAccessibility2 Implementation 2009-----
+		Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();	
+		if ( pMemberOf && pMemberOf != pWindow )
+		{
+			uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+			aSequence[0] = pMemberOf->GetAccessible();
+			rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+		}
+		uno::Sequence< uno::Reference< uno::XInterface > > aFlowToSequence = pWindow->GetAccFlowToSequence();
+		if( aFlowToSequence.getLength() > 0 )
+		{
+			rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aFlowToSequence ) );		
+		}
+//-----IAccessibility2 Implementation 2009
 	}
 }
 
@@ -504,13 +524,50 @@ void VCLXAccessibleComponent::FillAccess
 
 		if ( pWindow->GetStyle() & WB_SIZEABLE )
 			rStateSet.AddState( accessibility::AccessibleStateType::RESIZABLE );
-
+//IAccessibility2 Implementation 2009-----
+		// 6. frame doesn't have MOVABLE state
+		// 10. for password text, where is the sensitive state? 
+		if( ( getAccessibleRole() == accessibility::AccessibleRole::FRAME ||getAccessibleRole() == accessibility::AccessibleRole::DIALOG )&& pWindow->GetStyle() & WB_MOVEABLE )
+			rStateSet.AddState( accessibility::AccessibleStateType::MOVEABLE );
+//-----IAccessibility2 Implementation 2009
         if( pWindow->IsDialog() )
         {
             Dialog *pDlg = static_cast< Dialog* >( pWindow );
             if( pDlg->IsInExecute() )
 			    rStateSet.AddState( accessibility::AccessibleStateType::MODAL );
         }
+//IAccessibility2 Implementation 2009-----
+        //Solution:If a combobox or list's edit child isn't read-only,EDITABLE state
+        //         should be set.
+		if( pWindow && pWindow->GetType() == WINDOW_COMBOBOX )
+		{
+			if( !( pWindow->GetStyle() & WB_READONLY) ||  
+			    !((Edit*)pWindow)->IsReadOnly() )
+					rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );	
+		}
+		
+		Window* pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
+		
+		while( pWindow && pChild )
+		{
+			Window* pWinTemp = pChild->GetWindow( WINDOW_FIRSTCHILD );
+			if( pWinTemp && pWinTemp->GetType() == WINDOW_EDIT )
+			{
+				if( !( pWinTemp->GetStyle() & WB_READONLY) || 
+					!((Edit*)pWinTemp)->IsReadOnly() )
+					rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+				break;	
+			}
+			if( pChild->GetType() == WINDOW_EDIT )
+			{
+				if( !( pChild->GetStyle() & WB_READONLY) || 
+					!((Edit*)pChild)->IsReadOnly())
+					rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+				break;	
+			}
+			pChild = pChild->GetWindow( WINDOW_NEXT );
+		}
+//-----IAccessibility2 Implementation 2009
 	}
 	else
 	{
@@ -846,6 +903,11 @@ sal_Int32 SAL_CALL VCLXAccessibleCompone
 			else
 				aFont = pWindow->GetFont();
 			nColor = aFont.GetColor().GetColor();
+//IAccessibility2 Implementation 2009-----
+// COL_AUTO is not very meaningful for AT
+			if ( nColor == (sal_Int32)COL_AUTO)
+				nColor = pWindow->GetTextColor().GetColor();
+//-----IAccessibility2 Implementation 2009
 		}
 	}
 

Modified: openoffice/branches/l10n40/main/toolkit/source/awt/vclxtoolkit.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/toolkit/source/awt/vclxtoolkit.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/toolkit/source/awt/vclxtoolkit.cxx (original)
+++ openoffice/branches/l10n40/main/toolkit/source/awt/vclxtoolkit.cxx Tue Nov 19 22:39:40 2013
@@ -632,6 +632,11 @@ void SAL_CALL VCLXToolkit::disposing()
 
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > VCLXToolkit::createWindow( const ::com::sun::star::awt::WindowDescriptor& rDescriptor ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
 {
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+	CEnableAccessInterface e;
+#endif
+//-----IAccessibility2 Implementation 2009
     return ImplCreateWindow( rDescriptor, WinBits(0) );
 }
 

Modified: openoffice/branches/l10n40/main/toolkit/source/awt/vclxwindows.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/toolkit/source/awt/vclxwindows.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/toolkit/source/awt/vclxwindows.cxx (original)
+++ openoffice/branches/l10n40/main/toolkit/source/awt/vclxwindows.cxx Tue Nov 19 22:39:40 2013
@@ -4505,6 +4505,19 @@ VCLXDateField::~VCLXDateField()
 {
 }
 
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXDateField::CreateAccessibleContext()
+{
+	Window* pWindow = GetWindow();
+	if ( pWindow )
+	{
+		pWindow->SetType( WINDOW_DATEFIELD );
+	}
+	return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
+
 // ::com::sun::star::uno::XInterface
 ::com::sun::star::uno::Any VCLXDateField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
 {
@@ -4846,6 +4859,18 @@ VCLXTimeField::VCLXTimeField()
 VCLXTimeField::~VCLXTimeField()
 {
 }
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXTimeField::CreateAccessibleContext()
+{
+	Window* pWindow = GetWindow();
+	if ( pWindow )
+	{
+		pWindow->SetType( WINDOW_TIMEFIELD );
+	}
+	return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
 
 // ::com::sun::star::uno::XInterface
 ::com::sun::star::uno::Any VCLXTimeField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)

Modified: openoffice/branches/l10n40/main/tools/Executable_mkunroll.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/tools/Executable_mkunroll.mk?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/tools/Executable_mkunroll.mk (original)
+++ openoffice/branches/l10n40/main/tools/Executable_mkunroll.mk Tue Nov 19 22:39:40 2013
@@ -30,17 +30,9 @@ $(eval $(call gb_Executable_set_include,
 	-I$(SRCDIR)/tools/bootstrp/ \
 ))
 
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
 $(eval $(call gb_Executable_set_cxxflags,mkunroll,\
 	$$(CXXFLAGS) \
 	-D_TOOLS_STRINGLIST \
-	$(STLPORT_DEBUGFLAG) \
 ))
 
 $(eval $(call gb_Executable_add_linked_libs,mkunroll,\

Modified: openoffice/branches/l10n40/main/tools/Executable_rscdep.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/tools/Executable_rscdep.mk?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/tools/Executable_rscdep.mk (original)
+++ openoffice/branches/l10n40/main/tools/Executable_rscdep.mk Tue Nov 19 22:39:40 2013
@@ -30,17 +30,9 @@ $(eval $(call gb_Executable_set_include,
 	-I$(SRCDIR)/tools/bootstrp/ \
 ))
 
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
 $(eval $(call gb_Executable_set_cxxflags,rscdep,\
 	$$(CXXFLAGS) \
 	-D_TOOLS_STRINGLIST \
-	$(STLPORT_DEBUGFLAG) \
 ))
 
 $(eval $(call gb_Executable_add_linked_libs,rscdep,\

Modified: openoffice/branches/l10n40/main/tools/Executable_so_checksum.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/tools/Executable_so_checksum.mk?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/tools/Executable_so_checksum.mk (original)
+++ openoffice/branches/l10n40/main/tools/Executable_so_checksum.mk Tue Nov 19 22:39:40 2013
@@ -30,13 +30,6 @@ $(eval $(call gb_Executable_set_include,
 	-I$(SRCDIR)/tools/bootstrp/ \
 ))
 
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
 $(eval $(call gb_Executable_set_cxxflags,so_checksum,\
 	$$(CXXFLAGS) \
 	-D_TOOLS_STRINGLIST \

Modified: openoffice/branches/l10n40/main/tools/Executable_sspretty.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/tools/Executable_sspretty.mk?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/tools/Executable_sspretty.mk (original)
+++ openoffice/branches/l10n40/main/tools/Executable_sspretty.mk Tue Nov 19 22:39:40 2013
@@ -30,13 +30,6 @@ $(eval $(call gb_Executable_set_include,
 	-I$(SRCDIR)/tools/bootstrp/ \
 ))
 
-STLPORT_DEBUGFLAG =
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(PRODUCT),)
-STLPORT_DEBUGFLAG = -D_DEBUG
-endif
-endif
-
 $(eval $(call gb_Executable_set_cxxflags,sspretty,\
 	$$(CXXFLAGS) \
 	-D_TOOLS_STRINGLIST \

Modified: openoffice/branches/l10n40/main/ure/source/uretest/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/ure/source/uretest/Makefile?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/ure/source/uretest/Makefile (original)
+++ openoffice/branches/l10n40/main/ure/source/uretest/Makefile Tue Nov 19 22:39:40 2013
@@ -114,7 +114,7 @@ out.sdk/cppmain.uno.$(SHAREDLIB_EXT): ou
             out.sdk
 	$(LINK) $(COMP_LINK_FLAGS) $(link_output_switch)$@ $< $(LINK_LIBS) \
             $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) $(SALHELPERLIB) \
-            $(STLPORTLIB) $(link_std_libs)
+            $(link_std_libs)
 
 out.sdk/cppmain.$(OBJ_EXT): cppmain.cc out.sdk/cpputypes.cppumaker.flag \
             out.sdk/types.cppumaker.flag | out.sdk

Modified: openoffice/branches/l10n40/main/ure/source/uretest/Makefile.pln
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/ure/source/uretest/Makefile.pln?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/ure/source/uretest/Makefile.pln (original)
+++ openoffice/branches/l10n40/main/ure/source/uretest/Makefile.pln Tue Nov 19 22:39:40 2013
@@ -84,11 +84,10 @@ clean:
 
 out.pln/cppmain.uno.so: out.pln/cppmain.o version.map | out.pln \
             out.pln/lib/libuno_cppu.so out.pln/lib/libuno_cppuhelpergcc3.so \
-            out.pln/lib/libuno_sal.so out.pln/lib/libuno_salhelpergcc3.so \
-            out.pln/lib/libstlport_gcc.so
+            out.pln/lib/libuno_sal.so out.pln/lib/libuno_salhelpergcc3.so
 	g++ -shared -o $@ -Wl,-z,defs -Wl,--fatal-warnings \
             -Wl,--version-script=version.map $< -Lout.pln/lib -luno_cppu \
-            -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3 -lstlport_gcc
+            -luno_cppuhelpergcc3 -luno_sal -luno_salhelpergcc3
 
 out.pln/cppmain.o: cppmain.cc out.pln/cpputypes.cppumaker.flag \
             out.pln/types.cppumaker.flag | out.pln
@@ -295,9 +294,6 @@ out.pln/lib/libuno_sal.so: | out.pln/lib
 out.pln/lib/libuno_salhelpergcc3.so: | out.pln/lib
 	ln -fs $(URE_HOME)/lib/libuno_salhelpergcc3.so.3 $@
 
-out.pln/lib/libstlport_gcc.so: | out.pln/lib
-	ln -fs $(URE_HOME)/lib/libstlport_gcc.so $@
-
 
 out.pln:
 	mkdir $@

Modified: openoffice/branches/l10n40/main/vcl/Library_vcl.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/Library_vcl.mk?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/Library_vcl.mk (original)
+++ openoffice/branches/l10n40/main/vcl/Library_vcl.mk Tue Nov 19 22:39:40 2013
@@ -458,16 +458,6 @@ $(eval $(call gb_Library_add_exception_o
     vcl/source/glyphs/graphite_textsrc \
 ))
 
-#building with stlport, but graphite was not built with stlport
-ifneq ($(USE_SYSTEM_STL),YES)
-ifeq ($(SYSTEM_GRAPHITE),YES)
-$(eval $(call gb_Library_set_defs,vcl,\
-	$$(DEFS) \
-	-DADAPT_EXT_STL \
-))
-endif
-endif
-
 # handle X11 platforms, which have additional files and possibly system graphite
 ifeq ($(GUIBASE),unx)
 $(eval $(call gb_Library_add_exception_objects,vcl,\

Modified: openoffice/branches/l10n40/main/vcl/inc/ilstbox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/ilstbox.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/ilstbox.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/ilstbox.hxx Tue Nov 19 22:39:40 2013
@@ -250,6 +250,10 @@ private:
 	Link			maDoubleClickHdl;
 	Link			maUserDrawHdl;
 	Link			maMRUChangedHdl;
+//IAccessibility2 Implementation 2009-----
+	Link			maFocusHdl;
+	Link			maListItemSelectHdl;
+//-----IAccessibility2 Implementation 2009
 
     ::vcl::QuickSelectionEngine maQuickSelectionEngine;
 
@@ -263,7 +267,10 @@ protected:
 	virtual void	GetFocus();
 	virtual void	LoseFocus();
 
-	sal_Bool			SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+	//IAccessibility2 Implementation 2009-----
+	//sal_Bool			SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False );
+	sal_Bool			SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False, sal_Bool bSelectPosChange = sal_False );
+	//-----IAccessibility2 Implementation 2009
 	void			ImplPaint( sal_uInt16 nPos, sal_Bool bErase = sal_False, bool bLayout = false );
     void			ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
 	void			ImplCalcMetrics();
@@ -360,8 +367,14 @@ public:
 	const Link& 	GetUserDrawHdl() const				{ return maUserDrawHdl; }
 	void			SetMRUChangedHdl( const Link& rLink )	{ maMRUChangedHdl = rLink; }
 	const Link& 	GetMRUChangedHdl() const				{ return maMRUChangedHdl; }
-
-	bool            IsSelectionChanged() const { return mbSelectionChanged; }
+//IAccessibility2 Implementation 2009-----
+	void			SetFocusHdl( const Link& rLink )	{ maFocusHdl = rLink ; }
+	const Link& 	GetFocusHdl() const				{ return maFocusHdl; }
+
+	void			SetListItemSelectHdl( const Link& rLink )	{ maListItemSelectHdl = rLink ; }
+	const Link& 	GetListItemSelectHdl() const				{ return maListItemSelectHdl; }
+//-----IAccessibility2 Implementation 2009
+	bool			IsSelectionChanged() const { return mbSelectionChanged; }
 	sal_uInt16			GetSelectModifier() const { return mnSelectModifier; }
 
 	void			EnableSort( bool b ) { mbSort = b; }
@@ -497,6 +510,12 @@ public:
 	void			SetUserDrawHdl( const Link& rLink )	{ maLBWindow.SetUserDrawHdl( rLink ); }
 	const Link& 	GetUserDrawHdl() const				{ return maLBWindow.GetUserDrawHdl(); }
 
+//IAccessibility2 Implementation 2009-----
+	void			SetFocusHdl( const Link& rLink )	{ maLBWindow.SetFocusHdl( rLink ); }
+	const Link& 	GetFocusHdl() const				{ return maLBWindow.GetFocusHdl(); }
+	void			SetListItemSelectHdl( const Link& rLink )	{ maLBWindow.SetListItemSelectHdl( rLink ); }
+	const Link& 	GetListItemSelectHdl() const	{ return maLBWindow.GetListItemSelectHdl(); }
+//-----IAccessibility2 Implementation 2009
 	void			SetSelectionChangedHdl( const Link& rLnk )	{ maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
 	void			SetCallSelectionChangedHdl( sal_Bool bCall )	{ maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
 	sal_Bool			IsSelectionChanged() const 					{ return maLBWindow.IsSelectionChanged(); }

Modified: openoffice/branches/l10n40/main/vcl/inc/svdata.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/svdata.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/svdata.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/svdata.hxx Tue Nov 19 22:39:40 2013
@@ -182,6 +182,9 @@ struct ImplSVAppData
      */
     ImeStatusWindowMode meShowImeStatusWindow;
 
+//IAccessibility2 Implementation 2009-----
+	long m_bEnableAccessInterface;
+//-----IAccessibility2 Implementation 2009
                             DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* );
                            
 };

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/combobox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/combobox.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/combobox.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/combobox.hxx Tue Nov 19 22:39:40 2013
@@ -67,6 +67,9 @@ private:
     DECL_DLLPRIVATE_LINK(   ImplSelectionChangedHdl, void* );
     DECL_DLLPRIVATE_LINK(   ImplUserDrawHdl, UserDrawEvent* );
     DECL_DLLPRIVATE_LINK(   ImplAutocompleteHdl, Edit* );
+    //IAccessibility2 Implementation 2009-----
+    DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* );
+    //-----IAccessibility2 Implementation 2009
 
 protected:
     using Window::ImplInit;
@@ -182,7 +185,9 @@ public:
     XubString       GetMRUEntries( xub_Unicode cSep = ';' ) const;
     void            SetMaxMRUCount( sal_uInt16 n );
     sal_uInt16          GetMaxMRUCount() const;
-
+//IAccessibility2 Implementation 2009-----
+    sal_uInt16 	GetMRUCount() const;
+//-----IAccessibility2 Implementation 2009
     void            SetEntryData( sal_uInt16 nPos, void* pNewData );
     void*           GetEntryData( sal_uInt16 nPos ) const;
 
@@ -222,6 +227,9 @@ public:
      */
     using Control::GetIndexForPoint;
     long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+//IAccessibility2 Implementation 2009-----
+  	void  SetMpSubEditAccessibleName(String &aName);
+//-----IAccessibility2 Implementation 2009
 };
 
 #endif  // _COMBOBOX_HXX

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/lstbox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/lstbox.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/lstbox.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/lstbox.hxx Tue Nov 19 22:39:40 2013
@@ -67,7 +67,10 @@ private:
 	DECL_DLLPRIVATE_LINK(  ImplPopupModeEndHdl, void* );
 	DECL_DLLPRIVATE_LINK(  ImplSelectionChangedHdl, void* );
 	DECL_DLLPRIVATE_LINK(  ImplUserDrawHdl, UserDrawEvent* );
-
+//IAccessibility2 Implementation 2009-----
+					DECL_DLLPRIVATE_LINK( ImplFocusHdl, void* );					
+					DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* );
+//-----IAccessibility2 Implementation 2009
 protected:
     using Window::ImplInit;
 	SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
@@ -217,7 +220,9 @@ public:
 	XubString		GetMRUEntries( xub_Unicode cSep = ';' ) const;
 	void			SetMaxMRUCount( sal_uInt16 n );
 	sal_uInt16			GetMaxMRUCount() const;
-
+//IAccessibility2 Implementation 2009-----
+	sal_uInt16 			GetMRUCount() const;
+//-----IAccessibility2 Implementation 2009
     sal_uInt16			GetDisplayLineCount() const;
 
 	void			EnableMirroring();

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/menu.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/menu.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/menu.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/menu.hxx Tue Nov 19 22:39:40 2013
@@ -151,7 +151,9 @@ private:
 	sal_uInt16				nMenuFlags;
 	sal_uInt16				nDefaultItem;		// Id vom Default-Item
 	sal_uInt16				nSelectedId;
-
+//IAccessibility2 Implementation 2009-----
+	sal_uInt16				nHighlightedItem;
+//-----IAccessibility2 Implementation 2009
 	// Fuer Ausgabe:
 	sal_uInt16				nCheckPos;
 	sal_uInt16				nImagePos;
@@ -242,7 +244,14 @@ public:
 	sal_uInt16				GetItemPos( sal_uInt16 nItemId ) const;
 	MenuItemType		GetItemType( sal_uInt16 nPos ) const;
 	sal_uInt16				GetCurItemId() const;
+//IAccessibility2 Implementation 2009-----
+	void 					SetHightlightItem( sal_uInt16 nHighlightedItem );
+	sal_uInt16 				GetHighlightItem() const;
+
+	XubString			GetItemAccKeyStrFromPos(sal_uInt16 nPos ) const ;
 
+	sal_Bool				IsTemporaryItemFromPos(sal_uInt16 nPos ) const;
+//-----IAccessibility2 Implementation 2009
 	void				SetDefaultItem( sal_uInt16 nItemId )	{ nDefaultItem = nItemId; }
 	sal_uInt16				GetDefaultItem() const				{ return nDefaultItem; }
 
@@ -371,6 +380,9 @@ public:
 
 	void				SetAccessibleDescription( sal_uInt16 nItemId, const XubString& rStr );
 	XubString			GetAccessibleDescription( sal_uInt16 nItemId ) const;
+//IAccessibility2 Implementation 2009
+	Menu* GetStartedFromMenu(){ return pStartedFrom ;}
+//-----IAccessibility2 Implementation 2009
     
     // returns whether the item a position nItemPos is highlighted or not.
     bool  IsHighlighted( sal_uInt16 nItemPos ) const;

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/svapp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/svapp.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/svapp.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/svapp.hxx Tue Nov 19 22:39:40 2013
@@ -448,6 +448,10 @@ public:
     
     static void                 ShowNativeErrorBox(const String& sTitle  ,
                                                    const String& sMessage);
+//IAccessibility2 Implementation 2009-----
+	static bool					EnableAccessInterface(bool bEnable);
+	static bool					IsEnableAccessInterface();
+//-----IAccessibility2 Implementation 2009
 
     // IME Status Window Control:
 
@@ -514,4 +518,27 @@ inline void Application::EndYield()
     PostUserEvent( Link() );
 }
 
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+VCL_DLLPUBLIC sal_Bool HasAtHook();
+VCL_DLLPUBLIC bool IsWNTInitAccessBridge();
+bool WNTEnableAccessInterface(bool bEnable);
+
+class VCL_DLLPUBLIC CEnableAccessInterface
+{
+public:
+	CEnableAccessInterface(bool bEnable = false)
+	{
+		m_bIsEnableAccessInterface = Application::IsEnableAccessInterface();
+		Application::EnableAccessInterface(bEnable);
+	}
+	~CEnableAccessInterface()
+	{
+		Application::EnableAccessInterface(m_bIsEnableAccessInterface);
+	}
+private:
+	bool m_bIsEnableAccessInterface;
+};
+#endif
+//-----IAccessibility2 Implementation 2009
 #endif // _APP_HXX

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/vclevent.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/vclevent.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/vclevent.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/vclevent.hxx Tue Nov 19 22:39:40 2013
@@ -154,6 +154,10 @@ namespace com { namespace sun { namespac
 #define VCLEVENT_ITEM_COLLAPSED             1175
 // <--
 #define VCLEVENT_DROPDOWN_PRE_OPEN          1176
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_LISTBOX_FOCUSITEMCHANGED	1180
+// #define VCLEVENT_EDIT_CARETCHANGED  		xxxx	// IA2 CWS. MT: VCL only has selection API - difference for selection_changed vs. caret_changed is handled in accessibility wrapper since OOo 3.2
+//-----IAccessibility2 Implementation 2009
 
 // VclMenuEvent
 #define VCLEVENT_MENU_ACTIVATE              1200
@@ -172,24 +176,39 @@ namespace com { namespace sun { namespac
 #define VCLEVENT_MENU_ITEMCHECKED			1213
 #define VCLEVENT_MENU_ITEMUNCHECKED			1214
 #define VCLEVENT_MENU_ACCESSIBLENAMECHANGED	1215
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED  1216
+#define VCLEVENT_TOOLBOX_ITEMUPDATED  1217
+//-----IAccessibility2 Implementation 2009
 
 #define VCLEVENT_MENU_SHOW                  1250
 #define VCLEVENT_MENU_HIDE                  1251
 
 #define VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED  1216
-
+//IAccessibility2 Implementation 2009-----
+#define VCLEVENT_LISTBOX_TREEEXPAND             1218
+#define VCLEVENT_LISTBOX_TREECOLLAPSE           1219
+#define VCLEVENT_LISTBOX_TREEFOCUS	            1220
+#define VCLEVENT_LISTBOX_TREESELECT	            1221
+#define VCLEVENT_EDIT_CARETCHANGED  1222
+#define VCLEVENT_COMBOBOX_UPDATEVALUE  1223
+
+#define VCLEVENT_LISTBOX_FOCUS             1224
+#define VCLEVENT_LISTBOX_CLEAR             1225
+//-----IAccessibility2 Implementation 2009
 // DockingWindow
-#define VCLEVENT_WINDOW_STARTDOCKING            1217    // pData = DockingData
-#define VCLEVENT_WINDOW_DOCKING                 1218
-#define VCLEVENT_WINDOW_ENDDOCKING              1219    // pData = EndDockingData
-#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING   1220    // pData = sal_Bool
-#define VCLEVENT_WINDOW_TOGGLEFLOATING          1221
-#define VCLEVENT_WINDOW_ENDPOPUPMODE            1222    // pData = EndPopupModeData
-
-#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED     1223    // pData = itempos
-#define VCLEVENT_TABLECELL_NAMECHANGED          1224    // pData = struct(Entry, Column, oldText)
-#define VCLEVENT_TABLEROW_SELECT				1225
-
+#define VCLEVENT_WINDOW_STARTDOCKING            1227    // pData = DockingData
+#define VCLEVENT_WINDOW_DOCKING                 1228
+#define VCLEVENT_WINDOW_ENDDOCKING              1229    // pData = EndDockingData
+#define VCLEVENT_WINDOW_PREPARETOGGLEFLOATING   1230    // pData = sal_Bool
+#define VCLEVENT_WINDOW_TOGGLEFLOATING          1231
+#define VCLEVENT_WINDOW_ENDPOPUPMODE            1232    // pData = EndPopupModeData
+
+#define VCLEVENT_TOOLBOX_BUTTONSTATECHANGED     1233    // pData = itempos
+#define VCLEVENT_TABLECELL_NAMECHANGED          1234    // pData = struct(Entry, Column, oldText)
+#define VCLEVENT_TABLEROW_SELECT				1235
+// IAccessible2 implementation 2009
+#define VCLEVENT_LISTBOX_STATEUPDATE			1236
 class VCL_DLLPUBLIC VclSimpleEvent
 {
 private:

Modified: openoffice/branches/l10n40/main/vcl/inc/vcl/window.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/inc/vcl/window.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/inc/vcl/window.hxx (original)
+++ openoffice/branches/l10n40/main/vcl/inc/vcl/window.hxx Tue Nov 19 22:39:40 2013
@@ -629,6 +629,11 @@ public:
     virtual void        DataChanged( const DataChangedEvent& rDCEvt );
     virtual long        PreNotify( NotifyEvent& rNEvt );
     virtual long        Notify( NotifyEvent& rNEvt );
+//IAccessibility2 Implementation 2009-----
+    virtual void        NotifyVCLEvent( sal_uLong nEvent ,void* pData = NULL);
+    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > GetAccFlowToSequence();
+	virtual void SwitchView() {}
+//-----IAccessibility2 Implementation 2009
     virtual Window*     GetPreferredKeyInputWindow();
 
     /*virtual*/ void    AddEventListener( const Link& rEventListener );

Modified: openoffice/branches/l10n40/main/vcl/source/app/svapp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/app/svapp.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/app/svapp.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/app/svapp.cxx Tue Nov 19 22:39:40 2013
@@ -24,7 +24,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_vcl.hxx"
 
-//#include "svsys.h"
+#include "svsys.h"
 
 #include "comphelper/processfactory.hxx"
 
@@ -77,6 +77,10 @@
 
 #include <utility>
 
+#ifdef WNT
+#include <tchar.h>
+#endif
+
 using namespace ::com::sun::star::uno;
 
 // keycodes handled internally by VCL
@@ -2045,7 +2049,13 @@ void Application::AddToRecentDocumentLis
 
 sal_Bool Application::IsAccessibilityEnabled()
 {
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+	return IsWNTInitAccessBridge();
+#else 
     return sal_False;
+#endif 
+//-----IAccessible2 Implementation 2009
 }
 
 sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool &rCancelled )
@@ -2057,22 +2067,52 @@ sal_Bool InitAccessBridge( sal_Bool bSho
     (void) bShowCancel; // unsued
     (void) rCancelled; // unused
 #else
-    bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
-    
-    if( !bRet && bShowCancel && !rCancelled )
-    {
-        // disable accessibility if the user chooses to continue
-        AllSettings aSettings = Application::GetSettings();
-        MiscSettings aMisc = aSettings.GetMiscSettings();
-        aMisc.SetEnableATToolSupport( sal_False );
-        aSettings.SetMiscSettings( aMisc );
-        Application::SetSettings( aSettings );
-    }
+	// Checking HasAtHook() was introduced with IBM's IA2 CWS.
+	if( HasAtHook() )
+	{
+	    bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
+	    
+	    if( !bRet && bShowCancel && !rCancelled )
+	    {
+	        // disable accessibility if the user chooses to continue
+	        AllSettings aSettings = Application::GetSettings();
+	        MiscSettings aMisc = aSettings.GetMiscSettings();
+	        aMisc.SetEnableATToolSupport( sal_False );
+	        aSettings.SetMiscSettings( aMisc );
+	        Application::SetSettings( aSettings );
+	    }
+	}
+	else
+	{
+		bRet = false;
+	}
 #endif // !UNX
 
     return bRet;
 }
 
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+sal_Bool HasAtHook()
+{
+	sal_Int32 bIsRuning=0;
+	// BOOL WINAPI SystemParametersInfo(
+	//	  __in     UINT uiAction,
+	//	  __in     UINT uiParam,
+	//	  __inout  PVOID pvParam,
+	//	  __in     UINT fWinIni
+	//	);
+	// pvParam must be BOOL (defined in MFC as int)
+	// End
+	if(SystemParametersInfo(SPI_GETSCREENREADER,0,&bIsRuning,0))
+	{
+		if( bIsRuning )
+			return sal_True;
+	}
+	return sal_False;
+}
+#endif
+//-----IAccessible2 Implementation 2009
 // MT: AppProperty, AppEvent was in oldsv.cxx, but is still needed...
 // ------------------------------------------------------------------------
 
@@ -2094,6 +2134,21 @@ void Application::SetPropertyHandler( Pr
         delete pHandler;
     pHandler = p;
 }
+//IAccessible2 Implementation 2009-----
+bool Application::EnableAccessInterface(bool bEnable)
+{
+#ifdef WNT
+	return WNTEnableAccessInterface(bEnable);
+#else 
+    bEnable = true; // avoid compiler warning
+    return true;
+#endif 
+}
+bool Application::IsEnableAccessInterface()
+{
+	return ImplGetSVData()->maAppData.m_bEnableAccessInterface;
+}
+//-----IAccessibility2 Implementation 2009
 
 
 

Modified: openoffice/branches/l10n40/main/vcl/source/app/svdata.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/app/svdata.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/app/svdata.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/app/svdata.cxx Tue Nov 19 22:39:40 2013
@@ -36,6 +36,16 @@
 
 #include "unotools/fontcfg.hxx"
 
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+#endif
+//-----IAccessible2 Implementation 2009
 #include "vos/mutex.hxx"
 
 #include "cppuhelper/implbase1.hxx"
@@ -67,6 +77,13 @@
 #include "com/sun/star/java/JavaDisabledException.hpp"
 
 #include <stdio.h>
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+#include <unotools/processfactory.hxx>
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#include <win/g_msaasvc.h>
+#endif
+//-----IAccessible2 Implementation 2009
 
 namespace {
 
@@ -132,6 +149,12 @@ void ImplInitSVData()
             break;
         }
     }
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+	//Default enable the acc bridge interface
+	pImplSVData->maAppData.m_bEnableAccessInterface =true;
+#endif
+//-----IAccessible2 Implementation 2009
     
     // mark default layout border as unitialized
     pImplSVData->maAppData.mnDefaultLayoutBorder = -1;
@@ -339,7 +362,89 @@ com::sun::star::uno::Any AccessBridgeCur
     }
     return ret;
 }
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+void AccessBridgehandleExistingWindow(Window * pWindow, bool bShow)
+{
+    if ( pWindow )
+    {
+        css::uno::Reference< css::accessibility::XAccessible > xAccessible;
+    
+        // Test for combo box - drop down floating windows first
+        Window * pParentWindow = pWindow->GetParent();
+
+        if ( pParentWindow )
+        {
+            try 
+            {
+                // The parent window of a combo box floating window should have the role COMBO_BOX
+                css::uno::Reference< css::accessibility::XAccessible > xParentAccessible(pParentWindow->GetAccessible());
+                if ( xParentAccessible.is() )
+                {
+                    css::uno::Reference< css::accessibility::XAccessibleContext > xParentAC( xParentAccessible->getAccessibleContext() );
+                    if ( xParentAC.is() && (css::accessibility::AccessibleRole::COMBO_BOX == xParentAC->getAccessibleRole()) )
+                    {
+                        // O.k. - this is a combo box floating window corresponding to the child of role LIST of the parent.
+                        // Let's not rely on a specific child order, just search for the child with the role LIST
+                        sal_Int32 nCount = xParentAC->getAccessibleChildCount();
+                        for ( sal_Int32 n = 0; (n < nCount) && !xAccessible.is(); n++)
+                        {
+                            css::uno::Reference< css::accessibility::XAccessible > xChild = xParentAC->getAccessibleChild(n);
+                            if ( xChild.is() )
+                            {
+                                css::uno::Reference< css::accessibility::XAccessibleContext > xChildAC = xChild->getAccessibleContext();
+                                if ( xChildAC.is() && (css::accessibility::AccessibleRole::LIST == xChildAC->getAccessibleRole()) )
+                                {
+                                    xAccessible = xChild;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            catch (::com::sun::star::uno::RuntimeException e)
+            {
+                // Ignore show events that throw DisposedExceptions in getAccessibleContext(),
+                // but keep revoking these windows in hide(s).
+                if (bShow)
+                    return;
+            }
+        }
 
+        // We have to rely on the fact that Window::GetAccessible()->getAccessibleContext() returns a valid XAccessibleContext
+        // also for other menus than menubar or toplevel popup window. Otherwise we had to traverse the hierarchy to find the 
+        // context object to this menu floater. This makes the call to Window->IsMenuFloatingWindow() obsolete.
+        if ( ! xAccessible.is() )
+            xAccessible = pWindow->GetAccessible();
+
+		if ( xAccessible.is() && g_acc_manager1 )
+        {
+			g_acc_manager1->handleWindowOpened( (long)(xAccessible.get()));
+        }
+    }
+}
+
+void AccessBridgeupdateOldTopWindows()
+{
+	sal_uInt16 nTopWindowCount = (sal_uInt16)Application::GetTopWindowCount();
+	for (sal_uInt16 i = 0; i < nTopWindowCount; i++)
+	{
+		Window* pTopWindow = Application::GetTopWindow( i );
+        css::uno::Reference< css::accessibility::XAccessible > xAccessible = pTopWindow->GetAccessible();
+        if ( xAccessible.is() )
+        {
+			css::uno::Reference< css::accessibility::XAccessibleContext > xAC(xAccessible->getAccessibleContext());
+            if ( xAC.is())
+            {
+            	short role = xAC->getAccessibleRole();
+            	if(xAC->getAccessibleName().getLength() > 0)
+					AccessBridgehandleExistingWindow(pTopWindow, true);
+            }
+        }
+	}
+}
+#endif
+//-----IAccessible2 Implementation 2009
 
 bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool &rCancelled)
 {
@@ -371,6 +476,22 @@ bool ImplInitAccessBridge(sal_Bool bAllo
 
             if( xFactory.is() )
             {
+//IAccessible2 Implementation 2009-----
+#ifdef WNT
+				pSVData->mxAccessBridge = xFactory->createInstance(
+			               OUString::createFromAscii( "com.sun.star.accessibility.MSAAService" ) ); 
+			    if( pSVData->mxAccessBridge.is() )
+			    {
+			    	css::uno::Reference< css::uno::XInterface > pRManager= pSVData->mxAccessBridge;
+			    	g_acc_manager1 = (css::accessibility::XMSAAService*)(pRManager.get());
+					AccessBridgeupdateOldTopWindows();
+			    }
+			    
+			    if( !pSVData->mxAccessBridge.is() )
+                    bSuccess = false;
+                return bSuccess;
+#endif
+//-----IAccessible2 Implementation 2009
                 css::uno::Reference< XExtendedToolkit > xToolkit = 
                     css::uno::Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
 

Modified: openoffice/branches/l10n40/main/vcl/source/app/svmain.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/app/svmain.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/app/svmain.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/app/svmain.cxx Tue Nov 19 22:39:40 2013
@@ -55,6 +55,11 @@
 #include <process.h>    // for _beginthreadex
 #include <ole2.h>   // for _beginthreadex
 #include <tools/postwin.h>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/XMSAAService.hpp>
+#include <win/g_msaasvc.h>
+using namespace com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
 #endif
 
 // [ed 5/14/02 Add in explicit check for quartz graphics.  OS X will define
@@ -215,6 +220,12 @@ sal_Bool ImplSVMain()
 	}
 
     DeInitVCL();
+//IAccessibility2 Implementation 2009-----
+	#ifdef WNT
+		if( g_acc_manager1 )
+			g_acc_manager1->release();
+	#endif 
+//-----IAccessibility2 Implementation 2009
     return bInit;
 }
 

Modified: openoffice/branches/l10n40/main/vcl/source/control/combobox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/control/combobox.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/control/combobox.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/control/combobox.cxx Tue Nov 19 22:39:40 2013
@@ -215,6 +215,9 @@ void ComboBox::ImplInit( Window* pParent
 	mpImplLB->SetDoubleClickHdl( LINK( this, ComboBox, ImplDoubleClickHdl ) );
 	mpImplLB->SetUserDrawHdl( LINK( this, ComboBox, ImplUserDrawHdl ) );
 	mpImplLB->SetSelectionChangedHdl( LINK( this, ComboBox, ImplSelectionChangedHdl ) );
+//IAccessibility2 Implementation 2009-----
+	mpImplLB->SetListItemSelectHdl( LINK( this, ComboBox, ImplListItemSelectHdl ) );
+//-----IAccessibility2 Implementation 2009
 	mpImplLB->Show();
 
 	if ( mpFloatWin )
@@ -273,7 +276,13 @@ sal_Bool ComboBox::IsAutocompleteEnabled
 {
 	return mpSubEdit->GetAutocompleteHdl().IsSet();
 }
-
+//IAccessibility2 Implementation 2009-----
+void  ComboBox::SetMpSubEditAccessibleName(String &aName)
+{
+	if(mpSubEdit!=NULL)
+        mpSubEdit->SetAccessibleName(aName);
+}              
+//-----IAccessibility2 Implementation 2009
 // -----------------------------------------------------------------------
 
 IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
@@ -468,7 +477,13 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void
 
 	return 0;
 }
-
+//IAccessibility2 Implementation 2009-----
+IMPL_LINK( ComboBox, ImplListItemSelectHdl,  void*, EMPTYARG )
+{
+    ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT );
+	return 1;
+}
+//-----IAccessibility2 Implementation 2009
 // -----------------------------------------------------------------------
 
 IMPL_LINK( ComboBox, ImplCancelHdl, void*, EMPTYARG )
@@ -1420,6 +1435,12 @@ sal_uInt16 ComboBox::GetMaxMRUCount() co
 	return mpImplLB->GetMaxMRUCount();
 }
 
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 ComboBox::GetMRUCount() const
+{
+	return mpImplLB->GetEntryList()->GetMRUCount();
+}
+//-----IAccessibility2 Implementation 2009
 // -----------------------------------------------------------------------
 
 sal_uInt16 ComboBox::GetDisplayLineCount() const

Modified: openoffice/branches/l10n40/main/vcl/source/control/edit.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/control/edit.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/control/edit.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/control/edit.cxx Tue Nov 19 22:39:40 2013
@@ -2498,8 +2498,10 @@ void Edit::Modify()
             return;
 
         // #i13677# notify edit listeners about caret position change
-        ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
-
+//IAccessibility2 Implementation 2009-----
+        //ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+        ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+//-----IAccessibility2 Implementation 2009
         // FIXME: this is currently only on aqua
         // check for other platforms that need similar handling
         if( ImplGetSVData()->maNWFData.mbNoFocusRects &&
@@ -2654,15 +2656,37 @@ void Edit::ImplSetSelection( const Selec
 			if ( aNew != maSelection )
 			{
                 ImplClearLayoutData();
+//IAccessibility2 Implementation 2009-----
+				Selection aTemp = maSelection;
+//-----IAccessibility2 Implementation 2009
 				maSelection = aNew;
 
 				if ( bPaint && ( aOld.Len() || aNew.Len() || IsPaintTransparent() ) )
                     ImplInvalidateOrRepaint( 0, maText.Len() );
 				ImplShowCursor();
-				if ( mbIsSubEdit )
-					((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
-				else
-					ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+//IAccessibility2 Implementation 2009-----
+				sal_Bool bCaret = sal_False, bSelection = sal_False;
+				long nB=aNew.Max(), nA=aNew.Min(),oB=aTemp.Max(), oA=aTemp.Min();
+				long nGap = nB-nA, oGap = oB-oA;
+				if (nB != oB)
+					bCaret = sal_True;
+				if (nGap != 0 || oGap != 0)
+					bSelection = sal_True;
+				if (bCaret)
+				{
+					if ( mbIsSubEdit )
+						((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+					else
+						ImplCallEventListeners( VCLEVENT_EDIT_CARETCHANGED );
+				}
+				if (bSelection)
+				{
+					if ( mbIsSubEdit )
+						((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+					else
+						ImplCallEventListeners( VCLEVENT_EDIT_SELECTIONCHANGED );
+				}
+//-----IAccessibility2 Implementation 2009
                 // #103511# notify combobox listeners of deselection
                 if( !maSelection && GetParent() && GetParent()->GetType() == WINDOW_COMBOBOX )
                     ((Edit*)GetParent())->ImplCallEventListeners( VCLEVENT_COMBOBOX_DESELECT );

Modified: openoffice/branches/l10n40/main/vcl/source/control/ilstbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/control/ilstbox.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/control/ilstbox.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/control/ilstbox.cxx Tue Nov 19 22:39:40 2013
@@ -917,7 +917,11 @@ void ImplListBoxWindow::MouseButtonDown(
 
 				mnCurrentPos = nSelect;
 				mbTrackingSelect = true;
-				SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
+				//IAccessibility2 Impplementaton 2009-----
+				sal_Bool bCurPosChange = (mnCurrentPos != nSelect);
+				//SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() );
+				SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ,bCurPosChange);
+				//-----IAccessibility2 Impplementaton 2009
 				mbTrackingSelect = false;
 				if ( mbGrabFocus )
 					GrabFocus();
@@ -988,6 +992,14 @@ void ImplListBoxWindow::MouseMove( const
 			                ImplCallSelect();
 			                mbTravelSelect = false;
                         }
+//IAccessibility2 Implementation 2009----
+						// When list box selection change by mouse move, notity  
+						// VCLEVENT_LISTBOX_SELECT vcl event.
+						else
+						{
+							maListItemSelectHdl.Call(NULL);
+						}
+//----IAccessibility2 Implementation 2009
 		            }
 					mbTrackingSelect = false;
 				}
@@ -1075,7 +1087,7 @@ void ImplListBoxWindow::SelectEntry( sal
 
 // -----------------------------------------------------------------------
 
-sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl )
+sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl, sal_Bool bSelectPosChange /*=FALSE*/ )
 {
 	sal_Bool bFocusChanged = sal_False;
 	sal_Bool bSelectionChanged = sal_False;
@@ -1220,6 +1232,12 @@ sal_Bool ImplListBoxWindow::SelectEntrie
             maFocusRect.SetSize( aSz );
 			if( HasFocus() )
 				ImplShowFocusRect();
+//IAccessibility2 Implementation 2009----
+			if (bSelectPosChange)
+			{
+				maFocusHdl.Call(reinterpret_cast<void*>(nSelect));
+			}
+//----IAccessibility2 Implementation 2009
 		}
         ImplClearLayoutData();
 	}
@@ -1682,8 +1700,12 @@ sal_Bool ImplListBoxWindow::ProcessKeyIn
 		DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" );
 	    if( nSelect >= mpEntryList->GetEntryCount() )
             nSelect = mpEntryList->GetEntryCount()-1;
+//IAccessibility2 Implementation 2009-----
+		sal_Bool bCurPosChange = (mnCurrentPos != nSelect);
 		mnCurrentPos = nSelect;
-		if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
+		//if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
+		if(SelectEntries( nSelect, eLET, bShift, bCtrl ,bCurPosChange))
+//-----IAccessibility2 Implementation 2009
 		{
 			mbTravelSelect = true;
 			mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
@@ -2158,7 +2180,10 @@ Rectangle ImplListBoxWindow::GetBounding
 {
     const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nItem );
     Size aSz( GetSizePixel().Width(), pEntry ? pEntry->mnHeight : GetEntryHeight() );
-    long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() );
+    //long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) - mpEntryList->GetAddedHeight( GetTopEntry() );
+	//IAccessibility2 Impplementaton 2009-----
+    long nY = mpEntryList->GetAddedHeight( nItem, GetTopEntry() ) + GetEntryList()->GetMRUCount()*GetEntryHeight();
+	//-----IAccessibility2 Impplementaton 2009
     Rectangle aRect( Point( 0, nY ), aSz );
     return aRect;
 }

Modified: openoffice/branches/l10n40/main/vcl/source/control/lstbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/vcl/source/control/lstbox.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/vcl/source/control/lstbox.cxx (original)
+++ openoffice/branches/l10n40/main/vcl/source/control/lstbox.cxx Tue Nov 19 22:39:40 2013
@@ -170,6 +170,10 @@ void ListBox::ImplInit( Window* pParent,
 	mpImplLB->SetCancelHdl( LINK( this, ListBox, ImplCancelHdl ) );
 	mpImplLB->SetDoubleClickHdl( LINK( this, ListBox, ImplDoubleClickHdl ) );
 	mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
+//IAccessibility2 Implementation 2009-----
+	mpImplLB->SetFocusHdl( LINK( this, ListBox, ImplFocusHdl ) );
+	mpImplLB->SetListItemSelectHdl( LINK( this, ListBox, ImplListItemSelectHdl ) );
+//-----IAccessibility2 Implementation 2009
 	mpImplLB->SetPosPixel( Point() );
     mpImplLB->SetEdgeBlending(GetEdgeBlending());
 	mpImplLB->Show();
@@ -249,6 +253,18 @@ IMPL_LINK( ListBox, ImplSelectHdl, void*
 
 	return 1;
 }
+//IAccessibility2 Implementation 2009-----
+IMPL_LINK( ListBox, ImplFocusHdl, void *, nPos )
+{
+    ImplCallEventListeners( VCLEVENT_LISTBOX_FOCUS , nPos);
+	return 1;
+}
+IMPL_LINK( ListBox, ImplListItemSelectHdl, void*, EMPTYARG )
+{
+    ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT );
+	return 1;
+}
+//-----IAccessibility2 Implementation 2009
 
 // -----------------------------------------------------------------------
 
@@ -1060,6 +1076,8 @@ void ListBox::SetNoSelection()
 		mpImplWin->SetImage( aImage );
 		mpImplWin->Invalidate();
 	}
+	// IAccessible2 implementation 2009
+	NotifyVCLEvent( VCLEVENT_LISTBOX_STATEUPDATE);
 }
 
 // -----------------------------------------------------------------------
@@ -1204,7 +1222,21 @@ void ListBox::SelectEntry( const XubStri
 void ListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
 {
 	if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
+	{
+		// IAccessible2 implementation 2009
+		sal_uInt16 oldSelectCount = GetSelectEntryCount(), newSelectCount = 0, nCurrentPos = mpImplLB->GetCurrentPos();
 		mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
+		newSelectCount = GetSelectEntryCount();
+		if (oldSelectCount == 0 && newSelectCount > 0)
+			NotifyVCLEvent( VCLEVENT_LISTBOX_STATEUPDATE);
+		//Only when bSelect == true, send both Selection & Focus events
+		if (nCurrentPos != nPos && bSelect)
+		{
+			ImplCallEventListeners( VCLEVENT_LISTBOX_SELECT, reinterpret_cast<void*>(nPos));
+			if (HasFocus())
+				ImplCallEventListeners( VCLEVENT_LISTBOX_FOCUS, reinterpret_cast<void*>(nPos));
+		}
+	}
 }
 
 // -----------------------------------------------------------------------
@@ -1605,6 +1637,12 @@ sal_uInt16 ListBox::GetMaxMRUCount() con
 {
 	return mpImplLB->GetMaxMRUCount();
 }
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 ListBox::GetMRUCount() const
+{
+	return mpImplLB->GetEntryList()->GetMRUCount();
+}
+//-----IAccessibility2 Implementation 2009
 
 // -----------------------------------------------------------------------
 



Mime
View raw message