Kaydet (Commit) 62fae8bd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

svtools: simplify deprecated XTypeProvider.getImplementationId

Change-Id: I2534ad4a720dd5d13324ac6fb19b8676ae50ff4e
üst ecc65fb2
...@@ -179,8 +179,6 @@ public: ...@@ -179,8 +179,6 @@ public:
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception ); getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException, std::exception );
private:
static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
protected: protected:
/// @Return the object's current bounding box relative to the desktop. /// @Return the object's current bounding box relative to the desktop.
......
...@@ -379,7 +379,7 @@ Sequence< OUString > SAL_CALL SvtRulerAccessible::getSupportedServiceNames( void ...@@ -379,7 +379,7 @@ Sequence< OUString > SAL_CALL SvtRulerAccessible::getSupportedServiceNames( void
//===== XTypeProvider ======================================================= //===== XTypeProvider =======================================================
Sequence< sal_Int8 > SAL_CALL SvtRulerAccessible::getImplementationId( void ) throw( RuntimeException, std::exception ) Sequence< sal_Int8 > SAL_CALL SvtRulerAccessible::getImplementationId( void ) throw( RuntimeException, std::exception )
{ {
return getUniqueId(); return css::uno::Sequence<sal_Int8>();
} }
void SAL_CALL SvtRulerAccessible::disposing() void SAL_CALL SvtRulerAccessible::disposing()
...@@ -425,21 +425,6 @@ Rectangle SvtRulerAccessible::GetBoundingBox( void ) throw( RuntimeException ) ...@@ -425,21 +425,6 @@ Rectangle SvtRulerAccessible::GetBoundingBox( void ) throw( RuntimeException )
return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() ); return Rectangle( mpRepr->GetPosPixel(), mpRepr->GetSizePixel() );
} }
Sequence< sal_Int8 > SvtRulerAccessible::getUniqueId( void )
{
static OImplementationId* pId = 0;
if( !pId )
{
MutexGuard aGuard( Mutex::getGlobalMutex() );
if( !pId)
{
static OImplementationId aId;
pId = &aId;
}
}
return pId->getImplementationId();
}
void SvtRulerAccessible::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException ) void SvtRulerAccessible::ThrowExceptionIfNotAlive( void ) throw( lang::DisposedException )
{ {
if( IsNotAlive() ) if( IsNotAlive() )
......
...@@ -278,15 +278,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicDescriptor::getTypes() ...@@ -278,15 +278,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicDescriptor::getTypes()
return aTypes; return aTypes;
} }
namespace
{
class theGraphicDescriptorUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicDescriptorUnoTunnelId > {};
}
uno::Sequence< sal_Int8 > SAL_CALL GraphicDescriptor::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL GraphicDescriptor::getImplementationId()
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException, std::exception )
{ {
return theGraphicDescriptorUnoTunnelId::get().getSeq(); return css::uno::Sequence<sal_Int8>();
} }
......
...@@ -99,21 +99,6 @@ void SAL_CALL Graphic::release() throw() ...@@ -99,21 +99,6 @@ void SAL_CALL Graphic::release() throw()
::unographic::GraphicDescriptor::release(); ::unographic::GraphicDescriptor::release();
} }
namespace
{
class theGraphicUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicUnoTunnelId > {};
}
uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId_Static()
throw(uno::RuntimeException)
{
return theGraphicUnoTunnelId::get().getSeq();
}
OUString Graphic::getImplementationName_Static() OUString Graphic::getImplementationName_Static()
throw() throw()
{ {
...@@ -177,7 +162,7 @@ uno::Sequence< uno::Type > SAL_CALL Graphic::getTypes() ...@@ -177,7 +162,7 @@ uno::Sequence< uno::Type > SAL_CALL Graphic::getTypes()
uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId()
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
{ {
return getImplementationId_Static(); return css::uno::Sequence<sal_Int8>();
} }
......
...@@ -45,7 +45,6 @@ public: ...@@ -45,7 +45,6 @@ public:
void init( const ::Graphic& rGraphic ) throw(); void init( const ::Graphic& rGraphic ) throw();
static const ::Graphic* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw(); static const ::Graphic* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIFace ) throw();
static ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId_Static( ) throw(::com::sun::star::uno::RuntimeException);
static OUString getImplementationName_Static() throw(); static OUString getImplementationName_Static() throw();
static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(); static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw();
......
...@@ -91,15 +91,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes() ...@@ -91,15 +91,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes()
return aTypes; return aTypes;
} }
namespace
{
class theGraphicProviderUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicProviderUnoTunnelId > {};
}
uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
throw(uno::RuntimeException, std::exception) throw(uno::RuntimeException, std::exception)
{ {
return theGraphicProviderUnoTunnelId::get().getSeq(); return css::uno::Sequence<sal_Int8>();
} }
......
...@@ -146,15 +146,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicRendererVCL::getTypes() ...@@ -146,15 +146,10 @@ uno::Sequence< uno::Type > SAL_CALL GraphicRendererVCL::getTypes()
return aTypes; return aTypes;
} }
namespace
{
class theGraphicRendererVCLUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicRendererVCLUnoTunnelId > {};
}
uno::Sequence< sal_Int8 > SAL_CALL GraphicRendererVCL::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL GraphicRendererVCL::getImplementationId()
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException, std::exception )
{ {
return theGraphicRendererVCLUnoTunnelId::get().getSeq(); return css::uno::Sequence<sal_Int8>();
} }
......
...@@ -161,20 +161,7 @@ uno::Sequence< uno::Type > SAL_CALL VCLXHatchWindow::getTypes() ...@@ -161,20 +161,7 @@ uno::Sequence< uno::Type > SAL_CALL VCLXHatchWindow::getTypes()
uno::Sequence< sal_Int8 > SAL_CALL VCLXHatchWindow::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL VCLXHatchWindow::getImplementationId()
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException, std::exception )
{ {
static ::cppu::OImplementationId* pID = NULL ; return css::uno::Sequence<sal_Int8>();
if ( pID == NULL )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
if ( pID == NULL )
{
static ::cppu::OImplementationId aID( false ) ;
pID = &aID ;
}
}
return pID->getImplementationId() ;
} }
::com::sun::star::awt::Size SAL_CALL VCLXHatchWindow::getHatchBorderSize() throw (::com::sun::star::uno::RuntimeException, std::exception) ::com::sun::star::awt::Size SAL_CALL VCLXHatchWindow::getHatchBorderSize() throw (::com::sun::star::uno::RuntimeException, std::exception)
......
...@@ -89,8 +89,7 @@ namespace { ...@@ -89,8 +89,7 @@ namespace {
Sequence<sal_Int8> SAL_CALL OAddressBookSourceDialogUno::getImplementationId( ) throw(RuntimeException, std::exception) Sequence<sal_Int8> SAL_CALL OAddressBookSourceDialogUno::getImplementationId( ) throw(RuntimeException, std::exception)
{ {
static ::cppu::OImplementationId aId; return css::uno::Sequence<sal_Int8>();
return aId.getImplementationId();
} }
......
...@@ -361,15 +361,10 @@ uno::Sequence< uno::Type > SAL_CALL SvUnoImageMapObject::getTypes() ...@@ -361,15 +361,10 @@ uno::Sequence< uno::Type > SAL_CALL SvUnoImageMapObject::getTypes()
return aTypes; return aTypes;
} }
namespace
{
class theSvUnoImageMapObjectImplementationId : public rtl::Static< UnoTunnelIdInit, theSvUnoImageMapObjectImplementationId > {};
}
uno::Sequence< sal_Int8 > SAL_CALL SvUnoImageMapObject::getImplementationId() uno::Sequence< sal_Int8 > SAL_CALL SvUnoImageMapObject::getImplementationId()
throw (uno::RuntimeException, std::exception) throw (uno::RuntimeException, std::exception)
{ {
return theSvUnoImageMapObjectImplementationId::get().getSeq(); return css::uno::Sequence<sal_Int8>();
} }
// XServiceInfo // XServiceInfo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment