diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-03 21:38:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-07 08:58:49 +0100 |
commit | fd7b4908ead77c7f0fb8894cf78401468c5160a9 (patch) | |
tree | 12675a84af01c2c7737b9fa1f6e4bed30e979b3d /editeng/source/uno/unotext2.cxx | |
parent | 830aeb105e5ed34b1fb64a66bc2bc7051a18ff0a (diff) |
use the standard template for this
Diffstat (limited to 'editeng/source/uno/unotext2.cxx')
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index ade10370dc88..af227be6b673 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -30,19 +30,17 @@ #include "precompiled_editeng.hxx" #include <vcl/svapp.hxx> #include <osl/mutex.hxx> +#include <rtl/instance.hxx> #define _SVSTDARR_sal_uIt16S #include <svl/svstdarr.hxx> -#include <rtl/uuid.h> -#include <rtl/memory.h> -#include <rtl/instance.hxx> - #include <editeng/eeitem.hxx> #include <editeng/flditem.hxx> #include <editeng/unofield.hxx> #include <editeng/unotext.hxx> #include <comphelper/serviceinfohelper.hxx> +#include <comphelper/servicehelper.hxx> using namespace ::rtl; using namespace ::cppu; @@ -235,16 +233,15 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextContent::getTypes() return theSvxUnoTextContentTypes::get(); } +namespace +{ + class theSvxUnoTextContentImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxUnoTextContentImplementationId > {}; +} + uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextContent::getImplementationId() throw (uno::RuntimeException) { - 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 theSvxUnoTextContentImplementationId::get().getSeq(); } // text::XTextRange @@ -598,16 +595,15 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextCursor::getTypes() return theSvxUnoTextCursorTypes::get(); } +namespace +{ + class theSvxUnoTextCursorImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxUnoTextCursorImplementationId > {}; +} + uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextCursor::getImplementationId() throw (uno::RuntimeException) { - 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 theSvxUnoTextCursorImplementationId::get().getSeq(); } // text::XTextCursor |