summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-03 08:49:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-03 08:49:45 +0100
commit10ff4adcef1a4836245657d7c7ec41ce66f61e93 (patch)
tree3b1159eba07d3f0ca21cee8cf5c1cd40895b8510 /sd/source/ui/unoidl
parent4f95f23d8b9e0c5fcea663d7477c4c8aef7e2049 (diff)
use standard template for this here
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx20
-rw-r--r--sd/source/ui/unoidl/unopage.cxx36
-rw-r--r--sd/source/ui/unoidl/unopback.cxx1
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx1
4 files changed, 21 insertions, 37 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 660e6173b8df..a382a7aab057 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -41,11 +41,10 @@
#include <com/sun/star/presentation/XPresentation2.hpp>
#include <osl/mutex.hxx>
-#include <comphelper/serviceinfohelper.hxx>
-
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
+#include <comphelper/serviceinfohelper.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
#include <editeng/unofield.hxx>
#include <unomodel.hxx>
@@ -388,17 +387,14 @@ uno::Sequence< uno::Type > SAL_CALL SdXImpressDocument::getTypes( ) throw(uno::
return maTypeSequence;
}
-uno::Sequence< sal_Int8 > SAL_CALL SdXImpressDocument::getImplementationId( ) throw(uno::RuntimeException)
+namespace
{
- ::SolarMutexGuard aGuard;
+ class theSdXImpressDocumentImplementationId : public rtl::Static< UnoTunnelIdInit, theSdXImpressDocumentImplementationId > {};
+}
- static uno::Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+uno::Sequence< sal_Int8 > SAL_CALL SdXImpressDocument::getImplementationId( ) throw(uno::RuntimeException)
+{
+ return theSdXImpressDocumentImplementationId::get().getSeq();
}
/***********************************************************************
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 6e5623564c44..a2eec92fcdc4 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/presentation/EffectNodeType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/servicehelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/metaact.hxx>
@@ -61,7 +62,6 @@
#include <svx/svdorect.hxx>
#include <osl/mutex.hxx>
#include <svl/style.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
#include <comphelper/serviceinfohelper.hxx>
@@ -2122,19 +2122,14 @@ Sequence< uno::Type > SAL_CALL SdDrawPage::getTypes() throw(uno::RuntimeExceptio
return maTypeSequence;
}
-Sequence< sal_Int8 > SAL_CALL SdDrawPage::getImplementationId() throw(uno::RuntimeException)
+namespace
{
- ::SolarMutexGuard aGuard;
-
- throwIfDisposed();
+ class theSdDrawPageImplementationId : public rtl::Static< UnoTunnelIdInit, theSdDrawPageImplementationId > {};
+}
- static Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+Sequence< sal_Int8 > SAL_CALL SdDrawPage::getImplementationId() throw(uno::RuntimeException)
+{
+ return theSdDrawPageImplementationId::get().getSeq();
}
OUString SdDrawPage::getPageApiName( SdPage* pPage )
@@ -2781,19 +2776,14 @@ Sequence< uno::Type > SAL_CALL SdMasterPage::getTypes() throw(uno::RuntimeExcept
return maTypeSequence;
}
-Sequence< sal_Int8 > SAL_CALL SdMasterPage::getImplementationId() throw(uno::RuntimeException)
+namespace
{
- ::SolarMutexGuard aGuard;
-
- throwIfDisposed();
+ class theSdMasterPageImplementationId : public rtl::Static< UnoTunnelIdInit, theSdMasterPageImplementationId > {};
+}
- static Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+Sequence< sal_Int8 > SAL_CALL SdMasterPage::getImplementationId() throw(uno::RuntimeException)
+{
+ return theSdMasterPageImplementationId::get().getSeq();
}
// XServiceInfo
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 190a83a995b1..24472bee52fb 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -34,7 +34,6 @@
#include <svl/itemset.hxx>
#include <svx/svdpool.hxx>
#include <comphelper/extract.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
#include <svx/xflbstit.hxx>
#include <svx/xflbmtit.hxx>
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index cb895b16b1f7..d43fec1e982b 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -37,7 +37,6 @@
#include <editeng/unotext.hxx>
#include <comphelper/extract.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
#include "unohelp.hxx"