1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_accessibility.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir // includes -------------------------------------------------------------- 32*cdf0e10cSrcweir #include <accessibility/standard/vclxaccessiblecheckbox.hxx> 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir #include <toolkit/awt/vclxwindows.hxx> 35*cdf0e10cSrcweir #include <accessibility/helper/accresmgr.hxx> 36*cdf0e10cSrcweir #include <accessibility/helper/accessiblestrings.hrc> 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir #include <unotools/accessiblestatesethelper.hxx> 39*cdf0e10cSrcweir #include <comphelper/accessiblekeybindinghelper.hxx> 40*cdf0e10cSrcweir #include <com/sun/star/awt/KeyModifier.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleStateType.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleEventId.hpp> 43*cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx> 44*cdf0e10cSrcweir #include <comphelper/sequence.hxx> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #include <vcl/button.hxx> 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir using namespace ::com::sun::star; 49*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 50*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 51*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 52*cdf0e10cSrcweir using namespace ::com::sun::star::accessibility; 53*cdf0e10cSrcweir using namespace ::comphelper; 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 57*cdf0e10cSrcweir // VCLXAccessibleCheckBox 58*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir VCLXAccessibleCheckBox::VCLXAccessibleCheckBox( VCLXWindow* pVCLWindow ) 61*cdf0e10cSrcweir :VCLXAccessibleTextComponent( pVCLWindow ) 62*cdf0e10cSrcweir { 63*cdf0e10cSrcweir m_bChecked = IsChecked(); 64*cdf0e10cSrcweir m_bIndeterminate = IsIndeterminate(); 65*cdf0e10cSrcweir } 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir VCLXAccessibleCheckBox::~VCLXAccessibleCheckBox() 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir } 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir bool VCLXAccessibleCheckBox::IsChecked() 76*cdf0e10cSrcweir { 77*cdf0e10cSrcweir bool bChecked = false; 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); 80*cdf0e10cSrcweir if ( pVCLXCheckBox && pVCLXCheckBox->getState() == (sal_Int16) 1 ) 81*cdf0e10cSrcweir bChecked = true; 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir return bChecked; 84*cdf0e10cSrcweir } 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir bool VCLXAccessibleCheckBox::IsIndeterminate() 89*cdf0e10cSrcweir { 90*cdf0e10cSrcweir bool bIndeterminate = false; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); 93*cdf0e10cSrcweir if ( pVCLXCheckBox && pVCLXCheckBox->getState() == (sal_Int16) 2 ) 94*cdf0e10cSrcweir bIndeterminate = true; 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir return bIndeterminate; 97*cdf0e10cSrcweir } 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir void VCLXAccessibleCheckBox::SetChecked( bool bChecked ) 102*cdf0e10cSrcweir { 103*cdf0e10cSrcweir if ( m_bChecked != bChecked ) 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir Any aOldValue, aNewValue; 106*cdf0e10cSrcweir if ( m_bChecked ) 107*cdf0e10cSrcweir aOldValue <<= AccessibleStateType::CHECKED; 108*cdf0e10cSrcweir else 109*cdf0e10cSrcweir aNewValue <<= AccessibleStateType::CHECKED; 110*cdf0e10cSrcweir m_bChecked = bChecked; 111*cdf0e10cSrcweir NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); 112*cdf0e10cSrcweir } 113*cdf0e10cSrcweir } 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir void VCLXAccessibleCheckBox::SetIndeterminate( bool bIndeterminate ) 118*cdf0e10cSrcweir { 119*cdf0e10cSrcweir if ( m_bIndeterminate != bIndeterminate ) 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir Any aOldValue, aNewValue; 122*cdf0e10cSrcweir if ( m_bIndeterminate ) 123*cdf0e10cSrcweir aOldValue <<= AccessibleStateType::INDETERMINATE; 124*cdf0e10cSrcweir else 125*cdf0e10cSrcweir aNewValue <<= AccessibleStateType::INDETERMINATE; 126*cdf0e10cSrcweir m_bIndeterminate = bIndeterminate; 127*cdf0e10cSrcweir NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir } 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir void VCLXAccessibleCheckBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) 134*cdf0e10cSrcweir { 135*cdf0e10cSrcweir switch ( rVclWindowEvent.GetId() ) 136*cdf0e10cSrcweir { 137*cdf0e10cSrcweir case VCLEVENT_CHECKBOX_TOGGLE: 138*cdf0e10cSrcweir { 139*cdf0e10cSrcweir SetChecked( IsChecked() ); 140*cdf0e10cSrcweir SetIndeterminate( IsIndeterminate() ); 141*cdf0e10cSrcweir } 142*cdf0e10cSrcweir break; 143*cdf0e10cSrcweir default: 144*cdf0e10cSrcweir VCLXAccessibleTextComponent::ProcessWindowEvent( rVclWindowEvent ); 145*cdf0e10cSrcweir } 146*cdf0e10cSrcweir } 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir void VCLXAccessibleCheckBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) 151*cdf0e10cSrcweir { 152*cdf0e10cSrcweir VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir rStateSet.AddState( AccessibleStateType::FOCUSABLE ); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir if ( IsChecked() ) 157*cdf0e10cSrcweir rStateSet.AddState( AccessibleStateType::CHECKED ); 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir if ( IsIndeterminate() ) 160*cdf0e10cSrcweir rStateSet.AddState( AccessibleStateType::INDETERMINATE ); 161*cdf0e10cSrcweir } 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 164*cdf0e10cSrcweir // XInterface 165*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 166*cdf0e10cSrcweir 167*cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2( VCLXAccessibleCheckBox, VCLXAccessibleTextComponent, VCLXAccessibleCheckBox_BASE ) 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 170*cdf0e10cSrcweir // XTypeProvider 171*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXAccessibleCheckBox, VCLXAccessibleTextComponent, VCLXAccessibleCheckBox_BASE ) 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 176*cdf0e10cSrcweir // XServiceInfo 177*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir ::rtl::OUString VCLXAccessibleCheckBox::getImplementationName() throw (RuntimeException) 180*cdf0e10cSrcweir { 181*cdf0e10cSrcweir return ::rtl::OUString::createFromAscii( "com.sun.star.comp.toolkit.AccessibleCheckBox" ); 182*cdf0e10cSrcweir } 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir Sequence< ::rtl::OUString > VCLXAccessibleCheckBox::getSupportedServiceNames() throw (RuntimeException) 187*cdf0e10cSrcweir { 188*cdf0e10cSrcweir Sequence< ::rtl::OUString > aNames(1); 189*cdf0e10cSrcweir aNames[0] = ::rtl::OUString::createFromAscii( "com.sun.star.awt.AccessibleCheckBox" ); 190*cdf0e10cSrcweir return aNames; 191*cdf0e10cSrcweir } 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 194*cdf0e10cSrcweir // XAccessibleAction 195*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir sal_Int32 VCLXAccessibleCheckBox::getAccessibleActionCount( ) throw (RuntimeException) 198*cdf0e10cSrcweir { 199*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir return 1; 202*cdf0e10cSrcweir } 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) 211*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 212*cdf0e10cSrcweir 213*cdf0e10cSrcweir CheckBox* pCheckBox = (CheckBox*) GetWindow(); 214*cdf0e10cSrcweir VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); 215*cdf0e10cSrcweir if ( pCheckBox && pVCLXCheckBox ) 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir sal_Int32 nValueMin = (sal_Int32) 0; 218*cdf0e10cSrcweir sal_Int32 nValueMax = (sal_Int32) 1; 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir if ( pCheckBox->IsTriStateEnabled() ) 221*cdf0e10cSrcweir nValueMax = (sal_Int32) 2; 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir sal_Int32 nValue = (sal_Int32) pVCLXCheckBox->getState(); 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir ++nValue; 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir if ( nValue > nValueMax ) 228*cdf0e10cSrcweir nValue = nValueMin; 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir pVCLXCheckBox->setState( (sal_Int16) nValue ); 231*cdf0e10cSrcweir } 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir return sal_True; 234*cdf0e10cSrcweir } 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir ::rtl::OUString VCLXAccessibleCheckBox::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 239*cdf0e10cSrcweir { 240*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 241*cdf0e10cSrcweir 242*cdf0e10cSrcweir if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) 243*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir return ::rtl::OUString( TK_RES_STRING( RID_STR_ACC_ACTION_CLICK ) ); 246*cdf0e10cSrcweir } 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 251*cdf0e10cSrcweir { 252*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir if ( nIndex < 0 || nIndex >= getAccessibleActionCount() ) 255*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper(); 258*cdf0e10cSrcweir Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper; 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir Window* pWindow = GetWindow(); 261*cdf0e10cSrcweir if ( pWindow ) 262*cdf0e10cSrcweir { 263*cdf0e10cSrcweir KeyEvent aKeyEvent = pWindow->GetActivationKey(); 264*cdf0e10cSrcweir KeyCode aKeyCode = aKeyEvent.GetKeyCode(); 265*cdf0e10cSrcweir if ( aKeyCode.GetCode() != 0 ) 266*cdf0e10cSrcweir { 267*cdf0e10cSrcweir awt::KeyStroke aKeyStroke; 268*cdf0e10cSrcweir aKeyStroke.Modifiers = 0; 269*cdf0e10cSrcweir if ( aKeyCode.IsShift() ) 270*cdf0e10cSrcweir aKeyStroke.Modifiers |= awt::KeyModifier::SHIFT; 271*cdf0e10cSrcweir if ( aKeyCode.IsMod1() ) 272*cdf0e10cSrcweir aKeyStroke.Modifiers |= awt::KeyModifier::MOD1; 273*cdf0e10cSrcweir if ( aKeyCode.IsMod2() ) 274*cdf0e10cSrcweir aKeyStroke.Modifiers |= awt::KeyModifier::MOD2; 275*cdf0e10cSrcweir if ( aKeyCode.IsMod3() ) 276*cdf0e10cSrcweir aKeyStroke.Modifiers |= awt::KeyModifier::MOD3; 277*cdf0e10cSrcweir aKeyStroke.KeyCode = aKeyCode.GetCode(); 278*cdf0e10cSrcweir aKeyStroke.KeyChar = aKeyEvent.GetCharCode(); 279*cdf0e10cSrcweir aKeyStroke.KeyFunc = static_cast< sal_Int16 >( aKeyCode.GetFunction() ); 280*cdf0e10cSrcweir pKeyBindingHelper->AddKeyBinding( aKeyStroke ); 281*cdf0e10cSrcweir } 282*cdf0e10cSrcweir } 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir return xKeyBinding; 285*cdf0e10cSrcweir } 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 288*cdf0e10cSrcweir // XAccessibleValue 289*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir Any VCLXAccessibleCheckBox::getCurrentValue( ) throw (RuntimeException) 292*cdf0e10cSrcweir { 293*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir Any aValue; 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); 298*cdf0e10cSrcweir if ( pVCLXCheckBox ) 299*cdf0e10cSrcweir aValue <<= (sal_Int32) pVCLXCheckBox->getState(); 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir return aValue; 302*cdf0e10cSrcweir } 303*cdf0e10cSrcweir 304*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 305*cdf0e10cSrcweir 306*cdf0e10cSrcweir sal_Bool VCLXAccessibleCheckBox::setCurrentValue( const Any& aNumber ) throw (RuntimeException) 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 309*cdf0e10cSrcweir 310*cdf0e10cSrcweir sal_Bool bReturn = sal_False; 311*cdf0e10cSrcweir 312*cdf0e10cSrcweir VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() ); 313*cdf0e10cSrcweir if ( pVCLXCheckBox ) 314*cdf0e10cSrcweir { 315*cdf0e10cSrcweir sal_Int32 nValue = 0, nValueMin = 0, nValueMax = 0; 316*cdf0e10cSrcweir OSL_VERIFY( aNumber >>= nValue ); 317*cdf0e10cSrcweir OSL_VERIFY( getMinimumValue() >>= nValueMin ); 318*cdf0e10cSrcweir OSL_VERIFY( getMaximumValue() >>= nValueMax ); 319*cdf0e10cSrcweir 320*cdf0e10cSrcweir if ( nValue < nValueMin ) 321*cdf0e10cSrcweir nValue = nValueMin; 322*cdf0e10cSrcweir else if ( nValue > nValueMax ) 323*cdf0e10cSrcweir nValue = nValueMax; 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir pVCLXCheckBox->setState( (sal_Int16) nValue ); 326*cdf0e10cSrcweir bReturn = sal_True; 327*cdf0e10cSrcweir } 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir return bReturn; 330*cdf0e10cSrcweir } 331*cdf0e10cSrcweir 332*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir Any VCLXAccessibleCheckBox::getMaximumValue( ) throw (RuntimeException) 335*cdf0e10cSrcweir { 336*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir Any aValue; 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir CheckBox* pCheckBox = (CheckBox*) GetWindow(); 341*cdf0e10cSrcweir if ( pCheckBox && pCheckBox->IsTriStateEnabled() ) 342*cdf0e10cSrcweir aValue <<= (sal_Int32) 2; 343*cdf0e10cSrcweir else 344*cdf0e10cSrcweir aValue <<= (sal_Int32) 1; 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir return aValue; 347*cdf0e10cSrcweir } 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir Any VCLXAccessibleCheckBox::getMinimumValue( ) throw (RuntimeException) 352*cdf0e10cSrcweir { 353*cdf0e10cSrcweir OExternalLockGuard aGuard( this ); 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir Any aValue; 356*cdf0e10cSrcweir aValue <<= (sal_Int32) 0; 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir return aValue; 359*cdf0e10cSrcweir } 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 362