diff options
Diffstat (limited to 'oox/source/core')
-rw-r--r-- | oox/source/core/filterbase.cxx | 3 | ||||
-rw-r--r-- | oox/source/core/filterdetect.cxx | 4 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index ff498af719d2..1eee8458bbf1 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -545,7 +545,8 @@ void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDesc OUString sFilterName = mxImpl->maMediaDesc.getUnpackedValueOrDefault( "FilterName", OUString() ); try { - Reference< XNameAccess > xFilters( Reference<XMultiServiceFactory>(getComponentContext()->getServiceManager(), UNO_QUERY_THROW)->createInstance("com.sun.star.document.FilterFactory" ), UNO_QUERY_THROW ); + Reference<XMultiServiceFactory> xFactory(getComponentContext()->getServiceManager(), UNO_QUERY_THROW); + Reference<XNameAccess> xFilters(xFactory->createInstance("com.sun.star.document.FilterFactory" ), UNO_QUERY_THROW ); Any aValues = xFilters->getByName( sFilterName ); Sequence<PropertyValue > aPropSeq; aValues >>= aPropSeq; diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 7dd3f9210003..154cee0d8bde 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -286,8 +286,8 @@ PasswordVerifier::PasswordVerifier( DocumentDecryption& aDecryptor ) : comphelper::DocPasswordVerifierResult PasswordVerifier::verifyPassword( const OUString& rPassword, Sequence<NamedValue>& rEncryptionData ) { - if( mDecryptor.generateEncryptionKey(rPassword) ) - rEncryptionData = mDecryptor.createEncryptionData(); + if(mDecryptor.generateEncryptionKey(rPassword)) + rEncryptionData = mDecryptor.createEncryptionData(rPassword); return rEncryptionData.hasElements() ? comphelper::DocPasswordVerifierResult_OK : comphelper::DocPasswordVerifierResult_WRONG_PASSWORD; } diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 763090ab2b20..109e9b1f3076 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -657,7 +657,7 @@ Reference<XStream> XmlFilterBase::implGetOutputStream( MediaDescriptor& rMediaDe OUString aPassword; for (int i=0; i<aMediaEncData.getLength(); i++) { - if (aMediaEncData[i].Name == "Password") + if (aMediaEncData[i].Name == "OOXPassword") { Any& any = aMediaEncData[i].Value; any >>= aPassword; @@ -690,7 +690,7 @@ bool XmlFilterBase::implFinalizeExport( MediaDescriptor& rMediaDescriptor ) for (int i=0; i<aMediaEncData.getLength(); i++) { - if (aMediaEncData[i].Name == "Password") + if (aMediaEncData[i].Name == "OOXPassword") { Any& any = aMediaEncData[i].Value; any >>= aPassword; |