diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 09:32:27 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-05-14 09:32:27 +0000 |
commit | 012af4800756fb75d3a3e6668584a2a847faebdd (patch) | |
tree | 47b94b74602f60ab6bc410c58f1157b4a6adb2a9 /package | |
parent | 5c78558533c6bd946fc1cc35c268ada2c3d8554b (diff) |
INTEGRATION: CWS jl93 (1.16.48); FILE MERGED
2008/05/05 13:28:20 jl 1.16.48.2: RESYNC: (1.16-1.17); FILE MERGED
2008/04/08 15:43:27 mav 1.16.48.1: #i86651# add Version property
Diffstat (limited to 'package')
-rw-r--r-- | package/source/manifest/ManifestExport.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx index 5b34ab0c5..23d760c74 100644 --- a/package/source/manifest/ManifestExport.cxx +++ b/package/source/manifest/ManifestExport.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ManifestExport.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.18 $ * * This file is part of OpenOffice.org. * @@ -65,6 +65,7 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S const OUString sCdataAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CDATA ) ); const OUString sMediaTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_MEDIA_TYPE ) ); + const OUString sVersionAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_VERSION ) ); const OUString sFullPathAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_FULL_PATH ) ); const OUString sSizeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SIZE ) ); const OUString sSaltAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SALT ) ); @@ -76,6 +77,7 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S const OUString sChecksumAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CHECKSUM) ); const OUString sFullPathProperty ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) ); + const OUString sVersionProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Version" ) ); const OUString sMediaTypeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) ); const OUString sIterationCountProperty ( RTL_CONSTASCII_USTRINGPARAM ( "IterationCount" ) ); const OUString sSaltProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Salt" ) ); @@ -124,6 +126,7 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S } sal_Bool bProvideDTD = sal_False; + sal_Bool bAcceptNonemptyVersion = sal_False; if ( aDocMediaType.getLength() ) { if ( aDocMediaType.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) ) ) @@ -148,6 +151,7 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S pRootAttrList->AddAttribute ( OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_XMLNS ) ), sCdataAttribute, OUString( RTL_CONSTASCII_USTRINGPARAM ( MANIFEST_OASIS_NAMESPACE ) ) ); + bAcceptNonemptyVersion = sal_True; } else { @@ -186,6 +190,13 @@ ManifestExport::ManifestExport(Reference < XDocumentHandler > xHandler, const S pValue->Value >>= aString; pAttrList->AddAttribute ( sMediaTypeAttribute, sCdataAttribute, aString ); } + else if (pValue->Name.equals (sVersionProperty) ) + { + pValue->Value >>= aString; + // the version is stored only if it is not empty + if ( bAcceptNonemptyVersion && aString.getLength() ) + pAttrList->AddAttribute ( sVersionAttribute, sCdataAttribute, aString ); + } else if (pValue->Name.equals (sFullPathProperty) ) { pValue->Value >>= aString; |