summaryrefslogtreecommitdiff
path: root/chart2/source/model
AgeCommit message (Collapse)AuthorFilesLines
2024-03-01set default if no ViewShell yetCaolán McNamara1-3/+3
Change-Id: Ib6381ec963a9dc641d880eef1f9a3e556100a98e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-19tdf#50934: OfPie inport from OOXML, plus initial work for exportKurt Nordback3-2/+10
Change-Id: Ie17b583af28d274b3e7817c646dd4f5873e03fef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-16tdf#142467: restore "final" in CandleStickChartType classKevin Suo1-3/+1
The "final" was removed in commit e06f2bb00137655dbf6f0a8c8c2fc555720f4d3f (tdf#142467 crash on calling 'getInfoHelper' in final class, 2021-05-26) and commit 6cb1745c24c7651050e30216860c539fa13cc0e2 (tdf#142467: Update comments with GCC bug ID, 2021-05-31) due to a bug in gcc <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100797>. Now it has been amost 3 years past and that gcc bug has long been fixed, so it is time to restore the "final". Change-Id: I7db9fe59209cfbae4c04bb3a91cd764db9a38d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163447 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-09tdf#50934: Ensure BarOfPie has ScaleData::ShiftedCategoryPosition == falseKurt Nordback1-1/+7
Change-Id: I86c7ba4df89a1350f544345938a29c210903c06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-06tdf#50934: Add a version comment, and more structure for of-pieKurt Nordback2-8/+15
Change-Id: I9d7c25e47a3f4a78360f9b2deffe8650e378866d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-02tdf#50934: Initial plumbing and infrastructureKurt Nordback4-12/+58
Change-Id: I355bdc8e6d67e7cdd47e4d6eccecedc4b53ac11b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-30tdf#146756 pie chart2 import: use manualLayout Width for pie chart labelsJustin Luth2-1/+8
... and use a compatible 1/5 width if not specified. This patch depends on the previous oox patch (commit 301e27cbebf7d6e4c9b82290d7cd555c43f0c999) which actually reads the width into the model. Fixes a 7.2 regression from commit b0068342398786ca50304260434a18880dddf74d author Tünde Tóth on Wed Dec 16 18:26:26 2020 +0100 tdf#138777 pie chart: improve long data label width and is basically a re-write of 7.1's commit 20da1a5dd37c7edac620566c992d5a53b23a5f12 author Tünde Tóth <toth.tunde@nisz.hu> on Fri Oct 09 09:24:18 2020 +0200 tdf#134978 Chart OOXML Import: fix pie chart label custom position This is very risky, but then ANYTHING changing chart2 is risky. There were a lot of changes made in 7.1, and they all invited regressions. However, our chart implementation is not in a good state, and certainly is not very interoperable, so it is worth taking the risk. Anything dealing with manualLayout at this point should have originated as a pptx, so forcing a compatible max width should be fairly safe. It probably isn't actually all that risky after all. largely copied code from commit 4223ff2be69f03e571464b0b09ad0d278918631b Author: Balazs Varga on Wed Jan 15 16:31:35 2020 +0100 tdf#48436 Chart: add CustomLabelPosition UNO API property Fortunately this all goes away after a round-trip since custom label placement is lost on export to OOXML, and that really helps to reduce the risk. make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testTdf146487 Change-Id: I9722fc6c759c15ac3924780e6fc124f02fba07e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162590 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski2-3/+3
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-16chart2: Make automatic area coloring for charts work for tiled renderingofftkp1-3/+8
Charts now get a temporary colored applied to the area property set if their color was set to automatic, which is done by default in tiled rendering mode. Change-Id: Ic6bd19b97d2a0ffa2a1ad516cfa202e2f4921db7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160659 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-14cid#1585558 Using a moved objectCaolán McNamara1-1/+1
Change-Id: I59575034053cff0a4c534bdab7e80757839bab16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162048 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13cid#1546354 COPY_INSTEAD_OF_MOVECaolán McNamara2-11/+14
and cid#1546319 COPY_INSTEAD_OF_MOVE cid#1546286 COPY_INSTEAD_OF_MOVE cid#1546283 COPY_INSTEAD_OF_MOVE cid#1546191 COPY_INSTEAD_OF_MOVE cid#1545953 COPY_INSTEAD_OF_MOVE cid#1545874 COPY_INSTEAD_OF_MOVE cid#1545857 COPY_INSTEAD_OF_MOVE cid#1545781 COPY_INSTEAD_OF_MOVE cid#1545765 COPY_INSTEAD_OF_MOVE cid#1545546 COPY_INSTEAD_OF_MOVE cid#1545338 COPY_INSTEAD_OF_MOVE cid#1545190 COPY_INSTEAD_OF_MOVE cid#1545272 COPY_INSTEAD_OF_MOVE cid#1545242 COPY_INSTEAD_OF_MOVE cid#1545229 COPY_INSTEAD_OF_MOVE Change-Id: I88813d9dbd87ce10375db8198028f8b70e23f0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162027 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12cid#1546414 COPY_INSTEAD_OF_MOVECaolán McNamara1-1/+1
and cid#1546408 COPY_INSTEAD_OF_MOVE cid#1546367 COPY_INSTEAD_OF_MOVE cid#1546283 COPY_INSTEAD_OF_MOVE cid#1546268 COPY_INSTEAD_OF_MOVE Change-Id: I8b6067f70bc0e8cce7117bb3f366227add279887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161964 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-21chart2: Match chart background color with DOCCOLOR in Calcofftkp1-1/+9
Chart background color would be hardcoded to white which meant newly inserted charts would have a different background color in Calc (in other components, the background color is later set to transparent) Change-Id: I6ea55389f195155a96c4c8dcc94a902b2a862178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159751 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-10-24tdf#155040 sw floattable, RTF: fix table is overlapped by subsequent inline oneMiklos Vajna1-2/+2
The document had overlapping text on load since commit 05425f73bfa41d3f7591461e2ad0beb4fafc39b4 (sw floatable: teach the RTF import about SwFormatFlySplit, 2023-04-21). Interestingly the DOCX equivalent was fine, there the inline table is shifted down, below the floating table, so the overlap doesn't happen. Fix the problem by moving the AddVerticalFrameOffsets=true code from the DOCX filter to the shared dmapper, because RTF needs the same. See commit 50223ea6e212b60b7d33839c2753c5601fb50f95 (tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31) for more details about this compat flag. It was already enabled for DOC, too. Change-Id: I948b179c9ec5fa24377014b0e86826568c417b6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158372 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann1-1/+1
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-19Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: chart2Stephan Bergmann5-11/+11
Change-Id: Ifcb57548a594cbbaf70df8d9da17cf94a96667db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158146 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-16tdf#157776: Do not send delayed update notifications for setModified(false)Mike Kaganski1-1/+2
Change-Id: I4948cc217079d2ed535b95e3892e619736237cc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158014 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-09-11remove dead m_bCancelOperation flag from XMLFilterNoel Grandin2-15/+1
has always been ignored Change-Id: I272ca7026ddf25fbc679e7933ea23986466ad70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156822 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-02replace set(nullptr) with clear()Noel Grandin1-1/+1
It's a little easier to read, but mostly it makes an upcoming loplugin easier to implement Change-Id: I4ae7db8eda77795dab3255d1afd8ba4f20a8de76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin1-1/+1
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-01Revert "Convert XFastParser into a normal C++ interface"Noel Grandin2-4/+7
This reverts commit 5e68d6cfade45f40b1ad46025a81afe4cb8dd337. Reason for revert: Seems like outside users have been using this API Change-Id: I8814cf1eb4f000eeb4cbbb5db9c282d001465993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-01Convert XFastParser into a normal C++ interfaceNoel Grandin2-7/+4
There is no need for it to be an UNO interface anymore (ever since we started supporting dynamic_cast on UNO objects). Which means that XImportFilter2 also needs become a C++ interface. Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20Add a bit of consistencyMike Kaganski2-21/+23
Change-Id: Ib201a8cec7c7a4a0a5cbd3d7e7d6156f8e8e59a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150717 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-20Run clang-tidy with misc-unused-using-decls on modules [a-c]*Gabor Kelemen1-1/+0
To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: I95871cc0ae6f22a9684bae9d14ef0475aea17abb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150608 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-02make some methods final in chart OPropertySetNoel Grandin1-2/+2
so that the subclasses use the right overrides to implement custom behaviour Change-Id: Ida9d1de51b5595c4d9532a5c98a220bf39d9a208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-01fix locking in chart::DiagramNoel Grandin1-1/+19
we can't return a reference to internal state that needs to be protected by a mutex Change-Id: I13c0128559546cc2078584fc0de818c568617b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149914 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more get/setFastPropertyValue in chart2Noel Grandin1-1/+1
Change-Id: I4979cf5dab8b35ba35a46808cef76dc3f81c59b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149725 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more get/setFastPropertyValue in chart2Noel Grandin2-5/+12
Change-Id: I1471309e200c8eec21844658b873f817565f9604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin2-7/+9
Change-Id: Id665050f4f0763505e7f1ace6ade5bf9ab02edf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more get/setFastPropertyValue in pie chartsNoel Grandin2-20/+12
Change-Id: I17bf8631b5934d6d112f17e4a05025802dcde2f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149685 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin3-50/+2
Change-Id: I938aa1d6d3c20b35d9e11818d4b641d8a03decaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29crashtesting: Null-deref on export of forum-mso-en4-274729.xls to odsCaolán McNamara1-0/+2
and others, probably since: commit f02ec0d8489404966596cb0e949bf969e8e66fa2 Date: Wed Mar 22 08:50:15 2023 +0200 move hasUnhiddenData inside chart2::DataSeries Change-Id: Icf59439f00a40ef036decaa36f3d5af68787c864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149688 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-29fix concurrent access to fontcacheNoel Grandin4-6/+29
Every now and then I see a crash in fontcache code. Add some DBG_SOLARMUTEX calls there, which spots a few issues. (*) In writer, SwDLL needs to be under the SolarMutex during init, and we can just move a method call to fix that. (*) in chart2, life is more complicated. Various of the static defaults we build want to call OutputDevice::getFontInstance. We can't just stick a SolarMutex somewhere in the call chain, because those maps are built on-demand, and then we end up with ABBA deadlocks between the SolarMutex and the mutex in the cppu::PropertySetHelper. So I picked a spot that is init'ed early on in chart2, and force the init of all the troublesome tables there. Change-Id: I832978bea35fd5fa681d144b8beff1af13ef3341 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin1-4/+17
Change-Id: I286ad05252bb34f7a1b8f7c08190bddc601faf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin4-136/+35
Change-Id: Ifd3bce5fc22371559203da673ca98913bc742c21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149674 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move switchRightAngledAxes from ThreeDHelper to DiagramNoel Grandin1-0/+27
so we can use the get/setFastPropertyValue methods Change-Id: Id17fa2466f75a3b4530306143ce50f66fc5593b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149651 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move setDefaultRotation from ThreeDHelper to DiagramNoel Grandin2-79/+120
so we can use the get/setFastPropertyValue methods Change-Id: Id9470e5b878ed15e20ca285cacc36cd2e9511365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move get/setScheme from ThreeDHelper to DiagramNoel Grandin2-1/+236
so we can use the get/setFastPropertyValue methods Change-Id: I2b57212a1d3933cd2825e647f692e2ae3cb8b484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move get/setRotation from ThreeDHelper to DiagramNoel Grandin1-7/+255
so we can use the get/setFastPropertyValue methods Change-Id: I147ed5c092b44283bfbbf4ea5a3145736417b92c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149642 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move get/setCameraDistance from ThreeDHelper to DiagramNoel Grandin1-2/+48
so we can use the get/setFastPropertyValue methods Change-Id: Ibce7c93f067468f2e88f196158dfcb80686d01c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149635 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static-> thread-safe-static in chart2Noel Grandin12-699/+361
Change-Id: Ie1379a1d40a6d65b28fd94ed114853e399fea5f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static-> thread-safe-static in chart2Noel Grandin7-375/+135
Change-Id: I5bd595d5251cd92904750d6e6830f1d95f41b177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete type in chart2Noel Grandin2-5/+35
Change-Id: If67a4f0fe75554e14c3030c68374607b76d5b840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete type in chart2Noel Grandin2-140/+1
Change-Id: I568530c1db0add697f7f257a4e5560a3e50919f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22move hasUnhiddenData inside chart2::DataSeriesNoel Grandin1-0/+35
Change-Id: Id8a4daf046f2306a52948c7ed434854b25ee7936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete types in chart2Noel Grandin1-19/+2
Change-Id: I70042284e4549b3eef67866a35741b06305d720f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21move getLabel inside chart2::DataSeriesNoel Grandin1-0/+132
Change-Id: I38baff5980d8cae5f63ee9163d667385837d249b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21move getAllRegressionCurvesNotMeanValueLine inside chart2::DiagramNoel Grandin1-0/+19
Change-Id: Ic01a886f575022fa106aa2e3b384e184683df6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21move getTemplate inside chart2::DiagramNoel Grandin2-2/+39
Change-Id: I05da4e4a9acb2683633eda42cf18d740913c2e37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21move getVertical/setVertical inside chart2::DiagramNoel Grandin3-4/+89
Change-Id: Ide512e20fea94b1d7d038290d1c833f1d8cf42ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149164 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>