You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/01/05 07:11:12 UTC

svn commit: r1429204 - in /openoffice/branches/ia2/main/vcl: inc/ inc/vcl/ source/control/ source/window/

Author: steve_y
Date: Sat Jan  5 06:11:12 2013
New Revision: 1429204

URL: http://svn.apache.org/viewvc?rev=1429204&view=rev
Log:
IA2 migration for vcl module

Modified:
    openoffice/branches/ia2/main/vcl/inc/ilstbox.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/combobox.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/lstbox.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/menu.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/vclevent.hxx
    openoffice/branches/ia2/main/vcl/inc/vcl/window.hxx
    openoffice/branches/ia2/main/vcl/source/control/combobox.cxx
    openoffice/branches/ia2/main/vcl/source/control/edit.cxx
    openoffice/branches/ia2/main/vcl/source/control/ilstbox.cxx
    openoffice/branches/ia2/main/vcl/source/control/lstbox.cxx
    openoffice/branches/ia2/main/vcl/source/control/morebtn.cxx
    openoffice/branches/ia2/main/vcl/source/control/tabctrl.cxx
    openoffice/branches/ia2/main/vcl/source/window/btndlg.cxx
    openoffice/branches/ia2/main/vcl/source/window/dlgctrl.cxx
    openoffice/branches/ia2/main/vcl/source/window/menu.cxx
    openoffice/branches/ia2/main/vcl/source/window/toolbox.cxx
    openoffice/branches/ia2/main/vcl/source/window/toolbox2.cxx
    openoffice/branches/ia2/main/vcl/source/window/window.cxx

Modified: openoffice/branches/ia2/main/vcl/inc/ilstbox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/ilstbox.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/ilstbox.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/ilstbox.hxx Sat Jan  5 06:11:12 2013
@@ -248,6 +248,10 @@ private:
 	Link			maDoubleClickHdl;
 	Link			maUserDrawHdl;
 	Link			maMRUChangedHdl;
+//IAccessibility2 Implementation 2009-----
+	Link			maFocusHdl;
+	Link			maListItemSelectHdl;
+//-----IAccessibility2 Implementation 2009
 
     ::vcl::QuickSelectionEngine
                     maQuickSelectionEngine;
@@ -262,7 +266,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();
@@ -359,7 +366,13 @@ public:
 	const Link& 	GetUserDrawHdl() const				{ return maUserDrawHdl; }
 	void			SetMRUChangedHdl( const Link& rLink )	{ maMRUChangedHdl = rLink; }
 	const Link& 	GetMRUChangedHdl() const				{ return maMRUChangedHdl; }
-
+//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
 	sal_Bool			IsSelectionChanged() const { return mbSelectionChanged; }
 	sal_uInt16			GetSelectModifier() const { return mnSelectModifier; }
 
@@ -489,6 +502,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/ia2/main/vcl/inc/vcl/combobox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/combobox.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/combobox.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/combobox.hxx Sat Jan  5 06:11:12 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;
@@ -181,7 +184,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;
 
@@ -221,6 +226,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/ia2/main/vcl/inc/vcl/lstbox.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/lstbox.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/lstbox.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/lstbox.hxx Sat Jan  5 06:11:12 2013
@@ -64,7 +64,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 );
@@ -213,7 +216,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/ia2/main/vcl/inc/vcl/menu.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/menu.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/menu.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/menu.hxx Sat Jan  5 06:11:12 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/ia2/main/vcl/inc/vcl/svapp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/svapp.hxx Sat Jan  5 06:11:12 2013
@@ -520,9 +520,26 @@ inline void Application::EndYield()
 
 //IAccessibility2 Implementation 2009-----
 #ifdef WNT
-// VCL_DLLPUBLIC sal_Bool HasAtHook();
+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;
+};
+
 VCL_DLLPUBLIC bool TestBridgeRegistered();
 VCL_DLLPUBLIC bool IsBridgeRegistered();
 #endif

