summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)Author
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>
2022-04-19chart2: move ExplicitValueProvider impl. out of ChartViewTomaž Vajngerl
Change-Id: Ie1bcae70c5a5df3978f8890c127f9aae1ae9237b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133125 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-18chart2: convert TitleAlignment enum to enum classTomaž Vajngerl
Change-Id: I0cfc0bb74b2e218c579a5f7e7ed8e39c01838fec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133122 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-18chart2: extract SeriesPlotterContainer into its own fileTomaž Vajngerl
Change-Id: If190f0d99d5686e90fa56487744a9a663b345fad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133121 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-18chart2: extract AxisUsage from ChartView into AxisUsage.hxxTomaž Vajngerl
Change-Id: I680196af9c349c37312f177ab84051f0b68deae2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133120 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-18chart2: use a constant instead of a function for a contant valueTomaž Vajngerl
Change-Id: I21cbe01732bf78f58b3242669e696fb1f82aa64d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133119 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-18chart: cleanup member vars in Diagram.hxxTomaž Vajngerl
Change-Id: I756d570ba932e116bb346f21b5272807e8434939 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133118 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-15Prepare SvNumberFormatter::GetEditFormat() to obtain for another localeEike Rathke
Change-Id: Iab8b9a802ebac60b52007754430352d3de925374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133026 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-04-14use more string_view in chart2Noel Grandin
Change-Id: I9ab6cd3905bfb7c811e7ad14b54ced6c42d2e077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14Resolves: tdf#141625 give enough space to see full date+timeCaolán McNamara
Change-Id: I31193783231f27494ed1507faa143697e8facc30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132977 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>