summaryrefslogtreecommitdiffstats
path: root/package
Commit message (Collapse)AuthorAgeFilesLines
* OFFICE-3708: package: recognize correct SHA256 URLMichael Stahl2016-08-154-3/+9
| | | | | | | | | | | | | | ODF 1.2 uses an incorrect URL to refer to SHA256, add support for the correct W3C URL on import but continue to export the incorrect URL for now. Change-Id: I3135bcf989070d20f85f14702db07595f304e706 (cherry picked from commit 1015d35f2362953f415804476037d4f162eb49b5) Reviewed-on: https://gerrit.libreoffice.org/28008 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a040c39bb6be83f47449320eb4cc185458e2cc79)
* use Any constructor instead of temporariesNoel Grandin2016-07-202-33/+15
| | | | | | (cherry picked from commit 58a32075ca4f457f570af75aef368dd6c389aca7) Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
* Fix typosAndrea Gelmini2016-07-202-2/+2
| | | | | | | | Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 534b2a4b58ba765dbc256d6297e33453524915e2)
* Fix typosAndrea Gelmini2016-07-201-1/+1
| | | | | | | | | Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067) Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
* Remove excess newlinesChris Sherlock2016-07-121-1/+0
| | | | | | | | | | | | | | | | | | | | | A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit a238b1f8d304bf1e2ffb357937f3ec888ee8ac89) Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
* package: fix exception handling in DeflateThread (related tdf#91807)Michael Stahl2016-06-263-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the bugdoc of tdf#91807 there are at least 49 corrupt zip streams that raise exceptions in the DeflateThreads. Because the maximum allowed number of threads happens to be 48, this results in an infinite loop in ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(). (regression from 7e2ea27e5d56f5cf767a6718a0f5edc28e24af14) In case an exception is thrown, don't re-throw it immediately, which might cause trouble such as leaking all of the ZipOutputEntry instances in m_aEntries. (cherry picked from commit 8d8b9b80b114b94b20b0bf1438d80e925b49e3bf) sfx2: exception on storage commit is an error (related: tdf#91807) For no good or obvious reason, SfxMedium::StorageCommit_Impl() swallows embed::UseBackupException if there is a pTempFile, which (as the comment claims) is "always now". This results in the temp file actually being copied to the user-visible file and the SaveAs "succeeding", when it clearly did not. Also move the exception throwing to the end of ZipOutputStream::finish() to avoid more memory leaks. (cherry picked from commit 9084c11fb472f2024e609770ce922c911227e7a8) Change-Id: I448cc43291754ef20adfa6b65916282fcc365a11 Reviewed-on: https://gerrit.libreoffice.org/26618 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 60f668ba594c08aa935887ecd0e76d6ba016f166)
* tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian2016-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new static member getPreferredConcurrency added to comphelper::ThreadPool to return a configurable max number of threads. By default the new function returns the hardware_concurrency value provided by std::thread. When MAX_CONCURRENCY envar is defined, the return value is limited to whatever is set there. Three call-sites that used std::thread::hardware_concurrency have been replaced with getPreferredConcurrency. Unittests added to cover the functionality of the new member. Unittests are capped to 4 threads. Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 60e75fb276778459f6055360646d879b8c615d83) Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 197c1dacd5725db8ab2faf0aa9b39a2655eb4940)
* tdf#93553 limit parallelism at zip save time to useful amountArmin Le Grand2016-05-105-29/+108
| | | | | | | | | | | | | | | | | | | | | | | | At ODT export time writing and zipping comtained data packages is nicely parallelized, but not limited to an upper bounds of threads to use. Together with memory consumption this makes ressource usage and runtime behaviour bad to crashing (mostly on 32bit). I have now limited the processing dependent on the number of available cores to get a good processing/ressource ratio. The result uses much less memory, is faster and runs on 32bit systems. Reviewed-on: https://gerrit.libreoffice.org/23305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 7e2ea27e5d56f5cf767a6718a0f5edc28e24af14) Missing include (cherry picked from commit 3cdc8c27672e7e9253c9ca9abfc611a0f789da9c) Change-Id: I8bd516a9a0cefd644f5d7001214bc717f29770ab Reviewed-on: https://gerrit.libreoffice.org/24807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#89236: Don't deflate encrypted document in parallelMatúš Kukan2016-01-081-1/+2
| | | | | | | | | | | | | | | | | I see "warn:legacy.osl:22439:1:package/source/zipapi/ZipFile.cxx:583: Can't detect password correctness without digest!" when opening file saved with password. Obviously css::xml::crypto::XDigestContext used in ZipOutputEntry does not work properly when encrypting files in parallel, so don't do that. Change-Id: I4b354535240a4f31a6bc6855cf7f9af527634e7e Reviewed-on: https://gerrit.libreoffice.org/21238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org> (cherry picked from commit eaed822c9cf6b3762f727f1281003dafd300df6d) Reviewed-on: https://gerrit.libreoffice.org/21241 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
* loplugin:unusedfields in include/package,include/registryNoel Grandin2015-11-251-1/+0
| | | | Change-Id: Iadba30885ba3bab7aaee58e298a9dc6b22c8b977
* loplugin:unusedfields in oox,package,reportdesignNoel Grandin2015-11-233-199/+147
| | | | Change-Id: I83d03dcc76b5f0d54ebb0513ae972acb0db8eef1
* use comphelper::containerToSequenceNoel Grandin2015-11-192-16/+4
| | | | | | in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
* use initialiser list for Sequence<OUString>Noel Grandin2015-11-162-4/+2
| | | | | | | Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02 Reviewed-on: https://gerrit.libreoffice.org/19978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Fast PCH generator and optimized PCH filesAshod Nakashian2015-11-152-89/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* use initialiser for Sequence<OUString>Noel Grandin2015-11-153-6/+3
| | | | | | | | | | | | | replaced using: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\); .*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g" Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9 Reviewed-on: https://gerrit.libreoffice.org/19969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* use initialiser syntax for Sequence<OUString>Noel Grandin2015-11-152-4/+2
| | | | | | | | | | | | | | replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:nullptr (automatic rewrite)Stephan Bergmann2015-11-1026-92/+92
| | | | Change-Id: I1e5338558bc57afe51db57655550e9b7246f7214
* Don't check version field from local ZIP headerJan-Marek Glogowski2015-11-051-14/+8
| | | | | | | | | | | | | | | | | | | | | Our current Maven based Java toolchain produces JARs, which have a different "version needed to extract" in the ZIP local and central directory header. I had a look at 7zip and unzip and they already ignore the version but compare other data LO already ignores - sig. The "standard" document from PKWARE doesn't help. So just compare the file path and calculate the data offset and otherwise ignore all (duplicated) information from the local index and rely on a correct central directory entry. Various programs produce(d) "broken" ZIP files; even LO at some point (see git log). Change-Id: I8d63abb0d49a1087c7654f401b62355c147c3118 Reviewed-on: https://gerrit.libreoffice.org/19779 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
* use uno::Reference::set method instead of assignmentNoel Grandin2015-11-0411-92/+79
| | | | Change-Id: I1c7240fe2e2b5eb825f028ca7502e5ba8793046b
* com::sun::star->css in package,pyunoNoel Grandin2015-10-2344-1111/+1086
| | | | Change-Id: I7b7b0e7fea2d1a2b9f6f5501ad5e0b8c1b4a17b9
* Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann2015-10-1227-324/+324
| | | | Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
* clang-analyzer-deadcode.DeadStoresStephan Bergmann2015-10-071-2/+3
| | | | Change-Id: I823aab2038eb08f4061e353b5fafc12b8e60e671
* loplugin:mergeclassesNoel Grandin2015-10-061-6/+3
| | | | | | | in this case, just rename the baseclass so that it matches the other places we do this Change-Id: I21704db7352f72e43636dde9e92c8bef61b7e251
* Fix typosAndrea Gelmini2015-09-302-3/+3
| | | | | | | Change-Id: Id27f5a357c1333dec5c24c4f5e0fdaed7a775774 Reviewed-on: https://gerrit.libreoffice.org/18963 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Fix typosAndrea Gelmini2015-09-302-2/+2
| | | | | | | Change-Id: I013414cf10e25acd5216643855aaa230258a1b5f Reviewed-on: https://gerrit.libreoffice.org/18962 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* boost->stdCaolán McNamara2015-09-183-6/+4
| | | | | | | | Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0 Reviewed-on: https://gerrit.libreoffice.org/18670 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* comphelper: fix MSVC --enable-mergedlibs build, OFOPXMLHelperMichael Stahl2015-09-011-0/+1
| | | | | | | | | | | The OFOPXMLHelper class causes duplicate definition link errors due to its WeakImplHelper base class. It turns out that the OFOPXMLHelper class itself is only used by other exported functions in comphelper itself so just hide the implementation detail. Change-Id: I3ac8c561af703193cc2609e2c799b630a0d43127
* package: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe2015-08-2624-47/+46
| | | | | | | | | with the variadic variants. Change-Id: If88e1d741075e86997c91dc2c59eeebe45f67c1f Reviewed-on: https://gerrit.libreoffice.org/17980 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* Consolidate isFileUrl checksStephan Bergmann2015-08-191-1/+2
| | | | Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
* Remove newly unused ucbhelper/fileidentifierconverter.hxxStephan Bergmann2015-08-181-1/+0
| | | | Change-Id: I7c272383ecb115e19699ed96bf5622d979403a01
* Simplify ZipPackage::isLocalFile checkStephan Bergmann2015-08-181-14/+1
| | | | | | (vnd.sun.star.wfs is long gone) Change-Id: I3e25f1728504cbad07bb97187a7bac23b33695dc
* avoid possible leak on exceptionCaolán McNamara2015-08-171-13/+35
| | | | Change-Id: Id3c16e5fedc5e57c8daccafa25bdb2fbbd0131b0
* Related: tdf#88314 delete temp filesCaolán McNamara2015-08-073-0/+10
| | | | | | | | | | | clear to close the inputstream before attempting to delete the temp file, which is plausible as the windows-specific failure in earlier attempts at this Change-Id: I751aa3a098dd960f56b77a5f5fc93783c1060556 Reviewed-on: https://gerrit.libreoffice.org/17531 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Resolves: tdf#88314 close temp file after each thread completedCaolán McNamara2015-08-053-19/+65
| | | | | | | | Change-Id: Ic2eec30cfb5f61c53777eefeeb8bad6f552da2fc Reviewed-on: https://gerrit.libreoffice.org/17355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Revert "Resolves: tdf#88314 close temp file after each thread completes"Norbert Thiebaud2015-07-263-47/+20
| | | | | | | | | This reverts commit 738cf411e9315d17c7eb8be47ded643a00dfe5c5. It brokes windows in https://gerrit.libreoffice.org/#/c/17289/ as per http://ci.libreoffice.org/job/lo_gerrit_master/4465/Gerrit=Gerrit,Platform=Windows/ was pushed despite that.. :-(
* Resolves: tdf#88314 close temp file after each thread completesCaolán McNamara2015-07-243-20/+47
| | | | | | | | | | | | and reopen them when we need their data. That way we don't have as many open files as substreams in the package, so we don't run out of file handles Change-Id: Ic124e275abf15f4578c77ee271d185f40cb844b1 Reviewed-on: https://gerrit.libreoffice.org/17289 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* loplugin:unusedmethods toolkit,packageNoel Grandin2015-07-141-15/+0
| | | | | | | Change-Id: I83618cd2fd12fb0c1691dc7255fc7192e68649cd Reviewed-on: https://gerrit.libreoffice.org/17031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:unusedmethods packageNoel Grandin2015-07-078-85/+0
| | | | | | | Change-Id: I19d6bbb9288d72b99d1023b4983b1c3fff7570e8 Reviewed-on: https://gerrit.libreoffice.org/16811 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Fix typosAndrea Gelmini2015-07-031-1/+1
| | | | | | | | Change-Id: I8e429d1f03aac7c7cdb7ff4b43b3f46d40292510 Reviewed-on: https://gerrit.libreoffice.org/16709 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
* drop yet another reimplementation of rtl::Reference (SotMutexHolderRef)Noel Grandin2015-06-2915-120/+48
| | | | Change-Id: I57f9dff931242405420bd45fae7ec5f13718707f
* Fix typosAndrea Gelmini2015-06-281-1/+1
| | | | | | | Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff Reviewed-on: https://gerrit.libreoffice.org/16522 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:stringconstant: handle OUString+=OUString(literal)Stephan Bergmann2015-06-261-3/+3
| | | | Change-Id: Ib9bf6e0919ee0cab02d826859317ea20cb64cabb
* remove unnecessary check for null when calling deleteNoel Grandin2015-06-151-10/+7
| | | | | | | | Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
* TyposJulien Nabet2015-06-131-1/+1
| | | | Change-Id: I21c352a63d668c174eef212dbfbe6346c678ce4d
* cppcheck: noExplicitConstructorCaolán McNamara2015-06-114-5/+5
| | | | Change-Id: Id6291335945a8f10cef3afd1a2b3bae65fdf4562
* convert expressions like 'size() == 0' to 'empty()'Noel Grandin2015-06-112-7/+7
| | | | Change-Id: Ia5c8c0f38a347f398d587970a22e03f29ffd37af
* convert 'it.begin() == it.end()' to 'it.empty()'Noel Grandin2015-06-111-1/+1
| | | | | | | Change-Id: I244a9eb6bce6b1c649653ec38ebb9a39f8b4c145 Reviewed-on: https://gerrit.libreoffice.org/16212 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann2015-06-082-4/+4
| | | | Change-Id: I1a3766bba2c157f20422d3ffb0c08f631b537724
* WaE: unreferenced local variableCaolán McNamara2015-06-051-1/+1
| | | | Change-Id: Ie04966936a406fefbbcd1d96d7d3d299f98a31ae
* uncaught exceptions in parallel deflate threads on re-export of HTB23106 odgsCaolán McNamara2015-06-053-2/+20
| | | | Change-Id: Ib6aef478b8dcf1c7a7262ab60eef4d44da0de632