Modified: openoffice/branches/ia2/main/vcl/inc/vcl/vclevent.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/vclevent.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/vclevent.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/vclevent.hxx Sat Jan  5 06:11:12 2013
@@ -172,24 +172,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, Sym2_1986
+#define VCLEVENT_LISTBOX_STATEUPDATE			1236
 class VCL_DLLPUBLIC VclSimpleEvent
 {
 private:

Modified: openoffice/branches/ia2/main/vcl/inc/vcl/window.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/inc/vcl/window.hxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/inc/vcl/window.hxx (original)
+++ openoffice/branches/ia2/main/vcl/inc/vcl/window.hxx Sat Jan  5 06:11:12 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/ia2/main/vcl/source/control/combobox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/combobox.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/combobox.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/combobox.cxx Sat Jan  5 06:11:12 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 )
@@ -1407,6 +1422,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/ia2/main/vcl/source/control/edit.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/edit.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/edit.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/edit.cxx Sat Jan  5 06:11:12 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/ia2/main/vcl/source/control/ilstbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/ilstbox.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/ilstbox.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/ilstbox.cxx Sat Jan  5 06:11:12 2013
@@ -916,7 +916,11 @@ void ImplListBoxWindow::MouseButtonDown(
 
 				mnCurrentPos = nSelect;
 				mbTrackingSelect = sal_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 = sal_False;
 				if ( mbGrabFocus )
 					GrabFocus();
@@ -987,6 +991,14 @@ void ImplListBoxWindow::MouseMove( const
 			                ImplCallSelect();
 			                mbTravelSelect = sal_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 = sal_False;
 				}
@@ -1074,7 +1086,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;
@@ -1219,6 +1231,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();
 	}
@@ -1681,8 +1699,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 = sal_True;
 			mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
@@ -2141,7 +2163,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/ia2/main/vcl/source/control/lstbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/lstbox.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/lstbox.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/lstbox.cxx Sat Jan  5 06:11:12 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->Show();
     
@@ -248,6 +252,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
 
 // -----------------------------------------------------------------------
 
@@ -1046,6 +1062,8 @@ void ListBox::SetNoSelection()
 		mpImplWin->SetImage( aImage );
 		mpImplWin->Invalidate();
 	}
+	// IAccessible2 implementation 2009
+	NotifyVCLEvent( VCLEVENT_LISTBOX_STATEUPDATE);
 }
 
 // -----------------------------------------------------------------------
@@ -1190,7 +1208,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));
+		}
+	}
 }
 
 // -----------------------------------------------------------------------
@@ -1591,6 +1623,12 @@ sal_uInt16 ListBox::GetMaxMRUCount() con
 {
 	return mpImplLB->GetMaxMRUCount();
 }
+//IAccessibility2 Implementation 2009-----
+sal_uInt16 ListBox::GetMRUCount() const
+{
+	return mpImplLB->GetEntryList()->GetMRUCount();
+}
+//-----IAccessibility2 Implementation 2009
 
 // -----------------------------------------------------------------------
 

Modified: openoffice/branches/ia2/main/vcl/source/control/morebtn.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/morebtn.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/morebtn.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/morebtn.cxx Sat Jan  5 06:11:12 2013
@@ -155,7 +155,7 @@ void MoreButton::Click()
 
 	// Hier den Click-Handler rufen, damit vorher die Controls initialisiert
 	// werden koennen
-	PushButton::Click();
+	//PushButton::Click(); // IAccessibility2 Implementation 2009
 
 	// Je nach Status die Fenster updaten
 	if ( mbState )
@@ -197,6 +197,9 @@ void MoreButton::Click()
 			pWindow = mpMBData->mpItemList->Next();
 		}
 	}
+//IAccessibility2 Implementation 2009-----
+	PushButton::Click();
+//-----IAccessibility2 Implementation 2009
 }
 
 // -----------------------------------------------------------------------

Modified: openoffice/branches/ia2/main/vcl/source/control/tabctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/control/tabctrl.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/control/tabctrl.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/control/tabctrl.cxx Sat Jan  5 06:11:12 2013
@@ -619,6 +619,9 @@ void TabControl::ImplChangeTabPage( sal_
         }
 
         pPage->ActivatePage();
+//IAccessibility2 Implementation 2009-----
+		pPage->Show();
+//-----IAccessibility2 Implementation 2009
 
         if ( pOldPage && pOldPage->HasChildPathFocus() )
         {
@@ -630,7 +633,9 @@ void TabControl::ImplChangeTabPage( sal_
                 GrabFocus();
         }
 
-        pPage->Show();
+//IAccessibility2 Implementation 2009-----
+        // pPage->Show(); 
+//-----IAccessibility2 Implementation 2009
     }
 
     if ( pOldPage )

