summaryrefslogtreecommitdiff
path: root/svtools/source/graphic/graphic.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-01 10:02:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:21:54 +0100
commitd248451ca3e7599145103be6c79c2b78699f12c9 (patch)
treedf3ee19a784c41344297c569d56dd851d1652de0 /svtools/source/graphic/graphic.cxx
parentd3050b7e9ff741dec96f374a71f33774f32274b1 (diff)
use tunnel pattern here
Diffstat (limited to 'svtools/source/graphic/graphic.cxx')
-rw-r--r--svtools/source/graphic/graphic.cxx18
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();
}
// ------------------------------------------------------------------------------