summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)AuthorFilesLines
2017-06-26loplugin:oncevar in oox..saxNoel Grandin3-18/+6
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2 Reviewed-on: https://gerrit.libreoffice.org/39238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20create comphelper::RefCountedMutexNoel Grandin20-315/+259
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-13Avoid race between mbTerminate check and wait.Michael Meeks1-4/+4
package2.dll!osl::Thread::join() Line 112 C++ package2.dll!XBufferedThreadedStream::~XBufferedThreadedStream() Line 68 C++ package2.dll!XBufferedThreadedStream::`scalar deleting destructor'(unsigned int) C++ vs. package2.dll!std::condition_variable::wait<bool <lambda>(void) >... package2.dll!XBufferedThreadedStream::produce() Line 95 C++ package2.dll!`anonymous namespace'::UnzippingThread::execute() Line 29 C++ Change-Id: Iace86efc5e7fe00a5176380a8a21b2dc5e98d8a5 Reviewed-on: https://gerrit.libreoffice.org/38737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-13use local statics for getUnoTunnelImplementationIdJochen Nitschke1-5/+3
replace uses of double checked locking pattern and rtl::Static Change-Id: I479d9d94f652b4fb4c67388405823a5f4e2b6ed4 Reviewed-on: https://gerrit.libreoffice.org/38690 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 Azeem8-33/+5
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-11Fix typosAndrea Gelmini2-2/+2
Change-Id: I81740a3ff9474e971556e9e7d4aa245151163d0e Reviewed-on: https://gerrit.libreoffice.org/38608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-08First cut at moving unzipping into new thread:Mohammed Abdul Azeem5-34/+373
XBufferedThreadedStream class buffers data in a new thread, which will be available to be read from parent thread. Change-Id: I62d367fa1dec23da39aba24b5c765b57707956bb Reviewed-on: https://gerrit.libreoffice.org/38135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-08Fixing loose ends for multithread Sync in package/:Mohammed Abdul Azeem7-26/+41
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-06-02Improved loplugin:redundantcast static_cast handling: packageStephan Bergmann1-1/+1
Change-Id: I3b38df7b130ac8c0591b9429d871274718dcb993
2017-05-31Remove some unnecessary scaffolding around SAL_WARN callsStephan Bergmann1-1/+0
Change-Id: Iaec105d85a283ad15fdca6ffc5cf3d2ec5acac18
2017-05-28remove unnecessary use of OString::getStrNoel Grandin1-2/+1
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>