summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 17:24:46 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-02-03 17:24:46 +0000
commit28a0326b6b91d62006ba9319bd7ae59bc6a5af09 (patch)
treee40391ca0b570d96c2c1d01bd04bf3a24e46a968 /package
parent85491fb3db5b9748151c12a28dee1817c290c62a (diff)
INTEGRATION: CWS readstorage (1.62.20); FILE MERGED
2004/01/13 10:13:45 mav 1.62.20.1: #114521# cloning of encrypted storages
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index bc64d901a285..a69e9c58bd92 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageFolder.cxx,v $
*
- * $Revision: 1.63 $
+ * $Revision: 1.64 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 19:21:32 $
+ * last change: $Author: hr $ $Date: 2004-02-03 18:24:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,8 +120,11 @@ using vos::ORef;
Sequence < sal_Int8 > ZipPackageFolder::aImplementationId = Sequence < sal_Int8 > ();
-ZipPackageFolder::ZipPackageFolder ()
+ZipPackageFolder::ZipPackageFolder ( const Reference< XMultiServiceFactory >& xFactory )
+: m_xFactory( xFactory )
{
+ OSL_ENSURE( m_xFactory.is(), "No factory is provided to the package folder!" );
+
SetFolder ( sal_True );
aEntry.nVersion = -1;
aEntry.nFlag = 0;
@@ -540,6 +543,13 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
pStream->SetPackageMember ( sal_True );
}
+ // Remove hacky bit from entry flags
+ if ( pTempEntry->nFlag & ( 1 << 4 ) )
+ {
+ pTempEntry->nFlag &= ~( 1 << 4 );
+ pTempEntry->nMethod = STORED;
+ }
+
// Then copy it back afterwards...
ZipPackageFolder::copyZipEntry ( pStream->aEntry, *pTempEntry );
// all the dangerous stuff has passed, so we can release pTempEntry