summaryrefslogtreecommitdiff
path: root/extensions
AgeCommit message (Collapse)AuthorFilesLines
2018-01-27Fix typosAndrea Gelmini1-2/+2
Change-Id: Id1a19f2c8b44131773d4d5270a607c1907b16597 Reviewed-on: https://gerrit.libreoffice.org/48684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-25Fix typosAndrea Gelmini1-1/+1
Change-Id: I31741b4f42fcc7e58d383e204f3e305b9de1a4c4 Reviewed-on: https://gerrit.libreoffice.org/48248 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann5-21/+21
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19new loplugin:emptyifNoel Grandin1-3/+0
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42 Reviewed-on: https://gerrit.libreoffice.org/48128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-16Fix typosAndrea Gelmini2-3/+3
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15More loplugin:cstylecast: extensionsStephan Bergmann7-27/+27
Change-Id: Ia2f6f15f56b4e32887b04f882a5b62eb9eb81159
2018-01-12More loplugin:cstylecast: extensionsStephan Bergmann37-180/+180
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: If5cd78704f10a98524a113c67cdc09529f745c74
2018-01-09Various loplugin (clang-cl)Stephan Bergmann1-4/+4
Change-Id: Ib91d9f82b99989a37e5e03ecb9138a59436ce2c8 Reviewed-on: https://gerrit.libreoffice.org/47674 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-31loplugin:passstuffbyref improved return in emfio,writerfilterNoel Grandin3-4/+4
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e Reviewed-on: https://gerrit.libreoffice.org/47214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky3-6/+3
This way, it is possible to have all the strings translated in dialogs even when different users use different languages. [It was already possible to have different languages previously, but not everything in the dialog has switched - like the buttons at the bottom of the dialogs etc.] Change-Id: I29a5ae6d31a370eec60397884200b684ec1bf5b9 Reviewed-on: https://gerrit.libreoffice.org/46417 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46979 Tested-by: Jenkins <ci@libreoffice.org>
2017-12-22tdf#114635: fix TWAIN on Windows 64 bitMike Kaganski1-2/+8
DG_IMAGE / DAT_IMAGENATIVEXFER / MSG_GET is documented [1] to take a handle as its pData parameter, but said to be TW_UINT32. The latter is false, because it returns a Windows handle to DIB to that parameter, and it has 64 bits on 64-bit Windows systems. A crash resulted when wrong value attempted to be GlobalLock'd, pBIH was nullptr, and was dereferenced. Also, in some circumstances, duplicate MSG_XFERREADY might arrive sequentially; the second one arrives when current state has already changed value, and thus TWAIN_EVENT_QUIT used to be sent, resulting in mpImpTwain destroyed before TWAIN_EVENT_XFER processed. This had lead to absent result of scan. [1] http://www.twain.org/wp-content/uploads/2016/03/TWAIN-2-Spec.pdf Change-Id: Ic03fe7681f6003e5fda0c071be181696f9bc866a Reviewed-on: https://gerrit.libreoffice.org/46944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-12-20Fix typosAndrea Gelmini1-1/+1
Change-Id: I6f0eb93ec654e629c8fbe761f000190ea9343103 Reviewed-on: https://gerrit.libreoffice.org/46824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-19wrap scoped enum around css::util::NumberFormatNoel Grandin2-5/+5
Change-Id: Icab5ded8bccdb95f79b3fa35ea164f47919c68fa Reviewed-on: https://gerrit.libreoffice.org/46339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-12-18loplugin:unusedindexMike Kaganski4-117/+55
Change-Id: I256a807dd2a4c81126b5a76f3d472e31b8224146 Reviewed-on: https://gerrit.libreoffice.org/46652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-15loplugin:salcall (clang-cl)Stephan Bergmann4-11/+11
Change-Id: Idda630320bb5e02e1ea675b3b3786c9ec6ac166b Reviewed-on: https://gerrit.libreoffice.org/46504 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann37-67/+67
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-11loplugin:salcall fix functionsNoel Grandin39-76/+76
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-08Fix isSalCallFunction so it also works on WindowsStephan Bergmann2-2/+2
...where FunctionDecl::getReturnTypeSourceRange returns an invalid range because it fails to take AttributedTypeLoc (as caused by SAL_CALL -> __cdecl) into account. Change-Id: I7835dfca7b890ba1bfdb99adaad78a627b6e0e17 Reviewed-on: https://gerrit.libreoffice.org/45909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann1-0/+1
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06loplugin:salcallStephan Bergmann1-2/+2
Change-Id: Ie3931deb3b39160a6f46dd744ea5b098904d55d2
2017-12-06loplugin:salcall handle virtual methodsNoel Grandin24-33/+33
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42 Reviewed-on: https://gerrit.libreoffice.org/45851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05Replace deprecated std::mem_fun et al in extensionsStephan Bergmann2-4/+4
(as std::mem_fun is gone by default at least from recent libc++ in C++17 mode) Change-Id: I109dd7e04ed2914eb8768bb8139758b5ad60dadc Reviewed-on: https://gerrit.libreoffice.org/45862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05loplugin:salcall fix non-virtual methodsNoel Grandin6-21/+21
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-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin3-4/+4
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27loplugin:unnecessaryparen (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I5452235287fd5986de25ee542edd57bf1abded52 Reviewed-on: https://gerrit.libreoffice.org/45338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-27loplugin:unnecessaryparen check for (f1()).f2Noel Grandin1-1/+1
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3 Reviewed-on: https://gerrit.libreoffice.org/45218 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23loplugin:simplifyboolStephan Bergmann1-1/+1
Change-Id: I2e340824db3e1e5197a23e567e4b88b64136562f
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin1-1/+1
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22tdf#112689 Replace chained O(U)StringBuffer::append with operator+qzheng1-15/+16
Change OUStringBuffer::append() to operator+. Change-Id: I13232cb69b1d62acfcf15d5ba5a2d72e5ab5d253 Reviewed-on: https://gerrit.libreoffice.org/44703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-4/+4
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-20cosmetics: Drop duplicate semicolonTakeshi Abe2-2/+2
Change-Id: I96d2ffb903f9ed15070572552c9564b5089df12f Reviewed-on: https://gerrit.libreoffice.org/44914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-18Replace list by vector in framectr (extensions)Julien Nabet1-10/+7
+ use for range loop Change-Id: I7bd95df8a75979bf342e3a8920fab016593e1b18 Reviewed-on: https://gerrit.libreoffice.org/44891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15silence coverity#1362777 Explicit null dereferencedCaolán McNamara1-0/+1
Change-Id: I49089cfac207f67e03c19a09a95c4c7325276b53
2017-11-15Fix typosAndrea Gelmini1-1/+1
Change-Id: I8bdced3fa572074aedabdcfce841adf525ae8b81 Reviewed-on: https://gerrit.libreoffice.org/44710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13More proper construction of vnd.sun.star.pkg URLMike Kaganski1-6/+11
See commit bff8d843bd4e5dcca5dc1a60c2c7852b1b72a00b The SwUiWriterTest::testEmbeddedDataSource unit test is adjusted to test the paths with "#". Change-Id: I8d85147128915c7100ab9cc2888eb73c94fe6486 Reviewed-on: https://gerrit.libreoffice.org/44678 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-10No need to blacklist this loplugin:unnecessaryoverrideStephan Bergmann2-7/+1
...a using declaration should fix it just fine Change-Id: I05cf76672bcceb7a94afa602e215a0b5a32de82b Reviewed-on: https://gerrit.libreoffice.org/44591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-06loplugin:constparams in various(2)Noel Grandin2-4/+4
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04Make Windows error reporting more robustMike Kaganski1-4/+3
https://msdn.microsoft.com/en-us/library/ms679351 describes that "it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS" Previously in case when an error string would contain inserts, function returned error, so the error message wasn't shown (at least it didn't crash, thanks to nullptr as the function's last argument). As the function may fail, we now pre-nullify the buffer pointer to avoid dereferencing uninitialized pointer later (though at least for some Windows versions, the function nullifies the pointer in case of FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this). Also release of allocated buffer is changed to recommended use of HeapFree. The code that doesn't make use of OUString is left directly calling FormatMessage, to avoid introducing new dependencies. Where it makes sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx> Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848 Reviewed-on: https://gerrit.libreoffice.org/44206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-04loplugin:constparams in various(1)Noel Grandin2-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-02loplugin:finalclasses in filter,extensionsNoel Grandin28-147/+75
Change-Id: I2822b8c5a91feaf47466356c01728d32a85bbae9 Reviewed-on: https://gerrit.libreoffice.org/44190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01loplugin:constantparam in connectivityNoel Grandin3-3/+3
Change-Id: Ia13d0931bbdf642fe04119ea1112788fb143eba8 Reviewed-on: https://gerrit.libreoffice.org/44110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27loplugin:includeform: extensions (Windows)Stephan Bergmann17-22/+22
Change-Id: I6619004353fb7e94506e2a75c77b42156f0b6c6d
2017-10-26vcl: make MapMode constructor explicitMichael Stahl9-19/+19
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: extensionsStephan Bergmann63-151/+151
Change-Id: I2f9001ddae6cbcef51ba2c0415baa727f211261d
2017-10-23overload std::hash for OUString and OStringNoel Grandin7-13/+11
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-21tdf#113225 - hold the solar mutex when entering from UNO.Michael Meeks1-0/+1
http://crashreport.libreoffice.org/stats/crash_details/dff57662-1693-47f6-8b09-88f180d2e706 Change-Id: I4322c2113c300af97fb5854aac4a741b7027e6b1 Reviewed-on: https://gerrit.libreoffice.org/43623 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-10-18no need to call acquire()Noel Grandin1-9/+2
when we are returning an uno::Reference Change-Id: Ifff0dba20f45f5321f398577fa7d5fb073278a94 Reviewed-on: https://gerrit.libreoffice.org/43472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17use rtl::Reference in BibDataManagerNoel Grandin2-10/+6
instead of manual reference counting Change-Id: Ia8fd5487fb8d25d6725dd36b74aab57272aba911 Reviewed-on: https://gerrit.libreoffice.org/43447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17turn implicit container explicit in buildable notebooksCaolán McNamara1-3/+18
as in interim measure for SfxTabDialogs we throw away the TabPage if its not suitable for reuse Change-Id: Ic5776ca3d2a8cb6bf41f33df01b211f81c62a842 Reviewed-on: https://gerrit.libreoffice.org/43134 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>