summaryrefslogtreecommitdiff
path: root/chart2/source/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-09-06loplugin:simplifyconstruct in canvas..cuiNoel Grandin3-9/+3
Change-Id: I02eba1df117a9d0df42bcac13c3251cb4fa6da14 Reviewed-on: https://gerrit.libreoffice.org/60074 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05clang-tidy performance-inefficient-vector-operationNoel Grandin1-2/+4
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-29new loplugin:oustringbufferNoel Grandin4-14/+14
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-28tdf#42949 Fix IWYU warnings in chart2/source/inc/[l-z]*Gabor Kelemen19-0/+35
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Some only-recently analyzed files were cleaned. Also tried harder to use more fw decls instead of blacklisting Change-Id: Ie4f8eb7065e44a2b5208d6da4fa8e3681a31820b Reviewed-on: https://gerrit.libreoffice.org/59420 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-08tdf#42949 Fix IWYU warnings in chart2/source/inc/[d-l]*hxxGabor Kelemen8-0/+11
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Try harder to use fw declarations, and a few newly analyzed files Change-Id: I50299e9115ced60468c7bc5e63013addbaec48c0 Reviewed-on: https://gerrit.libreoffice.org/58618 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-05coverity#1438225 Improper use of negative valueCaolán McNamara1-2/+2
and coverity#1438221 Argument cannot be negative coverity#1438213 Argument cannot be negative coverity#1438227 Argument cannot be negative coverity#1438223 Argument cannot be negative coverity#1438222 Argument cannot be negative coverity#1438215 Improper use of negative value coverity#1438220 Improper use of negative value coverity#1438217 Improper use of negative value Change-Id: I398ae9901b27f6b65f03aad03638939b5880a671 Reviewed-on: https://gerrit.libreoffice.org/58626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-04Use more basegfx deg<->rad functions, instead of direct formulasMike Kaganski1-32/+32
Also make the functions constexpr. Due to slight changes in floating-point arithmetics (90.0 instead of 180.0, M_PI2 instead of M_PI resp.), results might differ in last digits (usually 17th decimal digit). This has lead to need to tweak char2dump's PieChartTest unit test. Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3 Reviewed-on: https://gerrit.libreoffice.org/58583 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03Move angle normalization code from various places to toolsMike Kaganski1-22/+5
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000; NormAngle360 -> NormAngle36000. Some places were fixed that previously returned inclusive ranges (i.e., both 0 and 360), see changes in these files: chart2/source/view/main/PlottingPositionHelper.cxx chart2/source/view/main/PolarLabelPositionHelper.cxx chart2/source/view/main/ShapeFactory.cxx filter/source/graphicfilter/idxf/dxf2mtf.cxx sw/source/core/graphic/grfatr.cxx (the latter now matches the comment in the function). Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59 Reviewed-on: https://gerrit.libreoffice.org/58556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-01loplugin:returnconstant in chart2Noel Grandin1-2/+2
Change-Id: If44096ccf8d176023a1b7b8ae722e04417e4c131 Reviewed-on: https://gerrit.libreoffice.org/58425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-28loplugin:stringloop basctl,chart2,connectivityNoel Grandin2-8/+8
Change-Id: I21353dace60705d55b3d70f1e0bc610d55b84d63 Reviewed-on: https://gerrit.libreoffice.org/58210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-26chart2: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-6/+0
...by removing explicitly user-provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non-deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already inline, so why bother with non-inline functions.) Change-Id: If96d3b6ca79416127933e7f22e3628361604efe1 Reviewed-on: https://gerrit.libreoffice.org/58069 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-26Missing includes (Windows --disable-pch)Stephan Bergmann1-0/+1
Change-Id: Iea067e3529de9208bd0a00c276eb03858816bd00 Reviewed-on: https://gerrit.libreoffice.org/57996 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-24pass WrappedProperty around by std::unique_ptrNoel Grandin2-55/+40
Change-Id: Ifcd9606541d1157027ca49a351dbbbe0bf153b12 Reviewed-on: https://gerrit.libreoffice.org/57875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-09Add missing sal/log.hxx headersGabor Kelemen10-0/+10
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 a* to configmgr Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a Reviewed-on: https://gerrit.libreoffice.org/57170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-25tdf#42949 Fix IWYU warnings in chart2/source/inc/[A-C]*Gabor Kelemen6-1/+11
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Thanks to codemaker changes there are more warnings to fix than before. Also try harder to use fw declarations. Change-Id: If8b1981d5bb0f0b00e9f88d318307594fffa2506 Reviewed-on: https://gerrit.libreoffice.org/55934 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-22tdf#42949 Fix IWYU warnings in chart2/source/tools/Gabor Kelemen6-6/+10
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7eeb4529d521e4ff6616507c7f68cbff155ea729 Reviewed-on: https://gerrit.libreoffice.org/55838 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-06-11loplugin:useuniqueptr in WrappedPropertySetNoel Grandin1-8/+8
Change-Id: I08f00c00b22c6a680ec59d2e86eb035c58b17609 Reviewed-on: https://gerrit.libreoffice.org/55526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08look for unnecessary calls to Reference::is() after an UNO_QUERY_THROWNoel Grandin3-43/+37
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-05-25Improve re-throwing of UNO exceptionsNoel Grandin1-6/+4
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-25tdf#42949 Fix IWYU warnings in chart2/source/inc/*Gabor Kelemen6-0/+6
Found with bin/find-unneeded-includes Only removal proposals are dealt with here A bit of fallout management was necessary as well find-unneeded-includes gave no proposals for chart2/inc Change-Id: Id382586f575cf45da758da453df9340b28e9ddd0 Reviewed-on: https://gerrit.libreoffice.org/54778 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-22loplugin:unusedfields in avmedia..comphelperNoel Grandin1-11/+0
Change-Id: I74f125103b67c506d9bb67537e4c4cd3f8f871da Reviewed-on: https://gerrit.libreoffice.org/54641 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-02Fix typosAndrea Gelmini1-1/+1
Change-Id: I56bd1a7ac204f4302261e46d0b8c5dd62c4b6df9 Reviewed-on: https://gerrit.libreoffice.org/53624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-04-15remove some unused comphelper includesJochen Nitschke2-0/+2
and fix the fallout Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359 Reviewed-on: https://gerrit.libreoffice.org/52894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin32-180/+212
so we get nice logs of the exception dynamic type for UNO exceptions. Change-Id: Ic0b10dc14d354a2c9a0591b3a51d2f1640d54bdb Reviewed-on: https://gerrit.libreoffice.org/52465 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01fix some openoffice bugzilla linksdennisroczek1-4/+4
* remove redirects * use https links * replace old attchment links with working ones Change-Id: Ic9a154f46e142138f0adea7d7b8be3b6cfe8af18 Reviewed-on: https://gerrit.libreoffice.org/52224 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-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin2-2/+2
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-10chart2: remove commented propertiesTomaž Vajngerl1-6/+0
Change-Id: I96b31f99a9517628f0b599f43105511415a24ddc Reviewed-on: https://gerrit.libreoffice.org/51024 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-08loplugin:constantparam in canvas..comphelperNoel Grandin2-3/+3
Change-Id: Ia666cb46c409852a13789389c032f0ce4377c0d5 Reviewed-on: https://gerrit.libreoffice.org/50927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07use more Color in chart2Noel Grandin3-5/+5
Change-Id: I23fc16cdc34a06486bcaaac63bfb313f1ddc95bf Reviewed-on: https://gerrit.libreoffice.org/50862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-04Modernize a bit chart2Julien Nabet6-45/+34
mainly by using for range loops + by using empty() instead of comparing begin and iterator or use size to test that a container has at least 2 elements Change-Id: I81f168d8c36a8b4195fbb0c1aee4983dab25d22c Reviewed-on: https://gerrit.libreoffice.org/50705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-03Use for-range loops in chart2 (part1)Julien Nabet5-72/+45
Change-Id: I9310a6dc79d47f9058df8a3b463667389af1b2cb Reviewed-on: https://gerrit.libreoffice.org/50672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin1-6/+6
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-27Fix typosAndrea Gelmini1-1/+1
Change-Id: I914ac70f39028caebafb874e871f11017fda7795 Reviewed-on: https://gerrit.libreoffice.org/48682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-14Fix typosAndrea Gelmini1-2/+2
Change-Id: Icc5fc590a6a90e30afa5f61028d4dd0279fbe120 Reviewed-on: https://gerrit.libreoffice.org/47861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: chart2Stephan Bergmann3-11/+11
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: I745557506326b2b0ce66d0058ebf85e5ed2a0952
2017-12-22lokdialog: Allow switching language of some of the ResMgr's.Jan Holesovsky2-36/+1
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-19wrap scoped enum around css::util::NumberFormatNoel Grandin1-2/+2
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 Kaganski2-26/+20
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-11loplugin:salcall fix functionsNoel Grandin9-18/+18
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-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann1-1/+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-11-27loplugin:unnecessaryparen: Warn about parentheses around literalsStephan Bergmann1-1/+1
...that are not composed of multiple tokens, like ("foo" "bar"). Also don't yet warn about Boolean literals, which are sometimes wrapped in parentheses to silence unreachable-code warnings. To avoid multiple warnings about code like f((0)) switch to generally using a set of ParenExpr to keep track of which occurrences have already been handled. Change-Id: I036a25a92836ec6ab6c56ea848f71bc6d63822bc Reviewed-on: https://gerrit.libreoffice.org/45317 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-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-2/+2
...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-10loplugin:finalclasses in chart2Noel Grandin1-3/+2
Change-Id: I35afa226beb6fe4319313125c323d9f059837357 Reviewed-on: https://gerrit.libreoffice.org/44534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-03inline ASSERT_EXCEPTION macro in chart2Noel Grandin48-149/+101
Change-Id: I6bdcde5fd416531e2cdd3c9ec160833f1022247c Reviewed-on: https://gerrit.libreoffice.org/44246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01loplugin:constantparam in c*Noel Grandin2-11/+6
Change-Id: I10c7b62e6458062324367b94b207f776af79f598 Reviewed-on: https://gerrit.libreoffice.org/44129 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26More loplugin:unnecessaryparenStephan Bergmann1-4/+4
81892b2037453108b9bde1512a500cf3b2ce438a "loplugin:unnecessaryparen when compiling as C++17, so the ParenExpr is no longer hidden behind ExprWithCleanups/CXXConstructExpr/MaterializedTemporaryExpr wrappers" gave me the idea to generally look though IgnoreImplicit instead of IngoreImpCasts in loplugin:unnecessaryparen. However, that would still not look through implicit CXXConstructExpr, so would still not have found the occurrences in 81892b2037453108b9bde1512a500cf3b2ce438a when compiling in pre-C++17 mode. Therefore, let ignoreAllImplicit also look through CXXConstructExpr. (I am not entirely sure in which situations non-implicit CXXConstructExpr---that should thus not be ignored---would occur, but assume they would be underneath something like a CXXFunctionalCastExpr, which is not ignored.) Change-Id: I947d08742e1809150ecc34a7abe84cca5e0ce843
2017-10-23loplugin:includeform: chart2Stephan Bergmann69-264/+264
Change-Id: I5b455c684e7cd689d5160135246f3400363c7d40
2017-09-19various unused fields in MediaDescriptorHelperNoel Grandin1-23/+0
ever since initial import Change-Id: Ie2df9fbee973e5c9bcdac090770d6a683450dfa8