diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-20 12:34:42 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-11-17 10:49:20 +0100 |
commit | 15678e7483369fae400c3b289c85e63001b3d131 (patch) | |
tree | 65d1177b77b07eba6b2ada6b9e613a5572a7a0e7 /package | |
parent | ad91cfdcf256f5af159f2f18d3b83f17b91849dc (diff) |
ZipPackageFolder: releaseUpwardRef only calls clearParent, remove it.
Since commit 0c5bb3f42d38b3c16015dc0a45defd1b1dad4f92.
Change-Id: I5511f9dc829aca42790f05cb8fb3ebd83b2acad4
Diffstat (limited to 'package')
-rw-r--r-- | package/inc/ZipPackageFolder.hxx | 1 | ||||
-rw-r--r-- | package/source/zippackage/ContentInfo.hxx | 2 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageFolder.cxx | 29 |
3 files changed, 1 insertions, 31 deletions
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx index 52a64e6dee02..1f4e84db7442 100644 --- a/package/inc/ZipPackageFolder.hxx +++ b/package/inc/ZipPackageFolder.hxx @@ -82,7 +82,6 @@ public: const com::sun::star::uno::Sequence< sal_Int8 > &rEncryptionKey, const rtlRandomPool & rRandomPool) const throw(::com::sun::star::uno::RuntimeException); - void releaseUpwardRef(); // XNameContainer virtual void SAL_CALL insertByName( const OUString& aName, const ::com::sun::star::uno::Any& aElement ) diff --git a/package/source/zippackage/ContentInfo.hxx b/package/source/zippackage/ContentInfo.hxx index 191199966fed..4b66395377ef 100644 --- a/package/source/zippackage/ContentInfo.hxx +++ b/package/source/zippackage/ContentInfo.hxx @@ -50,7 +50,7 @@ public: virtual ~ContentInfo () { if ( bFolder ) - pFolder->releaseUpwardRef(); + pFolder->clearParent(); else pStream->clearParent(); } diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 4420fdc53383..c2e5a4fa2f9a 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -392,35 +392,6 @@ void ZipPackageFolder::saveContents( throw uno::RuntimeException(THROW_WHERE ); } -void ZipPackageFolder::releaseUpwardRef( void ) -{ - // Now it is possible that a package folder is disconnected from the package before removing of the folder. - // Such a scenario is used in storage implementation. When a new version of a folder is provided the old - // one is retrieved, removed from the package but preserved for the error handling. - // In this scenario the referencing to the parent is not really useful, since it requires disposing. - - // Actually there is no need in having a reference to the parent, it even make things more complicated and - // requires disposing mechanics. Using of a simple pointer seems to be easier solution and also a safe enough. - - clearParent(); - -#if 0 - for ( ContentHash::const_iterator aCI = maContents.begin(); - aCI!=maContents.end(); - aCI++) - { - ContentInfo &rInfo = * (*aCI).second; - if ( rInfo.bFolder )// && ! rInfo.pFolder->HasReleased () ) - rInfo.pFolder->releaseUpwardRef(); - else //if ( !rInfo.bFolder && !rInfo.pStream->HasReleased() ) - rInfo.pStream->clearParent(); - } - clearParent(); - - OSL_ENSURE ( m_refCount == 1, "Ref-count is not 1!" ); -#endif -} - sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) throw(uno::RuntimeException, std::exception) { |