summaryrefslogtreecommitdiff
path: root/package/source/manifest
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/manifest')
-rw-r--r--package/source/manifest/Base64Codec.cxx208
-rw-r--r--package/source/manifest/Base64Codec.hxx48
-rw-r--r--package/source/manifest/ManifestDefines.hxx86
-rw-r--r--package/source/manifest/ManifestExport.cxx394
-rw-r--r--package/source/manifest/ManifestExport.hxx48
-rw-r--r--package/source/manifest/ManifestImport.cxx435
-rw-r--r--package/source/manifest/ManifestImport.hxx155
-rw-r--r--package/source/manifest/ManifestReader.cxx143
-rw-r--r--package/source/manifest/ManifestReader.hxx72
-rw-r--r--package/source/manifest/ManifestWriter.cxx128
-rw-r--r--package/source/manifest/ManifestWriter.hxx72
-rw-r--r--package/source/manifest/UnoRegister.cxx85
-rw-r--r--package/source/manifest/makefile.mk55
13 files changed, 0 insertions, 1929 deletions
diff --git a/package/source/manifest/Base64Codec.cxx b/package/source/manifest/Base64Codec.cxx
deleted file mode 100644
index 5dc4ebfa4..000000000
--- a/package/source/manifest/Base64Codec.cxx
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-#include "Base64Codec.hxx"
-#include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
-using namespace osl;
-using namespace com::sun::star;
-
-using ::rtl::OUStringBuffer;
-
-const
- sal_Char aBase64EncodeTable[] =
- { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };
-
-const
- sal_uInt8 aBase64DecodeTable[] =
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, // 32-47
-// + /
-
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, // 48-63
-// 0 1 2 3 4 5 6 7 8 9 =
-
- 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, // 64-79
-// A B C D E F G H I J K L M N O
-
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, // 80-95
-// P Q R S T U V W X Y Z
-
- 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, // 96-111
-// a b c d e f g h i j k l m n o
-
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, // 112-127
-// p q r s t u v w x y z
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-
-void ThreeByteToFourByte (const sal_uInt8* pBuffer, const sal_Int32 nStart, const sal_Int32 nFullLen, rtl::OUStringBuffer& sBuffer)
-{
- sal_Int32 nLen(nFullLen - nStart);
- if (nLen > 3)
- nLen = 3;
- if (nLen == 0)
- {
- sBuffer.setLength(0);
- return;
- }
-
- sal_Int32 nBinaer;
- switch (nLen)
- {
- case 1:
- {
- nBinaer = ((sal_uInt8)pBuffer[nStart + 0]) << 16;
- }
- break;
- case 2:
- {
- nBinaer = (((sal_uInt8)pBuffer[nStart + 0]) << 16) +
- (((sal_uInt8)pBuffer[nStart + 1]) << 8);
- }
- break;
- default:
- {
- nBinaer = (((sal_uInt8)pBuffer[nStart + 0]) << 16) +
- (((sal_uInt8)pBuffer[nStart + 1]) << 8) +
- ((sal_uInt8)pBuffer[nStart + 2]);
- }
- break;
- }
-
- sBuffer.appendAscii("====");
-
- sal_uInt8 nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0000) >> 18);
- sBuffer.setCharAt(0, aBase64EncodeTable [nIndex]);
-
- nIndex = static_cast< sal_uInt8 >((nBinaer & 0x3F000) >> 12);
- sBuffer.setCharAt(1, aBase64EncodeTable [nIndex]);
- if (nLen == 1)
- return;
-
- nIndex = static_cast< sal_uInt8 >((nBinaer & 0xFC0) >> 6);
- sBuffer.setCharAt(2, aBase64EncodeTable [nIndex]);
- if (nLen == 2)
- return;
-
- nIndex = static_cast< sal_uInt8 >(nBinaer & 0x3F);
- sBuffer.setCharAt(3, aBase64EncodeTable [nIndex]);
-}
-
-void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Sequence < sal_Int8 >& aPass)
-{
- sal_Int32 i(0);
- sal_Int32 nBufferLength(aPass.getLength());
- const sal_uInt8* pBuffer = reinterpret_cast< const sal_uInt8* >( aPass.getConstArray() );
- while (i < nBufferLength)
- {
- rtl::OUStringBuffer sBuffer;
- ThreeByteToFourByte (pBuffer, i, nBufferLength, sBuffer);
- aStrBuffer.append(sBuffer);
- i += 3;
- }
-}
-
-const rtl::OUString s2equal(RTL_CONSTASCII_USTRINGPARAM("=="));
-const rtl::OUString s1equal(RTL_CONSTASCII_USTRINGPARAM("="));
-
-void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int32 nStart, const rtl::OUString& sString)
-{
- nLength = 0;
- sal_Int32 nLen (sString.getLength());
-
- OSL_ASSERT( nLen == 4 );
- if (nLen != 4)
- return;
-
- if (sString.indexOf(s2equal) == 2)
- nLength = 1;
- else if (sString.indexOf(s1equal) == 3)
- nLength = 2;
- else
- nLength = 3;
-
- sal_Int32 nBinaer ((aBase64DecodeTable [sString [0]] << 18) +
- (aBase64DecodeTable [sString [1]] << 12) +
- (aBase64DecodeTable [sString [2]] << 6) +
- (aBase64DecodeTable [sString [3]]));
-
- sal_uInt8 OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF0000) >> 16);
- pBuffer[nStart + 0] = (sal_uInt8)OneByte;
-
- if (nLength == 1)
- return;
-
- OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF00) >> 8);
- pBuffer[nStart + 1] = OneByte;
-
- if (nLength == 2)
- return;
-
- OneByte = static_cast< sal_uInt8 >(nBinaer & 0xFF);
- pBuffer[nStart + 2] = OneByte;
-}
-
-void Base64Codec::decodeBase64(uno::Sequence< sal_Int8 >& aBuffer, const rtl::OUString& sBuffer)
-{
- sal_Int32 nFirstLength((sBuffer.getLength() / 4) * 3);
- sal_uInt8* pBuffer = new sal_uInt8[nFirstLength];
- sal_Int32 nSecondLength(0);
- sal_Int32 nLength(0);
- sal_Int32 i = 0;
- sal_Int32 k = 0;
- while (i < sBuffer.getLength())
- {
- FourByteToThreeByte (pBuffer, nLength, k, sBuffer.copy(i, 4));
- nSecondLength += nLength;
- nLength = 0;
- i += 4;
- k += 3;
- }
- aBuffer = uno::Sequence<sal_Int8>( reinterpret_cast< sal_Int8* >( pBuffer ), nSecondLength );
- delete[] pBuffer;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/Base64Codec.hxx b/package/source/manifest/Base64Codec.hxx
deleted file mode 100644
index 60456ad32..000000000
--- a/package/source/manifest/Base64Codec.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _BASE64_CODEC_HXX
-#define _BASE64_CODEC_HXX
-
-#include <com/sun/star/uno/Sequence.hxx>
-
-namespace rtl
-{
-class OUString;
-class OUStringBuffer;
-}
-
-class Base64Codec
-{
-public:
- static void encodeBase64(rtl::OUStringBuffer& aStrBuffer, const com::sun::star::uno::Sequence<sal_Int8>& aPass);
- static void decodeBase64(com::sun::star::uno::Sequence<sal_Int8>& aPass, const rtl::OUString& sBuffer);
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestDefines.hxx b/package/source/manifest/ManifestDefines.hxx
deleted file mode 100644
index b4fa4b72a..000000000
--- a/package/source/manifest/ManifestDefines.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _MANIFEST_DEFINES_HXX
-#define _MANIFEST_DEFINES_HXX
-
-#include <PackageConstants.hxx>
-
-#define MANIFEST_NSPREFIX "manifest:"
-#define ELEMENT_MANIFEST "manifest:manifest"
-#define ATTRIBUTE_XMLNS "xmlns:manifest"
-#define MANIFEST_NAMESPACE "http://openoffice.org/2001/manifest"
-#define MANIFEST_OASIS_NAMESPACE "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"
-#define MANIFEST_DOCTYPE "<!DOCTYPE manifest:manifest PUBLIC \"-//OpenOffice.org//DTD Manifest 1.0//EN\" \"Manifest.dtd\">"
-#define ATTRIBUTE_CDATA "CDATA"
-
-#define ELEMENT_FILE_ENTRY "manifest:file-entry"
-#define ATTRIBUTE_FULL_PATH "manifest:full-path"
-#define ATTRIBUTE_VERSION "manifest:version"
-#define ATTRIBUTE_MEDIA_TYPE "manifest:media-type"
-#define ATTRIBUTE_SIZE "manifest:size"
-
-#define ELEMENT_ENCRYPTION_DATA "manifest:encryption-data"
-#define ATTRIBUTE_CHECKSUM_TYPE "manifest:checksum-type"
-#define ATTRIBUTE_CHECKSUM "manifest:checksum"
-
-#define ELEMENT_ALGORITHM "manifest:algorithm"
-#define ATTRIBUTE_ALGORITHM_NAME "manifest:algorithm-name"
-#define ATTRIBUTE_INITIALISATION_VECTOR "manifest:initialisation-vector"
-
-#define ELEMENT_START_KEY_GENERATION "manifest:start-key-generation"
-#define ATTRIBUTE_START_KEY_GENERATION_NAME "manifest:start-key-generation-name"
-#define ATTRIBUTE_KEY_SIZE "manifest:key-size"
-
-#define ELEMENT_KEY_DERIVATION "manifest:key-derivation"
-#define ATTRIBUTE_KEY_DERIVATION_NAME "manifest:key-derivation-name"
-#define ATTRIBUTE_SALT "manifest:salt"
-#define ATTRIBUTE_ITERATION_COUNT "manifest:iteration-count"
-
-#define SHA256_URL "http://www.w3.org/2001/04/xmlenc#sha256"
-//http://tools.oasis-open.org/issues/browse/OFFICE-3702
-//http://tools.oasis-open.org/issues/browse/OFFICE-3708
-#define SHA256_URL_TYPO "http://www.w3.org/2000/09/xmldsig#sha256"
-#define SHA1_NAME "SHA1"
-#define SHA1_URL "http://www.w3.org/2000/09/xmldsig#sha1"
-
-#define SHA1_1K_NAME "SHA1/1K"
-#define SHA1_1K_URL "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0#sha1-1k"
-#define SHA256_1K_URL "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0#sha256-1k"
-
-#define BLOWFISH_NAME "Blowfish CFB"
-#define BLOWFISH_URL "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0#blowfish"
-#define AES128_URL "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
-#define AES192_URL "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
-#define AES256_URL "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
-
-#define PBKDF2_NAME "PBKDF2"
-#define PBKDF2_URL "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0#pbkdf2"
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
deleted file mode 100644
index 0a8c1d08a..000000000
--- a/package/source/manifest/ManifestExport.cxx
+++ /dev/null
@@ -1,394 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-
-#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/xml/crypto/DigestID.hpp>
-#include <com/sun/star/xml/crypto/CipherID.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
-
-#include <ManifestDefines.hxx>
-#include <ManifestExport.hxx>
-#include <Base64Codec.hxx>
-
-#include <rtl/ustrbuf.hxx>
-#include <comphelper/documentconstants.hxx>
-#include <comphelper/attributelist.hxx>
-
-using namespace ::com::sun::star;
-
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHandler, const uno::Sequence< uno::Sequence < beans::PropertyValue > >& rManList )
-{
- const ::rtl::OUString sFileEntryElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_FILE_ENTRY ) );
- const ::rtl::OUString sManifestElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_MANIFEST ) );
- const ::rtl::OUString sEncryptionDataElement( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_ENCRYPTION_DATA ) );
- const ::rtl::OUString sAlgorithmElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_ALGORITHM ) );
- const ::rtl::OUString sStartKeyGenerationElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_START_KEY_GENERATION ) );
- const ::rtl::OUString sKeyDerivationElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_KEY_DERIVATION ) );
-
- const ::rtl::OUString sCdataAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CDATA ) );
- const ::rtl::OUString sMediaTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_MEDIA_TYPE ) );
- const ::rtl::OUString sVersionAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_VERSION ) );
- const ::rtl::OUString sFullPathAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_FULL_PATH ) );
- const ::rtl::OUString sSizeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SIZE ) );
- const ::rtl::OUString sKeySizeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_KEY_SIZE ) );
- const ::rtl::OUString sSaltAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SALT ) );
- const ::rtl::OUString sInitialisationVectorAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_INITIALISATION_VECTOR ) );
- const ::rtl::OUString sIterationCountAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_ITERATION_COUNT ) );
- const ::rtl::OUString sAlgorithmNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_ALGORITHM_NAME ) );
- const ::rtl::OUString sStartKeyGenerationNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_START_KEY_GENERATION_NAME ) );
- const ::rtl::OUString sKeyDerivationNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_KEY_DERIVATION_NAME ) );
- const ::rtl::OUString sChecksumTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CHECKSUM_TYPE ) );
- const ::rtl::OUString sChecksumAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CHECKSUM) );
-
- const ::rtl::OUString sFullPathProperty ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) );
- const ::rtl::OUString sVersionProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Version" ) );
- const ::rtl::OUString sMediaTypeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) );
- const ::rtl::OUString sIterationCountProperty ( RTL_CONSTASCII_USTRINGPARAM ( "IterationCount" ) );
- const ::rtl::OUString sDerivedKeySizeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "DerivedKeySize" ) );
- const ::rtl::OUString sSaltProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Salt" ) );
- const ::rtl::OUString sInitialisationVectorProperty( RTL_CONSTASCII_USTRINGPARAM ( "InitialisationVector" ) );
- const ::rtl::OUString sSizeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Size" ) );
- const ::rtl::OUString sDigestProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Digest" ) );
- const ::rtl::OUString sEncryptionAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "EncryptionAlgorithm" ) );
- const ::rtl::OUString sStartKeyAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "StartKeyAlgorithm" ) );
- const ::rtl::OUString sDigestAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "DigestAlgorithm" ) );
-
- const ::rtl::OUString sWhiteSpace ( RTL_CONSTASCII_USTRINGPARAM ( " " ) );
-
- const ::rtl::OUString sSHA256_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_URL ) );
- const ::rtl::OUString sSHA1_Name ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_NAME ) );
-
- const ::rtl::OUString sSHA1_1k_Name ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_1K_NAME ) );
- const ::rtl::OUString sSHA256_1k_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_1K_URL ) );
-
- const ::rtl::OUString sBlowfish_Name ( RTL_CONSTASCII_USTRINGPARAM ( BLOWFISH_NAME ) );
- const ::rtl::OUString sAES256_URL ( RTL_CONSTASCII_USTRINGPARAM ( AES256_URL ) );
-
- const ::rtl::OUString sPBKDF2_Name ( RTL_CONSTASCII_USTRINGPARAM ( PBKDF2_NAME ) );
-
- ::comphelper::AttributeList * pRootAttrList = new ::comphelper::AttributeList;
- const uno::Sequence < beans::PropertyValue > *pSequence = rManList.getConstArray();
- const sal_uInt32 nManLength = rManList.getLength();
-
- // find the mediatype of the document if any
- ::rtl::OUString aDocMediaType;
- ::rtl::OUString aDocVersion;
- for (sal_uInt32 nInd = 0; nInd < nManLength ; nInd++ )
- {
- ::rtl::OUString aMediaType;
- ::rtl::OUString aPath;
- ::rtl::OUString aVersion;
-
- const beans::PropertyValue *pValue = pSequence[nInd].getConstArray();
- for (sal_uInt32 j = 0, nNum = pSequence[nInd].getLength(); j < nNum; j++, pValue++)
- {
- if (pValue->Name.equals (sMediaTypeProperty) )
- {
- pValue->Value >>= aMediaType;
- }
- else if (pValue->Name.equals (sFullPathProperty) )
- {
- pValue->Value >>= aPath;
- }
- else if (pValue->Name.equals (sVersionProperty) )
- {
- pValue->Value >>= aVersion;
- }
-
- if ( aPath.getLength() && aMediaType.getLength() && aVersion.getLength() )
- break;
- }
-
- if ( aPath.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ) )
- {
- aDocMediaType = aMediaType;
- aDocVersion = aVersion;
- break;
- }
- }
-
- sal_Bool bProvideDTD = sal_False;
- sal_Bool bAcceptNonemptyVersion = sal_False;
- sal_Bool bStoreStartKeyGeneration = sal_False;
- if ( aDocMediaType.getLength() )
- {
- if ( aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) ) )
-
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII ) ) )
- || aDocMediaType.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII ) ) ) )
-
- {
- // oasis format
- pRootAttrList->AddAttribute ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_XMLNS ) ),
- sCdataAttribute,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( MANIFEST_OASIS_NAMESPACE ) ) );
- bAcceptNonemptyVersion = sal_True;
- if ( aDocVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
- {
- // this is ODF12 generation, let encrypted streams contain start-key-generation entry
- bStoreStartKeyGeneration = sal_True;
- pRootAttrList->AddAttribute ( sVersionAttribute, sCdataAttribute, aDocVersion );
- }
- }
- else
- {
- // even if it is no SO6 format the namespace must be specified
- // thus SO6 format is used as default one
- pRootAttrList->AddAttribute ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_XMLNS ) ),
- sCdataAttribute,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( MANIFEST_NAMESPACE ) ) );
-
- bProvideDTD = sal_True;
- }
- }
-
- uno::Reference < xml::sax::XAttributeList > xRootAttrList (pRootAttrList);
-
- xHandler->startDocument();
- uno::Reference < xml::sax::XExtendedDocumentHandler > xExtHandler ( xHandler, uno::UNO_QUERY );
- if ( xExtHandler.is() && bProvideDTD )
- {
- ::rtl::OUString aDocType ( RTL_CONSTASCII_USTRINGPARAM ( MANIFEST_DOCTYPE ) );
- xExtHandler->unknown ( aDocType );
- xHandler->ignorableWhitespace ( sWhiteSpace );
- }
- xHandler->startElement( sManifestElement, xRootAttrList );
-
- for (sal_uInt32 i = 0 ; i < nManLength ; i++)
- {
- ::comphelper::AttributeList *pAttrList = new ::comphelper::AttributeList;
- const beans::PropertyValue *pValue = pSequence[i].getConstArray();
- ::rtl::OUString aString;
- const uno::Any *pVector = NULL, *pSalt = NULL, *pIterationCount = NULL, *pDigest = NULL, *pDigestAlg = NULL, *pEncryptAlg = NULL, *pStartKeyAlg = NULL, *pDerivedKeySize = NULL;
- for (sal_uInt32 j = 0, nNum = pSequence[i].getLength(); j < nNum; j++, pValue++)
- {
- if (pValue->Name.equals (sMediaTypeProperty) )
- {
- 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;
- pAttrList->AddAttribute ( sFullPathAttribute, sCdataAttribute, aString );
- }
- else if (pValue->Name.equals (sSizeProperty) )
- {
- sal_Int32 nSize = 0;
- pValue->Value >>= nSize;
- ::rtl::OUStringBuffer aBuffer;
- aBuffer.append ( nSize );
- pAttrList->AddAttribute ( sSizeAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
- }
- else if (pValue->Name.equals (sInitialisationVectorProperty) )
- pVector = &pValue->Value;
- else if (pValue->Name.equals (sSaltProperty) )
- pSalt = &pValue->Value;
- else if (pValue->Name.equals (sIterationCountProperty) )
- pIterationCount = &pValue->Value;
- else if (pValue->Name.equals ( sDigestProperty ) )
- pDigest = &pValue->Value;
- else if (pValue->Name.equals ( sDigestAlgProperty ) )
- pDigestAlg = &pValue->Value;
- else if (pValue->Name.equals ( sEncryptionAlgProperty ) )
- pEncryptAlg = &pValue->Value;
- else if (pValue->Name.equals ( sStartKeyAlgProperty ) )
- pStartKeyAlg = &pValue->Value;
- else if (pValue->Name.equals ( sDerivedKeySizeProperty ) )
- pDerivedKeySize = &pValue->Value;
- }
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
- uno::Reference < xml::sax::XAttributeList > xAttrList ( pAttrList );
- xHandler->startElement( sFileEntryElement , xAttrList);
- if ( pVector && pSalt && pIterationCount && pDigest && pDigestAlg && pEncryptAlg && pStartKeyAlg && pDerivedKeySize )
- {
- // ==== Encryption Data
- ::comphelper::AttributeList * pNewAttrList = new ::comphelper::AttributeList;
- uno::Reference < xml::sax::XAttributeList > xNewAttrList (pNewAttrList);
- ::rtl::OUStringBuffer aBuffer;
- uno::Sequence < sal_Int8 > aSequence;
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
-
- // ==== Digest
- ::rtl::OUString sChecksumType;
- sal_Int32 nDigestAlgID = 0;
- *pDigestAlg >>= nDigestAlgID;
- if ( nDigestAlgID == xml::crypto::DigestID::SHA256_1K )
- sChecksumType = sSHA256_1k_URL;
- else if ( nDigestAlgID == xml::crypto::DigestID::SHA1_1K )
- sChecksumType = sSHA1_1k_Name;
- else
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected digest algorithm is provided!" ) ), uno::Reference< uno::XInterface >() );
-
- pNewAttrList->AddAttribute ( sChecksumTypeAttribute, sCdataAttribute, sChecksumType );
- *pDigest >>= aSequence;
- Base64Codec::encodeBase64( aBuffer, aSequence );
- pNewAttrList->AddAttribute ( sChecksumAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
-
- xHandler->startElement( sEncryptionDataElement , xNewAttrList);
-
- // ==== Algorithm
- pNewAttrList = new ::comphelper::AttributeList;
- xNewAttrList = pNewAttrList;
-
- sal_Int32 nEncAlgID = 0;
- sal_Int32 nDerivedKeySize = 0;
- *pEncryptAlg >>= nEncAlgID;
- *pDerivedKeySize >>= nDerivedKeySize;
-
- ::rtl::OUString sEncAlgName;
- if ( nEncAlgID == xml::crypto::CipherID::AES_CBC_W3C_PADDING )
- {
- OSL_ENSURE( nDerivedKeySize, "Unexpected key size is provided!" );
- if ( nDerivedKeySize != 32 )
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected key size is provided!" ) ), uno::Reference< uno::XInterface >() );
-
- sEncAlgName = sAES256_URL;
- }
- else if ( nEncAlgID == xml::crypto::CipherID::BLOWFISH_CFB_8 )
- {
- sEncAlgName = sBlowfish_Name;
- }
- else
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpecte encryption algorithm is provided!" ) ), uno::Reference< uno::XInterface >() );
-
- pNewAttrList->AddAttribute ( sAlgorithmNameAttribute, sCdataAttribute, sEncAlgName );
-
- *pVector >>= aSequence;
- Base64Codec::encodeBase64 ( aBuffer, aSequence );
- pNewAttrList->AddAttribute ( sInitialisationVectorAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sAlgorithmElement , xNewAttrList);
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sAlgorithmElement );
-
- // ==== Key Derivation
- pNewAttrList = new ::comphelper::AttributeList;
- xNewAttrList = pNewAttrList;
-
- pNewAttrList->AddAttribute ( sKeyDerivationNameAttribute, sCdataAttribute, sPBKDF2_Name );
-
- if ( bStoreStartKeyGeneration )
- {
- aBuffer.append( nDerivedKeySize );
- pNewAttrList->AddAttribute ( sKeySizeAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
- }
-
- sal_Int32 nCount = 0;
- *pIterationCount >>= nCount;
- aBuffer.append (nCount);
- pNewAttrList->AddAttribute ( sIterationCountAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
-
- *pSalt >>= aSequence;
- Base64Codec::encodeBase64 ( aBuffer, aSequence );
- pNewAttrList->AddAttribute ( sSaltAttribute, sCdataAttribute, aBuffer.makeStringAndClear() );
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sKeyDerivationElement , xNewAttrList);
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sKeyDerivationElement );
-
- // we have to store start-key-generation element as the last one to workaround the parsing problem
- // in OOo3.1 and older versions
- if ( bStoreStartKeyGeneration )
- {
- // ==== Start Key Generation
- pNewAttrList = new ::comphelper::AttributeList;
- xNewAttrList = pNewAttrList;
-
- ::rtl::OUString sStartKeyAlg;
- ::rtl::OUString sStartKeySize;
- sal_Int32 nStartKeyAlgID = 0;
- *pStartKeyAlg >>= nStartKeyAlgID;
- if ( nStartKeyAlgID == xml::crypto::DigestID::SHA256 )
- {
- sStartKeyAlg = sSHA256_URL;
- aBuffer.append( (sal_Int32)32 );
- sStartKeySize = aBuffer.makeStringAndClear();
- }
- else if ( nStartKeyAlgID == xml::crypto::DigestID::SHA1 )
- {
- sStartKeyAlg = sSHA1_Name;
- aBuffer.append( (sal_Int32)20 );
- sStartKeySize = aBuffer.makeStringAndClear();
- }
- else
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Unexpected start key algorithm is provided!" ) ), uno::Reference< uno::XInterface >() );
-
- pNewAttrList->AddAttribute ( sStartKeyGenerationNameAttribute, sCdataAttribute, sStartKeyAlg );
- pNewAttrList->AddAttribute ( sKeySizeAttribute, sCdataAttribute, sStartKeySize );
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->startElement( sStartKeyGenerationElement , xNewAttrList);
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sStartKeyGenerationElement );
- }
-
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sEncryptionDataElement );
- }
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sFileEntryElement );
- }
- xHandler->ignorableWhitespace ( sWhiteSpace );
- xHandler->endElement( sManifestElement );
- xHandler->endDocument();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestExport.hxx b/package/source/manifest/ManifestExport.hxx
deleted file mode 100644
index 860c8e60d..000000000
--- a/package/source/manifest/ManifestExport.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MANIFEST_EXPORT_HXX
-#define _MANIFEST_EXPORT_HXX
-
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/uno/Reference.h>
-#include <rtl/ustring.hxx>
-
-namespace com { namespace sun { namespace star {
- namespace beans { struct PropertyValue;}
- namespace xml { namespace sax { class XDocumentHandler; } }
-} } }
-class ManifestExport
-{
-public:
- ManifestExport(com::sun::star::uno::Reference < com::sun::star::xml::sax::XDocumentHandler > xHandler, const com::sun::star::uno::Sequence < com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > > &rManList );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
deleted file mode 100644
index cf5a77785..000000000
--- a/package/source/manifest/ManifestImport.cxx
+++ /dev/null
@@ -1,435 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER( update_precomp.py ): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-#include <ManifestImport.hxx>
-#include <ManifestDefines.hxx>
-#include <Base64Codec.hxx>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/xml/crypto/DigestID.hpp>
-#include <com/sun/star/xml/crypto/CipherID.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::beans;
-using namespace com::sun::star;
-using namespace std;
-
-using ::rtl::OUString;
-
-// ---------------------------------------------------
-ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
-: nNumProperty ( 0 )
-, bIgnoreEncryptData ( sal_False )
-, nDerivedKeySize( 0 )
-, rManVector ( rNewManVector )
-
-, sFileEntryElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_FILE_ENTRY ) )
-, sManifestElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_MANIFEST ) )
-, sEncryptionDataElement( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_ENCRYPTION_DATA ) )
-, sAlgorithmElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_ALGORITHM ) )
-, sStartKeyAlgElement ( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_START_KEY_GENERATION ) )
-, sKeyDerivationElement( RTL_CONSTASCII_USTRINGPARAM ( ELEMENT_KEY_DERIVATION ) )
-
-, sCdataAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CDATA ) )
-, sMediaTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_MEDIA_TYPE ) )
-, sVersionAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_VERSION ) )
-, sFullPathAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_FULL_PATH ) )
-, sSizeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SIZE ) )
-, sSaltAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_SALT ) )
-, sInitialisationVectorAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_INITIALISATION_VECTOR ) )
-, sIterationCountAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_ITERATION_COUNT ) )
-, sKeySizeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_KEY_SIZE ) )
-, sAlgorithmNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_ALGORITHM_NAME ) )
-, sStartKeyAlgNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_START_KEY_GENERATION_NAME ) )
-, sKeyDerivationNameAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_KEY_DERIVATION_NAME ) )
-, sChecksumAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CHECKSUM ) )
-, sChecksumTypeAttribute ( RTL_CONSTASCII_USTRINGPARAM ( ATTRIBUTE_CHECKSUM_TYPE ) )
-
-, sFullPathProperty ( RTL_CONSTASCII_USTRINGPARAM ( "FullPath" ) )
-, sMediaTypeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "MediaType" ) )
-, sVersionProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Version" ) )
-, sIterationCountProperty ( RTL_CONSTASCII_USTRINGPARAM ( "IterationCount" ) )
-, sDerivedKeySizeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "DerivedKeySize" ) )
-, sSaltProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Salt" ) )
-, sInitialisationVectorProperty ( RTL_CONSTASCII_USTRINGPARAM ( "InitialisationVector" ) )
-, sSizeProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Size" ) )
-, sDigestProperty ( RTL_CONSTASCII_USTRINGPARAM ( "Digest" ) )
-, sEncryptionAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "EncryptionAlgorithm" ) )
-, sStartKeyAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "StartKeyAlgorithm" ) )
-, sDigestAlgProperty ( RTL_CONSTASCII_USTRINGPARAM ( "DigestAlgorithm" ) )
-
-, sWhiteSpace ( RTL_CONSTASCII_USTRINGPARAM ( " " ) )
-
-, sSHA256_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_URL ) )
-, sSHA256_URL_TYPO ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_URL_TYPO ) )
-, sSHA1_Name ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_NAME ) )
-, sSHA1_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_URL ) )
-
-, sSHA256_1k_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA256_1K_URL ) )
-, sSHA1_1k_Name ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_1K_NAME ) )
-, sSHA1_1k_URL ( RTL_CONSTASCII_USTRINGPARAM ( SHA1_1K_URL ) )
-
-, sBlowfish_Name ( RTL_CONSTASCII_USTRINGPARAM ( BLOWFISH_NAME ) )
-, sBlowfish_URL ( RTL_CONSTASCII_USTRINGPARAM ( BLOWFISH_URL ) )
-, sAES128_URL ( RTL_CONSTASCII_USTRINGPARAM ( AES128_URL ) )
-, sAES192_URL ( RTL_CONSTASCII_USTRINGPARAM ( AES192_URL ) )
-, sAES256_URL ( RTL_CONSTASCII_USTRINGPARAM ( AES256_URL ) )
-
-, sPBKDF2_Name ( RTL_CONSTASCII_USTRINGPARAM ( PBKDF2_NAME ) )
-, sPBKDF2_URL ( RTL_CONSTASCII_USTRINGPARAM ( PBKDF2_URL ) )
-{
- aStack.reserve( 10 );
-}
-
-// ---------------------------------------------------
-ManifestImport::~ManifestImport ( void )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::startDocument( )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::endDocument( )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
- StringHashMap aConvertedAttribs;
- ::rtl::OUString aConvertedName = PushNameAndNamespaces( aName, xAttribs, aConvertedAttribs );
-
- if ( aConvertedName == sFileEntryElement )
- {
- aSequence.realloc ( PKG_SIZE_ENCR_MNFST );
-
- // Put full-path property first for MBA
- aSequence[nNumProperty].Name = sFullPathProperty;
- aSequence[nNumProperty++].Value <<= aConvertedAttribs[sFullPathAttribute];
- aSequence[nNumProperty].Name = sMediaTypeProperty;
- aSequence[nNumProperty++].Value <<= aConvertedAttribs[sMediaTypeAttribute];
-
- OUString sVersion = aConvertedAttribs[sVersionAttribute];
- if ( sVersion.getLength() )
- {
- aSequence[nNumProperty].Name = sVersionProperty;
- aSequence[nNumProperty++].Value <<= sVersion;
- }
-
- OUString sSize = aConvertedAttribs[sSizeAttribute];
- if ( sSize.getLength() )
- {
- sal_Int32 nSize;
- nSize = sSize.toInt32();
- aSequence[nNumProperty].Name = sSizeProperty;
- aSequence[nNumProperty++].Value <<= nSize;
- }
- }
- else if ( aStack.size() > 1 )
- {
- ManifestStack::reverse_iterator aIter = aStack.rbegin();
- ++aIter;
-
- if ( aIter->m_aConvertedName.equals( sFileEntryElement ) )
- {
- if ( aConvertedName.equals( sEncryptionDataElement ) )
- {
- // If this element exists, then this stream is encrypted and we need
- // to import the initialisation vector, salt and iteration count used
- nDerivedKeySize = 0;
- OUString aString = aConvertedAttribs[sChecksumTypeAttribute];
- if ( !bIgnoreEncryptData )
- {
- if ( aString.equals( sSHA1_1k_Name ) || aString.equals( sSHA1_1k_URL ) )
- {
- aSequence[nNumProperty].Name = sDigestAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::DigestID::SHA1_1K;
- }
- else if ( aString.equals( sSHA256_1k_URL ) )
- {
- aSequence[nNumProperty].Name = sDigestAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::DigestID::SHA256_1K;
- }
- else
- bIgnoreEncryptData = sal_True;
-
- if ( !bIgnoreEncryptData )
- {
- aString = aConvertedAttribs[sChecksumAttribute];
- uno::Sequence < sal_Int8 > aDecodeBuffer;
- Base64Codec::decodeBase64( aDecodeBuffer, aString );
- aSequence[nNumProperty].Name = sDigestProperty;
- aSequence[nNumProperty++].Value <<= aDecodeBuffer;
- }
- }
- }
- }
- else if ( aIter->m_aConvertedName.equals( sEncryptionDataElement ) )
- {
- if ( aConvertedName == sAlgorithmElement )
- {
- if ( !bIgnoreEncryptData )
- {
- OUString aString = aConvertedAttribs[sAlgorithmNameAttribute];
- if ( aString.equals( sBlowfish_Name ) || aString.equals( sBlowfish_URL ) )
- {
- aSequence[nNumProperty].Name = sEncryptionAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8;
- }
- else if ( aString.equals( sAES256_URL ) )
- {
- aSequence[nNumProperty].Name = sEncryptionAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
- OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 32, "Unexpected derived key length!" );
- nDerivedKeySize = 32;
- }
- else if ( aString.equals( sAES192_URL ) )
- {
- aSequence[nNumProperty].Name = sEncryptionAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
- OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 24, "Unexpected derived key length!" );
- nDerivedKeySize = 24;
- }
- else if ( aString.equals( sAES128_URL ) )
- {
- aSequence[nNumProperty].Name = sEncryptionAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
- OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 16, "Unexpected derived key length!" );
- nDerivedKeySize = 16;
- }
- else
- bIgnoreEncryptData = sal_True;
-
- if ( !bIgnoreEncryptData )
- {
- aString = aConvertedAttribs[sInitialisationVectorAttribute];
- uno::Sequence < sal_Int8 > aDecodeBuffer;
- Base64Codec::decodeBase64 ( aDecodeBuffer, aString );
- aSequence[nNumProperty].Name = sInitialisationVectorProperty;
- aSequence[nNumProperty++].Value <<= aDecodeBuffer;
- }
- }
- }
- else if ( aConvertedName == sKeyDerivationElement )
- {
- if ( !bIgnoreEncryptData )
- {
- OUString aString = aConvertedAttribs[sKeyDerivationNameAttribute];
- if ( aString.equals( sPBKDF2_Name ) || aString.equals( sPBKDF2_URL ) )
- {
- aString = aConvertedAttribs[sSaltAttribute];
- uno::Sequence < sal_Int8 > aDecodeBuffer;
- Base64Codec::decodeBase64 ( aDecodeBuffer, aString );
- aSequence[nNumProperty].Name = sSaltProperty;
- aSequence[nNumProperty++].Value <<= aDecodeBuffer;
-
- aString = aConvertedAttribs[sIterationCountAttribute];
- aSequence[nNumProperty].Name = sIterationCountProperty;
- aSequence[nNumProperty++].Value <<= aString.toInt32();
-
- aString = aConvertedAttribs[sKeySizeAttribute];
- if ( aString.getLength() )
- {
- sal_Int32 nKey = aString.toInt32();
- OSL_ENSURE( !nDerivedKeySize || nKey == nDerivedKeySize , "Provided derived key length differs from the expected one!" );
- nDerivedKeySize = nKey;
- }
- else if ( !nDerivedKeySize )
- nDerivedKeySize = 16;
- else if ( nDerivedKeySize != 16 )
- OSL_ENSURE( sal_False, "Default derived key length differs from the expected one!" );
-
- aSequence[nNumProperty].Name = sDerivedKeySizeProperty;
- aSequence[nNumProperty++].Value <<= nDerivedKeySize;
- }
- else
- bIgnoreEncryptData = sal_True;
- }
- }
- else if ( aConvertedName == sStartKeyAlgElement )
- {
- OUString aString = aConvertedAttribs[sStartKeyAlgNameAttribute];
- if (aString.equals(sSHA256_URL) || aString.equals(sSHA256_URL_TYPO))
- {
- aSequence[nNumProperty].Name = sStartKeyAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::DigestID::SHA256;
- }
- else if ( aString.equals( sSHA1_Name ) || aString.equals( sSHA1_URL ) )
- {
- aSequence[nNumProperty].Name = sStartKeyAlgProperty;
- aSequence[nNumProperty++].Value <<= xml::crypto::DigestID::SHA1;
- }
- else
- bIgnoreEncryptData = sal_True;
- }
- }
- }
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::endElement( const OUString& aName )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
- ::rtl::OUString aConvertedName = ConvertName( aName );
- if ( !aStack.empty() && aStack.rbegin()->m_aConvertedName.equals( aConvertedName ) )
- {
- if ( aConvertedName.equals( sFileEntryElement ) )
- {
- aSequence.realloc ( nNumProperty );
- bIgnoreEncryptData = sal_False;
- rManVector.push_back ( aSequence );
- nNumProperty = 0;
- }
-
- aStack.pop_back();
- }
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::characters( const OUString& /*aChars*/ )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& /*aWhitespaces*/ )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ )
- throw( xml::sax::SAXException, uno::RuntimeException )
-{
-}
-
-// ---------------------------------------------------
-::rtl::OUString ManifestImport::PushNameAndNamespaces( const ::rtl::OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs, StringHashMap& o_aConvertedAttribs )
-{
- StringHashMap aNamespaces;
- ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > > aAttribsStrs;
-
- if ( xAttribs.is() )
- {
- sal_Int16 nAttrCount = xAttribs.is() ? xAttribs->getLength() : 0;
- aAttribsStrs.reserve( nAttrCount );
-
- for( sal_Int16 nInd = 0; nInd < nAttrCount; nInd++ )
- {
- ::rtl::OUString aAttrName = xAttribs->getNameByIndex( nInd );
- ::rtl::OUString aAttrValue = xAttribs->getValueByIndex( nInd );
- if ( aAttrName.getLength() >= 5
- && aAttrName.compareToAscii( "xmlns", 5 ) == 0
- && ( aAttrName.getLength() == 5 || aAttrName.getStr()[5] == ( sal_Unicode )':' ) )
- {
- // this is a namespace declaration
- ::rtl::OUString aNsName( ( aAttrName.getLength() == 5 ) ? ::rtl::OUString() : aAttrName.copy( 6 ) );
- aNamespaces[aNsName] = aAttrValue;
- }
- else
- {
- // this is no namespace declaration
- aAttribsStrs.push_back( pair< ::rtl::OUString, ::rtl::OUString >( aAttrName, aAttrValue ) );
- }
- }
- }
-
- ::rtl::OUString aConvertedName = ConvertNameWithNamespace( aName, aNamespaces );
- if ( !aConvertedName.getLength() )
- aConvertedName = ConvertName( aName );
-
- aStack.push_back( ManifestScopeEntry( aConvertedName, aNamespaces ) );
-
- for ( sal_uInt16 nInd = 0; nInd < aAttribsStrs.size(); nInd++ )
- {
- // convert the attribute names on filling
- o_aConvertedAttribs[ConvertName( aAttribsStrs[nInd].first )] = aAttribsStrs[nInd].second;
- }
-
- return aConvertedName;
-}
-
-// ---------------------------------------------------
-::rtl::OUString ManifestImport::ConvertNameWithNamespace( const ::rtl::OUString& aName, const StringHashMap& aNamespaces )
-{
- ::rtl::OUString aNsAlias;
- ::rtl::OUString aPureName = aName;
-
- sal_Int32 nInd = aName.indexOf( ( sal_Unicode )':' );
- if ( nInd != -1 && nInd < aName.getLength() )
- {
- aNsAlias = aName.copy( 0, nInd );
- aPureName = aName.copy( nInd + 1 );
- }
-
- ::rtl::OUString aResult;
-
- StringHashMap::const_iterator aIter = aNamespaces.find( aNsAlias );
- if ( aIter != aNamespaces.end()
- && ( aIter->second.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_NAMESPACE ) ) )
- || aIter->second.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_OASIS_NAMESPACE ) ) ) ) )
- {
- // no check for manifest.xml consistency currently since the old versions have supported inconsistent documents as well
- aResult = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MANIFEST_NSPREFIX ) );
- aResult += aPureName;
- }
-
- return aResult;
-}
-
-// ---------------------------------------------------
-::rtl::OUString ManifestImport::ConvertName( const ::rtl::OUString& aName )
-{
- ::rtl::OUString aConvertedName;
- for ( ManifestStack::reverse_iterator aIter = aStack.rbegin(); !aConvertedName.getLength() && aIter != aStack.rend(); ++aIter )
- {
- if ( !aIter->m_aNamespaces.empty() )
- aConvertedName = ConvertNameWithNamespace( aName, aIter->m_aNamespaces );
- }
-
- if ( !aConvertedName.getLength() )
- aConvertedName = aName;
-
- return aConvertedName;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
deleted file mode 100644
index 4b927971c..000000000
--- a/package/source/manifest/ManifestImport.hxx
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MANIFEST_IMPORT_HXX
-#define _MANIFEST_IMPORT_HXX
-
-#include <cppuhelper/implbase1.hxx> // helper for implementations
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <vector>
-
-#include <HashMaps.hxx>
-
-namespace com { namespace sun { namespace star {
- namespace xml { namespace sax { class XAttributeList; } }
- namespace beans { struct PropertyValue; }
-} } }
-
-typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash, eqFunc > StringHashMap;
-
-struct ManifestScopeEntry
-{
- ::rtl::OUString m_aConvertedName;
- StringHashMap m_aNamespaces;
-
- ManifestScopeEntry( const ::rtl::OUString& aConvertedName, const StringHashMap& aNamespaces )
- : m_aConvertedName( aConvertedName )
- , m_aNamespaces( aNamespaces )
- {}
-
- ~ManifestScopeEntry()
- {}
-};
-
-typedef ::std::vector< ManifestScopeEntry > ManifestStack;
-
-class ManifestImport : public cppu::WeakImplHelper1 < com::sun::star::xml::sax::XDocumentHandler >
-{
-protected:
- com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aSequence;
- sal_Int16 nNumProperty;
- ManifestStack aStack;
- sal_Bool bIgnoreEncryptData;
- sal_Int32 nDerivedKeySize;
- ::std::vector < ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > > & rManVector;
-
- const ::rtl::OUString sFileEntryElement;
- const ::rtl::OUString sManifestElement;
- const ::rtl::OUString sEncryptionDataElement;
- const ::rtl::OUString sAlgorithmElement;
- const ::rtl::OUString sStartKeyAlgElement;
- const ::rtl::OUString sKeyDerivationElement;
-
- const ::rtl::OUString sCdataAttribute;
- const ::rtl::OUString sMediaTypeAttribute;
- const ::rtl::OUString sVersionAttribute;
- const ::rtl::OUString sFullPathAttribute;
- const ::rtl::OUString sSizeAttribute;
- const ::rtl::OUString sSaltAttribute;
- const ::rtl::OUString sInitialisationVectorAttribute;
- const ::rtl::OUString sIterationCountAttribute;
- const ::rtl::OUString sKeySizeAttribute;
- const ::rtl::OUString sAlgorithmNameAttribute;
- const ::rtl::OUString sStartKeyAlgNameAttribute;
- const ::rtl::OUString sKeyDerivationNameAttribute;
- const ::rtl::OUString sChecksumAttribute;
- const ::rtl::OUString sChecksumTypeAttribute;
-
- const ::rtl::OUString sFullPathProperty;
- const ::rtl::OUString sMediaTypeProperty;
- const ::rtl::OUString sVersionProperty;
- const ::rtl::OUString sIterationCountProperty;
- const ::rtl::OUString sDerivedKeySizeProperty;
- const ::rtl::OUString sSaltProperty;
- const ::rtl::OUString sInitialisationVectorProperty;
- const ::rtl::OUString sSizeProperty;
- const ::rtl::OUString sDigestProperty;
- const ::rtl::OUString sEncryptionAlgProperty;
- const ::rtl::OUString sStartKeyAlgProperty;
- const ::rtl::OUString sDigestAlgProperty;
-
- const ::rtl::OUString sWhiteSpace;
-
- const ::rtl::OUString sSHA256_URL;
- const ::rtl::OUString sSHA256_URL_TYPO;
- const ::rtl::OUString sSHA1_Name;
- const ::rtl::OUString sSHA1_URL;
-
- const ::rtl::OUString sSHA256_1k_URL;
- const ::rtl::OUString sSHA1_1k_Name;
- const ::rtl::OUString sSHA1_1k_URL;
-
- const ::rtl::OUString sBlowfish_Name;
- const ::rtl::OUString sBlowfish_URL;
- const ::rtl::OUString sAES128_URL;
- const ::rtl::OUString sAES192_URL;
- const ::rtl::OUString sAES256_URL;
-
- const ::rtl::OUString sPBKDF2_Name;
- const ::rtl::OUString sPBKDF2_URL;
-
-
- ::rtl::OUString PushNameAndNamespaces( const ::rtl::OUString& aName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs,
- StringHashMap& o_aConvertedAttribs );
- ::rtl::OUString ConvertNameWithNamespace( const ::rtl::OUString& aName, const StringHashMap& aNamespaces );
- ::rtl::OUString ConvertName( const ::rtl::OUString& aName );
-
-public:
- ManifestImport( std::vector < ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > > & rNewVector );
- ~ManifestImport( void );
- virtual void SAL_CALL startDocument( )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endDocument( )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL startElement( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endElement( const ::rtl::OUString& aName )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL characters( const ::rtl::OUString& aChars )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction( const ::rtl::OUString& aTarget, const ::rtl::OUString& aData )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setDocumentLocator( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& xLocator )
- throw(::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestReader.cxx b/package/source/manifest/ManifestReader.cxx
deleted file mode 100644
index 34fe9e262..000000000
--- a/package/source/manifest/ManifestReader.cxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-#include <ManifestReader.hxx>
-#include <ManifestImport.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/xml/sax/SAXParseException.hpp>
-#include <com/sun/star/xml/sax/XParser.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <vector>
-
-using namespace ::std;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::packages;
-using namespace ::com::sun::star::xml::sax;
-using namespace ::com::sun::star::packages::manifest;
-using ::rtl::OUString;
-
-ManifestReader::ManifestReader( const Reference < XMultiServiceFactory > & xNewFactory )
-: xFactory ( xNewFactory )
-{
-}
-ManifestReader::~ManifestReader()
-{
-}
-Sequence< Sequence< PropertyValue > > SAL_CALL ManifestReader::readManifestSequence( const Reference< XInputStream >& rStream )
- throw (::com::sun::star::uno::RuntimeException)
-{
- Sequence < Sequence < PropertyValue > > aManifestSequence;
- Reference < XParser > xParser (xFactory->createInstance ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.xml.sax.Parser" ) ) ), UNO_QUERY );
- if (xParser.is())
- {
- try
- {
- vector < Sequence < PropertyValue > > aManVector;
- Reference < XDocumentHandler > xFilter = new ManifestImport( aManVector );
- InputSource aParserInput;
- aParserInput.aInputStream = rStream;
- aParserInput.sSystemId = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "META-INF/manifest.xml" ) );
- xParser->setDocumentHandler ( xFilter );
- xParser->parseStream( aParserInput );
- aManifestSequence.realloc ( aManVector.size() );
- Sequence < PropertyValue > * pSequence = aManifestSequence.getArray();
- ::std::vector < Sequence < PropertyValue > >::const_iterator aIter = aManVector.begin();
- ::std::vector < Sequence < PropertyValue > >::const_iterator aEnd = aManVector.end();
- while( aIter != aEnd )
- *pSequence++ = (*aIter++);
- }
- catch (SAXParseException& )
- {
- }
- catch (SAXException& )
- {
- }
- catch (IOException& )
- {
- }
- }
- xParser->setDocumentHandler ( Reference < XDocumentHandler > () );
- return aManifestSequence;
-}
-// Component functions
-
-Reference < XInterface > SAL_CALL ManifestReader_createInstance( Reference< XMultiServiceFactory > const & rServiceFactory )
-{
- return *new ManifestReader( rServiceFactory );
-}
-OUString ManifestReader::static_getImplementationName()
-{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.comp.ManifestReader" ) );
-}
-
-sal_Bool SAL_CALL ManifestReader::static_supportsService(OUString const & rServiceName)
-{
- return rServiceName == getSupportedServiceNames()[0];
-}
-
-Sequence < OUString > ManifestReader::static_getSupportedServiceNames()
-{
- Sequence < OUString > aNames(1);
- aNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.ManifestReader" ) );
- return aNames;
-}
-
-OUString ManifestReader::getImplementationName()
- throw (RuntimeException)
-{
- return static_getImplementationName();
-}
-
-sal_Bool SAL_CALL ManifestReader::supportsService(OUString const & rServiceName)
- throw (RuntimeException)
-{
- return static_supportsService ( rServiceName );
-}
-
-Sequence < OUString > ManifestReader::getSupportedServiceNames()
- throw (RuntimeException)
-{
- return static_getSupportedServiceNames();
-}
-Reference < XSingleServiceFactory > ManifestReader::createServiceFactory( Reference < XMultiServiceFactory > const & rServiceFactory )
-{
- return cppu::createSingleFactory (rServiceFactory,
- static_getImplementationName(),
- ManifestReader_createInstance,
- static_getSupportedServiceNames());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestReader.hxx b/package/source/manifest/ManifestReader.hxx
deleted file mode 100644
index b200f6efb..000000000
--- a/package/source/manifest/ManifestReader.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MANIFEST_READER_HXX
-#define _MANIFEST_READER_HXX
-
-#include <cppuhelper/implbase2.hxx>
-#include <com/sun/star/packages/manifest/XManifestReader.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace com { namespace sun { namespace star {
- namespace lang { class XMultiServiceFactory; class XSingleServiceFactory; }
-} } }
-
-class ManifestReader: public ::cppu::WeakImplHelper2
-<
- ::com::sun::star::packages::manifest::XManifestReader,
- ::com::sun::star::lang::XServiceInfo
->
-{
-protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory;
-public:
- ManifestReader( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNewFactory );
- virtual ~ManifestReader();
-
- // XManifestReader
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > SAL_CALL readManifestSequence( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rStream )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-
- // Component constructor
- static ::rtl::OUString static_getImplementationName();
- static ::com::sun::star::uno::Sequence < ::rtl::OUString > static_getSupportedServiceNames();
- sal_Bool SAL_CALL static_supportsService(rtl::OUString const & rServiceName);
- static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestWriter.cxx b/package/source/manifest/ManifestWriter.cxx
deleted file mode 100644
index 6d7c84801..000000000
--- a/package/source/manifest/ManifestWriter.cxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-#include <ManifestWriter.hxx>
-#include <ManifestExport.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/xml/sax/SAXException.hpp>
-
-#include <osl/diagnose.hxx>
-
-using namespace ::rtl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::packages;
-using namespace ::com::sun::star::xml::sax;
-using namespace ::com::sun::star::packages::manifest;
-
-ManifestWriter::ManifestWriter( const Reference < XMultiServiceFactory > & xNewFactory )
-: xFactory ( xNewFactory )
-{
-}
-ManifestWriter::~ManifestWriter()
-{
-}
-
-// XManifestWriter methods
-void SAL_CALL ManifestWriter::writeManifestSequence( const Reference< XOutputStream >& rStream, const Sequence< Sequence< PropertyValue > >& rSequence )
- throw (RuntimeException)
-{
- OUString sSaxWriter ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.xml.sax.Writer" ) );
- Reference < XActiveDataSource > xSource ( xFactory->createInstance ( sSaxWriter ), UNO_QUERY );
- if (xSource.is())
- {
- xSource->setOutputStream ( rStream );
- Reference < XDocumentHandler > xHandler ( xSource, UNO_QUERY );
- if (xHandler.is())
- try {
- ManifestExport aExporter ( xHandler, rSequence);
- }
- catch( SAXException& )
- {
- throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
- }
- }
-}
-
-// Component methods
-Reference < XInterface > SAL_CALL ManifestWriter_createInstance( Reference< XMultiServiceFactory > const & rServiceFactory )
-{
- return *new ManifestWriter( rServiceFactory );
-}
-
-OUString ManifestWriter::static_getImplementationName()
-{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.comp.ManifestWriter" ) );
-}
-
-sal_Bool SAL_CALL ManifestWriter::static_supportsService(OUString const & rServiceName)
-{
- return rServiceName == getSupportedServiceNames()[0];
-}
-Sequence < OUString > ManifestWriter::static_getSupportedServiceNames()
-{
- Sequence < OUString > aNames(1);
- aNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.manifest.ManifestWriter" ) );
- return aNames;
-}
-
-OUString ManifestWriter::getImplementationName()
- throw (RuntimeException)
-{
- return static_getImplementationName();
-}
-
-sal_Bool SAL_CALL ManifestWriter::supportsService(OUString const & rServiceName)
- throw (RuntimeException)
-{
- return static_supportsService ( rServiceName );
-}
-Sequence < OUString > ManifestWriter::getSupportedServiceNames()
- throw (RuntimeException)
-{
- return static_getSupportedServiceNames();
-}
-Reference < XSingleServiceFactory > ManifestWriter::createServiceFactory( Reference < XMultiServiceFactory > const & rServiceFactory )
-{
- return cppu::createSingleFactory (rServiceFactory,
- static_getImplementationName(),
- ManifestWriter_createInstance,
- static_getSupportedServiceNames());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/ManifestWriter.hxx b/package/source/manifest/ManifestWriter.hxx
deleted file mode 100644
index 34c4e45d3..000000000
--- a/package/source/manifest/ManifestWriter.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MANIFEST_WRITER_HXX
-#define _MANIFEST_WRITER_HXX
-
-#include <cppuhelper/implbase2.hxx>
-#include <com/sun/star/packages/manifest/XManifestWriter.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace com { namespace sun { namespace star {
- namespace lang { class XMultiServiceFactory; class XSingleServiceFactory; }
-} } }
-
-class ManifestWriter: public ::cppu::WeakImplHelper2
-<
- ::com::sun::star::packages::manifest::XManifestWriter,
- ::com::sun::star::lang::XServiceInfo
->
-{
-protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory;
-public:
- ManifestWriter( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xNewFactory );
- virtual ~ManifestWriter();
-
- // XManifestWriter
- virtual void SAL_CALL writeManifestSequence( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rStream, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& rSequence )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw (::com::sun::star::uno::RuntimeException);
-
- // Component constructor
- static ::rtl::OUString static_getImplementationName();
- static ::com::sun::star::uno::Sequence < ::rtl::OUString > static_getSupportedServiceNames();
- static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
- sal_Bool SAL_CALL static_supportsService(rtl::OUString const & rServiceName);
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/UnoRegister.cxx b/package/source/manifest/UnoRegister.cxx
deleted file mode 100644
index c5734977d..000000000
--- a/package/source/manifest/UnoRegister.cxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_package.hxx"
-#include <ManifestReader.hxx>
-#include <ManifestWriter.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <osl/diagnose.h>
-#include <ZipPackage.hxx>
-
-#include <zipfileaccess.hxx>
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::packages;
-using namespace ::com::sun::star::packages::manifest;
-
-using rtl::OUString;
-
-/**
- * This function is called to get service factories for an implementation.
- * @param pImplName name of implementation
- * @param pServiceManager generic uno interface providing a service manager to instantiate components
- * @param pRegistryKey registry data key to read and write component persistent data
- * @return a component factory (generic uno interface)
- */
-extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = 0;
- uno::Reference< XMultiServiceFactory > xSMgr(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
- uno::Reference< XSingleServiceFactory > xFactory;
-
- if (ManifestReader::static_getImplementationName().compareToAscii( pImplName ) == 0)
- xFactory = ManifestReader::createServiceFactory ( xSMgr );
- else if (ManifestWriter::static_getImplementationName().compareToAscii( pImplName ) == 0)
- xFactory = ManifestWriter::createServiceFactory ( xSMgr );
- else if (ZipPackage::static_getImplementationName().compareToAscii( pImplName ) == 0)
- xFactory = ZipPackage::createServiceFactory ( xSMgr );
- else if ( OZipFileAccess::impl_staticGetImplementationName().compareToAscii( pImplName ) == 0 )
- xFactory = ::cppu::createSingleFactory( xSMgr,
- OZipFileAccess::impl_staticGetImplementationName(),
- OZipFileAccess::impl_staticCreateSelfInstance,
- OZipFileAccess::impl_staticGetSupportedServiceNames() );
-
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- return pRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/source/manifest/makefile.mk b/package/source/manifest/makefile.mk
deleted file mode 100644
index abc61848f..000000000
--- a/package/source/manifest/makefile.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=package
-TARGET=manifest
-AUTOSEG=true
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(L10N_framework)"==""
-
-SLOFILES= \
- $(SLO)$/ManifestReader.obj \
- $(SLO)$/ManifestWriter.obj \
- $(SLO)$/ManifestImport.obj \
- $(SLO)$/ManifestExport.obj \
- $(SLO)$/Base64Codec.obj \
- $(SLO)$/UnoRegister.obj
-
-.ENDIF # L10N_framework
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk