summaryrefslogtreecommitdiff
path: root/package
AgeCommit message (Collapse)AuthorFilesLines
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann4-12/+12
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-11Fix typos and grammarIlmari Lauhakangas1-1/+1
Change-Id: I4143da3c5a809118d57849664f6ab1d2e775837f Reviewed-on: https://gerrit.libreoffice.org/46253 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11loplugin:salcall fix functionsNoel Grandin5-5/+5
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-10remove unused osl/time.h includes ..Jochen Nitschke3-3/+0
and some more in base64.cxx Change-Id: I31c9f23d3bd11f5482774e976a7c40025ffcfb86 Reviewed-on: https://gerrit.libreoffice.org/46157 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08rtlRandomPool: remove pointless seeding with system timeThorsten Behrens1-4/+0
Change-Id: I88647a66a72d092303560a4348ce3dc55ee6c321 Reviewed-on: https://gerrit.libreoffice.org/46055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-07gpg4libre: [API CHANGE] add storage helper for GPG encryption dataThorsten Behrens5-1/+87
OpenPGP encryption needs to pass down slightly different meta data to package / zip storage. Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276
2017-12-07gpg4libre: add manifest entries for gpg encryptionThorsten Behrens2-14/+174
Change-Id: I71bd7e2c6c73d997fa1ed5bb36fdc2873daca10c
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin13-38/+38
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 Grandin2-4/+4
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-12-02ofz#4502 Direct-leakCaolán McNamara1-5/+9
Change-Id: I1323aa7033c68802384c9b984b52a6c6f1156094 Reviewed-on: https://gerrit.libreoffice.org/45714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-02improve scopingCaolán McNamara1-5/+3
Change-Id: I4b42d1357e951acda8e7cdba416dc298f260a541 Reviewed-on: https://gerrit.libreoffice.org/45713 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-02ofz#4491 Bad-CastCaolán McNamara1-3/+14
Change-Id: Ibee0c3e51ecd2b976d67c3ab28cabf0acb10c6b8 Reviewed-on: https://gerrit.libreoffice.org/45659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-29ofz: Direct-leakCaolán McNamara1-5/+5
Change-Id: Id94586cc659a5e504c727c570dc9fc60c85c8820
2017-11-27keep track of available dataCaolán McNamara2-0/+5
Change-Id: Idc54cdef0f3a4355a7e26f25cdc5b50d65d9d583 Reviewed-on: https://gerrit.libreoffice.org/45351 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-24fix attempt to save and rethrow exceptionCaolán McNamara2-17/+7
Change-Id: Idff6ffef536d87d85f1092b3316d65da83527711 Reviewed-on: https://gerrit.libreoffice.org/45229 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-04loplugin:constparams in various(1)Noel Grandin4-6/+6
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 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>