Modified: openoffice/branches/ia2/main/vcl/source/window/btndlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/btndlg.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/btndlg.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/btndlg.cxx Sat Jan  5 06:11:12 2013
@@ -289,6 +289,15 @@ void ButtonDialog::StateChanged( StateCh
 	if ( nType == STATE_CHANGE_INITSHOW )
 	{
 		ImplPosControls();
+//IAccessibility2 Implementation 2009-----
+		ImplBtnDlgItem* pItem = mpItemList->First();
+		while ( pItem )
+		{
+			if ( pItem->mpPushButton && pItem->mbOwnButton )
+				pItem->mpPushButton->SetZOrder(0, WINDOW_ZORDER_LAST);
+			pItem = mpItemList->Next();
+		}
+//-----IAccessibility2 Implementation 2009
 
 		// Focus evt. auf den entsprechenden Button setzen
 		if ( mnFocusButtonId != BUTTONDIALOG_BUTTON_NOTFOUND )

Modified: openoffice/branches/ia2/main/vcl/source/window/dlgctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/dlgctrl.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/dlgctrl.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/dlgctrl.cxx Sat Jan  5 06:11:12 2013
@@ -835,7 +835,18 @@ sal_Bool Window::ImplDlgCtrl( const KeyE
                 if ( nStyle & WB_GROUP )
                     break;
 
-                if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() )
+//IAccessibility2 Implementation 2009-----
+				//Solution:Pure window shouldn't get window after controls such as buttons. 
+                //if ( pWindow->IsVisible() && pWindow->IsEnabled() && pWindow->IsInputEnabled() )
+				if ( pWindow->IsVisible() && pWindow->IsEnabled() && 
+					 pWindow->IsInputEnabled() && ( 
+									pWindow->GetType() != WINDOW_WINDOW &&
+									pWindow->GetType() != WINDOW_SYSWINDOW &&
+									pWindow->GetType() != WINDOW_WORKWINDOW &&
+									pWindow->GetType() != WINDOW_CONTROL
+								   )
+	   )
+//-----IAccessibility2 Implementation 2009
                 {
                     pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD );
                     return sal_True;

Modified: openoffice/branches/ia2/main/vcl/source/window/menu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/menu.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/menu.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/menu.cxx Sat Jan  5 06:11:12 2013
@@ -1573,6 +1573,36 @@ sal_uInt16 Menu::GetCurItemId() const
 {
     return nSelectedId;
 }
+//IAccessibility2 Implementation 2009
+void Menu::SetHightlightItem( sal_uInt16 nHighlightedItem )
+{
+	this->nHighlightedItem = nHighlightedItem;
+}
+sal_uInt16 Menu::GetHighlightItem() const
+{
+	return nHighlightedItem;
+}
+
+
+XubString Menu::GetItemAccKeyStrFromPos(sal_uInt16 nPos) const 
+{
+    MenuItemData* pData = pItemList->GetDataFromPos( nPos );
+	if (pData)
+	{
+		return pData->aAccelKey.GetName();
+	}
+	return XubString();
+}
+
+sal_Bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const
+{
+    MenuItemData* pData = pItemList->GetDataFromPos( nPos );
+	if (pData)
+	{
+		return pData->bIsTemporary;
+	}
+	return sal_False;
+}
 
 void Menu::SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits )
 {
@@ -3728,7 +3758,12 @@ sal_uInt16 PopupMenu::ImplExecute( Windo
             String aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
             MenuItemData* pData = pItemList->Insert(
                 0xFFFF, MENUITEM_STRING, 0, aTmpEntryText, Image(), NULL, 0xFFFF );
+//IAccessibility2 Implementation 2009-----
+		sal_uInt16          nmPos;
+		pData = pItemList->GetData( pData->nId, nmPos );
                 pData->bIsTemporary = sal_True;
+		ImplCallEventListeners(VCLEVENT_MENU_SUBMENUCHANGED,nmPos);
+//-----IAccessibility2 Implementation 2009
         }
     }
     else if ( Application::GetSettings().GetStyleSettings().GetAutoMnemonic() && !( nMenuFlags & MENU_FLAG_NOAUTOMNEMONICS ) )
@@ -4005,7 +4040,9 @@ void MenuFloatingWindow::doShutdown()
         // otherwise the entry will not be read when the menu is opened again
         if( nHighlightedItem != ITEMPOS_INVALID )
             pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
-    
+//IAccessibility2 Implementation 2009-----
+	pMenu->SetHightlightItem(ITEMPOS_INVALID);
+//-----IAccessibility2 Implementation 2009
         if( !bKeyInput && pMenu && pMenu->pStartedFrom && !pMenu->pStartedFrom->bIsMenuBar )
         {
             // #102461# remove highlight in parent
@@ -4676,6 +4713,9 @@ void MenuFloatingWindow::ChangeHighlight
             }
         }
         HighlightItem( nHighlightedItem, sal_True );
