diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 08:58:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 08:59:23 +0100 |
commit | 1349f49a72be947aa708e7bcbc7de773894c5684 (patch) | |
tree | cba3030ba8f215b98b23832920f1e5afce4c8bd5 | |
parent | ddc9595b3145e7af0958b52f47bf80bddf877a8e (diff) |
Use cppu::OImplementationId for XUnoTunnel IDs
Change-Id: I564ec761b7a7b3488682acfb3aff56beb3f68213
-rw-r--r-- | package/inc/ZipPackageFolder.hxx | 2 | ||||
-rw-r--r-- | package/inc/ZipPackageStream.hxx | 2 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 10 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 11 |
4 files changed, 10 insertions, 15 deletions
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx index db0a6aa9a79d..251c934894bf 100644 --- a/package/inc/ZipPackageFolder.hxx +++ b/package/inc/ZipPackageFolder.hxx @@ -74,7 +74,7 @@ public: 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 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 setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; } diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx index 1e25d123d223..56ed22cf2744 100644 --- a/package/inc/ZipPackageStream.hxx +++ b/package/inc/ZipPackageStream.hxx @@ -155,7 +155,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData() 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 virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream ) diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index d4d137499697..b71d34ae15a2 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/packages/zip/ZipConstants.hpp> #include <com/sun/star/embed/StorageFormats.hpp> #include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/typeprovider.hxx> #include <osl/diagnose.h> #include <osl/time.h> #include <rtl/digest.h> @@ -57,7 +58,7 @@ using namespace ::com::sun::star; #define THROW_WHERE "" #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, sal_Bool bAllowRemoveOnInsert ) @@ -74,9 +75,6 @@ ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat, aEntry.nCompressedSize = 0; aEntry.nSize = 0; aEntry.nOffset = -1; - uno::Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get(); - if ( !rCachedImplId.getLength() ) - rCachedImplId = getImplementationId(); } ZipPackageFolder::~ZipPackageFolder() @@ -178,9 +176,9 @@ void ZipPackageFolder::copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource) 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 diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d6355761d1e2..02e8047427f9 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -42,6 +42,7 @@ #include <comphelper/seekableinput.hxx> #include <comphelper/storagehelper.hxx> #include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/typeprovider.hxx> #include <rtl/instance.hxx> @@ -60,11 +61,11 @@ using namespace cppu; #define THROW_WHERE "" #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, @@ -103,10 +104,6 @@ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage, aEntry.nOffset = -1; aEntry.nPathLen = -1; aEntry.nExtraLen = -1; - - Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get(); - if ( !rCachedImplId.getLength() ) - rCachedImplId = getImplementationId(); } ZipPackageStream::~ZipPackageStream( void ) |