summaryrefslogtreecommitdiff
path: root/package/source
AgeCommit message (Collapse)AuthorFilesLines
2016-07-27improve passstuffbyref return analysisNoel Grandin3-7/+7
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18add tagging to ThreadTasks so we don't need more one poolNoel Grandin2-6/+7
If more than one place in the code submits tasks to the shared pool, then waitTillDone() becomes unreliable. Add a tagging mechanism, so different callsites can wait on different sets of tasks. Also try to protect our worker threads against exceptions from the thread tasks code. Change-Id: Idde664ab50008d31a2dd73910bb22f50e62ae22f Reviewed-on: https://gerrit.libreoffice.org/27042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann14-38/+38
Change-Id: Ie05f9427dcd88d3b64cfe02c2ece5c0cf40be547
2016-06-28loplugin:singlevalfields in variousNoel Grandin3-4/+1
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23sfx2: exception on storage commit is an error (related: tdf#91807)Michael Stahl1-5/+5
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. Change-Id: I448cc43291754ef20adfa6b65916282fcc365a11
2016-06-23package: fix exception handling in DeflateThread (related tdf#91807)Michael Stahl2-1/+22
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. Change-Id: Ia74ab8e46fa1349c049d05dbec3454bfbe7d61d9
2016-06-15tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian1-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. Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266 Reviewed-on: https://gerrit.libreoffice.org/25420 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19loplugin:unusedmethods in package to rscNoel Grandin1-3/+0
Change-Id: I61c6f56a69891d656a41d3617d0ce2b34d848c84 Reviewed-on: https://gerrit.libreoffice.org/25108 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-16Fix typosAndrea Gelmini1-1/+1
Change-Id: If7262e114b5b4cd40e9c0a8929940199ea747595 Reviewed-on: https://gerrit.libreoffice.org/25025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann2-0/+2
Change-Id: Ieee43fce49b7f07d6b356e8c2e34e9e92b605957
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin2-5/+5
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-04use Any constructor instead of temporariesNoel Grandin2-33/+15
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-04-21Fix typosAndrea Gelmini1-1/+1
Change-Id: Ic4fbc8e7220eb4641f67ef4f85d4853608a369f4 Reviewed-on: https://gerrit.libreoffice.org/24257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann5-34/+34
Change-Id: I1879dece7dfb206dd55b13ca5572b962e20d37f5
2016-04-18clean-up: unused using declarations and includesJochen Nitschke1-1/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14clang-tidy performance-unnecessary-value-param in variousNoel Grandin6-8/+8
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907 Reviewed-on: https://gerrit.libreoffice.org/24019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14loplugin:passstuffbyref in variousNoel Grandin1-1/+1
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-05Missing includeStephan Bergmann1-0/+2
Change-Id: I094b4a1c89676426b286f72a2f510e48fed98b3b
2016-03-22tdf#93553 limit parallelism at zip save time to useful amountArmin Le Grand3-28/+87
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. Change-Id: I8bd516a9a0cefd644f5d7001214bc717f29770ab Reviewed-on: https://gerrit.libreoffice.org/23305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-18loplugin:constantparam in packageNoel Grandin3-8/+8
Change-Id: Ifd9bb81ff9ccfaf5093c04024d7ea93946b00e66 Reviewed-on: https://gerrit.libreoffice.org/23329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23Use passed-in context instead of comphelper::getProcessComponentContext()Stephan Bergmann2-17/+13
(and the passed-in context is required to always be non-null) Change-Id: I1197a2bafba8cb645e15df4310c1c5767b648670
2016-02-09Remove excess newlinesChris Sherlock1-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 Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-05Fix typosAndrea Gelmini2-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>
2016-01-25InterfaceContainer2 with vector instead of SequenceNoel Grandin3-4/+4
create an InterfaceContainer2 class to replace InterfaceContainer. It uses a std::vector instead of a Sequence for the mutable listener list, which provides far better performance. Switch all our internal use-sites to the new class. Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-15loplugin:unusedmethods unused return value in oox,packageNoel Grandin4-10/+5
Change-Id: I63862c3ce32a1106b7de037f422e7e5480e8bfd6
2016-01-11loplugin:privatebase: Publicly derive from UNO interfacesStephan Bergmann1-1/+1
Somewhat arbitrarily prefer public over private derivation; the former is what is used by default across the code base. Change-Id: I936c1b0d3231ac97015863f396a5af49f6c9647b
2016-01-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-08tdf#89236: Don't deflate encrypted document in parallelMatúš Kukan1-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>
2015-12-24loplugin:unusedfieldsNoel Grandin2-3/+2
Change-Id: I979592adb978c3757a1e54615021ee424a2e02bf Reviewed-on: https://gerrit.libreoffice.org/20892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-22loplugin:unusedfields in oox,packageNoel Grandin3-9/+3
Change-Id: I8f8c3ff9ded455a09f3df81c501da17cca0b2310
2015-11-25loplugin:unusedfields in include/package,include/registryNoel Grandin1-1/+0
Change-Id: Iadba30885ba3bab7aaee58e298a9dc6b22c8b977
2015-11-23loplugin:unusedfields in oox,package,reportdesignNoel Grandin2-198/+147
Change-Id: I83d03dcc76b5f0d54ebb0513ae972acb0db8eef1
2015-11-19use comphelper::containerToSequenceNoel Grandin2-16/+4
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-16use initialiser list for Sequence<OUString>Noel Grandin2-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>
2015-11-15use initialiser for Sequence<OUString>Noel Grandin3-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>
2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin2-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>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann25-91/+91
Change-Id: I1e5338558bc57afe51db57655550e9b7246f7214
2015-11-05Don't check version field from local ZIP headerJan-Marek Glogowski1-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>
2015-11-04use uno::Reference::set method instead of assignmentNoel Grandin11-92/+79
Change-Id: I1c7240fe2e2b5eb825f028ca7502e5ba8793046b
2015-10-23com::sun::star->css in package,pyunoNoel Grandin30-801/+782
Change-Id: I7b7b0e7fea2d1a2b9f6f5501ad5e0b8c1b4a17b9
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann20-238/+238
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann1-2/+3
Change-Id: I823aab2038eb08f4061e353b5fafc12b8e60e671
2015-10-06loplugin:mergeclassesNoel Grandin1-6/+3
in this case, just rename the baseclass so that it matches the other places we do this Change-Id: I21704db7352f72e43636dde9e92c8bef61b7e251
2015-09-30Fix typosAndrea Gelmini2-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>
2015-09-30Fix typosAndrea Gelmini1-1/+1
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>
2015-09-18boost->stdCaolán McNamara2-5/+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>
2015-09-01comphelper: fix MSVC --enable-mergedlibs build, OFOPXMLHelperMichael Stahl1-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
2015-08-26package: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe17-34/+33
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>
2015-08-19Consolidate isFileUrl checksStephan Bergmann1-1/+2
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a