diff options
Diffstat (limited to 'sw/source/uibase/docvw/SidebarWinAcc.cxx')
-rw-r--r-- | sw/source/uibase/docvw/SidebarWinAcc.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sw/source/uibase/docvw/SidebarWinAcc.cxx b/sw/source/uibase/docvw/SidebarWinAcc.cxx index 4e52b471aa4b..3b2b4c758e93 100644 --- a/sw/source/uibase/docvw/SidebarWinAcc.cxx +++ b/sw/source/uibase/docvw/SidebarWinAcc.cxx @@ -23,6 +23,7 @@ #include <viewsh.hxx> #include <accmap.hxx> #include <toolkit/awt/vclxaccessiblecomponent.hxx> +#include <vcl/svapp.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> @@ -37,17 +38,16 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent explicit SidebarWinAccessibleContext( sw::annotation::SwAnnotationWin& rSidebarWin, SwViewShell& rViewShell, const SwFrame* pAnchorFrame ) - : VCLXAccessibleComponent( rSidebarWin.GetWindowPeer() ) + : VCLXAccessibleComponent( dynamic_cast<VCLXWindow*>(rSidebarWin.CreateAccessible().get()) ) , mrViewShell( rViewShell ) , mpAnchorFrame( pAnchorFrame ) - , maMutex() { rSidebarWin.SetAccessibleRole( css::accessibility::AccessibleRole::COMMENT ); } void ChangeAnchor( const SwFrame* pAnchorFrame ) { - osl::MutexGuard aGuard(maMutex); + SolarMutexGuard aGuard; mpAnchorFrame = pAnchorFrame; } @@ -55,7 +55,7 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override { - osl::MutexGuard aGuard(maMutex); + SolarMutexGuard aGuard; css::uno::Reference< css::accessibility::XAccessible > xAccParent; @@ -68,11 +68,11 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent return xAccParent; } - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override + virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override { - osl::MutexGuard aGuard(maMutex); + SolarMutexGuard aGuard; - sal_Int32 nIndex( -1 ); + sal_Int64 nIndex( -1 ); if ( mpAnchorFrame && GetWindow() && mrViewShell.GetAccessibleMap() ) @@ -87,8 +87,6 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent private: SwViewShell& mrViewShell; const SwFrame* mpAnchorFrame; - - ::osl::Mutex maMutex; }; } @@ -97,11 +95,10 @@ class SidebarWinAccessibleContext : public VCLXAccessibleComponent SidebarWinAccessible::SidebarWinAccessible( sw::annotation::SwAnnotationWin& rSidebarWin, SwViewShell& rViewShell, const SwSidebarItem& rSidebarItem ) - : VCLXWindow() - , mrSidebarWin( rSidebarWin ) + : mrSidebarWin( rSidebarWin ) , mrViewShell( rViewShell ) , mpAnchorFrame( rSidebarItem.maLayoutInfo.mpAnchorFrame ) - , bAccContextCreated( false ) + , m_bAccContextCreated( false ) { SetWindow( &mrSidebarWin ); } @@ -112,7 +109,7 @@ SidebarWinAccessible::~SidebarWinAccessible() void SidebarWinAccessible::ChangeSidebarItem( const SwSidebarItem& rSidebarItem ) { - if ( !bAccContextCreated ) + if ( !m_bAccContextCreated ) return; css::uno::Reference< css::accessibility::XAccessibleContext > xAcc @@ -134,7 +131,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SidebarWinAccessib new SidebarWinAccessibleContext( mrSidebarWin, mrViewShell, mpAnchorFrame ); - bAccContextCreated = true; + m_bAccContextCreated = true; return pAccContext; } |