+//IAccessibility2 Implementation 2009-----
+	pMenu->SetHightlightItem(nHighlightedItem);
+//-----IAccessibility2 Implementation 2009
         pMenu->ImplCallHighlight( nHighlightedItem );
     }
     else
@@ -4977,6 +5017,10 @@ void MenuFloatingWindow::KeyInput( const
                     MenuFloatingWindow* pFloat = ((PopupMenu*)pMenu->pStartedFrom)->ImplGetFloatingWindow();
                     pFloat->GrabFocus();
                     pFloat->KillActivePopup();
+//IAccessibility2 Implementation 2009-----
+  		    sal_uInt16 highlightItem = pFloat->GetHighlightedItem();
+		    pFloat->ChangeHighlightItem(highlightItem, sal_False);
+//-----IAccessibility2 Implementation 2009
                 }
             }
         }
@@ -5566,6 +5610,9 @@ void MenuBarWindow::ChangeHighlightItem(
     nHighlightedItem = (sal_uInt16)n;
     DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" );
     HighlightItem( nHighlightedItem, sal_True );
+//IAccessibility2 Implementation 2009-----
+    pMenu->SetHightlightItem(nHighlightedItem);
+//-----IAccessibility2 Implementation 2009
     pMenu->ImplCallHighlight( nHighlightedItem );
 
     if( mbAutoPopup )

Modified: openoffice/branches/ia2/main/vcl/source/window/toolbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/toolbox.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/toolbox.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/toolbox.cxx Sat Jan  5 06:11:12 2013
@@ -6065,6 +6065,11 @@ void ToolBox::ImplChangeHighlight( ImplT
                 mnCurPos = aPos;
             ImplShowFocus();
 
+//IAccessibility2 Implementation 2009-----
+			if( pItem->mpWindow )
+				pItem->mpWindow->GrabFocus();
+			if( pItem != pOldItem )
+//-----IAccessibility2 Implementation 2009
             ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT );
 		}
 	}

Modified: openoffice/branches/ia2/main/vcl/source/window/toolbox2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/toolbox2.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/toolbox2.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/toolbox2.cxx Sat Jan  5 06:11:12 2013
@@ -1737,7 +1737,11 @@ void ToolBox::SetItemState( sal_uInt16 n
             ImplCallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );
 
             // Notify
-		    ImplCallEventListeners( VCLEVENT_TOOLBOX_CLICK, reinterpret_cast< void* >( nPos ) );
+//IAccessibility2 Implementation 2009-----
+		    //Solution:Call accessivle listener to notify state_changed event
+		    ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMUPDATED,reinterpret_cast< void* >(nPos) );
+		    //ImplCallEventListeners( VCLEVENT_TOOLBOX_CLICK, reinterpret_cast< void* >( nPos ) );
+//-----IAccessibility2 Implementation 2009
 		}
 	}
 }

Modified: openoffice/branches/ia2/main/vcl/source/window/window.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/vcl/source/window/window.cxx?rev=1429204&r1=1429203&r2=1429204&view=diff
==============================================================================
--- openoffice/branches/ia2/main/vcl/source/window/window.cxx (original)
+++ openoffice/branches/ia2/main/vcl/source/window/window.cxx Sat Jan  5 06:11:12 2013
@@ -5392,6 +5392,15 @@ long Window::Notify( NotifyEvent& rNEvt 
     return nRet;
 }
 
+// IAccessible2 implementation, 2009
+void Window::NotifyVCLEvent( ULONG nEvent ,void* pData /*= NULL*/)
+{
+	ImplCallEventListeners( nEvent ,pData);
+}
+::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > Window::GetAccFlowToSequence()
+{
+	return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >();
+}
 // -----------------------------------------------------------------------
 
 void Window::ImplCallEventListeners( sal_uLong nEvent, void* pData )
@@ -9092,10 +9101,11 @@ sal_uInt16 Window::GetAccessibleRole() c
             case WINDOW_CANCELBUTTON:
             case WINDOW_HELPBUTTON:
             case WINDOW_IMAGEBUTTON:
