[Libreoffice-commits] core.git: Branch 'feature/cib_contract3756' - oox/source

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Sun Oct 13 20:58:42 UTC 2019


 oox/source/core/xmlfilterbase.cxx |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

New commits:
commit e195e6d24255a30bf1ebe57473116b2772182459
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Sun Oct 13 23:56:39 2019 +0300
Commit:     Vasily Melenchuk <vasily.melenchuk at cib.de>
CommitDate: Sun Oct 13 23:56:39 2019 +0300

    oox: init OLE container if any encryption data is present
    
    Some encryption methods could use other than "OOXPassword"
    values. So we could rely just on "EncryptionData" exists and
    it is not empty
    
    Change-Id: Iece53601282a1bd30b592c998c77185c9dcbbe7c

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index c1c2972f4e9c..fe7e541de4b3 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -881,17 +881,7 @@ Reference<XStream> XmlFilterBase::implGetOutputStream( MediaDescriptor& rMediaDe
                                         MediaDescriptor::PROP_ENCRYPTIONDATA(),
                                         Sequence< NamedValue >() );
 
-    OUString aPassword;
-    for (int i=0; i<aMediaEncData.getLength(); i++)
-    {
-        if (aMediaEncData[i].Name == "OOXPassword")
-        {
-            Any& any = aMediaEncData[i].Value;
-            any >>= aPassword;
-            break;
-        }
-    }
-    if (aPassword.isEmpty())
+    if (aMediaEncData.getLength() == 0)
     {
         return FilterBase::implGetOutputStream( rMediaDescriptor );
     }


More information about the Libreoffice-commits mailing list