summaryrefslogtreecommitdiff
path: root/extensions/source
AgeCommit message (Collapse)Author
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11loplugin:stringbuffer (clang-cl)Stephan Bergmann
Change-Id: Ie49cd58e7363c834c02769dda7c5aa83cca4f587 Reviewed-on: https://gerrit.libreoffice.org/60324 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-09Avoid getTokenCount and use indexed getTokenMatteo Casalin
Change-Id: Iaac598c9e56afa29db88237fecbe54d9cb4d4011
2018-09-08clan-tidy bugprone-throw-keyword-missing in SubmissionPropertyHandlerNoel Grandin
warning: suspicious exception object created but not thrown; did you mean 'throw IllegalArgumentException'? looks like a mistake in commit cd5b956817d0a6585d44f50857d690e9dc58145e Date: Tue Mar 14 10:33:39 2006 +0000 INTEGRATION: CWS pbrwuno (1.3.88); FILE MERGED Change-Id: I828501f32b3caff8c4ca05a8a8c4b063dccecd3b Reviewed-on: https://gerrit.libreoffice.org/60196 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-08loplugin:simplifyconstruct in editeng..extensionsNoel Grandin
Change-Id: I646a24382554312d92a4a8746d5267767353a53f Reviewed-on: https://gerrit.libreoffice.org/60169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05clang-tidy performance-inefficient-vector-operationNoel Grandin
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-24pass DelFormats around using std::vectorNoel Grandin
instead of an array and a separate count Change-Id: Ia12a549da7e35092da2db35f8b2b9fc6a9e9c2be Reviewed-on: https://gerrit.libreoffice.org/59506 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in OPropertyBrowserControllerNoel Grandin
Change-Id: Id5e225dbe5a1c2f27c1032cdaab35a01c78ede81 Reviewed-on: https://gerrit.libreoffice.org/59136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15loplugin:useuniqueptr in extensions/propctrlrNoel Grandin
Change-Id: I08564e76ed667d158bd885a66b994b421ae9b426 Reviewed-on: https://gerrit.libreoffice.org/59015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-04Fix typosAndrea Gelmini
Change-Id: Iaaf12d276fb890e5ac860e79c5dc196d7e8680d8 Reviewed-on: https://gerrit.libreoffice.org/58435 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-01Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from dbaccess to extensions Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59 Reviewed-on: https://gerrit.libreoffice.org/58165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-29loplugin:stringloop in variousNoel Grandin
Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3 Reviewed-on: https://gerrit.libreoffice.org/58250 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-23Fix typosAndrea Gelmini
Change-Id: Iebc31a53404da41f35eed7338662365d7efbd7a2 Reviewed-on: https://gerrit.libreoffice.org/57810 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-07-22Fix typosAndrea Gelmini
Change-Id: I326827c394347cbe9fad242e9da5702cba7a4d95 Reviewed-on: https://gerrit.libreoffice.org/57761 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-07-18Fix typosAndrea Gelmini
Change-Id: I5195d13b351c0eebad1eae901f7ce8408a9e5c92 Reviewed-on: https://gerrit.libreoffice.org/57028 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-07-14tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctorUlkem Kasapoglu
Change-Id: I09016a06110772379ddf8b15f14446346b850cd6 Reviewed-on: https://gerrit.libreoffice.org/57339 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
2018-07-09loplugin:oncevarNoel Grandin
Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a Reviewed-on: https://gerrit.libreoffice.org/57108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-26Fix typoAndrea Gelmini
Change-Id: I47cf4db535562e4db505b44981d86d40171e7630 Reviewed-on: https://gerrit.libreoffice.org/56424 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-26tdf#96099 Remove some trivial container iterator typedefsArkadiy Illarionov
Change-Id: Ifec98748d55ff6aca64c425c50c2cf2650f61591 Reviewed-on: https://gerrit.libreoffice.org/56422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-25Add a FIXMETor Lillqvist
Change-Id: I3771d6f4703bbd1f012389f5699928464875290f
2018-06-20move SvColorDialog to welded argumentsCaolán McNamara
Change-Id: Ieb04fc4684caa6df47b123ab06e280f2d204375a Reviewed-on: https://gerrit.libreoffice.org/56162 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin
we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-12Support named arguments in InterfaceOleWrapper::Invoke()Tor Lillqvist
Convert a DISPPARAMS with named arguments into one with just positional ones. If there are gaps, use markers for them (VARIANTs with VT_ERROR:DISP_E_PARAMNOTFOUND). Those are then passed on as empty UNO Anys. Change-Id: Iad1197ba2559567a9c0eca4524e76389c2048fec Reviewed-on: https://gerrit.libreoffice.org/55646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-11Show also args in the SAL_INFO in InterfaceOleWrapper::Invoke()Tor Lillqvist
Change-Id: I8d1d3273fcafe1ce750e66e55712eac607722717 Reviewed-on: https://gerrit.libreoffice.org/55643 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-11Fix typoAndrea Gelmini
Change-Id: I22eb441313c2f06ecbbbe86a8b2c4dc602861cff Reviewed-on: https://gerrit.libreoffice.org/55611 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-10Start of work on supporting named argumentsTor Lillqvist
In InterfaceOleWrapper::GetIDsOfNames(), look up also the parameter names, if present (if cNames > 1, rgszNames entries after the first). Return S_OK only if *all* the names were found, i.e. both the first (method or property) name, *and* all the parameter names. Change-Id: Ie04bc0558a7e2044ef527fc18f99230c71985a22 Reviewed-on: https://gerrit.libreoffice.org/55549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-08Fix glitch in SAL_INFO loggingTor Lillqvist
Change-Id: I421d3980c50706f927a0611e48c33a43267dd01b Reviewed-on: https://gerrit.libreoffice.org/55477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-08Log all the names being looked up in GetIDsOfNames()Tor Lillqvist
Change-Id: Ia116021ecc9f20c82622a4bc8ee40e7a9a1508fa Reviewed-on: https://gerrit.libreoffice.org/55479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin
Since the previous call would throw if there was nothing to be assigned to the value. Idea from tml. Used the following script to find places: git grep -A3 -n UNO_QUERY_THROW | grep -B3 -F 'is()' Change-Id: I36ba7b00bcd014bdf16c0455ab91056f82194969 Reviewed-on: https://gerrit.libreoffice.org/55417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-06-07Fix off-by-one error: The XCollection loop index is one-basedTor Lillqvist
We must compare the index against the number of entries with '>' and not '>='. Change-Id: I2de9e53b2a0d923d4136ee5e093baa955c8301da Reviewed-on: https://gerrit.libreoffice.org/55405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-07Improve logging in CXEnumVariantTor Lillqvist
Change-Id: Ia0c3f9f1e95980b14415a030fc40268629ae06f3 Reviewed-on: https://gerrit.libreoffice.org/55399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-06tdf#118026: Use ooo::vba::XCollection instead of css::container::XEnumerationTor Lillqvist
An object returned by XCollection::Item() is of the right "VBA" kind that we want. One returned by XEnumeration::nextElement() is not. Change-Id: I26132a7d0f2638a61f2711b941386a889fabea72 Reviewed-on: https://gerrit.libreoffice.org/55392 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-05tdf#42949 remove unused compheler includes ..Jochen Nitschke
and fix the fallout Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e Reviewed-on: https://gerrit.libreoffice.org/54882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-04Various clang-cl/loplugin errors in extensions/source/ole/unoobjw.cxxStephan Bergmann
-Werror,-Wnon-virtual-dtor: made various dtors virtual -Werror,-Winconsistent-missing-override in END_COM_MAP: silenced the same way as in other places across the code base loplugin:unreffun in BEGIN_COM_MAP and END_COM_MAP: silence with -Wunused-function various -Werror in atlbase.h and atlcom.h: silenced the same way as in e.g. embedserv/source/inc/stdafx.h -Werror,-Wshadow -Werror,-Wunused-function loplugin:casttovoid loplugin:cstylecast loplugin:nullptr loplugin:salbool loplugin:subtlezeroinit Change-Id: Ifefdc930a1d3ecf5366523dea509bfaca1f4e001 Reviewed-on: https://gerrit.libreoffice.org/55186 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-03tdf#96099 Remove some trivial std::vector typedefsArkadiy Illarionov
Change-Id: I21171bd90b5e19fe8e5b8f2d125b6dfcb9a8b766 Reviewed-on: https://gerrit.libreoffice.org/55198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-06-01Improve handling of _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNINGStephan Bergmann
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING turned into a global -D..., same as existing _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING. Change-Id: Ifefdc930a1d3ecf5366523dea509bfaca1f4e002 Reviewed-on: https://gerrit.libreoffice.org/55188 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-06-01Fix typosAndrea Gelmini
Change-Id: Icc6fd609d3e57277822c4de76bd3baf4b1900840 Reviewed-on: https://gerrit.libreoffice.org/55176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-06-01loplugin:unoany (clang-cl)Stephan Bergmann
Change-Id: I2a27c41ed2045cca8b8efb5f9d07f3015c67f8a1 Reviewed-on: https://gerrit.libreoffice.org/55169 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-01tdf#96099 Remove some trivial typedef std::vectorArkadiy Illarionov
Change-Id: Iaba48932dde059c88401ee60f7aac0048a79e9eb Reviewed-on: https://gerrit.libreoffice.org/55045 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-01Fix typosAndrea Gelmini
Change-Id: I17d6a674fbe7b5eebd21cad5a9491c129679e5c1 Reviewed-on: https://gerrit.libreoffice.org/55117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-05-31Log the call to CoRegisterClassObject()Tor Lillqvist
Change-Id: Idfca38ec2c931572b6978440862c7bfca8d536e6
2018-05-31Revert "Simplify: Use AutomationInvokedZone::isActive()"Tor Lillqvist
Can't have the URE library 'stoc' depend on the non-URE library 'comphelper'. This reverts commit 3c041720304ec77202741b5d5c8df9b93bc70a70.
2018-05-31Add a SAL_INFOTor Lillqvist
Change-Id: Ic197a9573968fb252cb52cc5089f9140d5375d3a
2018-05-31Simplify: Use AutomationInvokedZone::isActive()Tor Lillqvist
Don't need the mbFromOLE boolean flag and the special "FromOLE" parameter passed to the InvocationService:: createInstanceWithArguments(). Change-Id: I05e10a78955d87cb7c37e198c60c3ddcfdbc4275
2018-05-31Need to enter the AutomationInvokedZone here, tooTor Lillqvist
Change-Id: I2723146f2c549c630dfa0e5da330af228cb305a0
2018-05-31Enter AutomationInvokedZone appropriatelyTor Lillqvist
Change-Id: Ic76fc43fc521a6fd6642e22b71c311370788d4aa
2018-05-31Make convertDispparamsArgs() handle mismatch in number of parameters sanelyTor Lillqvist
Parameters come in in reverse order in pdispparams. There might be less parameters than expected. In that case, assume the missing ones are "optional" (but can't be marked as such in UNO IDL), and fill in the rest with empty Anys. There might also be more parameters than expected. In that case, assume the oovbaapi UNO IDL hasn't kept up with added optional parameters in MSO, and just ignore the extra ones, as long as they are empty. An example: incoming parameters: <12, 13, "foo/bar.tem"> Expected paramters: (string filename, int something, int somethingElse, Any whatever, Any whateverElse) Here the existing incoming parameters are placed in reverse order in the first three outgoing parameters, and the rest of the outgoing paramters are passed as empty Anys. Another example: incoming parameters: <EMPTY, TRUE> Expected parameters: (bool flag) Here the TRUE is passed as the sole outgoing parameter, and the incoming EMPTY is ignored. Still an example: incoming parameters: <"foo.doc", TRUE> Expected parameters: (bool flag) This throws an error as the incoming non-empty extra parameter presumably indicates something important, but there is no corresponding outgoing parameter to pass it in. Change-Id: Ib04f9701099ecb899e792d99ff86588022b3bbf6