summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoflatpara.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-01 22:40:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 22:40:08 +0100
commit2e846d734bf3965c4104a5baab35a8fa524d42a2 (patch)
treeac2411e81412804dbe51147280db12ddff3d8999 /sw/source/core/unocore/unoflatpara.cxx
parent52388d29994a52f3dea83dbf214e81f9abfc11dc (diff)
use uuid template here instead of hand-rolled ones
Diffstat (limited to 'sw/source/core/unocore/unoflatpara.cxx')
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 17538a119b35..55faa3d11c17 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -53,6 +53,7 @@
#include <pagedesc.hxx>
#include <IGrammarContact.hxx>
#include <viewopt.hxx>
+#include <comphelper/servicehelper.hxx>
using namespace ::com::sun::star;
@@ -78,17 +79,14 @@ uno::Sequence< uno::Type > SwXFlatParagraph::getTypes( ) throw(uno::RuntimeExce
return aTypes;
}
+namespace
+{
+ class theSwXFlatParagraphImplementationId : public rtl::Static< UnoTunnelIdInit, theSwXFlatParagraphImplementationId > {};
+}
+
uno::Sequence< sal_Int8 > SwXFlatParagraph::getImplementationId( ) throw(uno::RuntimeException)
{
- SolarMutexGuard aGuard;
- static uno::Sequence< sal_Int8 > aId( 16 );
- static sal_Bool bInit = sal_False;
- if(!bInit)
- {
- rtl_createUuid( (sal_uInt8 *)(aId.getArray() ), 0, sal_True );
- bInit = sal_True;
- }
- return aId;
+ return theSwXFlatParagraphImplementationId::get().getSeq();
}
uno::Any SAL_CALL SwXFlatParagraph::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
@@ -266,15 +264,17 @@ css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions
return css::uno::Sequence< ::sal_Int32>();
}
+namespace
+{
+ class theSwXFlatParagraphUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSwXFlatParagraphUnoTunnelId > {};
+}
const uno::Sequence< sal_Int8 >&
SwXFlatParagraph::getUnoTunnelId()
{
- static uno::Sequence<sal_Int8> aSeq(CreateUnoTunnelId());
- return aSeq;
+ return theSwXFlatParagraphUnoTunnelId::get().getSeq();
}
-
sal_Int64 SAL_CALL
SwXFlatParagraph::getSomething(
const uno::Sequence< sal_Int8 >& rId)