summaryrefslogtreecommitdiff
path: root/package/source
AgeCommit message (Collapse)AuthorFilesLines
2017-02-06Add missing #includesStephan Bergmann13-1/+32
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-01-28loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin1-3/+1
..calls when creating exceptions Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe Reviewed-on: https://gerrit.libreoffice.org/33617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann48-1315/+266
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-25loplugin: unnecessary destructor oox..saxNoel Grandin2-9/+0
Change-Id: Ie12bfabc92bce04d702f3e77aa5896366e49245e Reviewed-on: https://gerrit.libreoffice.org/33509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, packageStephan Bergmann4-0/+19
Change-Id: I5d30cc2483452ba140cdce341677e872bffce6d1
2017-01-17replace boost::checked_deleter with std::default_deleteJochen Nitschke1-4/+2
and remove all traces of boost/checked_delete.hpp Change-Id: I4486d0e07a7197d75f8739c8c6d79670163eaab2 Reviewed-on: https://gerrit.libreoffice.org/33182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-01-17tdf#97597: attempt to add test for multithreaded input stream buffering.Kohei Yoshida1-1/+31
But it always passes, even when UseBufferedStream is set to false... Needs improvement. Change-Id: I98f65dcd7bec3b47a437fdc6cc42c6e8e3775522 Reviewed-on: https://gerrit.libreoffice.org/33190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-16Use unique_ptr for ZipFile here.Kohei Yoshida1-7/+3
Change-Id: I9e3bbf23f9ee7de8ad05061496eeb7d4dc74774e Reviewed-on: https://gerrit.libreoffice.org/33175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-15ZipFile: make it work on MSVC 14.0David Ostrovsky1-0/+1
Change-Id: I99a00c61634375a75e15a8c1530213f5aad25b51
2017-01-14tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida4-9/+122
Change-Id: I93077f954a49b3922930e4fc86c80228be0f4dd2 Reviewed-on: https://gerrit.libreoffice.org/33069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-12package: fixup SAL_CALL removalThorsten Behrens1-1/+1
Change-Id: I3b688b660ef4374442b616cb5c8bb4cee9ef7cb7
2017-01-11These SAL_CALL can go as well...Kohei Yoshida1-3/+3
Change-Id: I79aa4374126faaf9f782fb7ff0c12c171e7041b1
2017-01-11Use std::unique_ptr for the ZipFile instance.Kohei Yoshida1-7/+5
Change-Id: Ifac7a9e29c8cf0afcf44a82db608ba3c48499ca1
2017-01-11Not worth having this as a separate data member.Kohei Yoshida1-3/+1
It is the same as the input stream instance, and it is only used in one call site. Change-Id: If52209420462aec7ec3dbc180e05f09603acaea1
2017-01-11Let's return std::unique_ptr<...> directly.Kohei Yoshida2-3/+4
It's only used at one call site, which already uses std::unique_ptr. Change-Id: I5ff528ebc560bb6eb8783d20002cea40a451761e Reviewed-on: https://gerrit.libreoffice.org/32946 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-11Remove unnecessary UNO-ness from ZipFile class.Kohei Yoshida1-19/+2
This class is only used inside package module, and totally private to the module. Change-Id: Ib00e7066c22a74c0b16c8d6ecf72b99ac42682dd Reviewed-on: https://gerrit.libreoffice.org/32945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-08coverity#704153 merge m_xRootFolder and m_pRootFolderCaolán McNamara1-32/+25
Change-Id: Id9a37afa38a2456cb022945240586081771a5436 Reviewed-on: https://gerrit.libreoffice.org/32842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-08Rename css::packages::ContentInfo to just ZipContentInfo.Kohei Yoshida2-15/+16
And use std::unique_ptr not rtl::Reference. This is not a UNO object anyway... Change-Id: If43da4f7e0f478b9ad8d62e5f43f04f035c31717 Reviewed-on: https://gerrit.libreoffice.org/32828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-08Clean up and annotate the code a bit.Kohei Yoshida1-18/+34
Change-Id: I5f0c6130e5cf21f93bb1309f7bf148bd40b3821d Reviewed-on: https://gerrit.libreoffice.org/32827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-01-07Reduce scope by removing unnecessary else clauses.Kohei Yoshida1-59/+59
This makes the code a bit easier to follow. Change-Id: Ia55d963c97b33dd8462e6084adc4820856e126bf Reviewed-on: https://gerrit.libreoffice.org/32825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-12-01tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.Michael Meeks1-0/+1
The existing osl::Condition is an API and reliability disaster area. Change-Id: I3be84e1c6a83e58c43c40c9c8720790d923a6694 Reviewed-on: https://gerrit.libreoffice.org/31163 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-11-13drop extra semicolonsDavid Tardon1-1/+1
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
2016-11-09package: ODF: bump PBKDF2 iteration countsMichael Stahl1-2/+2
Given recent elections we need to build a higher wall to keep the government out of our documents, and we will make the government pay for it. These iteration counts were considered appropriate a decade ago. http://security.stackexchange.com/questions/3959/recommended-of-iterations-when-using-pkbdf2-sha256 We get similar numbers on SandyBridge-E desktop and Haswell i7-4600U laptop: * with 10k iterations ~20 msec per derivation * with 100k iterations ~195 msec per derivation * with 150k iterations ~290 msec per derivation We can't go too high though because in ODF every package stream gets its own derived key with a different salt, so a document with embedded images may need a lot of these. Change-Id: I6894e71ed399f8c340eff97a9191c8d8419789a6
2016-11-08loplugin:expandablemethods in lotuswordpro..packageNoel Grandin2-22/+12
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102 Reviewed-on: https://gerrit.libreoffice.org/30682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07style fix for cppcheck redundantConditionJochen Nitschke1-1/+1
Change-Id: I5d02c6f4c6b411c23a6de43374884a76e1c408fe Reviewed-on: https://gerrit.libreoffice.org/30667 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01style fixes for cppcheck noExplicitConstructorJochen Nitschke1-1/+1
Change-Id: I2a690caea7656f2a18beb6d09f53154178a30f34 Reviewed-on: https://gerrit.libreoffice.org/30460 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-19loplugin:expandablemethodds in lotuswordpro..packageNoel Grandin1-1/+1
Change-Id: Id33d88edc4be00f4238792d885e392cc08e72386 Reviewed-on: https://gerrit.libreoffice.org/30017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19replace <<= with assign for <<= with rhs AnyJochen Nitschke3-11/+11
queryAggregation and queryInterface return Any Change-Id: Ib8e3e742bd66f7419cad583988b247bb628f7b4a Reviewed-on: https://gerrit.libreoffice.org/29912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann17-17/+17
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-12loplugin:constantparam in package..stocNoel Grandin6-11/+12
Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672 Reviewed-on: https://gerrit.libreoffice.org/28824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (package)Stephan Bergmann1-1/+1
Change-Id: I359fcf33039b406d614bf71361a7882a101667d2
2016-08-18coverity#1371440 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Ia9ce56ecbaecd6e63b3ec7086d3a677a7816c924
2016-08-08OFFICE-3708: package: recognize correct SHA256 URLMichael Stahl4-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
2016-08-05loplugin:countusersofdefaultparams in oox..sdNoel Grandin1-1/+1
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01 Reviewed-on: https://gerrit.libreoffice.org/27902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
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>