-            case WINDOW_MENUBUTTON:
+            //case WINDOW_MENUBUTTON:
             case WINDOW_MOREBUTTON:
             case WINDOW_SPINBUTTON:
             case WINDOW_BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
+            case WINDOW_MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
 
             case WINDOW_PATHDIALOG: nRole = accessibility::AccessibleRole::DIRECTORY_PANE; break;
             case WINDOW_FILEDIALOG: nRole = accessibility::AccessibleRole::FILE_CHOOSER; break;
@@ -9110,10 +9120,15 @@ sal_uInt16 Window::GetAccessibleRole() c
             case WINDOW_MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
 
             case WINDOW_PATTERNFIELD:
+//IAccessibility2 Impplementaton 2009-----
+            // Need to set the role of those window control to spinbox
+            /*
             case WINDOW_NUMERICFIELD:
             case WINDOW_METRICFIELD:
             case WINDOW_CURRENCYFIELD:
             case WINDOW_LONGCURRENCYFIELD:
+            */
+//-----IAccessibility2 Impplementaton 2009
             case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
 
             case WINDOW_PATTERNBOX:
@@ -9130,7 +9145,17 @@ sal_uInt16 Window::GetAccessibleRole() c
 
             case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
             case WINDOW_FIXEDBORDER:
-            case WINDOW_FIXEDLINE: nRole = accessibility::AccessibleRole::SEPARATOR; break;
+				nRole = accessibility::AccessibleRole::SEPARATOR; break;
+	    //IAccessibility2 Impplementaton 2009-----
+            case WINDOW_FIXEDLINE: 
+				{	if( GetText().Len() > 0 )
+						nRole = accessibility::AccessibleRole::LABEL; 
+					else
+						nRole = accessibility::AccessibleRole::SEPARATOR; 
+					break;
+				}
+            //case WINDOW_FIXEDLINE: nRole = accessibility::AccessibleRole::SEPARATOR; break;
+	    //-----IAccessibility2 Impplementaton 2009
             case WINDOW_FIXEDBITMAP:
             case WINDOW_FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
             case WINDOW_GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
@@ -9145,6 +9170,13 @@ sal_uInt16 Window::GetAccessibleRole() c
             case WINDOW_DATEFIELD:
             case WINDOW_TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
 
+//IAccessibility2 Impplementaton 2009-----
+            // Need to set the role of those window control to spinbox
+            case WINDOW_NUMERICFIELD:
+            case WINDOW_METRICFIELD:
+            case WINDOW_CURRENCYFIELD:
+            case WINDOW_LONGCURRENCYFIELD:
+//-----IAccessibility2 Impplementaton 2009
             case WINDOW_SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
 
             case WINDOW_TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
@@ -9196,8 +9228,12 @@ void Window::SetAccessibleName( const St
    if ( !mpWindowImpl->mpAccessibleInfos )
         mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos;
 
+//IAccessibility2 Implementation 2009-----
+	String oldName = GetAccessibleName();
     delete mpWindowImpl->mpAccessibleInfos->pAccessibleName;
     mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName );
+    ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldName );	
+//-----IAccessibility2 Implementation 2009
 }
 
 String Window::GetAccessibleName() const
@@ -9242,6 +9278,12 @@ String Window::GetAccessibleName() const
                 if ( pLabel && pLabel != this )
                     aAccessibleName = pLabel->GetText();
             }
+		//IAccessibility2 Implementation 2009-----
+		if ( !aAccessibleName.Len() )
+	        {
+	            aAccessibleName = GetQuickHelpText();
+	        }
+		//-----IAccessibility2 Implementation 2009
             break;
 
             case WINDOW_IMAGEBUTTON:
@@ -9255,6 +9297,16 @@ String Window::GetAccessibleName() const
                 }
             break;
 
+//IAccessibility2 Implementation 2009-----
+			case WINDOW_TOOLBOX:
+				aAccessibleName = GetText();
+				if( aAccessibleName.Len() == 0 )
+					aAccessibleName =XubString( RTL_CONSTASCII_USTRINGPARAM( "Tool Bar"  ) );
+				break;
+			case WINDOW_MOREBUTTON:
+				aAccessibleName = mpWindowImpl->maText;
+				break;
+//-----IAccessibility2 Implementation 2009
             default:
                 aAccessibleName = GetText();
                 break;