[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - package/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 3 17:54:06 UTC 2019


 package/source/zippackage/ZipPackage.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit caef781b0aa6433ef210f9a5cf6e52e33d7e534a
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Mon Mar 25 10:29:38 2019 -0400
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Apr 3 19:53:42 2019 +0200

    oox: don't trim the default sequences
    
    Change-Id: Iefa4bd729b0d4ab1dab870b16e7cbe29ac08a49a
    Reviewed-on: https://gerrit.libreoffice.org/69721
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 346f509d2250..9527140e7d47 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1085,11 +1085,8 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
     pEntry->nSize = pEntry->nCompressedSize = -1;
     pEntry->nTime = ZipOutputStream::getCurrentDosTime();
 
-    // Convert vector into a uno::Sequence
-    // TODO/LATER: use Default entries in future
+    // Add default entries, the count must be updated manually when appending.
     uno::Sequence< beans::StringPair > aDefaultsSequence(4);
-    // Add at least the standard default entries.
-    sal_Int32 nDefSeqLength = 1;
     aDefaultsSequence[0].First = "xml";
     aDefaultsSequence[0].Second= "application/xml";
     aDefaultsSequence[1].First = "rels";
@@ -1122,7 +1119,6 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
         }
     }
     aOverridesSequence.realloc(nOverSeqLength);
-    aDefaultsSequence.realloc(nDefSeqLength);
 
     ::comphelper::OFOPXMLHelper::WriteContentSequence(
             xConTypeOutStream, aDefaultsSequence, aOverridesSequence, m_xContext );


More information about the Libreoffice-commits mailing list