diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 09:33:39 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 09:33:39 +0000 |
commit | d8dc0ff26a2a1b02756b78a48be40e76293f4b3a (patch) | |
tree | d5ae01570da2cdd67cf9273ee44c7f9b77c7d2a6 /package | |
parent | c9a0a5b518f4e85ec1832d4804be102b820ef60d (diff) |
INTEGRATION: CWS jl93 (1.112.8); FILE MERGED
2008/05/05 13:28:10 jl 1.112.8.2: RESYNC: (1.112-1.113); FILE MERGED
2008/04/08 15:43:28 mav 1.112.8.1: #i86651# add Version property
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 5adf65f173d4..531feb4420b8 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ZipPackage.cxx,v $ - * $Revision: 1.113 $ + * $Revision: 1.114 $ * * This file is part of OpenOffice.org. * @@ -237,6 +237,7 @@ void ZipPackage::parseManifest() if ( xReader.is() ) { const OUString sPropFullPath ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) ); + const OUString sPropVersion ( RTL_CONSTASCII_USTRINGPARAM ( "Version" ) ); const OUString sPropMediaType ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) ); const OUString sPropInitialisationVector ( RTL_CONSTASCII_USTRINGPARAM ( "InitialisationVector" ) ); const OUString sPropSalt ( RTL_CONSTASCII_USTRINGPARAM ( "Salt" ) ); @@ -252,13 +253,15 @@ void ZipPackage::parseManifest() for (sal_Int32 i = 0; i < nLength ; i++, pSequence++) { - OUString sPath, sMediaType; + OUString sPath, sMediaType, sVersion; const PropertyValue *pValue = pSequence->getConstArray(); const Any *pSalt = NULL, *pVector = NULL, *pCount = NULL, *pSize = NULL, *pDigest = NULL; for (sal_Int32 j = 0, nNum = pSequence->getLength(); j < nNum; j++ ) { if (pValue[j].Name.equals( sPropFullPath ) ) pValue[j].Value >>= sPath; + else if (pValue[j].Name.equals( sPropVersion ) ) + pValue[j].Value >>= sVersion; else if (pValue[j].Name.equals( sPropMediaType ) ) pValue[j].Value >>= sMediaType; else if (pValue[j].Name.equals( sPropSalt ) ) @@ -282,6 +285,7 @@ void ZipPackage::parseManifest() { pFolder = reinterpret_cast < ZipPackageFolder* > ( nTest ); pFolder->SetMediaType ( sMediaType ); + pFolder->SetVersion ( sVersion ); } else { @@ -1009,15 +1013,18 @@ sal_Bool ZipPackage::writeFileIsTemp() // until the call to ZipOutputStream->finish() uno::Reference < XOutputStream > xManOutStream; const OUString sMediaType ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) ); + const OUString sVersion ( RTL_CONSTASCII_USTRINGPARAM ( "Version" ) ); const OUString sFullPath ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) ); if ( m_nFormat == PACKAGE_FORMAT ) { - Sequence < PropertyValue > aPropSeq ( 2 ); - aPropSeq [0].Name = sMediaType; - aPropSeq [0].Value <<= pRootFolder->GetMediaType( ); - aPropSeq [1].Name = sFullPath; - aPropSeq [1].Value <<= OUString ( RTL_CONSTASCII_USTRINGPARAM ( "/" ) ); + Sequence < PropertyValue > aPropSeq ( PKG_SIZE_NOENCR_MNFST ); + aPropSeq [PKG_MNFST_MEDIATYPE].Name = sMediaType; + aPropSeq [PKG_MNFST_MEDIATYPE].Value <<= pRootFolder->GetMediaType( ); + aPropSeq [PKG_MNFST_VERSION].Name = sVersion; + aPropSeq [PKG_MNFST_VERSION].Value <<= pRootFolder->GetVersion( ); + aPropSeq [PKG_MNFST_FULLPATH].Name = sFullPath; + aPropSeq [PKG_MNFST_FULLPATH].Value <<= OUString ( RTL_CONSTASCII_USTRINGPARAM ( "/" ) ); aManList.push_back( aPropSeq ); } |