summaryrefslogtreecommitdiff
path: root/package/inc
AgeCommit message (Collapse)AuthorFilesLines
2018-10-13loplugin:constfields in package..registryNoel Grandin3-7/+7
Change-Id: Ie139490f2b008bf294910d002af711f8f41fe76d Reviewed-on: https://gerrit.libreoffice.org/61727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in consumeScheduledThreadEntryNoel Grandin1-1/+1
Change-Id: I9c0b05081915712089d363a476d6354cfba2461d Reviewed-on: https://gerrit.libreoffice.org/59010 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13loplugin:returnconstant in oox,packageNoel Grandin1-1/+1
Change-Id: I1dade7ddde6b1e226861d32f24f65be5bb9d9352 Reviewed-on: https://gerrit.libreoffice.org/58880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-04use C++11 exception rethrowingCaolán McNamara2-4/+4
for those cases where we are doing relatively simple catching and rethrowing e.g. catch in one thread and throw in main thread. Change-Id: I6192017c4ec99dd671a9582f7b004096b0fc4525 Reviewed-on: https://gerrit.libreoffice.org/58588 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-04Make ThreadPool::pushTask take param by std::unique_ptrNoel Grandin1-1/+1
And fix leak in XclExpRowBuffer::Finalize, was not freeing the synchronous task it creates Change-Id: Id1e9ddb5d968e6b95d9d2b5ca0c9e50774580182 Reviewed-on: https://gerrit.libreoffice.org/56874 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke1-1/+0
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-23loplugin:useuniqueptr in OZipFileAccessNoel Grandin1-1/+1
Change-Id: Iaad8b364b1a244bd559e582a1622dd59b4756759 Reviewed-on: https://gerrit.libreoffice.org/53226 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-14oox: cosmetic cleanupAshod Nakashian1-5/+5
Change-Id: Ifafd7338ddfec8b707b5ddf4acb39512faf186da Reviewed-on: https://gerrit.libreoffice.org/49325 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-13tdf#114550 don't use PBKDF2 in package for gpg encryptionThorsten Behrens3-0/+4
No need to derive password-based key, simply skip rtl_digest_PBKDF2 for the gpg4libre case. Also pass down PBKDF2 iteration count from ZipPackage, which knows about GPG encryption, instead of just always setting it in package stream. We otherwise needlessly iterate session key also for gpg encrypted storages. Change-Id: Ic96b2193f8541bbd109795fb9c0212a0a10c7344 Reviewed-on: https://gerrit.libreoffice.org/47783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-12tdf#114939 package: change ODF 1.1 export to use real SHA1Michael Stahl1-2/+2
Change-Id: I20d4965cc467df56536ca03b773b3f0f61b1f2a3
2018-01-12tdf#114939 package,comphelper: Try both real SHA1 and StarOffice SHA1Michael Stahl2-3/+7
... when importing ODF documents. In CreatePackageEncryptionData(), add a 3rd SHA1 password hash, PackageSHA1CorrectEncryptionKey, to EncryptionData. Use it in ZipPackageStream::getDataStream(), which has 3 fall-backs for SHA1 bugs now. Also add a CorrectSHA1DigestContext, to be used together with PackageSHA1CorrectEncryptionKey, and rename the existing one to StarOfficeSHA1DigestContext, to be used together with the existing 2 PackageSHA1{UTF8,MS1252}EncryptionKey. The fallback won't be used very often anyway: for the password SHA1 to be wrong, you need a password between 52 and 55 bytes long, and for the SHA1/1K checksum to be wrong, you need a file smaller than 1K with compressed size mod 64 between 52 and 55; all XML files have enough random "chaff" added to be too large. Test that we can read both correct SHA1 and StarOffice SHA1. Change-Id: I988fa489b5e40c7657f404f18538f637d54d28f1
2018-01-12ODT export: handle NoFileSync store optionMiklos Vajna1-0/+1
SfxMedium already had a m_bDisableFileSync member; if the medium has a storage, then forward this flag to it, so at the end SwitchablePersistenceStream::waitForCompletion() (and the called fileaccess::XStream_impl::waitForCompletion()) does not call osl_syncFile(), either. Times for 100 hello world inputs: 12594 -> 5281 ms is spent in XHTML-load + ODT export + close (42% of original). Change-Id: I2aab6c9e6baf133b211620004dcea66bd41ffc6f Reviewed-on: https://gerrit.libreoffice.org/47766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann1-3/+3
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-07gpg4libre: [API CHANGE] add storage helper for GPG encryption dataThorsten Behrens2-0/+2
OpenPGP encryption needs to pass down slightly different meta data to package / zip storage. Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin4-12/+12
first, since those are safer to change than virtual methods Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe Reviewed-on: https://gerrit.libreoffice.org/45798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05loplugin:countusersofdefaultparams in editeng..packageNoel Grandin1-2/+2
Change-Id: I4c20235a04d9ab5ea5edbb6b1b2413677b18a305 Reviewed-on: https://gerrit.libreoffice.org/45795 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04loplugin:constparams in various(1)Noel Grandin1-2/+2
Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b Reviewed-on: https://gerrit.libreoffice.org/44261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01-Werror,-Wunused-private-fieldStephan Bergmann1-2/+2
Change-Id: I4ba10f68cf87315a9a3f6970338b8d9f6ac7a62c
2017-11-01loplugin:finalclasses in packageNoel Grandin6-12/+6
Change-Id: I020ea1f3bea5c3deab05b9a2154102548c7622cf Reviewed-on: https://gerrit.libreoffice.org/44132 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: packageStephan Bergmann10-15/+15
Change-Id: I64200b2d03d579c5c83d1ec0cc8aaa839edaa7ed
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-18/+3
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski2-6/+24
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-08loplugin:constantparamNoel Grandin1-1/+2
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e Reviewed-on: https://gerrit.libreoffice.org/40843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:constparams in basctlNoel Grandin1-2/+2
Change-Id: If6c2b980a2916c4ee8ac108fbb84b006a35f49c5 Reviewed-on: https://gerrit.libreoffice.org/40570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19tdf#108835 Fixed writer crash on adding Autocorrect Entry:Mohammed Abdul Azeem2-2/+4
ZipPackageStream::saveChild seeks and reads on the same stream, so it cannot be done parallely. Also, read on BufferedStream tries to aquire the same mutes, which is already aquired by the calling method resulting in deadlock. Using UnbufferedStream here should solve both. Change-Id: I25b7ca2ff3c31125cf107fe404f9af66435bec7d Reviewed-on: https://gerrit.libreoffice.org/40160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-18loplugin:constparams in packageNoel Grandin3-3/+3
Change-Id: I78386422f90f860647c844666548cd63e630b9a7 Reviewed-on: https://gerrit.libreoffice.org/40125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20create comphelper::RefCountedMutexNoel Grandin5-70/+16
and merge the two existing implementations of the idea - SotMutexHolder from package and RefCountedMutex from connectivity Change-Id: I87f09f359ac798cf934381a2c75225dab71dd43e Reviewed-on: https://gerrit.libreoffice.org/38972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12Setting Buffered(threaded)Stream as default:Mohammed Abdul Azeem1-3/+0
Also cleaning up bUseBufferedStream parameter. Change-Id: Ibf9c9fcefbdcd229ffaa1d3b169ff87f00e91ceb Reviewed-on: https://gerrit.libreoffice.org/38661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-08Fixing loose ends for multithread Sync in package/:Mohammed Abdul Azeem1-3/+6
Mutexes in different classes operate exclusively, which might cause sync problem when multithreads are involved. This patch shares the mutex across all classes that share the underlying stream. Change-Id: I57e549fb7c375f93955bf54886b91b1892db1e27 Reviewed-on: https://gerrit.libreoffice.org/38563 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-04-12drop document_io_logring.txt and use global loggingCaolán McNamara1-1/+0
Change-Id: Ibda0ce925bc76355e636022c955077ac89e66cce Reviewed-on: https://gerrit.libreoffice.org/36434 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann1-1/+1
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-23Use copy ctor instead of ZipPackageFolder::copyZipEntryStephan Bergmann1-1/+0
Change-Id: Ief103f2f4c66a2086f73c4d2ff332e769e6fc33b
2017-01-26Remove dynamic exception specificationsStephan Bergmann10-206/+105
...(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-19New loplugin:dynexcspec: Add @throws documentation, packageStephan Bergmann7-0/+43
Change-Id: I5d30cc2483452ba140cdce341677e872bffce6d1
2017-01-17replace boost::checked_deleter with std::default_deleteJochen Nitschke1-1/+0
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-16Use unique_ptr for ZipFile here.Kohei Yoshida1-1/+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-14tdf#97597: Ensure that each parsing thread has its own buffer.Kohei Yoshida1-1/+4
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-1/+2
Change-Id: Ifac7a9e29c8cf0afcf44a82db608ba3c48499ca1
2017-01-11Not worth having this as a separate data member.Kohei Yoshida1-1/+0
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 Yoshida1-1/+3
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-36/+13
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-2/+1
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-6/+5
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>
2016-11-08loplugin:expandablemethods in lotuswordpro..packageNoel Grandin2-3/+0
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-10-19loplugin:expandablemethodds in lotuswordpro..packageNoel Grandin1-1/+0
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-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann6-6/+6
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 Grandin2-3/+2
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-18coverity#1371440 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Ia9ce56ecbaecd6e63b3ec7086d3a677a7816c924