summaryrefslogtreecommitdiffstats
path: root/svx/source/accessibility/AccessibleFrameSelector.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/accessibility/AccessibleFrameSelector.cxx')
-rwxr-xr-x[-rw-r--r--]svx/source/accessibility/AccessibleFrameSelector.cxx69
1 files changed, 28 insertions, 41 deletions
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 76d9ae56dfba..a112610cf8e5 100644..100755
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,31 +32,21 @@
#include <com/sun/star/awt/KeyEvent.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/Key.hpp>
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HDL_
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HDL_
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HDL_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/awt/FocusChangeReason.hpp>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svx/frmsel.hxx>
#include <svx/dialmgr.hxx>
#include "editeng/unolingu.hxx"
-#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
-#endif
-#ifndef SVX_FRMSEL_HRC
#include "frmsel.hrc"
-#endif
#ifndef MNEMONIC_CHAR
#define MNEMONIC_CHAR ((sal_Unicode)'~')
@@ -130,7 +121,7 @@ Reference< XAccessibleContext > AccFrameSelector::getAccessibleContext( )
sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return (meBorder == FRAMEBORDER_NONE) ? mpFrameSel->GetEnabledBorderCount() : 0;
}
@@ -140,7 +131,7 @@ sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException)
Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Reference< XAccessible > xRet;
if( meBorder == FRAMEBORDER_NONE )
@@ -155,7 +146,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i )
Reference< XAccessible > AccFrameSelector::getAccessibleParent( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Reference< XAccessible > xRet;
if(meBorder == FRAMEBORDER_NONE)
@@ -170,7 +161,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleParent( )
sal_Int32 AccFrameSelector::getAccessibleIndexInParent( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
sal_Int32 nIdx = 0;
@@ -202,7 +193,7 @@ sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException)
OUString AccFrameSelector::getAccessibleDescription( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return maDescriptions.GetString(meBorder);
}
@@ -212,7 +203,7 @@ OUString AccFrameSelector::getAccessibleDescription( )
OUString AccFrameSelector::getAccessibleName( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return maNames.GetString(meBorder);
}
@@ -222,7 +213,7 @@ OUString AccFrameSelector::getAccessibleName( )
Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
utl::AccessibleRelationSetHelper* pHelper;
Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper;
@@ -247,7 +238,7 @@ Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet(
Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
Reference< XAccessibleStateSet > xRet = pStateSetHelper;
@@ -320,7 +311,7 @@ void AccFrameSelector::removePropertyChangeListener( const Reference< XPropertyC
sal_Bool AccFrameSelector::containsPoint( const AwtPoint& aPt )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
//aPt is relative to the frame selector
return mpFrameSel->ContainsClickPoint( Point( aPt.X, aPt.Y ) );
@@ -332,7 +323,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint(
const AwtPoint& aPt )
throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
//aPt is relative to the frame selector
return mpFrameSel->GetChildAccessible( Point( aPt.X, aPt.Y ) );
@@ -340,7 +331,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint(
AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Size aSz;
Point aPos;
@@ -367,7 +358,7 @@ AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException)
AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Point aPos;
switch(meBorder)
@@ -387,7 +378,7 @@ AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException)
AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Point aPos;
switch(meBorder)
@@ -408,7 +399,7 @@ AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException)
AwtSize AccFrameSelector::getSize( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
Size aSz;
switch(meBorder)
@@ -428,7 +419,7 @@ AwtSize AccFrameSelector::getSize( ) throw (RuntimeException)
sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return sal_True;
}
@@ -437,7 +428,7 @@ sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException)
sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return sal_True;
}
@@ -446,7 +437,7 @@ sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException)
sal_Bool AccFrameSelector::isFocusTraversable( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return sal_True;
}
@@ -469,7 +460,7 @@ void AccFrameSelector::removeFocusListener( const Reference< XFocusListener >& x
void AccFrameSelector::grabFocus( ) throw (RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
mpFrameSel->GrabFocus();
}
@@ -479,7 +470,7 @@ void AccFrameSelector::grabFocus( ) throw (RuntimeException)
Any AccFrameSelector::getAccessibleKeyBinding( ) throw (RuntimeException)
{
Any aRet;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
utl::AccessibleRelationSetHelper* pHelper;
Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper;
@@ -517,7 +508,7 @@ sal_Int32 AccFrameSelector::getForeground( )
throw (RuntimeException)
{
Any aRet;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return mpFrameSel->GetControlForeground().GetColor();
}
@@ -528,7 +519,7 @@ sal_Int32 AccFrameSelector::getBackground( )
throw (RuntimeException)
{
Any aRet;
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
IsValid();
return mpFrameSel->GetControlBackground().GetColor();
}
@@ -537,7 +528,7 @@ sal_Int32 AccFrameSelector::getBackground( )
void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( xListener.is() )
{
@@ -553,7 +544,7 @@ void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListen
void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
if ( xListener.is() && mnClientId != 0 &&
::comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ) == 0 )
@@ -572,7 +563,7 @@ void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventLis
OUString AccFrameSelector::getImplementationName( ) throw (RuntimeException)
{
- return OUString::createFromAscii("AccFrameSelector");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("AccFrameSelector"));
}
// ----------------------------------------------------------------------------
@@ -614,7 +605,7 @@ void AccFrameSelector::IsValid() throw (RuntimeException)
void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
AwtFocusEvent aEvent;
aEvent.FocusFlags = 0;
if(bGetFocus)
@@ -634,12 +625,7 @@ void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus)
aEvent.FocusFlags |= AwtFocusChangeReason::AROUND;
if(nFocusFlags&GETFOCUS_UNIQUEMNEMONIC)
aEvent.FocusFlags |= AwtFocusChangeReason::UNIQUEMNEMONIC;
- // if(nFocusFlags&GETFOCUS_INIT)
- // aEvent.FocusFlags |= AwtFocusChangeReason::
}
-// else
- //how can I find the current focus window?
-// aEvent.NextFocus = ;
aEvent.Temporary = sal_False;
Reference < XAccessibleContext > xThis( this );
@@ -738,3 +724,4 @@ void AccFrameSelector::Invalidate()
} // namespace a11y
} // namespace svx
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */