summaryrefslogtreecommitdiff
path: root/chart2/source/model
AgeCommit message (Collapse)Author
2022-01-23use more concrete types in chart2, RangeHighlighterNoel Grandin
Change-Id: I0a0fed3b703c2fda36b8e26391b0b7713e80f4d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128831 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23use more concrete types in chart2, BaseCoordinateSystemNoel Grandin
Change-Id: I780b391ffbff7cb79201eb2895702a7a9a07f89d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23use more concrete types in chart2, DiagramNoel Grandin
Change-Id: Iaeb477d6c5760dc701291059c4f250c2f1aa0ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23use more concrete types in chart2, DiagramNoel Grandin
Change-Id: I78b0e12e469ff17974b6ba176336d1a5f39afce5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23remove css::chart::XDataInterpreterNoel Grandin
these are purely internal interfaces, they cannot be used from outside chart2. Change-Id: I43c6d8aa96eb94e47767a4b16b89b4889f571579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128792 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23use more concrete types in chart2, DiagramNoel Grandin
Change-Id: Ic3e54f0d82e4cfd0e8eee08214800ce7f1427d25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128791 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-23use more concrete types in chart2, ChartTypeNoel Grandin
Change-Id: Idd81f73e1352118f25102542effc8a3287e244cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128790 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-22remove css::chart::XChartTypeTemplateNoel Grandin
these are purely internal interfaces, they cannot be used from outside chart2. Change-Id: Ib89e98e8099c34a530951bd85236fced216aff18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-22use more concrete types in chart2, ChartTypeNoel Grandin
Change-Id: Ibd299e2e8d82169706d810af98c29d684809c320 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-22use more concrete types in chart2, BaseCoordinateSystemNoel Grandin
Change-Id: Iea726c410829fbd3f116ecead76610e356ef83ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-21fix ChartDocumentWrapper::createInstanceNoel Grandin
which I broke in commit fe37aa64ff79abcd3aeedeb03d8d74798225a367 Date: Sat Jan 15 13:45:44 2022 +0200 use more concrete types in chart2, ChartView by copying behaviour from the wrong construction site. And then in commit c592574948b0a28bac965b508bc260aaa6c365d3 Date: Sun Jan 16 12:25:49 2022 +0200 use more concrete types in chart2, ChartView I spread the error further by using the incorrect behaviour I had introduced in the first commit in Chart2ModelContact::getChartView() Change-Id: I4b004b8893fa51b8968328b6a8b6ffde081f1269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-20cid#1497461 Logically dead codeCaolán McNamara
Change-Id: Ia8a7fe24e46d749f8837efb50145c66b0ecb5ee2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128642 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-19use more concrete types in chart2, SvNumberFormatsSupplierObjNoel Grandin
Change-Id: I15bb69bab11e374db2bfa2b964ba820063f01cda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128631 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, InternalDataProviderNoel Grandin
Change-Id: Iee2cc56b00f0464e652a14eace2640e5d798eb5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128629 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, BaseCoordinateSystemNoel Grandin
Change-Id: I1c246a3ea37595647ac254f492170a9e18540794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128623 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, ChartTypeTemplateNoel Grandin
and return data using a little struct rather than std::pair, to make the call sites read a little better. Change-Id: Ieb6fc24e053f50823789167ed0112aa04a083725 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128613 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, DiagramNoel Grandin
Change-Id: Id21836b1258b8757e634fc9ab670ef1180748469 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128612 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, PageBackgroundNoel Grandin
Change-Id: I432b77bab48c8574373daa00916ef6ceea4ebc93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-19use more concrete types in chart2, NameContainerNoel Grandin
and simplify the NameContainer class, since it has only one use site Change-Id: I5b68b8985c22bb5eb37fa559aba1d5314c3d3aa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128575 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-18use more concrete types in chart2, ChartTypeTemplateNoel Grandin
Change-Id: Ife0be0fde2f8d273411cbdbbafa2173ac80f80f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-18use more concrete types in chart2, ChartTypeManagerNoel Grandin
Change-Id: If5055256c3e3a20ab1a30e9c8bf46f453785e80c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-17loplugin:finalclasses in chart2Noel Grandin
Change-Id: I6cc88d50df7a6c77285f8534de43fd0c8d251bf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128505 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-16use more concrete types in chart2, DiagramNoel Grandin
Change-Id: Iae84e16b3406f4c08139764a1838e38b13cebee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128471 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-15use more concrete types in chart2, ChartViewNoel Grandin
Change-Id: I7316d01d08eb1d9d482937fdd87bd34e2ae7e3c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-14use more concrete types in chart2Noel Grandin
in this case, ModifyEventForwarder. Instead of doing UNO_QUERY and implicitly relying on it's implementation, make it obvious what we are doing Change-Id: Ie02a11f115da9c8af7d4ca85bda9fb9a69c5d52f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128392 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-19use more cppu::BaseMutexNoel Grandin
Change-Id: Ib9da716de0addc70ca58d9085ff351c2ff8c706f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-05speed up property access in chartsNoel Grandin
uno::Any copy and assign is fairly hot, so try and do those operations in one step Change-Id: I110566ba98788d5a658d229433de291c8cdf146c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09rtl::Static to thread-safe staticNoel Grandin
Change-Id: I35e2a252708228bdbeaee557ef35763c64608653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29Prepare for removal of non-const operator[] from Sequence in chart2Mike Kaganski
Change-Id: I71e0b458c4dd2a85e36a485e3efa72b1077b0e54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124346 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-01tdf#143942: oox: import/export labels from <c15:datalabelsRange>Dennis Francis
When <c15:showDataLabelsRange> boolean flag is present, the imported label texts are added as the first text field in oox data label model. The cell-range associated is also preserved. The export part preserves the how labels were store originally in <c15:datalabelsRange>. However in order to make the custom labels reflect the contents of the cells in the associated cell-range, more work needs to be done. For this the labels present in <c15:datalabelsRange> needs to be made available as a data-sequence with a new "role" like "point-labels" in XInternalDataProvider implementation and and make the label renderer read this data source rather than consulting the custom label fields property which is static after import. Change-Id: Ibc7045fa5ea209d463680c96efb49a06662d2500 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121313 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-08-31clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I5e8baec88d5f17ddda452bd945c87769623cb4e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18improve SvxShapeCollection::getByIndexNoel Grandin
Change-Id: I4cca7c0b6344241256d038902069a20ece314358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17rtl::Static -> thread-safe static localNoel Grandin
Change-Id: I9f8fe250813f4f376dc46c6f3d7e25e90fdbb50e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07create comphelper::OMultiTypeInterfaceContainerHelper2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07no need to use UNO_QUERY hereNoel Grandin
Change-Id: I1bfe8238d7c08f27d2b21f9fe79712aba045c812 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-24use officecfg to retrieve PrettyPrintingNoel Grandin
Change-Id: Ia815acdb8050316293e23801d3ed5bfbeb3ab386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-08Simplify Sequences initializations (chart2)(part1)Julien Nabet
Change-Id: I97ddde9659f337932b4165b794a769b83882126d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116802 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-05-31tdf#142467: Update comments with GCC bug IDStephan Bergmann
Change-Id: I71052f8db941733ab4e4b1b36cbf1fcb28eac9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116420 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-26tdf#142467 crash on calling 'getInfoHelper' in final classCaolán McNamara
IPropertyArrayHelper & rInfo = getInfoHelper(); crashes when CandleStickChartType is final for unknown reasons. I see this with gcc-11.1.1-1.fc34.x86_64 in 7-1 locally but also in the fedora libreoffice-7.0.6 built with gcc-10 so this isn't a recent problem. #1 0x00007ffff6f4fe91 in cppu::OPropertySetHelper::getFastPropertyValue(int) (this=this@entry=0x5bdd588, nHandle=nHandle@entry=3) at cppuhelper/source/propshlp.cxx:549 #2 0x00007fffad45e9ff in chart::CandleStickChartType::getSupportedMandatoryRoles() (this=0x5bdd520) at chart2/source/model/template/CandleStickChartType.cxx:219 Change-Id: Ia029162587da1fc00df32866863deb186c7e11bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116196 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-21tdf#138556 Don’t add Open Values to stock chart types 1 and 3Aritz Erkiaga
A new function was defined, XdataInterpreter::getChartTypeSpecificData. Being 100% chart-type-agnostic when retrieving chart data is impossible; candlestick charts can have different numbers of sequences per series, and this information is not present in any other chart type. Change-Id: I0f54b09202c42667331b083d54d90e4ceee81083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-19tdf#124295 - Always select a 3D scheme in the chart wizardAndreas Heinisch
Change-Id: Ic0a39b4cb6f7af6fbdd99fc93677a0c2d966234d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115671 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-26tdf#141914: Allow to unset modified anywayMike Kaganski
IsEnableSetModified returning true means kind of "treat this document as read-only". Marking object unmodified does not break this idea. Change-Id: I3efd5b3b25e2d9318702cdbf24ac5eb61aeda3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114666 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>