diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 10:02:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-01 15:21:54 +0100 |
commit | d248451ca3e7599145103be6c79c2b78699f12c9 (patch) | |
tree | df3ee19a784c41344297c569d56dd851d1652de0 /svtools/source/graphic/graphic.cxx | |
parent | d3050b7e9ff741dec96f374a71f33774f32274b1 (diff) |
use tunnel pattern here
Diffstat (limited to 'svtools/source/graphic/graphic.cxx')
-rw-r--r-- | svtools/source/graphic/graphic.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index 19c8d904b3d9..cf212d9d8fce 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -29,13 +29,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <rtl/uuid.h> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/graphic/GraphicType.hpp> #include <com/sun/star/graphic/XGraphicTransformer.hpp> #include <vcl/graph.hxx> #include "graphic.hxx" +#include <comphelper/servicehelper.hxx> using namespace com::sun::star; @@ -114,19 +114,15 @@ void SAL_CALL Graphic::release() throw() // ------------------------------------------------------------------------------ +namespace +{ + class theGraphicUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicUnoTunnelId > {}; +} + uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId_Static() throw(uno::RuntimeException) { - SolarMutexGuard aGuard; - static uno::Sequence< sal_Int8 > aId; - - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True ); - } - - return aId; + return theGraphicUnoTunnelId::get().getSeq(); } // ------------------------------------------------------------------------------ |