diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 15:55:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 17:39:58 +0100 |
commit | af277041412ee8dcfa6a02a147efd89ae843d61b (patch) | |
tree | e70eaaaed6b10847f778fad979fb6c92fc369134 /sfx2 | |
parent | 8150f5064f080710d89cd21b731bccbd2f490917 (diff) |
sfx2: simplify deprecated XTypeProvider.getImplementationId
Change-Id: I7d98f0d3f101d7441e83d37f0ee36a74b991a996
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/qa/complex/sfx2/UndoManager.java | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 25 |
3 files changed, 3 insertions, 39 deletions
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java index 52f062600f48..faa280dd9824 100644 --- a/sfx2/qa/complex/sfx2/UndoManager.java +++ b/sfx2/qa/complex/sfx2/UndoManager.java @@ -1435,7 +1435,7 @@ public class UndoManager public byte[] getImplementationId() { - return getClass().toString().getBytes(); + return new byte[0]; } } diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index 8fc7d6533c77..4a97a13c847b 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -299,20 +299,7 @@ css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes() css::uno::Sequence< sal_Int8 > SAL_CALL BackingComp::getImplementationId() throw(css::uno::RuntimeException, std::exception) { - static ::cppu::OImplementationId* pID = NULL; - if (!pID) - { - /* GLOBAL SAFE { */ - ::osl::MutexGuard aLock(::osl::Mutex::getGlobalMutex()); - // Control these pointer again ... it can be, that another instance will be faster then this one! - if (!pID) - { - static ::cppu::OImplementationId aID(false); - pID = &aID; - } - /* } GLOBAL SAFE */ - } - return pID->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } OUString SAL_CALL BackingComp::getImplementationName() diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 78d26f556885..26dc24dae2c6 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -615,30 +615,7 @@ Sequence< uno::Type > SAL_CALL SfxBaseModel::getTypes() throw( RuntimeException, Sequence< sal_Int8 > SAL_CALL SfxBaseModel::getImplementationId() throw( RuntimeException, std::exception ) { - // Create one Id for all instances of this class. - // Use ethernet address to do this! (sal_True) - - // Optimize this method - // We initialize a static variable only one time. And we don't must use a mutex at every call! - // For the first call; pID is NULL - for the second call pID is different from NULL! - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ; - - // Control these pointer again ... it can be, that another instance will be faster then these! - if ( pID == NULL ) - { - // Create a new static ID ... - static ::cppu::OImplementationId aID( false ) ; - // ... and set his address to static pointer! - pID = &aID ; - } - } - - return pID->getImplementationId() ; + return css::uno::Sequence<sal_Int8>(); } |