summaryrefslogtreecommitdiff
path: root/package/source/zipapi
AgeCommit message (Collapse)Author
2023-05-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ief95f111350808f010539bb733a553007d30a9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152006 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-25Resolves: tdf#155005 use of uninitialised valueCaolán McNamara
==2515797== Conditional jump or move depends on uninitialised value(s) ==2515797== at 0x33FAB399: ZipFile::recover() (ZipFile.cxx:1090) ==2515797== by 0x33FA4D32: ZipFile::ZipFile(rtl::Reference<comphelper::RefCountedMutex>, com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, bool, bool) (ZipFile.cxx:111) ==2515797== by 0x33FEF134: void std::_Construct<ZipFile, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(ZipFile*, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (stl_construct.h:119) ==2515797== by 0x33FED528: void std::_Optional_payload_base<ZipFile>::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:278) ==2515797== by 0x33FEB73B: void std::_Optional_base_impl<ZipFile, std::_Optional_base<ZipFile, false, false> >::_M_construct<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:457) ==2515797== by 0x33FE77DB: std::enable_if<is_constructible_v<ZipFile, rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>, ZipFile&>::type std::optional<ZipFile>::emplace<rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, bool&>(rtl::Reference<comphelper::RefCountedMutex>&, com::sun::star::uno::Reference<com::sun::star::io::XInputStream>&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool&&, bool&) (optional:918) ==2515797== by 0x33FD61FD: ZipPackage::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (ZipPackage.cxx:760) ==2515797== by 0x64DE1EC: cppuhelper::ServiceManager::Data::Implementation::doCreateInstanceWithArguments(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (servicemanager.cxx:732) ==2515797== by 0x64DDF19: cppuhelper::ServiceManager::Data::Implementation::createInstanceWithArguments(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (servicemanager.cxx:694) ==2515797== by 0x64E0E8F: cppuhelper::ServiceManager::createInstanceWithArgumentsAndContext(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (servicemanager.cxx:1018) ==2515797== by 0x34A3B25F: OStorage_Impl::OpenOwnPackage() (xstorage.cxx:435) ==2515797== by 0x34A3C16C: OStorage_Impl::ReadContents() (xstorage.cxx:541) ==2515797== Uninitialised value was created by a stack allocation ==2515797== at 0x33FAB02C: ZipFile::recover() (ZipFile.cxx:1034) since: commit abda72eeac19b18c22f57d5443c3955a463605d7 Date: Mon Feb 20 00:32:22 2023 +0100 tdf#82984 tdf#94915 zip64 support (import + export) where - aEntry.nCompressedSize = nCompressedSize; - aEntry.nSize = nSize; was removed before the subsequent use of aEntry.nCompressedSize/aEntry.nSize change things (git show -w for clarity) to check bounds first just for the range the extra fields might be in and read those, and then follow up with the original check that the newly discovered aEntry.nCompressedSize/aEntry.nSize are within the bounds of the overall file Change-Id: Iad4ce8297109b06bc5baf77df4f3e86659cbb4cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150969 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-25tdf#155005 fail gracefully on encountering a negative compression valueCaolán McNamara
we are using sal_Int64 for this so a large enough value can be interpreted as negative here Change-Id: Id547a24591aca4b6ed7b7955621641a0666b0bd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150968 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-30ofz#57529 Integer-overflowCaolán McNamara
Change-Id: I93775299aa340e2e645a04be5d0bc36a9caea103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149773 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-20Missing includes (for std::exception_ptr)Stephan Bergmann
Change-Id: If93883ba9feb22e6da2d56af4ebb2f4eafe58de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149162 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-03-09cid#1521901 Pointer to local outside scopeCaolán McNamara
Change-Id: I38e76440606afb65a8c1ce419c446e234a513659 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148550 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09ofz#56826 Heap-use-after-freeCaolán McNamara
since: commit abda72eeac19b18c22f57d5443c3955a463605d7 Date: Mon Feb 20 00:32:22 2023 +0100 tdf#82984 tdf#94915 zip64 support (import + export) Change-Id: Iffc1c54b3ccc5464e217d7f94ecc34b57ec1afb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09Fix typoAndrea Gelmini
Change-Id: I4c48c988667ffd9221a0e226ab9c35e1e857e9d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148489 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-08tdf#82984 tdf#94915 zip64 support (import + export)Attila Szűcs
Implemented import + export for "Zip64 Extended Information Extra Field", (in "Local file header" and "Central directory file header") and for Data descriptor. Focused only to be able to handle files with over 4GB uncompressed size, in the zip archive. The 64k filecount, and the 4GB compressed size limit is probably still present Tried to follow pkware .ZIP File Format Specification, Some cases were not clear to me and/or some zip compressing tool may not perfectly follow the standard, like 'extra field' should be 28 bytes long, but its reader now can read shorter (or longer) 'extra field'. Replaced some 32bit codes with 64bit codes, in stream handling, in deflater. Tested with an ods file that contained a content.xml that bigger then 4BG+ (import + export + reimport) on windows. I think 4GB+ files import/export would be too slow fot unittest. So, for unit test, used the small but zip64 format files, that was attached to the bugzilla tickets Note: It helps with Bug 128244 too (1 of the unittest tests it), but that ods file missing manifest.xml, so LO won't be able to import it. Change-Id: Idfeb90594388fd34ae719677f5d268ca9a484fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147306 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-01-17XUnoTunnel->dynamic_cast in ZipPackageEntryNoel Grandin
Change-Id: I0c49ebcb0ed16ab5b90c0cfa1417f002b5dad7b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-13Simplify a bitMike Kaganski
Change-Id: Ie2435701078b0e111c1b04b77c857fd1923f2d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145430 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-13XUnoTunnel->dynamic_cast in comphelper::ByteReader and comphelper::ByteWriterNoel Grandin
Change-Id: I1f8c864a939dff1252ba15f517f63b62d1a1e1fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145393 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-09use std::this_thread::sleep_for instead of osl equivalentArnaud VERSINI
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-27cid#1242675 Untrusted value as argumentCaolán McNamara
Change-Id: If8ecad4501d6c555791eae0ae113a34e05f9436f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141670 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-21tdf#133767 new service TempFileFastServiceNoel Grandin
to use in places where we know we can use the TempFileFast mechanism. Speeds up export to EPUB from 43s to 17s on my windows machine. This is essentially a copy of OTempFileService, but it does not implement XTempFile (because these temp files have no name on Windows). Also remove a couple of calls to Flush() (which is not necessary now), and TellEnd(), which is a little slow on Windows. Change-Id: Iced300bf8121eae08c7a011d62ec68b93330d84c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141598 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-23clang-tidy modernize-pass-by-value in packageNoel Grandin
Change-Id: Id12d7b38d278c9fb18b30c6d921713a53168b048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02Use more appropriate return type for ThreadPool::getPreferredConcurrencyStephan Bergmann
All call sites already effectively asked for an unsigned return type, including: * The ThreadPool ctor took an nWorkers argument of type sal_Int32, but internally stores that as std::size_t mnMaxWorkers. * ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess apparently benefits from an unsigned nThreadTasks parameter, getting rid of various casts in its implementation that were necessary to silence signed vs. unsigned comparison warnings. The only drawback is that comphelper::ThreadPool::getPreferredConcurrency() * 4 in package/source/zippackage/ZipPackageStream.cxx would now silently wrap around instead of causing UB on overflow (which could be detected with appropriate tools). Ideally, it would use some o3tl::saturating_mul if we had that, so add a TODO comment for now. While std::thread::hardware_concurrency returns unsigned, it looked more natural to go with std::size_t here, as some call sites already used that (see above), so the implementation of ThreadPool::getPreferredConcurrency is a natural place to hide clamping std::thread::hardware_concurrency() to std::size_t (in the unlikely case that std::size_t is of smaller rank than unsigned). This required addition of o3tl::clamp_to_unsigned in o3tl/safeint.hxx. Change-Id: I0a04a8b32e63ebfeb39f924c4b38520455a6fb38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24use comphelper::ByteReader in XBufferedStreamNoel Grandin
to avoid an intermediary buffer Change-Id: Ic59e701491ac041022ca3e328741f170bb5b7ab6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-14reserve space in map in ZipFile::readCENNoel Grandin
Change-Id: I4d7764f00b7d05ba5d43a3fb35596f5ec4653da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-14loplugin:trivialdestructor (-stdlib=libc++)Stephan Bergmann
That these are only flagged when building against libc++ and not against libstdc++ is a consequence of the plugin's dependence on implementation details of the relevant classes, but so be it. Change-Id: I6b96f81939edab2b8e618aa53c9fe23492edfbbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131562 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-11new loplugin:trivialdestructorNoel Grandin
look for potentially trivial destructors that can then be elided Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-30Recheck modules [o-r]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I6b4b05a5e59b256653c4caf5297fffd601b45083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128845 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-20WASM make test file loading workArmin Le Grand (Allotropia)
Change-Id: Ic34104534c3e0e73791cf867bfb2e1246dc79cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128653 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-11optimise and simplify ZipOutputEntryInThreadNoel Grandin
by just using the tempfile service as intended, we can stay on the "happy path" which means that, on Windows, if there is sufficient system RAM, the temporary file never even hits the disk. Change-Id: I3b27cf09bd40a4cfee01c23273af05860708a16f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128258 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-09Simplify some TempFile service codeNoel Grandin
Change-Id: Id39be33dcc5aa9378e29c850cb71d3662093ab25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128189 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in packageMike Kaganski
Change-Id: Ib5d7fa143c4c5e3b4862ed4b91acf1e2dfc4d8bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124378 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31Use ZLIB_CONST to avoid const_castMike Kaganski
It is available since 2011 [1]. CentOS 7, which is the baseline, included zlib 1.2.7, which was released in 2012, and included [1]. [1] https://github.com/madler/zlib/commit/5ab9f47745fe9353291b217f705086b6070575d5, Change-Id: Ie6cf2e934579620787426d95380f8ff6d6423b7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119627 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-31getArray->getConstArray in packageNoel Grandin
so we can avoid the const of making the Sequence singular Change-Id: I939d573c0f1e7a5d3b09a8589c0fda1e9ea38208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30tsan:data race in XBufferedThreadedStreamNoel Grandin
cannot read from maInUseBuffer without holding the lock Change-Id: I4244e1132595a18c1a7ab33803e10b6c29684bf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-21pass ZipEnumeration around by valueNoel Grandin
Change-Id: I8418bd3eb6a8013f55f4283c7d96755d95a60c1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20osl::Mutex->std::mutex in StarOfficeSHA1DigestContextNoel Grandin
Change-Id: I924796823230151a3edde2ead875cfc5bc5072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119282 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20osl::Mutex->std::mutex in CorrectSHA1DigestContextNoel Grandin
Change-Id: Ia81e8edd84080a2cb750e2dce7b2e8879b66498e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119281 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20no need to use a pImpl in CorrectSHA1DigestContextNoel Grandin
Change-Id: If7404f63833373c5ac2954c4aac129c52582989c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20osl::Mutex->std::mutex in BlowfishCFB8CipherContextNoel Grandin
Change-Id: Id70ec156ab9e06a48a5a2571fc0186bd63b280a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119279 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-20osl::Mutex->std::mutex in ByteGrabberNoel Grandin
Change-Id: I96ea49da6708041ac19e147f192c7e996d44b8ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21remove some unnecessary OUString::internNoel Grandin
Change-Id: Ia0f41dfc8a00c115ad544b8236d751e6b2dae5ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117577 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-02fix detection of encrypted zip entriesDavid Blatter
if a zip entry is encrypted, bit 1 of the flags field is set. previously bit 1 of the version field was checked. a valid zip with a required version of e.g. 45 generated a 'file is corrupt' error see: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.3.TXT (sections 4.4.3 and 4.4.4) Change-Id: I8bba6ead582e6cab55c8449f202807b50befea07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113420 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-16loplugin:referencecasting in oox..packageNoel
Change-Id: I4276c6c45cb2478afbc0231a15c402ddcafd00a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110950 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19tdf#123936 Formatting files in module package with clang-formatPhilipp Hofer
Change-Id: I3ff80c6c636003d468f384e0d6fbfb5233e0b4da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105696 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-05loplugin:reducevarscope in packageNoel
Change-Id: If35738232ceb0442d57b9e9b37a850e0920e61b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16properly finish encrypting when parallel zip saving (tdf#134796)Luboš Luňák
More fixing of 353d4528b8ad8ab, that I didn't get quite right in 08161f853571e3. There must be one final processDeflated() call that has isDeflaterFinished() return true, so that encrypting is finalized properly. Change-Id: Id15190cc467a801ccc57e1efe802cdd8fc618a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98878 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-07-14fix encrypted parallel zip saving (tdf#134332)Luboš Luňák
ZipOutputEntryBase::processDeflated() was calling isDeflaterFinished() to find out whether to finalize and dispose m_xCipherContext. With ZipOutputEntryParallel this was always true, so the context was disposed after the first call. That was originally correct, because originally processDeflated() was called just once at the very end, but 353d4528b8ad8abca9a13f3016632e42bab7afde changed to calling it several times. Change-Id: I1e4a0c887e4ba7ac7b20fa315169eaa911335fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98625 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-06-24use more std::container::insert instead of std::copyNoel Grandin
which is both more compact code, and more efficient, since the insert method can do smarter resizing Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in packageNoel Grandin
Change-Id: I9956f715e00a0c2814b79617f37dd0c09f049ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93858 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15loplugin:buriedassign in l,o,p*Noel Grandin
Change-Id: Ib2dd157d43c4387eda009475311761fe2eb627cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03loplugin:flatten in packageNoel Grandin
Change-Id: I4d81c7c1d241e51565d7cbc6549ac586136f0c86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>