diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-04-26 13:26:44 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-04-26 13:26:44 +0000 |
commit | d6b07add553ff0d4e34999d44a15c423af016566 (patch) | |
tree | 231ec0578a77cc645f5e1cf66359df8a51872832 /unotools/source/accessibility/accessiblestatesethelper.cxx | |
parent | bc98d6ed07e63f7167cf6b48d191f813de068c56 (diff) |
#98750# new ctor which takes a bitmask for the initial states
Diffstat (limited to 'unotools/source/accessibility/accessiblestatesethelper.cxx')
-rw-r--r-- | unotools/source/accessibility/accessiblestatesethelper.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx index 9f33b80fbb38..c109c2a5557d 100644 --- a/unotools/source/accessibility/accessiblestatesethelper.cxx +++ b/unotools/source/accessibility/accessiblestatesethelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: accessiblestatesethelper.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2002-03-20 07:24:19 $ + * last change: $Author: fs $ $Date: 2002-04-26 14:26:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,6 +101,8 @@ public: AccessibleStateSetHelperImpl* pNewStates) throw (uno::RuntimeException); + void AddStates( const sal_Int64 _nStates ) SAL_THROW( ( ) ); + private: #if 0 ::std::bitset<BITFIELDSIZE> maStates; //Bitfield @@ -143,6 +145,11 @@ sal_Bool AccessibleStateSetHelperImpl::Contains (sal_Int16 aState) return ((aTempBitSet & maStates) != 0); } +void AccessibleStateSetHelperImpl::AddStates( const sal_Int64 _nStates ) SAL_THROW( ( ) ) +{ + maStates |= _nStates; +} + void AccessibleStateSetHelperImpl::AddState(sal_Int16 aState) throw (uno::RuntimeException) { @@ -204,6 +211,13 @@ AccessibleStateSetHelper::AccessibleStateSetHelper () mpHelperImpl = new AccessibleStateSetHelperImpl(); } +AccessibleStateSetHelper::AccessibleStateSetHelper ( const sal_Int64 _nInitialStates ) + : mpHelperImpl(NULL) +{ + mpHelperImpl = new AccessibleStateSetHelperImpl(); + mpHelperImpl->AddStates( _nInitialStates ); +} + AccessibleStateSetHelper::AccessibleStateSetHelper (const AccessibleStateSetHelper& rHelper) : mpHelperImpl(NULL) { |