summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblecheckbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblecheckbox.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblecheckbox.cxx45
1 files changed, 21 insertions, 24 deletions
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
index a15ae4013ceb..018878714e8a 100644
--- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
@@ -23,7 +23,7 @@
#include <helper/accresmgr.hxx>
#include <strings.hrc>
-#include <unotools/accessiblestatesethelper.hxx>
+#include <comphelper/accessiblecontexthelper.hxx>
#include <comphelper/accessiblekeybindinghelper.hxx>
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -37,7 +37,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::accessibility;
using namespace ::comphelper;
@@ -46,7 +45,7 @@ using namespace ::comphelper;
VCLXAccessibleCheckBox::VCLXAccessibleCheckBox( VCLXWindow* pVCLWindow )
- :VCLXAccessibleTextComponent( pVCLWindow )
+ :ImplInheritanceHelper( pVCLWindow )
{
m_bChecked = IsChecked();
m_bIndeterminate = IsIndeterminate();
@@ -123,44 +122,33 @@ void VCLXAccessibleCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindo
}
-void VCLXAccessibleCheckBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
+void VCLXAccessibleCheckBox::FillAccessibleStateSet( sal_Int64& rStateSet )
{
VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
- rStateSet.AddState( AccessibleStateType::FOCUSABLE );
+ rStateSet |= AccessibleStateType::CHECKABLE;
+ rStateSet |= AccessibleStateType::FOCUSABLE;
if ( IsChecked() )
- rStateSet.AddState( AccessibleStateType::CHECKED );
+ rStateSet |= AccessibleStateType::CHECKED;
if ( IsIndeterminate() )
- rStateSet.AddState( AccessibleStateType::INDETERMINATE );
+ rStateSet |= AccessibleStateType::INDETERMINATE;
}
-// XInterface
-
-
-IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleCheckBox, VCLXAccessibleTextComponent, VCLXAccessibleCheckBox_BASE )
-
-
-// XTypeProvider
-
-
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleCheckBox, VCLXAccessibleTextComponent, VCLXAccessibleCheckBox_BASE )
-
-
// XServiceInfo
OUString VCLXAccessibleCheckBox::getImplementationName()
{
- return "com.sun.star.comp.toolkit.AccessibleCheckBox";
+ return u"com.sun.star.comp.toolkit.AccessibleCheckBox"_ustr;
}
Sequence< OUString > VCLXAccessibleCheckBox::getSupportedServiceNames()
{
- return { "com.sun.star.awt.AccessibleCheckBox" };
+ return { u"com.sun.star.awt.AccessibleCheckBox"_ustr };
}
@@ -226,8 +214,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe
if ( nIndex != 0 )
throw IndexOutOfBoundsException();
- OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();
- Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ rtl::Reference<OAccessibleKeyBindingHelper> pKeyBindingHelper = new OAccessibleKeyBindingHelper();
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
@@ -253,7 +240,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe
}
}
- return xKeyBinding;
+ return pKeyBindingHelper;
}
@@ -329,5 +316,15 @@ Any VCLXAccessibleCheckBox::getMinimumValue( )
return aValue;
}
+Any VCLXAccessibleCheckBox::getMinimumIncrement( )
+{
+ OExternalLockGuard aGuard( this );
+
+ Any aValue;
+ aValue <<= sal_Int32(1);
+
+ return aValue;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */