summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)AuthorFilesLines
2017-11-01-Werror,-Wunused-private-fieldStephan Bergmann3-7/+3
Change-Id: I4ba10f68cf87315a9a3f6970338b8d9f6ac7a62c
2017-11-01loplugin:finalclasses in packageNoel Grandin14-28/+15
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 Bergmann26-42/+42
Change-Id: I64200b2d03d579c5c83d1ec0cc8aaa839edaa7ed
2017-10-23overload std::hash for OUString and OStringNoel Grandin3-30/+5
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-10-21coverity#1401307 document checked 'Uncaught exception'Caolán McNamara1-1/+2
markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-10Replace list by vector InputStreamsList_Impl (package)Julien Nabet3-13/+13
Change-Id: I4f03ddff09b8b7bb92dd1a9d2aeec279835c81b4 Reviewed-on: https://gerrit.libreoffice.org/43294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin6-251/+251
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03new loplugin:blockblockNoel Grandin1-9/+7
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd Reviewed-on: https://gerrit.libreoffice.org/43025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01throw more useful uno::Exception'sNoel Grandin1-7/+7
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01simplify some OUString compareTo callsMuhammet Kara1-1/+1
to either startsWith or == or != Change-Id: I595dd9d89d32134827980c4ba10f88584430137d Reviewed-on: https://gerrit.libreoffice.org/42988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin2-31/+28
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2 Reviewed-on: https://gerrit.libreoffice.org/42726 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-23new loplugin unnecessarycatchthrowNoel Grandin1-11/+5
Change-Id: Iabab71ee076227bc38447ec109afaea1e53a86a6 Reviewed-on: https://gerrit.libreoffice.org/42643 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-09-22loplugin:flatten in framework..packageNoel Grandin7-269/+230
Change-Id: Ide8a97eae6e2fdc7d2dcccba1480ac55a9b555bc Reviewed-on: https://gerrit.libreoffice.org/42593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12clang-tidy modernize-use-emplace in package..saxNoel Grandin3-5/+5
Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a Reviewed-on: https://gerrit.libreoffice.org/42173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-07tdf#108572 let remove storage elementSzymon Kłos1-0/+2
void OStorage_Impl::RemoveElement( SotElement_Impl* pElement ) expects that m_pAntiImpl will be nullptr, if not throws an exception. This caused that in case of deleting embedded database used for mail merge it wasn't fully removed and it was impossible to import the same datasource second time. Change-Id: I0310fde2ad819c96474a857f37ee42d052fad266 Reviewed-on: https://gerrit.libreoffice.org/42028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-02Replace some lists by vectors in xstorage (part2)Julien Nabet2-57/+51
Change-Id: Icb10605f9ac75aa5b00668a5088be8ef6e1414da Reviewed-on: https://gerrit.libreoffice.org/41543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24Replace some lists by vectors in xstorage (package module)Julien Nabet2-30/+27
Change-Id: I0093b87ff70d9ea31ca08f8df161899d5ff4bb9f Reviewed-on: https://gerrit.libreoffice.org/41478 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-20Fixing threadedStream produce loop condition:Mohammed Abdul Azeem1-2/+3
hasBytes() is for the consuming thread, produce loop should be stopped as soon as we've read as much as size of the stream. Change-Id: I0d857cc9cbcc4dd7d4a43cddbc4c457e8280353f Reviewed-on: https://gerrit.libreoffice.org/41364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-20package: get rid of requirement for plain passwordsThorsten Behrens1-3/+2
Change-Id: I36d41d9166ae2b2ea287af82c87b5f2ea86bd564 Reviewed-on: https://gerrit.libreoffice.org/41344 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-08tdf#111481 package: seek to 0 before truncate()Miklos Vajna1-0/+8
With this, the ZIP files created by the EPUB export don't trigger this warning on 'unzip -l': warning [test.epub]: 2546 extra bytes at beginning or within zipfile Change-Id: Ic9111d2c97b9337cf39a023def4afe4c64c4a3e5 Reviewed-on: https://gerrit.libreoffice.org/40873 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-08loplugin:constantparamNoel Grandin2-5/+6
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 Grandin2-4/+4
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-31loplugin:oncevarNoel Grandin1-2/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28loplugin:checkunusedparams more part1Noel Grandin3-3/+1
seems I got one of the checks wrong, and was missing a bunch of stuff Change-Id: I2c662fc4e735f8d6cbe56c6f82906a60a580331b Reviewed-on: https://gerrit.libreoffice.org/40481 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 Azeem4-9/+16
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 Grandin8-9/+9
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-07-13use more OUString::operator== in forms..salNoel Grandin11-91/+91
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc Reviewed-on: https://gerrit.libreoffice.org/39899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-12strip some linefeeds from the end of debug outputNoel Grandin3-7/+7
Change-Id: I2821969d86b7f8cee53404e6a0acfbebbe53b3ac Reviewed-on: https://gerrit.libreoffice.org/39824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)Noel Grandin1-3/+3
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07tdf#108821 - fix for overflow of variables on opening huge filesMohammed Abdul Azeem3-4/+4
This should fix the issue, as well as restrict available to return only non-negative values. Change-Id: I198e226e945b9bd79dec32b1686c20e2a8dfaf3e Reviewed-on: https://gerrit.libreoffice.org/39665 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin1-1/+1
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06tdf#108821 - fixed bad alloc on opening large fileMichael Meeks4-8/+12
Workaround for streams with size > SAL_MAX_INT32. More complicated ways using available() and navigating cross-thread are possible, but probably harder to maintain. Change-Id: I721b1f38055dfcea03fef555b8a5fd93dfc1b886 Reviewed-on: https://gerrit.libreoffice.org/39374 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin3-3/+3
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin5-10/+10
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: packageStephan Bergmann1-2/+1
Change-Id: Ic1459121287c613bbc64f4f673b0e28d7019db1c
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>