summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-20 15:22:53 +0200
committerNoel Grandin <noel@peralex.com>2015-11-23 08:26:11 +0200
commit56b2a2d874c5c74af0eb02d6d542f4dc9d748870 (patch)
tree23930cc5a04fea5cedd446a53b1abf27ed1c74b5 /package/source
parent8c10722513b24b47b91f6469684f59c5136f574d (diff)
loplugin:unusedfields in oox,package,reportdesign
Change-Id: I83d03dcc76b5f0d54ebb0513ae972acb0db8eef1
Diffstat (limited to 'package/source')
-rw-r--r--package/source/manifest/ManifestImport.cxx341
-rw-r--r--package/source/manifest/ManifestImport.hxx4
2 files changed, 147 insertions, 198 deletions
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index eb8ed2b3ad36..7cc28660d783 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -33,63 +33,59 @@ using namespace com::sun::star;
using namespace std;
ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
-: bIgnoreEncryptData ( false )
-, nDerivedKeySize( 0 )
-, rManVector ( rNewManVector )
-
-, sFileEntryElement ( ELEMENT_FILE_ENTRY )
-, sManifestElement ( ELEMENT_MANIFEST )
-, sEncryptionDataElement( ELEMENT_ENCRYPTION_DATA )
-, sAlgorithmElement ( ELEMENT_ALGORITHM )
-, sStartKeyAlgElement ( ELEMENT_START_KEY_GENERATION )
-, sKeyDerivationElement( ELEMENT_KEY_DERIVATION )
-
-, sCdataAttribute ( ATTRIBUTE_CDATA )
-, sMediaTypeAttribute ( ATTRIBUTE_MEDIA_TYPE )
-, sVersionAttribute ( ATTRIBUTE_VERSION )
-, sFullPathAttribute ( ATTRIBUTE_FULL_PATH )
-, sSizeAttribute ( ATTRIBUTE_SIZE )
-, sSaltAttribute ( ATTRIBUTE_SALT )
-, sInitialisationVectorAttribute ( ATTRIBUTE_INITIALISATION_VECTOR )
-, sIterationCountAttribute ( ATTRIBUTE_ITERATION_COUNT )
-, sKeySizeAttribute ( ATTRIBUTE_KEY_SIZE )
-, sAlgorithmNameAttribute ( ATTRIBUTE_ALGORITHM_NAME )
-, sStartKeyAlgNameAttribute ( ATTRIBUTE_START_KEY_GENERATION_NAME )
-, sKeyDerivationNameAttribute ( ATTRIBUTE_KEY_DERIVATION_NAME )
-, sChecksumAttribute ( ATTRIBUTE_CHECKSUM )
-, sChecksumTypeAttribute ( ATTRIBUTE_CHECKSUM_TYPE )
-
-, sFullPathProperty ( "FullPath" )
-, sMediaTypeProperty ( "MediaType" )
-, sVersionProperty ( "Version" )
-, sIterationCountProperty ( "IterationCount" )
-, sDerivedKeySizeProperty ( "DerivedKeySize" )
-, sSaltProperty ( "Salt" )
-, sInitialisationVectorProperty ( "InitialisationVector" )
-, sSizeProperty ( "Size" )
-, sDigestProperty ( "Digest" )
-, sEncryptionAlgProperty ( "EncryptionAlgorithm" )
-, sStartKeyAlgProperty ( "StartKeyAlgorithm" )
-, sDigestAlgProperty ( "DigestAlgorithm" )
-
-, sWhiteSpace ( " " )
-
-, sSHA256_URL ( SHA256_URL )
-, sSHA1_Name ( SHA1_NAME )
-, sSHA1_URL ( SHA1_URL )
-
-, sSHA256_1k_URL ( SHA256_1K_URL )
-, sSHA1_1k_Name ( SHA1_1K_NAME )
-, sSHA1_1k_URL ( SHA1_1K_URL )
-
-, sBlowfish_Name ( BLOWFISH_NAME )
-, sBlowfish_URL ( BLOWFISH_URL )
-, sAES128_URL ( AES128_URL )
-, sAES192_URL ( AES192_URL )
-, sAES256_URL ( AES256_URL )
-
-, sPBKDF2_Name ( PBKDF2_NAME )
-, sPBKDF2_URL ( PBKDF2_URL )
+ : bIgnoreEncryptData ( false )
+ , nDerivedKeySize( 0 )
+ , rManVector ( rNewManVector )
+
+ , sFileEntryElement ( ELEMENT_FILE_ENTRY )
+ , sEncryptionDataElement( ELEMENT_ENCRYPTION_DATA )
+ , sAlgorithmElement ( ELEMENT_ALGORITHM )
+ , sStartKeyAlgElement ( ELEMENT_START_KEY_GENERATION )
+ , sKeyDerivationElement( ELEMENT_KEY_DERIVATION )
+
+ , sMediaTypeAttribute ( ATTRIBUTE_MEDIA_TYPE )
+ , sVersionAttribute ( ATTRIBUTE_VERSION )
+ , sFullPathAttribute ( ATTRIBUTE_FULL_PATH )
+ , sSizeAttribute ( ATTRIBUTE_SIZE )
+ , sSaltAttribute ( ATTRIBUTE_SALT )
+ , sInitialisationVectorAttribute ( ATTRIBUTE_INITIALISATION_VECTOR )
+ , sIterationCountAttribute ( ATTRIBUTE_ITERATION_COUNT )
+ , sKeySizeAttribute ( ATTRIBUTE_KEY_SIZE )
+ , sAlgorithmNameAttribute ( ATTRIBUTE_ALGORITHM_NAME )
+ , sStartKeyAlgNameAttribute ( ATTRIBUTE_START_KEY_GENERATION_NAME )
+ , sKeyDerivationNameAttribute ( ATTRIBUTE_KEY_DERIVATION_NAME )
+ , sChecksumAttribute ( ATTRIBUTE_CHECKSUM )
+ , sChecksumTypeAttribute ( ATTRIBUTE_CHECKSUM_TYPE )
+
+ , sFullPathProperty ( "FullPath" )
+ , sMediaTypeProperty ( "MediaType" )
+ , sVersionProperty ( "Version" )
+ , sIterationCountProperty ( "IterationCount" )
+ , sDerivedKeySizeProperty ( "DerivedKeySize" )
+ , sSaltProperty ( "Salt" )
+ , sInitialisationVectorProperty ( "InitialisationVector" )
+ , sSizeProperty ( "Size" )
+ , sDigestProperty ( "Digest" )
+ , sEncryptionAlgProperty ( "EncryptionAlgorithm" )
+ , sStartKeyAlgProperty ( "StartKeyAlgorithm" )
+ , sDigestAlgProperty ( "DigestAlgorithm" )
+
+ , sSHA256_URL ( SHA256_URL )
+ , sSHA1_Name ( SHA1_NAME )
+ , sSHA1_URL ( SHA1_URL )
+
+ , sSHA256_1k_URL ( SHA256_1K_URL )
+ , sSHA1_1k_Name ( SHA1_1K_NAME )
+ , sSHA1_1k_URL ( SHA1_1K_URL )
+
+ , sBlowfish_Name ( BLOWFISH_NAME )
+ , sBlowfish_URL ( BLOWFISH_URL )
+ , sAES128_URL ( AES128_URL )
+ , sAES192_URL ( AES192_URL )
+ , sAES256_URL ( AES256_URL )
+
+ , sPBKDF2_Name ( PBKDF2_NAME )
+ , sPBKDF2_URL ( PBKDF2_URL )
{
aStack.reserve( 10 );
}
@@ -99,17 +95,17 @@ ManifestImport::~ManifestImport()
}
void SAL_CALL ManifestImport::startDocument( )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
void SAL_CALL ManifestImport::endDocument( )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
void ManifestImport::doFileEntry(StringHashMap &rConvertedAttribs)
- throw( uno::RuntimeException )
+throw( uno::RuntimeException )
{
aSequence.resize(PKG_SIZE_ENCR_MNFST);
@@ -119,15 +115,13 @@ void ManifestImport::doFileEntry(StringHashMap &rConvertedAttribs)
aSequence[PKG_MNFST_MEDIATYPE].Value <<= rConvertedAttribs[sMediaTypeAttribute];
OUString sVersion = rConvertedAttribs[sVersionAttribute];
- if ( sVersion.getLength() )
- {
+ if ( sVersion.getLength() ) {
aSequence[PKG_MNFST_VERSION].Name = sVersionProperty;
aSequence[PKG_MNFST_VERSION].Value <<= sVersion;
}
OUString sSize = rConvertedAttribs[sSizeAttribute];
- if ( sSize.getLength() )
- {
+ if ( sSize.getLength() ) {
sal_Int64 nSize = sSize.toInt64();
aSequence[PKG_MNFST_UCOMPSIZE].Name = sSizeProperty;
aSequence[PKG_MNFST_UCOMPSIZE].Value <<= nSize;
@@ -135,29 +129,23 @@ void ManifestImport::doFileEntry(StringHashMap &rConvertedAttribs)
}
void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs)
- throw( uno::RuntimeException )
+throw( uno::RuntimeException )
{
// 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 = rConvertedAttribs[sChecksumTypeAttribute];
- if ( !bIgnoreEncryptData )
- {
- if ( aString.equals( sSHA1_1k_Name ) || aString.equals( sSHA1_1k_URL ) )
- {
+ if ( !bIgnoreEncryptData ) {
+ if ( aString.equals( sSHA1_1k_Name ) || aString.equals( sSHA1_1k_URL ) ) {
aSequence[PKG_MNFST_DIGESTALG].Name = sDigestAlgProperty;
aSequence[PKG_MNFST_DIGESTALG].Value <<= xml::crypto::DigestID::SHA1_1K;
- }
- else if ( aString.equals( sSHA256_1k_URL ) )
- {
+ } else if ( aString.equals( sSHA256_1k_URL ) ) {
aSequence[PKG_MNFST_DIGESTALG].Name = sDigestAlgProperty;
aSequence[PKG_MNFST_DIGESTALG].Value <<= xml::crypto::DigestID::SHA256_1K;
- }
- else
+ } else
bIgnoreEncryptData = true;
- if ( !bIgnoreEncryptData )
- {
+ if ( !bIgnoreEncryptData ) {
aString = rConvertedAttribs[sChecksumAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::sax::Converter::decodeBase64(aDecodeBuffer, aString);
@@ -168,42 +156,32 @@ void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs)
}
void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
- throw( uno::RuntimeException )
+throw( uno::RuntimeException )
{
- if ( !bIgnoreEncryptData )
- {
+ if ( !bIgnoreEncryptData ) {
OUString aString = rConvertedAttribs[sAlgorithmNameAttribute];
- if ( aString.equals( sBlowfish_Name ) || aString.equals( sBlowfish_URL ) )
- {
+ if ( aString.equals( sBlowfish_Name ) || aString.equals( sBlowfish_URL ) ) {
aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::BLOWFISH_CFB_8;
- }
- else if ( aString.equals( sAES256_URL ) )
- {
+ } else if ( aString.equals( sAES256_URL ) ) {
aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].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 ) )
- {
+ } else if ( aString.equals( sAES192_URL ) ) {
aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].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 ) )
- {
+ } else if ( aString.equals( sAES128_URL ) ) {
aSequence[PKG_MNFST_ENCALG].Name = sEncryptionAlgProperty;
aSequence[PKG_MNFST_ENCALG].Value <<= xml::crypto::CipherID::AES_CBC_W3C_PADDING;
OSL_ENSURE( !nDerivedKeySize || nDerivedKeySize == 16, "Unexpected derived key length!" );
nDerivedKeySize = 16;
- }
- else
+ } else
bIgnoreEncryptData = true;
- if ( !bIgnoreEncryptData )
- {
+ if ( !bIgnoreEncryptData ) {
aString = rConvertedAttribs[sInitialisationVectorAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::sax::Converter::decodeBase64(aDecodeBuffer, aString);
@@ -214,13 +192,11 @@ void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
}
void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
- throw( uno::RuntimeException )
+throw( uno::RuntimeException )
{
- if ( !bIgnoreEncryptData )
- {
+ if ( !bIgnoreEncryptData ) {
OUString aString = rConvertedAttribs[sKeyDerivationNameAttribute];
- if ( aString.equals( sPBKDF2_Name ) || aString.equals( sPBKDF2_URL ) )
- {
+ if ( aString.equals( sPBKDF2_Name ) || aString.equals( sPBKDF2_URL ) ) {
aString = rConvertedAttribs[sSaltAttribute];
uno::Sequence < sal_Int8 > aDecodeBuffer;
::sax::Converter::decodeBase64(aDecodeBuffer, aString);
@@ -232,45 +208,38 @@ void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
aSequence[PKG_MNFST_ITERATION].Value <<= aString.toInt32();
aString = rConvertedAttribs[sKeySizeAttribute];
- if ( aString.getLength() )
- {
+ 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 )
+ } else if ( !nDerivedKeySize )
nDerivedKeySize = 16;
else if ( nDerivedKeySize != 16 )
OSL_ENSURE( false, "Default derived key length differs from the expected one!" );
aSequence[PKG_MNFST_DERKEYSIZE].Name = sDerivedKeySizeProperty;
aSequence[PKG_MNFST_DERKEYSIZE].Value <<= nDerivedKeySize;
- }
- else
+ } else
bIgnoreEncryptData = true;
}
}
void ManifestImport::doStartKeyAlg(StringHashMap &rConvertedAttribs)
- throw( uno::RuntimeException )
+throw( uno::RuntimeException )
{
OUString aString = rConvertedAttribs[sStartKeyAlgNameAttribute];
- if ( aString.equals( sSHA256_URL ) )
- {
+ if ( aString.equals( sSHA256_URL ) ) {
aSequence[PKG_MNFST_STARTALG].Name = sStartKeyAlgProperty;
aSequence[PKG_MNFST_STARTALG].Value <<= xml::crypto::DigestID::SHA256;
- }
- else if ( aString.equals( sSHA1_Name ) || aString.equals( sSHA1_URL ) )
- {
+ } else if ( aString.equals( sSHA1_Name ) || aString.equals( sSHA1_URL ) ) {
aSequence[PKG_MNFST_STARTALG].Name = sStartKeyAlgProperty;
aSequence[PKG_MNFST_STARTALG].Value <<= xml::crypto::DigestID::SHA1;
- }
- else
+ } else
bIgnoreEncryptData = true;
}
void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
StringHashMap aConvertedAttribs;
OUString aConvertedName = PushNameAndNamespaces( aName, xAttribs, aConvertedAttribs );
@@ -279,77 +248,70 @@ void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Re
assert(nLevel >= 1);
- switch (nLevel)
- {
- case 1:
- {
- if (aConvertedName != ELEMENT_MANIFEST) //manifest:manifest
- aStack.back().m_bValid = false;
- break;
- }
- case 2:
- {
- if (aConvertedName == sFileEntryElement) //manifest:file-entry
- doFileEntry(aConvertedAttribs);
- else
- aStack.back().m_bValid = false;
- break;
- }
- case 3:
- {
- ManifestStack::reverse_iterator aIter = aStack.rbegin();
- ++aIter;
-
- if (!aIter->m_bValid)
- aStack.back().m_bValid = false;
- else if (aConvertedName.equals(sEncryptionDataElement)) //manifest:encryption-data
- doEncryptionData(aConvertedAttribs);
- else
- aStack.back().m_bValid = false;
- break;
- }
- case 4:
- {
- ManifestStack::reverse_iterator aIter = aStack.rbegin();
- ++aIter;
-
- if (!aIter->m_bValid)
- aStack.back().m_bValid = false;
- else if (aConvertedName.equals(sAlgorithmElement)) //manifest:algorithm,
- doAlgorithm(aConvertedAttribs);
- else if (aConvertedName.equals(sKeyDerivationElement)) //manifest:key-derivation,
- doKeyDerivation(aConvertedAttribs);
- else if (aConvertedName.equals(sStartKeyAlgElement)) //manifest:start-key-generation
- doStartKeyAlg(aConvertedAttribs);
- else
- aStack.back().m_bValid = false;
- break;
- }
- default:
+ switch (nLevel) {
+ case 1: {
+ if (aConvertedName != ELEMENT_MANIFEST) //manifest:manifest
aStack.back().m_bValid = false;
- break;
+ break;
+ }
+ case 2: {
+ if (aConvertedName == sFileEntryElement) //manifest:file-entry
+ doFileEntry(aConvertedAttribs);
+ else
+ aStack.back().m_bValid = false;
+ break;
+ }
+ case 3: {
+ ManifestStack::reverse_iterator aIter = aStack.rbegin();
+ ++aIter;
+
+ if (!aIter->m_bValid)
+ aStack.back().m_bValid = false;
+ else if (aConvertedName.equals(sEncryptionDataElement)) //manifest:encryption-data
+ doEncryptionData(aConvertedAttribs);
+ else
+ aStack.back().m_bValid = false;
+ break;
+ }
+ case 4: {
+ ManifestStack::reverse_iterator aIter = aStack.rbegin();
+ ++aIter;
+
+ if (!aIter->m_bValid)
+ aStack.back().m_bValid = false;
+ else if (aConvertedName.equals(sAlgorithmElement)) //manifest:algorithm,
+ doAlgorithm(aConvertedAttribs);
+ else if (aConvertedName.equals(sKeyDerivationElement)) //manifest:key-derivation,
+ doKeyDerivation(aConvertedAttribs);
+ else if (aConvertedName.equals(sStartKeyAlgElement)) //manifest:start-key-generation
+ doStartKeyAlg(aConvertedAttribs);
+ else
+ aStack.back().m_bValid = false;
+ break;
+ }
+ default:
+ aStack.back().m_bValid = false;
+ break;
}
}
namespace
{
- bool isEmpty(const css::beans::PropertyValue &rProp)
- {
- return rProp.Name.isEmpty();
- }
+bool isEmpty(const css::beans::PropertyValue &rProp)
+{
+ return rProp.Name.isEmpty();
+}
}
void SAL_CALL ManifestImport::endElement( const OUString& aName )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
OUString aConvertedName = ConvertName( aName );
- if ( !aStack.empty() && aStack.rbegin()->m_aConvertedName.equals( aConvertedName ) )
- {
- if ( aConvertedName.equals( sFileEntryElement ) && aStack.back().m_bValid )
- {
+ if ( !aStack.empty() && aStack.rbegin()->m_aConvertedName.equals( aConvertedName ) ) {
+ if ( aConvertedName.equals( sFileEntryElement ) && aStack.back().m_bValid ) {
css::beans::PropertyValue aEmpty;
aSequence.erase(std::remove_if(aSequence.begin(), aSequence.end(),
- isEmpty), aSequence.end());
+ isEmpty), aSequence.end());
bIgnoreEncryptData = false;
rManVector.push_back ( comphelper::containerToSequence(aSequence) );
@@ -362,22 +324,22 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
}
void SAL_CALL ManifestImport::characters( const OUString& /*aChars*/ )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
void SAL_CALL ManifestImport::ignorableWhitespace( const OUString& /*aWhitespaces*/ )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
void SAL_CALL ManifestImport::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
void SAL_CALL ManifestImport::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ )
- throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
+throw( xml::sax::SAXException, uno::RuntimeException, std::exception )
{
}
@@ -386,25 +348,20 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno
StringHashMap aNamespaces;
::std::vector< ::std::pair< OUString, OUString > > aAttribsStrs;
- if ( xAttribs.is() )
- {
+ if ( xAttribs.is() ) {
sal_Int16 nAttrCount = xAttribs.is() ? xAttribs->getLength() : 0;
aAttribsStrs.reserve( nAttrCount );
- for( sal_Int16 nInd = 0; nInd < nAttrCount; nInd++ )
- {
+ for( sal_Int16 nInd = 0; nInd < nAttrCount; nInd++ ) {
OUString aAttrName = xAttribs->getNameByIndex( nInd );
OUString aAttrValue = xAttribs->getValueByIndex( nInd );
if ( aAttrName.getLength() >= 5
- && aAttrName.startsWith("xmlns")
- && ( aAttrName.getLength() == 5 || aAttrName[5] == ':' ) )
- {
+ && aAttrName.startsWith("xmlns")
+ && ( aAttrName.getLength() == 5 || aAttrName[5] == ':' ) ) {
// this is a namespace declaration
OUString aNsName( ( aAttrName.getLength() == 5 ) ? OUString() : aAttrName.copy( 6 ) );
aNamespaces[aNsName] = aAttrValue;
- }
- else
- {
+ } else {
// this is no namespace declaration
aAttribsStrs.push_back( pair< OUString, OUString >( aAttrName, aAttrValue ) );
}
@@ -417,8 +374,7 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno
aStack.push_back( ManifestScopeEntry( aConvertedName, aNamespaces ) );
- for ( size_t nInd = 0; nInd < aAttribsStrs.size(); nInd++ )
- {
+ for ( size_t nInd = 0; nInd < aAttribsStrs.size(); nInd++ ) {
// convert the attribute names on filling
o_aConvertedAttribs[ConvertName( aAttribsStrs[nInd].first )] = aAttribsStrs[nInd].second;
}
@@ -432,8 +388,7 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const
OUString aPureName = aName;
sal_Int32 nInd = aName.indexOf( ( sal_Unicode )':' );
- if ( nInd != -1 && nInd < aName.getLength() )
- {
+ if ( nInd != -1 && nInd < aName.getLength() ) {
aNsAlias = aName.copy( 0, nInd );
aPureName = aName.copy( nInd + 1 );
}
@@ -442,8 +397,7 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const
StringHashMap::const_iterator aIter = aNamespaces.find( aNsAlias );
if ( aIter != aNamespaces.end()
- && ( aIter->second == MANIFEST_NAMESPACE || aIter->second == MANIFEST_OASIS_NAMESPACE ) )
- {
+ && ( aIter->second == MANIFEST_NAMESPACE || aIter->second == MANIFEST_OASIS_NAMESPACE ) ) {
// no check for manifest.xml consistency currently since the old versions have supported inconsistent documents as well
aResult = MANIFEST_NSPREFIX;
aResult += aPureName;
@@ -455,8 +409,7 @@ OUString ManifestImport::ConvertNameWithNamespace( const OUString& aName, const
OUString ManifestImport::ConvertName( const OUString& aName )
{
OUString aConvertedName;
- for ( ManifestStack::reverse_iterator aIter = aStack.rbegin(); !aConvertedName.getLength() && aIter != aStack.rend(); ++aIter )
- {
+ for ( ManifestStack::reverse_iterator aIter = aStack.rbegin(); !aConvertedName.getLength() && aIter != aStack.rend(); ++aIter ) {
if ( !aIter->m_aNamespaces.empty() )
aConvertedName = ConvertNameWithNamespace( aName, aIter->m_aNamespaces );
}
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index e62c401f9f4e..19484969cb75 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -61,13 +61,11 @@ protected:
::std::vector < css::uno::Sequence < css::beans::PropertyValue > > & rManVector;
const OUString sFileEntryElement;
- const OUString sManifestElement;
const OUString sEncryptionDataElement;
const OUString sAlgorithmElement;
const OUString sStartKeyAlgElement;
const OUString sKeyDerivationElement;
- const OUString sCdataAttribute;
const OUString sMediaTypeAttribute;
const OUString sVersionAttribute;
const OUString sFullPathAttribute;
@@ -95,8 +93,6 @@ protected:
const OUString sStartKeyAlgProperty;
const OUString sDigestAlgProperty;
- const OUString sWhiteSpace;
-
const OUString sSHA256_URL;
const OUString sSHA1_Name;
const OUString sSHA1_URL;