diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-18 20:36:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-19 11:35:29 +0100 |
commit | bcf601f53ca50460e973a7ad8725aeed33170b2e (patch) | |
tree | 5c66ada548544504e01833d2040d6a6e46ae2602 /vcl/osx | |
parent | 38ef2cb092100d03fbef2c05a36526802d06ebaf (diff) |
rtl::Static->thread-safe static in vcl
Change-Id: I748c3b5608b76b4b847273856f6b1c66b53aced1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/a11yfactory.mm | 2 | ||||
-rw-r--r-- | vcl/osx/a11yfocuslistener.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/a11yfocustracker.cxx | 6 | ||||
-rw-r--r-- | vcl/osx/a11ylistener.cxx | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/vcl/osx/a11yfactory.mm b/vcl/osx/a11yfactory.mm index 797a7492d391..560d3f97357a 100644 --- a/vcl/osx/a11yfactory.mm +++ b/vcl/osx/a11yfactory.mm @@ -59,7 +59,7 @@ static bool enabled = false; mdAllWrapper = [ [ [ NSMutableDictionary alloc ] init ] retain ]; // initialize keyboard focus tracker rtl::Reference< AquaA11yFocusListener > listener( AquaA11yFocusListener::get() ); - TheAquaA11yFocusTracker::get().setFocusListener(listener); + TheAquaA11yFocusTracker().setFocusListener(listener); enabled = true; } return mdAllWrapper; diff --git a/vcl/osx/a11yfocuslistener.cxx b/vcl/osx/a11yfocuslistener.cxx index 68eb45a31f20..bae851647e6b 100644 --- a/vcl/osx/a11yfocuslistener.cxx +++ b/vcl/osx/a11yfocuslistener.cxx @@ -42,7 +42,7 @@ AquaA11yFocusListener::AquaA11yFocusListener() : m_focusedObject(nil) id AquaA11yFocusListener::getFocusedUIElement() { if ( nil == m_focusedObject ) { - Reference< XAccessible > xAccessible( TheAquaA11yFocusTracker::get().getFocusedObject() ); + Reference< XAccessible > xAccessible( TheAquaA11yFocusTracker().getFocusedObject() ); try { if( xAccessible.is() ) { Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext()); diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx index 000a4f04fd59..9aa3ae9fb733 100644 --- a/vcl/osx/a11yfocustracker.cxx +++ b/vcl/osx/a11yfocustracker.cxx @@ -35,6 +35,12 @@ using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; +AquaA11yFocusTracker& TheAquaA11yFocusTracker() +{ + static AquaA11yFocusTracker SINGLETON; + return SINGLETON; +} + static vcl::Window * getWindow(const ::VclSimpleEvent *pEvent) { diff --git a/vcl/osx/a11ylistener.cxx b/vcl/osx/a11ylistener.cxx index b8220c07d933..b34d047b3b7b 100644 --- a/vcl/osx/a11ylistener.cxx +++ b/vcl/osx/a11ylistener.cxx @@ -80,7 +80,7 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent ) if( m_role != AccessibleRole::LIST ) { Reference< XAccessible > xAccessible; if( aEvent.NewValue >>= xAccessible ) - TheAquaA11yFocusTracker::get().setFocusedObject( xAccessible ); + TheAquaA11yFocusTracker().setFocusedObject( xAccessible ); } break; |