summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)AuthorFilesLines
2018-02-23forcepoint #5 check for short readCaolán McNamara1-2/+5
a zip file within a structured storage stream. underlying storage stream claims larger size that it can satisfy on read Change-Id: I8516b12df33ad78b2525192826f5e3aef2622eb8 Reviewed-on: https://gerrit.libreoffice.org/50240 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-07MemoryByteGrabber sequence has to exist for Grabber lifetimeCaolán McNamara1-3/+5
it just takes a c++ ref, so a temp is an unsuitable arg Change-Id: I40490e94d977df91b985bc4ae458b68ee85d5dfe Reviewed-on: https://gerrit.libreoffice.org/49323 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-01ofz#4491 Bad-CastCaolán McNamara1-3/+14
Change-Id: Ibee0c3e51ecd2b976d67c3ab28cabf0acb10c6b8 Reviewed-on: https://gerrit.libreoffice.org/45663 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-11-28keep track of available dataCaolán McNamara2-0/+5
Change-Id: Idc54cdef0f3a4355a7e26f25cdc5b50d65d9d583 Reviewed-on: https://gerrit.libreoffice.org/45354 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-12remove unused uno::Reference varsNoel Grandin4-7/+0
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke4-3/+1
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09remove unnecessary empty OUString fields and varsNoel Grandin1-2/+1
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-07revert OSL_ASSERT changesChris Sherlock1-1/+1
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert package module away from OSL_ASSERT to assertChris Sherlock1-1/+1
Change-Id: I74f11a025cd1f8d361c26bac70ffdbd382e5129c
2017-05-03loplugin:checkunusedparams in package..reportdesignNoel Grandin2-4/+3
Change-Id: I8ebccc413153667269954c303e216b155ee9d1ae Reviewed-on: https://gerrit.libreoffice.org/37145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: packageStephan Bergmann1-2/+2
Change-Id: I5910fdc2ee54fab9105a8e5ffeb3a7575227c13f
2017-04-27tdf#105942 Don't hang when file is protected and compressedXisco Fauli1-1/+1
Change-Id: I762e6e6d457ea3f5a1f1fd706268b832a71ee550 Reviewed-on: https://gerrit.libreoffice.org/36672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock5-0/+5
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky3-3/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin14-49/+49
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12drop document_io_logring.txt and use global loggingCaolán McNamara5-562/+263
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-30remove type decorations on char literalsJochen Nitschke4-7/+7
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I14dca0d55c09187690dc1d94936c40b890ca5cea Reviewed-on: https://gerrit.libreoffice.org/35637 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-13Revert "comphelper: fix MSVC hang in ThreadPool::shutdown()"Miklos Vajna1-11/+3
As it causes "unopkg.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/comphelper/source/misc/threadpool.cxx:96: comphelper::ThreadPool::~ThreadPool(): Assertion `mbTerminate' failed." in <https://ci.libreoffice.org/job/lo_gerrit/8283/Config=linux_clang_dbgutil_64/console> and also locally. Revert till it's clear if that assert() should be a SAL_WARN() or unopkg has to be fixed. This reverts commit 9899ffd244dd367ba69dffe1f21f4f0222064a46. Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
2017-03-11comphelper: fix MSVC hang in ThreadPool::shutdown()Michael Stahl1-3/+11
Commit aa68c99d88fd7abe08c4aee5206c859a0cdba38e added some code using std::condition_variable to comphelper. Built with MSVC 2017, this causes many cppunittester.exe processes to deadlock in ThreadPool::shutdown(): maTasksChanged.notify_all(); This ultimately calls NtReleaseKeyedEvent(), which never returns. The reason appears to be a bug in Windows 7, for which a "hotfix"[1] is avaiable here, but it's apparently not distributed via Windows Update so we likely can't rely on users or even developers having this installed. However, the documentation of DllMain[2] and ExitProcess[3] indicates that during shutdown, by the time global destructors are invoked all threads other than the one that called ExitProcess have already been terminated. Returning from main() implicitly calls ExitProcess [4]. As it turns out the problem only happens for some CppUnitTests because soffice.bin will call ThreadPool::shutdown() from Desktop::doShutdown() while it is still safe. [1] http://support.microsoft.com/kb/2582203 [2] https://msdn.microsoft.com/en-US/library/windows/desktop/ms682583(v=vs.85).aspx [3] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx [4] https://blogs.msdn.microsoft.com/oldnewthing/20100827-00/?p=13023 Change-Id: I6137461ca7efe9a5fbe4f8f8478fb96de3570469 Reviewed-on: https://gerrit.libreoffice.org/35066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@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 Bergmann3-24/+6
Change-Id: Ief103f2f4c66a2086f73c4d2ff332e769e6fc33b
2017-02-22use std::unique_ptrCaolán McNamara2-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>
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann6-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>
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 Bergmann58-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>
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 Bergmann11-0/+62
Change-Id: I5d30cc2483452ba140cdce341677e872bffce6d1
2017-01-19Use the old-fashion way to instantiate a UNO service.Kohei Yoshida1-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>
2017-01-17replace boost::checked_deleter with std::default_deleteJochen Nitschke3-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>
2017-01-17tdf#97597: attempt to add test for multithreaded input stream buffering.Kohei Yoshida3-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>
2017-01-16Use unique_ptr for ZipFile here.Kohei Yoshida2-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>
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 Yoshida5-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>
2017-01-12package: fixup SAL_CALL removalThorsten Behrens2-2/+2
Change-Id: I3b688b660ef4374442b616cb5c8bb4cee9ef7cb7
2017-01-11These SAL_CALL can go as well...Kohei Yoshida2-6/+6
Change-Id: I79aa4374126faaf9f782fb7ff0c12c171e7041b1
2017-01-11Use std::unique_ptr for the ZipFile instance.Kohei Yoshida2-8/+7
Change-Id: Ifac7a9e29c8cf0afcf44a82db608ba3c48499ca1
2017-01-11Not worth having this as a separate data member.Kohei Yoshida2-4/+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 Yoshida3-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>
2017-01-11Remove unnecessary UNO-ness from ZipFile class.Kohei Yoshida2-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>
2017-01-08coverity#704153 merge m_xRootFolder and m_pRootFolderCaolán McNamara2-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>
2017-01-08Rename css::packages::ContentInfo to just ZipContentInfo.Kohei Yoshida4-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>
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 Grandin4-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>
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>