summaryrefslogtreecommitdiffstats
path: root/package
Commit message (Collapse)AuthorAgeFilesLines
* Use copy ctor instead of ZipPackageFolder::copyZipEntryStephan Bergmann2017-02-233-24/+6
| | | | Change-Id: Ief103f2f4c66a2086f73c4d2ff332e769e6fc33b
* use std::unique_ptrCaolán McNamara2017-02-222-140/+122
| | | | | | | Change-Id: I11a58aa38f931c7912e2e5ac6df46f98e6bb681e Reviewed-on: https://gerrit.libreoffice.org/34539 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Some simplifications, using UNO_QUERY_THROWStephan Bergmann2017-02-156-159/+48
| | | | | | | Change-Id: I3d5024ee6e43e5c1ac9f19e967dd6e210757e4d7 Reviewed-on: https://gerrit.libreoffice.org/34265 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Add missing #includesStephan Bergmann2017-02-0613-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
* loplugin:stringconstant check for unnecessary OUString constructor..Noel Grandin2017-01-281-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>
* Remove dynamic exception specificationsStephan Bergmann2017-01-2658-1521/+371
| | | | | | | | | | | | | | | | | | | | | | | | | ...(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>
* loplugin: unnecessary destructor oox..saxNoel Grandin2017-01-252-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>
* New loplugin:dynexcspec: Add @throws documentation, packageStephan Bergmann2017-01-1911-0/+62
| | | | Change-Id: I5d30cc2483452ba140cdce341677e872bffce6d1
* Use the old-fashion way to instantiate a UNO service.Kohei Yoshida2017-01-191-7/+16
| | | | | | | Change-Id: Ibc5c55dbe9c4c5101ebb292696f79e4e8c8a35c5 Reviewed-on: https://gerrit.libreoffice.org/33293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
* replace boost::checked_deleter with std::default_deleteJochen Nitschke2017-01-173-7/+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>
* tdf#97597: attempt to add test for multithreaded input stream buffering.Kohei Yoshida2017-01-173-1/+120
| | | | | | | | | | 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>
* Use unique_ptr for ZipFile here.Kohei Yoshida2017-01-162-8/+6
| | | | | | | Change-Id: I9e3bbf23f9ee7de8ad05061496eeb7d4dc74774e Reviewed-on: https://gerrit.libreoffice.org/33175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
* ZipFile: make it work on MSVC 14.0David Ostrovsky2017-01-151-0/+1
| | | | Change-Id: I99a00c61634375a75e15a8c1530213f5aad25b51
* tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida2017-01-145-10/+126
| | | | | | | Change-Id: I93077f954a49b3922930e4fc86c80228be0f4dd2 Reviewed-on: https://gerrit.libreoffice.org/33069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
* package: fixup SAL_CALL removalThorsten Behrens2017-01-122-2/+2
| | | | Change-Id: I3b688b660ef4374442b616cb5c8bb4cee9ef7cb7
* These SAL_CALL can go as well...Kohei Yoshida2017-01-112-6/+6
| | | | Change-Id: I79aa4374126faaf9f782fb7ff0c12c171e7041b1
* Use std::unique_ptr for the ZipFile instance.Kohei Yoshida2017-01-112-8/+7
| | | | Change-Id: Ifac7a9e29c8cf0afcf44a82db608ba3c48499ca1
* Not worth having this as a separate data member.Kohei Yoshida2017-01-112-4/+1
| | | | | | | It is the same as the input stream instance, and it is only used in one call site. Change-Id: If52209420462aec7ec3dbc180e05f09603acaea1
* Let's return std::unique_ptr<...> directly.Kohei Yoshida2017-01-113-4/+7
| | | | | | | | | | 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>
* Remove unnecessary UNO-ness from ZipFile class.Kohei Yoshida2017-01-112-55/+15
| | | | | | | | | | 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>
* coverity#704153 merge m_xRootFolder and m_pRootFolderCaolán McNamara2017-01-082-34/+26
| | | | | | | | 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>
* Rename css::packages::ContentInfo to just ZipContentInfo.Kohei Yoshida2017-01-084-21/+21
| | | | | | | | | | 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>
* Clean up and annotate the code a bit.Kohei Yoshida2017-01-081-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>
* Reduce scope by removing unnecessary else clauses.Kohei Yoshida2017-01-071-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>
* tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.Michael Meeks2016-12-011-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>
* drop extra semicolonsDavid Tardon2016-11-131-1/+1
| | | | Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673
* package: ODF: bump PBKDF2 iteration countsMichael Stahl2016-11-091-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
* loplugin:expandablemethods in lotuswordpro..packageNoel Grandin2016-11-084-25/+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>
* style fix for cppcheck redundantConditionJochen Nitschke2016-11-071-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>
* style fixes for cppcheck noExplicitConstructorJochen Nitschke2016-11-011-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>
* loplugin:expandablemethodds in lotuswordpro..packageNoel Grandin2016-10-192-2/+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>
* replace <<= with assign for <<= with rhs AnyJochen Nitschke2016-10-193-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>
* loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann2016-09-1323-23/+23
| | | | | | | | | | | | | | | | | 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
* loplugin:constantparam in package..stocNoel Grandin2016-09-128-14/+14
| | | | | | | Change-Id: I04b6d14d3dd8d55ccc4d4eb9313bc37959690672 Reviewed-on: https://gerrit.libreoffice.org/28824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:stringconstant: adapt to improved OUStringLiteral1 (package)Stephan Bergmann2016-08-301-1/+1
| | | | Change-Id: I359fcf33039b406d614bf71361a7882a101667d2
* coverity#1371440 Uncaught exceptionCaolán McNamara2016-08-182-2/+2
| | | | Change-Id: Ia9ce56ecbaecd6e63b3ec7086d3a677a7816c924
* loplugin:unusedenumconstants in package..svtoolsNoel Grandin2016-08-121-7/+0
| | | | | | | Change-Id: I8136b93b9303ebecafd791159e813c335b1bc172 Reviewed-on: https://gerrit.libreoffice.org/28052 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* OFFICE-3708: package: recognize correct SHA256 URLMichael Stahl2016-08-084-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
* loplugin:countusersofdefaultparams in oox..sdNoel Grandin2016-08-051-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>
* Fix typo: completelly -> completelyTakeshi Abe2016-07-292-2/+2
| | | | Change-Id: I566c5554bf32ea18121c5a186365b97c91667c5d
* improve passstuffbyref return analysisNoel Grandin2016-07-274-8/+8
| | | | | | | Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* add tagging to ThreadTasks so we don't need more one poolNoel Grandin2016-07-183-7/+10
| | | | | | | | | | | | | | | 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>
* loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann2016-07-0716-40/+40
| | | | Change-Id: Ie05f9427dcd88d3b64cfe02c2ece5c0cf40be547
* loplugin:singlevalfields in variousNoel Grandin2016-06-283-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>
* sfx2: exception on storage commit is an error (related: tdf#91807)Michael Stahl2016-06-231-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
* package: fix exception handling in DeflateThread (related tdf#91807)Michael Stahl2016-06-233-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. Change-Id: Ia74ab8e46fa1349c049d05dbec3454bfbe7d61d9
* tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian2016-06-151-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>
* tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko2016-06-091-4/+1
| | | | | | | | | | | | | | | | | | | | This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
* Fix typosAndrea Gelmini2016-05-251-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>
* loplugin:unusedmethods in package to rscNoel Grandin2016-05-191-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>