diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 09:36:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 15:21:54 +0100 |
commit | d3050b7e9ff741dec96f374a71f33774f32274b1 (patch) | |
tree | 291cfff711288475556a39d0eb5de708cee363ac /unotools/source/accessibility/accessiblestatesethelper.cxx | |
parent | 386cc4f05131c81024779e040019b79330b4dcaf (diff) |
use tunnel pattern here
Diffstat (limited to 'unotools/source/accessibility/accessiblestatesethelper.cxx')
-rw-r--r-- | unotools/source/accessibility/accessiblestatesethelper.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx index f4705c5e25bc..9229e1c4045c 100644 --- a/unotools/source/accessibility/accessiblestatesethelper.cxx +++ b/unotools/source/accessibility/accessiblestatesethelper.cxx @@ -31,8 +31,8 @@ #include "unotools/accessiblestatesethelper.hxx" -#include <rtl/uuid.h> #include <tools/debug.hxx> +#include <comphelper/servicehelper.hxx> // defines how many states the bitfield can contain // it has the size of 64 because I use a uInt64 @@ -310,18 +310,16 @@ uno::Sequence< ::com::sun::star::uno::Type> return aTypeSequence; } +namespace +{ + class theAccessibleStateSetHelperUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theAccessibleStateSetHelperUnoTunnelId > {}; +} + uno::Sequence<sal_Int8> SAL_CALL AccessibleStateSetHelper::getImplementationId (void) throw (::com::sun::star::uno::RuntimeException) { - osl::MutexGuard aGuard (maMutex); - static uno::Sequence<sal_Int8> aId; - if (aId.getLength() == 0) - { - aId.realloc (16); - rtl_createUuid ((sal_uInt8 *)aId.getArray(), 0, sal_True); - } - return aId; + return theAccessibleStateSetHelperUnoTunnelId::get().getSeq(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |