summaryrefslogtreecommitdiff
path: root/UnoControls
AgeCommit message (Collapse)AuthorFilesLines
2021-01-20Improve loplugin:doubleconvertStephan Bergmann1-2/+2
(The use of isa_and_nonnull<> instead of isa<> is necessary for cases like return (i_styleSettings.*i_getDefaultColor)(); in lcl_getEffectiveColor, svtools/source/table/gridtablerenderer.cxx.) Change-Id: Iffc59b1146dd4ce13bbd3c8a6f46bd3c78a39344 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109663 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-20improve some IllegalArgumentException messagesNoel1-1/+1
Change-Id: Id88f2a82bf2651e8b5895aa330f32b71ff5b0e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109546 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16make the Color constructors explicitly specify transparencyNoel4-11/+11
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel2-2/+2
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17loplugin:stringviewparam check methods tooNoel2-8/+8
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-02loplugin:flatten in UnoControlsNoel Grandin6-246/+246
Change-Id: I0702283083297fc956eb8bd5132a1144286e1fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-04UnoControl: create instances with uno constructorsNoel Grandin11-209/+37
See tdf#74608 for motivation. Change-Id: I3df173e3c7064d3d925d3abe5c652b8cbe6c8ea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-30loplugin:simplifybool extend to expression like !(a < b || c > d)Noel Grandin1-1/+1
mostly to catch stuff from the flatten work, but I think this looks good in general Change-Id: I7be5b7bcf1f3d9f980c748ba20793965cef957e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen1-0/+1
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-03loplugin:finalclasses in xmlsecurity..UnoControlsNoel Grandin6-16/+11
Change-Id: I8e942bf37c9173a01bef6e1403ca21f579e7f608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91612 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen1-1/+0
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-15Revert "loplugin:constfields in ucbhelper"Noel Grandin1-1/+1
This reverts commit 64035391ebe8810520a214a3ae0aeb4c1b039819. Change-Id: Icfde3e984f9ebf93a423d101aee385182f65dea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90518 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-19tdf#42982 add detail exception reason for UnoControlsnienzu1-8/+4
Change-Id: Ia62a0015d68fe819113322e27b93054d38d98aea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88996 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-12-28tdf#124176: Use "pragma once" on UnoControls/*Andrea Gelmini9-27/+9
It passed "make check" on Linux Change-Id: I4b0427e86063de0d4b1fd916ab4dfb1505db5a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85888 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-22loplugin:finalclasses in UnoControls..writerperfectNoel Grandin1-4/+2
Change-Id: I751c9a45503326dfdaeb471967a688a95d4fa090 Reviewed-on: https://gerrit.libreoffice.org/85711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-17Extend loplugin:external to warn about enumsStephan Bergmann1-0/+4
To mitigate the dangers of silently breaking ADL when moving enums into unnamed namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79 "New loplugin:external"), note all functions that are affected. (The plan is to extend loplugin:external further to also warn about classes and class templates, and the code to identify affected functions already takes that into account, so some parts of that code are not actually relevant for enums.) But it appears that none of the functions that are actually affected by the changes in this commit relied on being found through ADL, so no adaptions were necessary for them. (clang::DeclContext::collectAllContexts is non-const, which recursively means that External's Visit... functions must take non-const Decl*. Which required compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support such Visit... functions with non-const Decl* parameters.) Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd Reviewed-on: https://gerrit.libreoffice.org/83001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-30loplugin:duplicate-defines in UnoControlsNoel Grandin4-12/+14
these are only used by internal code, so move inside the relevant .cxx file Change-Id: If7cdf17a49ff3089ad2100961092dd2747523a8d Reviewed-on: https://gerrit.libreoffice.org/79830 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-24loplugin:returnconstval in UnoControlsNoel Grandin8-18/+17
Change-Id: I6e855ee6dc2075334e92803d87e660f389b54d53 Reviewed-on: https://gerrit.libreoffice.org/78055 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in basic..cuiNoel Grandin2-3/+3
Change-Id: I15d825de3201808d188b461415f78a4d81b64127 Reviewed-on: https://gerrit.libreoffice.org/77494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): UnoControlsStephan Bergmann4-4/+4
Change-Id: I4f24cb6e5c44b27dc0fc85ddadedb7a93b4e5eb4 Reviewed-on: https://gerrit.libreoffice.org/76701 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-21loplugin:referencecasting in variousNoel Grandin2-3/+2
Change-Id: Id4e3d9d1bbfd47181299568afec45e996eb1eed5 Reviewed-on: https://gerrit.libreoffice.org/76071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-17tdf#42949 Fix IWYU warnings in UnoControls/Gabor Kelemen18-153/+60
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id088a2c8a91c2fe7c8ff9e05d910d5b5e9383b7c Reviewed-on: https://gerrit.libreoffice.org/72095 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-09Simplify Sequence iterations in UnoControlsArkadiy Illarionov2-11/+6
Use range-based loops Change-Id: I4d3be75bb83c74267b9dec6f1dcdc105c292be9d Reviewed-on: https://gerrit.libreoffice.org/72011 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-08Use osl_atomic_increment/osl_atomic_decrement to change m_refCountMike Kaganski2-4/+4
Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski1-10/+10
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-05Fix typoAndrea Gelmini1-1/+1
Change-Id: I49ffb2fff63a8818c4e84a26923fca1484bf1e36 Reviewed-on: https://gerrit.libreoffice.org/70284 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-3/+3
Change-Id: I42090a462b15fbc537b0fdb5eaf66f60a213e5ff Reviewed-on: https://gerrit.libreoffice.org/70103 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-3/+3
Change-Id: I7831896b8898f0cb20589fbd241b97fcc21db366 Reviewed-on: https://gerrit.libreoffice.org/70108 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-3/+3
Change-Id: I546735f427a47d9ada1589e1861d0cf696788b05 Reviewed-on: https://gerrit.libreoffice.org/70107 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-6/+6
Change-Id: I0e8f761768c7faf3da1d11d6fe02ee24e1180cf2 Reviewed-on: https://gerrit.libreoffice.org/70104 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-3/+3
Change-Id: I907b28c98133162a31835ebaeae6244dc8735752 Reviewed-on: https://gerrit.libreoffice.org/70106 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-03Fix typoAndrea Gelmini1-3/+3
Change-Id: I794be89bed433e813feaecffce9464d087ddde61 Reviewed-on: https://gerrit.libreoffice.org/70105 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-08loplugin:indentation in UnoControls..accessibilityNoel Grandin1-1/+1
Change-Id: Ib58ac1c7171331eac543eba7b5f7bae8fa04ae4d Reviewed-on: https://gerrit.libreoffice.org/67524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-09Fix typosAndrea Gelmini1-2/+2
Change-Id: I4beaec7bf6b023a73be464a8c38b0701ff3ae1b1 Reviewed-on: https://gerrit.libreoffice.org/63116 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-31loplugin:useuniqueptr in impl_getWindowDescriptorNoel Grandin8-52/+41
return by value, the usual C++ optimisations will make this efficient Change-Id: I7f9634b9663605504c69e0381a6ebc9c76061048 Reviewed-on: https://gerrit.libreoffice.org/62645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-27loplugin:constfields in ucbhelperNoel Grandin1-1/+1
Change-Id: Ic9d59b352dcb771191de963c0f6e90c74647c8b8 Reviewed-on: https://gerrit.libreoffice.org/60983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-18m_xTabControllerList is deadNoel Grandin2-27/+0
ever since commit af4b38d6e7f769bf403a768bd310e5fa2b3e8ddd Date: Mon Mar 24 15:59:06 2014 +0100 Remove dead code Change-Id: Ia7848f469d91666f13130132ebe5766c4fedcebb Reviewed-on: https://gerrit.libreoffice.org/60621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-18loplugin:useuniqueptr in BaseContainerControlNoel Grandin2-35/+7
Change-Id: If78893d47d2b504b01652575579c6972a3863a09 Reviewed-on: https://gerrit.libreoffice.org/60620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-11clang-tidy bugprone-copy-constructor-initNoel Grandin1-2/+2
Change-Id: Idd435b3a4d081f6d3af26ff8add69ad4af50db57 warning: calling a base constructor other than the copy constructor Reviewed-on: https://gerrit.libreoffice.org/60239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29Fix typosAndrea Gelmini1-1/+1
Change-Id: I6ca53ead2b125618d0aceff05d5fdfa374662799 Reviewed-on: https://gerrit.libreoffice.org/58809 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-27new loplugin:stringloop, and applied in variousNoel Grandin1-12/+12
look for OUString being appended to in a loop, better to use OUStringBuffer to accumulate the results. Change-Id: Ia36e06e2781a7c546ce9cbad62727aa4c5f10c4b Reviewed-on: https://gerrit.libreoffice.org/58092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Ife28cd9399cfcb375bad764dac7424eda50d430d Reviewed-on: https://gerrit.libreoffice.org/52198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-16loplugin:useuniqueptr in ProgressMonitorNoel Grandin3-27/+18
Change-Id: Ic66e49037c04501a2c39a69f3f8a2a03cb10b5fc Reviewed-on: https://gerrit.libreoffice.org/52884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke1-1/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-23[API CHANGE] Fix typo in prop implemented by stardiv.UnoControls.FrameControlStephan Bergmann1-1/+1
There is exactly one implementation of css.frame.FrameControl (which demands a property named "ComponentUrl" not "ComponentURL"), and exactly one place where that property is used. So switch those two places to use the spelling of the property name as documented in the UNOIDL service. (Even though that can be considered an incompatible change, in the unlikely case that 3rd party code expects to be able to access the given implementation's property with the mis- spelled name.) Change-Id: I4fa3f21851b61079c09deea1a24aac22bc96f36f Reviewed-on: https://gerrit.libreoffice.org/51766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-13Sorry, could not resist: Drive-by cosmetic changesTor Lillqvist18-223/+147
Remove noise comments, ASCII graphics, and superfluous whitespace. Change-Id: Icca0995082ce8afad1e770a263fdef00bfc33449 Reviewed-on: https://gerrit.libreoffice.org/51168 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-03-07use more Color in UnoControls..canvasNoel Grandin2-8/+8
Change-Id: I8dda18f9630b4e59ead83fa7471525bdf4eaeda0 Reviewed-on: https://gerrit.libreoffice.org/50863 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-02delete colordata.hxxNoel Grandin1-1/+0
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26use less TRGB_COLORDATANoel Grandin3-9/+10
part of removing ColorData Change-Id: Id2d5843762227559f97cfb5eb61c01c888a0601e Reviewed-on: https://gerrit.libreoffice.org/50347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>