Kaydet (Commit) 1349f49a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Use cppu::OImplementationId for XUnoTunnel IDs

Change-Id: I564ec761b7a7b3488682acfb3aff56beb3f68213
üst ddc9595b
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
static void copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource); static void copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource);
static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId(); static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId();
void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; } void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; }
void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; } void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
......
...@@ -155,7 +155,7 @@ public: ...@@ -155,7 +155,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData() ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData()
throw(::com::sun::star::uno::RuntimeException); throw(::com::sun::star::uno::RuntimeException);
static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId(); static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId();
// XActiveDataSink // XActiveDataSink
virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream ) virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream )
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <com/sun/star/packages/zip/ZipConstants.hpp> #include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <com/sun/star/embed/StorageFormats.hpp> #include <com/sun/star/embed/StorageFormats.hpp>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/time.h> #include <osl/time.h>
#include <rtl/digest.h> #include <rtl/digest.h>
...@@ -57,7 +58,7 @@ using namespace ::com::sun::star; ...@@ -57,7 +58,7 @@ using namespace ::com::sun::star;
#define THROW_WHERE "" #define THROW_WHERE ""
#endif #endif
namespace { struct lcl_CachedImplId : public rtl::Static< uno::Sequence < sal_Int8 >, lcl_CachedImplId > {}; } namespace { struct lcl_CachedImplId : public rtl::Static< cppu::OImplementationId, lcl_CachedImplId > {}; }
ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat, ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat,
sal_Bool bAllowRemoveOnInsert ) sal_Bool bAllowRemoveOnInsert )
...@@ -74,9 +75,6 @@ ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat, ...@@ -74,9 +75,6 @@ ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat,
aEntry.nCompressedSize = 0; aEntry.nCompressedSize = 0;
aEntry.nSize = 0; aEntry.nSize = 0;
aEntry.nOffset = -1; aEntry.nOffset = -1;
uno::Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
if ( !rCachedImplId.getLength() )
rCachedImplId = getImplementationId();
} }
ZipPackageFolder::~ZipPackageFolder() ZipPackageFolder::~ZipPackageFolder()
...@@ -178,9 +176,9 @@ void ZipPackageFolder::copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource) ...@@ -178,9 +176,9 @@ void ZipPackageFolder::copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource)
rDest.nExtraLen = rSource.nExtraLen; rDest.nExtraLen = rSource.nExtraLen;
} }
const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageFolder::static_getImplementationId() ::com::sun::star::uno::Sequence < sal_Int8 > ZipPackageFolder::static_getImplementationId()
{ {
return lcl_CachedImplId::get(); return lcl_CachedImplId::get().getImplementationId();
} }
// XNameContainer // XNameContainer
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <comphelper/seekableinput.hxx> #include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
...@@ -60,11 +61,11 @@ using namespace cppu; ...@@ -60,11 +61,11 @@ using namespace cppu;
#define THROW_WHERE "" #define THROW_WHERE ""
#endif #endif
namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; } namespace { struct lcl_CachedImplId : public rtl::Static< cppu::OImplementationId, lcl_CachedImplId > {}; }
const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageStream::static_getImplementationId() ::com::sun::star::uno::Sequence < sal_Int8 > ZipPackageStream::static_getImplementationId()
{ {
return lcl_CachedImplId::get(); return lcl_CachedImplId::get().getImplementationId();
} }
ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage, ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
...@@ -103,10 +104,6 @@ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage, ...@@ -103,10 +104,6 @@ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
aEntry.nOffset = -1; aEntry.nOffset = -1;
aEntry.nPathLen = -1; aEntry.nPathLen = -1;
aEntry.nExtraLen = -1; aEntry.nExtraLen = -1;
Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
if ( !rCachedImplId.getLength() )
rCachedImplId = getImplementationId();
} }
ZipPackageStream::~ZipPackageStream( void ) ZipPackageStream::~ZipPackageStream( void )
......
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