summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)Author
2022-06-22tdf#149204 revert getSeriesNames method to the original behaviourTomaž Vajngerl
The VSeriesPlotter::getSeriesNames returned a filtered list of series names without the z-axis names, which is not expected from the name, so when refactoring the assumption was to return all of them names. This wasn't correct and has broken rendering of some charts. This change reverts the method to the original behaviour. Change-Id: I42464495a1a2b68a34efbc8409ae6c1417ff072d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136280 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-22tdf#128150 Adapt sidebar to new "use slide background" propertySamuel Mehrbrodt
Change-Id: Idce049a7498f98b0079c708236cfeff7fddd6e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135963 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-21tdf#128150 Only show "Use background" btn in Impress & DrawSamuel Mehrbrodt
Change-Id: I5d14f651af55b51a8a02a8a4ddbb1c0921b15d81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136182 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-18cid#1506305 Big parameter passed by valueCaolán McNamara
and cid#1506307 Big parameter passed by value Change-Id: I7386eeea04f73a4ec9fe0fe09ff2981b2022be89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136079 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-16Fix typo in codeAndrea Gelmini
Change-Id: Ic2c07abd89361aaef0f216ee71d0fa8ce8529233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135924 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-06-14tdf#149536 Move Up/Down in Data Table switched enabled statusesAron Budea
Regression from aa7e7747f4296b3b92379c3c7703b80ad8af6a8b. Change-Id: Id2b66b2e87fdb13a55b32a4989cae2c7796fd003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135801 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-06-13clang-tidy modernize-pass-by-value in chart2Noel Grandin
Change-Id: I73ae444487571fb61a02a2c813c060d269d52a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02A simpler way to avoid MSVC warning C4018 "signed/unsigned mismatch"Stephan Bergmann
Change-Id: I0e6418598cd446dd541708fc91145e5f47d14a46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135289 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02Use o3tl::make_unsigned, nPolygonIndex is already clamped to non-negative hereStephan Bergmann
Change-Id: Ib174df281389b334396905a94fc395900e7d9eb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135290 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02Use o3tl::make_unsigned, nPolygonIndex is already clamped to non-negative hereStephan Bergmann
Change-Id: Idaf80e28f177c84faaec2c047db2b4435b9e7e15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01Use more appropriate index variable typesStephan Bergmann
Change-Id: Ic2cf5512cabcda0ad476c43bcbc544d0d6dd2685 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135231 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01Use less noisy way to iterate over some (unscoped) enumerationStephan Bergmann
Change-Id: I37ed9b3dd607367d2e42fcc163c423dc416cc7c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135224 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01The return value of those getLength functions is guaranteed to be non-negativeStephan Bergmann
...so use o3tl::make_unsigned when comparing it against an expression of unsigned integer type, instead of casting that expression to a signed type Change-Id: Ic47c6d96919b2aba2d16ce6d1a2a8e4c5761a480 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31Use some range-based for loopsStephan Bergmann
Change-Id: I4935bf51c6c7e9be1e3f069c6c72e618eaa0b4a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135189 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-28add GetItemState to SfxItemIter, the same way I did to SfxWhichIterNoel Grandin
to speed up GetItemState while iterating Change-Id: Ibe092e7581a5be0160eed52472122afe7e0ef377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28use the new SfxWhichIter::GetItemState featureNoel Grandin
to speed up other places that are iterating over SfxItemSets Change-Id: I646bae12420d15e67effdd279e071cdf8a8afffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24modernize and improve PropertySetInfoNoel Grandin
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24no need to instantiate these services indirectlyNoel Grandin
Change-Id: I5c798d2b0ac3895963cbb907e4a25fc0f14a9a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134745 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23instantiate Title directly in chartNoel Grandin
which simplifies some code Change-Id: I0c9aa212334a3dedd8a54f8deda6100d93b0be70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134743 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-19chart2: simplify sheet indices constants for trendline calc. testTomaž Vajngerl
Change-Id: I3ec16c33446d20b6d795c5950ceb882ff78fb029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134382 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-11chart2: prefix VDataSeries members, rename Double to m_aValuesTomaž Vajngerl
Change-Id: I74d560fa8a9c9d1ee761b26aa1ca90798f774a7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134052 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-11chart2: remove code duplication in VSeriesPlotter::getSeriesNamesTomaž Vajngerl
Change-Id: Ib7b96e6fe0037a141efe696252ff2aa4a38ec327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133924 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-11chart2: simplify with structured binding decl. and some cleanupTomaž Vajngerl
- use structured binding declaration to simplify the code - use cend() instead of end() - use std::clamp to bound a value Change-Id: I83b9ba926e70d173cc161db713c53940df422241 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133923 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-10chart2: add func. to convert from css::awt and B2IRectangleTomaž Vajngerl
Change-Id: I6da70d4559d1536b788228bcae64f5e43462d8e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133922 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-09tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macroPragat Pandya
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Jenkins
2022-05-06remove unnecessary sequenceToContainerNoel Grandin
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I65677007d105f4783603df74113ebed6db0b551b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06chart2: add function to create a table shape to ShapeFactoryTomaž Vajngerl
Change-Id: I18f76c3372504c1d660aa168ee0387f61817f30a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133921 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-06chart2: use range for loop to iterate rVCooSysList in ChartViewTomaž Vajngerl
We always just iterate the rVCooSysList and don't need the index, so change the code to use a range for loop. Change-Id: I3148d5d251c27d8d8f457446508e3152ae86dcc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-06chart2: typedef SeriesPlottersType is not neededTomaž Vajngerl
Change-Id: I457bfa5eab8b403c4b00a72068e427082709995c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133919 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-05loplugin:unusedvariableplusNoel Grandin
Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05Just use Any ctor instead of makeAny in chart2Stephan Bergmann
Change-Id: I156cd5597a4b9e683913d9730b8d8bb22e8064f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133845 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03simplify RegressionCurveCalculator::getFormattedStringNoel Grandin
no need to format number as OString and then convert to OUString, just format it as OUString Change-Id: I2ad686c4d69302c545d483bcfe7a1a129ce38eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133765 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27add string_view wrappers for rtl::math::stringToDoubleNoel Grandin
Change-Id: I114bec72cb933238675e539a8388a607226827cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26add o3tl::toUInt32Noel Grandin
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-25Recheck module chart2 with IWYUGabor Kelemen
See tdf#42949 for motivation This time using the new --noexclude switch to recheck validity of the excludelist; these were the obsolete exclusions Change-Id: Ifdf79b30ebaf198082c2194611a2ed2b664e6f1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133309 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-23Recheck module chart2 with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Id4cdca3eed8618c289f30913d506f8f2bd46f0bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133112 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-22Drop a bit more special-casing for Chart's sidebar property deckMike Kaganski
Introduced in commit 2d01ed9e8be543460e41e009fa992103a7c8d4c0 Author Muhammet Kara <muhammet.kara@collabora.com> Date Mon Nov 25 21:55:31 2019 +0300 tdf#94288: Show chart props sidebar on activation The problem was that ChartController::attachFrame, that called SelectionChangeHandler::selectionChanged notification, did that *prior* to setting its m_xFrame - and the notification failed in ContextChangeEventMultiplexer::NotifyContextChange, that checks the frame first. That prevented the proper context (with correct application and context names) to arrive to listeners, and the sidebar didn't update properly. Changing the order of the calls should fix the original problem. Change-Id: I9da8465af2ee4ed1f8eabed1c65d1c318f81a3f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133326 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-20no need to make copies of the vector hereNoel Grandin
Change-Id: Ieca07df686668af252800089028146f0f55c26de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20loplugin:passstuffbyrefNoel Grandin
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19new loplugin:stringviewvar looks for OUString vars that can beNoel Grandin
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19tdf#148635 cache some chart stuffNoel Grandin
cache some intermediate stuff that it does a handful of times when finishing a chart - halves the time taken Change-Id: I75c5621844d4309b64e64219a7c9e2bcd344ce36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133173 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19tdf#148635 no need to init ChartDataWrapper more than onceNoel Grandin
halves the time to finish a chart2 Change-Id: Ib7f066672878f7630c2d1c90b9487a14f2048029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133172 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19chart2: change define to constantTomaž Vajngerl
Change-Id: Id545105cb48fdd0c28a67e6017570658915f93b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133163 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-19chart2: not really worth having a TrueGuard - just use ScopeGuardTomaž Vajngerl
Change-Id: Ia2436d4cc843540a51e00ee937b80303cb600851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133162 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-19chart2: ExplicitValueProvider - make forward declrs. consistentTomaž Vajngerl
Change-Id: I90e8b2d163f700c7b1e251064af8655529f76906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133126 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>