diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 16:15:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 17:39:59 +0100 |
commit | 3b0b4ac5fc16a5f5568dd4da63818723b6d1d6fd (patch) | |
tree | a4e997e80b83d4e9a5c1767f5af285eea2acf781 /svx | |
parent | 62fae8bda81508828cca4ed8d2911961ce1971a4 (diff) |
svx: simplify deprecated XTypeProvider.getImplementationId
Change-Id: I520563a98c1285fed97174d2aaedfdd042ca699f
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/GraphCtlAccessibleContext.cxx | 23 | ||||
-rw-r--r-- | svx/source/accessibility/svxrectctaccessiblecontext.cxx | 29 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 24 | ||||
-rw-r--r-- | svx/source/form/fmdpage.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/xfm_addcondition.cxx | 12 | ||||
-rw-r--r-- | svx/source/inc/GraphCtlAccessibleContext.hxx | 2 | ||||
-rw-r--r-- | svx/source/inc/svxrectctaccessiblecontext.hxx | 2 | ||||
-rw-r--r-- | svx/source/table/cell.cxx | 12 | ||||
-rw-r--r-- | svx/source/unodraw/unomod.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 28 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap3.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 38 | ||||
-rw-r--r-- | svx/source/unogallery/unogalitem.cxx | 7 | ||||
-rw-r--r-- | svx/source/unogallery/unogaltheme.cxx | 7 | ||||
-rw-r--r-- | svx/source/unogallery/unogalthemeprovider.cxx | 7 |
18 files changed, 22 insertions, 226 deletions
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index c5951c5335a6..ef06ecdc32a1 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -581,8 +581,7 @@ Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedService //===== XTypeProvider ======================================================= Sequence<sal_Int8> SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId( void ) throw( RuntimeException, std::exception ) { - ::SolarMutexGuard aGuard; - return getUniqueId(); + return css::uno::Sequence<sal_Int8>(); } //===== XServiceName ======================================================== @@ -829,26 +828,6 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox( void ) throw( RuntimeEx return aBounds; } - - -Sequence< sal_Int8 > SvxGraphCtrlAccessibleContext::getUniqueId( void ) -{ - // no guard because it's private -> has to guarded when using it! - static OImplementationId* pId = 0; - if( !pId ) - { - ::SolarMutexGuard aGuard; - if( !pId) - { - static OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); -} - - - void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint ); diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index f783ac680883..56ac207ada69 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -543,7 +543,7 @@ Sequence< OUString > SAL_CALL SvxRectCtlAccessibleContext::getSupportedServiceNa Sequence< sal_Int8 > SAL_CALL SvxRectCtlAccessibleContext::getImplementationId( void ) throw( RuntimeException, std::exception ) { - return getUniqueId(); + return css::uno::Sequence<sal_Int8>(); } //===== XAccessibleSelection ============================================= @@ -761,21 +761,6 @@ Rectangle SvxRectCtlAccessibleContext::GetBoundingBox( void ) throw( RuntimeExce return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); } -Sequence< sal_Int8 > SvxRectCtlAccessibleContext::getUniqueId( void ) -{ - static OImplementationId* pId = 0; - if( !pId ) - { - MutexGuard aGuard( Mutex::getGlobalMutex() ); - if( !pId) - { - static OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); -} - void SvxRectCtlAccessibleContext::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException ) { if( IsNotAlive() ) @@ -1154,17 +1139,7 @@ Sequence< OUString > SAL_CALL SvxRectCtlChildAccessibleContext::getSupportedServ //===== XTypeProvider ======================================================= Sequence< sal_Int8 > SAL_CALL SvxRectCtlChildAccessibleContext::getImplementationId( void ) throw( RuntimeException, std::exception ) { - static OImplementationId* pId = 0; - if( !pId ) - { - MutexGuard aGuard( Mutex::getGlobalMutex() ); - if( !pId) - { - static OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } //===== internal ============================================================ diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 90ab712129e2..933844cc13a0 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -391,17 +391,7 @@ Sequence< Type> SAL_CALL FmXGridControl::getTypes( ) throw(RuntimeException, st Sequence<sal_Int8> SAL_CALL FmXGridControl::getImplementationId( ) throw(RuntimeException, std::exception) { - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } // XServiceInfo @@ -1062,17 +1052,7 @@ Sequence< Type> SAL_CALL FmXGridPeer::getTypes( ) throw(RuntimeException, std:: Sequence<sal_Int8> SAL_CALL FmXGridPeer::getImplementationId( ) throw(RuntimeException, std::exception) { - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx index aa3fb0874ebf..2e5a341a1a26 100644 --- a/svx/source/form/fmdpage.cxx +++ b/svx/source/form/fmdpage.cxx @@ -40,17 +40,7 @@ SvxFmDrawPage::~SvxFmDrawPage() throw () ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL SvxFmDrawPage::getImplementationId() throw(::com::sun::star::uno::RuntimeException, std::exception) { - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } Any SAL_CALL SvxFmDrawPage::queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(RuntimeException, std::exception) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 20cee166cc02..a9f4eaf14c92 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -766,17 +766,7 @@ Sequence< Type > SAL_CALL FmXFormShell::getTypes( ) throw(RuntimeException, std Sequence< sal_Int8 > SAL_CALL FmXFormShell::getImplementationId() throw(RuntimeException, std::exception) { - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } // EventListener diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 21dc44df0650..6ae3b39ebcfa 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -659,17 +659,7 @@ Any SAL_CALL FormController::queryInterface( const Type& _rType ) throw(RuntimeE Sequence< sal_Int8 > SAL_CALL FormController::getImplementationId() throw( RuntimeException, std::exception ) { - static ::cppu::OImplementationId* pId = NULL; - if ( !pId ) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( !pId ) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } Sequence< Type > SAL_CALL FormController::getTypes( ) throw(RuntimeException, std::exception) diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx index 9391d0161e89..f8c01420793a 100644 --- a/svx/source/form/xfm_addcondition.cxx +++ b/svx/source/form/xfm_addcondition.cxx @@ -106,17 +106,7 @@ namespace svxform Sequence<sal_Int8> SAL_CALL OAddConditionDialog::getImplementationId( ) throw(RuntimeException, std::exception) { - static ::cppu::OImplementationId * pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 9507cdee7478..17c5ff535019 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -185,8 +185,6 @@ public: */ void setModelAndView (SdrModel* pModel, SdrView* pView); -private: - static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void ); protected: /** Return the object's current bounding box relative to the desktop, diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 7834b8d4b37b..dd2043e25445 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -255,8 +255,6 @@ public: void selectChild( RECT_POINT ePoint, sal_Bool bFireFocus = sal_True ); void FireChildFocus( RECT_POINT eButton ); -private: - static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void ); protected: /// @Return the object's current bounding box relative to the desktop. diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index af3da32c5a43..c58b18175453 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -855,17 +855,7 @@ Sequence< Type > SAL_CALL Cell::getTypes( ) throw (RuntimeException, std::excep Sequence< sal_Int8 > SAL_CALL Cell::getImplementationId( ) throw (RuntimeException, std::exception) { - static ::cppu::OImplementationId* pId = 0; - if (! pId) - { - ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if (! pId) - { - static ::cppu::OImplementationId aId; - pId = &aId; - } - } - return pId->getImplementationId(); + return css::uno::Sequence<sal_Int8>(); } // XServiceInfo diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 9f433a7ac0ff..1f18880693fa 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -310,14 +310,9 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( ) throw(uno:: return maTypeSequence; } -namespace -{ - class theSvxUnoDrawingModelImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxUnoDrawingModelImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawingModel::getImplementationId( ) throw(uno::RuntimeException, std::exception) { - return theSvxUnoDrawingModelImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } void SAL_CALL SvxUnoDrawingModel::lockControllers( ) diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 66cb8e48568e..4a14b589b2dd 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -382,15 +382,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes() return aTypes; } -namespace -{ - class theSvxUnoDrawPoolImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxUnoDrawPoolImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawPool::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvxUnoDrawPoolImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } // XServiceInfo diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index a59c509bdb22..14bf98a507a1 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -131,15 +131,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxShapeGroup::getTypes() return SvxShape::getTypes(); } -namespace -{ - class theSvxShapeGroupImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxShapeGroupImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxShapeGroup::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvxShapeGroupImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } // ::com::sun::star::drawing::XShape @@ -426,15 +421,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxShapeConnector::getTypes() return SvxShape::getTypes(); } -namespace -{ - class theSvxShapeConnectorImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxShapeConnectorImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxShapeConnector::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvxShapeConnectorImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } // ::com::sun::star::drawing::XShape @@ -590,15 +580,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxShapeControl::getTypes() return SvxShape::getTypes(); } -namespace -{ - class theSvxShapeControlImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxShapeControlImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxShapeControl::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvxShapeControlImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } // ::com::sun::star::drawing::XShape @@ -1790,15 +1775,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxCustomShape::getTypes() return SvxShapeText::getTypes(); } -namespace -{ - class theSvxCustomShapeImplementationId : public rtl::Static< UnoTunnelIdInit, theSvxCustomShapeImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL SvxCustomShape::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvxCustomShapeImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } // ::com::sun::star::drawing::XShape diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index e5e37687b79e..765d19fe4ef4 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -117,15 +117,10 @@ uno::Sequence< uno::Type > SAL_CALL Svx3DSceneObject::getTypes() return SvxShape::getTypes(); } -namespace -{ - class theSvx3DSceneObjectImplementationId : public rtl::Static< UnoTunnelIdInit, theSvx3DSceneObjectImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL Svx3DSceneObject::getImplementationId() throw (uno::RuntimeException, std::exception) { - return theSvx3DSceneObjectImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 71a82eb9ed7e..962df11958d4 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1024,24 +1024,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() uno::Sequence< sal_Int8 > SAL_CALL SvxShape::getImplementationId() throw (uno::RuntimeException, std::exception) { - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - 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>(); } @@ -4095,24 +4078,7 @@ sal_Int64 SAL_CALL SvxShapeText::getSomething( const ::com::sun::star::uno::Sequ uno::Sequence< sal_Int8 > SAL_CALL SvxShapeText::getImplementationId() throw( uno::RuntimeException, std::exception ) { - static ::cppu::OImplementationId* pID = NULL ; - - if ( pID == NULL ) - { - // Ready for multithreading; get global mutex for first call of this method only! see before - 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>(); } diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index e0c138fb92fb..1f116e9ef874 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -178,15 +178,10 @@ uno::Sequence< uno::Type > SAL_CALL GalleryItem::getTypes() return aTypes; } -namespace -{ - class theGalleryItemImplementationId : public rtl::Static< UnoTunnelIdInit, theGalleryItemImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL GalleryItem::getImplementationId() throw(uno::RuntimeException, std::exception) { - return theGalleryItemImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index 56a00946e438..9e43d0d0cd93 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -123,15 +123,10 @@ uno::Sequence< uno::Type > SAL_CALL GalleryTheme::getTypes() return aTypes; } -namespace -{ - class theGalleryThemeImplementationId : public rtl::Static< UnoTunnelIdInit, theGalleryThemeImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL GalleryTheme::getImplementationId() throw(uno::RuntimeException, std::exception) { - return theGalleryThemeImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index f4054292c4d1..c82520590e21 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -80,15 +80,10 @@ uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes() return aTypes; } -namespace -{ - class theGalleryThemeProviderImplementationId : public rtl::Static< UnoTunnelIdInit, theGalleryThemeProviderImplementationId > {}; -} - uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId() throw(uno::RuntimeException, std::exception) { - return theGalleryThemeProviderImplementationId::get().getSeq(); + return css::uno::Sequence<sal_Int8>(); } void SAL_CALL GalleryThemeProvider::initialize( const uno::Sequence< uno::Any >& rArguments ) |