summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)Author
2023-05-05tdf#101894: chart2: move UItest to CppUnittestXisco Fauli
Change-Id: I54d7376cb9b96164ed8c4526ef8f3a0502326f9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151365 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-05-04tdf#105404 [API CHANGE] add index to accessiblity change eventNoel Grandin
Which shaves 80% off the time off breaking up a vector image on Linux. Change-Id: Id8e7daad001b6120d1fb98e382357da5b55e92ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-04WIP ODF import and export for MCGRRegina Henschel
Current state uses: Element loext:gradient-stop with the attributes svg:offset, loext:color-type with value 'rgb', and loext:color-value with values of kind #rrggbb. Element loext:opacity-stop with the attributes svg:offset and svg:stop-opacity, both with datatype double. With MCGR enabled testColorGradientWithTransparencyDOCX in CppunitTest_chart_export3 has the value 90000 instead of 90196. That is same value as in original file. Thus I have adapted the test. Change-Id: I976934f9b8fb79be4f74adb180b3285486dce31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150060 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-05-03MCGR: Make MCGR default for oox im/export, cleanupArmin Le Grand (allotropia)
Following an error in CppunitTest_chart2_export3 I updated the transparency definition at WriteGradientFill and corrected usages. Had to correct/adapt some Chart UnitTests. Some of these changes are temporary since this will/has to change when ODF MCGR im/export is integrated. I checked that all of these cases actually work, comparing im LO and MSO. Adapted some Chart2ImportTest to directly compare/check now for the fully imported tranparence gradient with available higher precision. Adapted OoxDrawingmlTest testGradientMultiStepTransparency to use new MCGR capabilities. Adapted testTextframeGradient and tested the turn-around with rtf gradients. These are a little bit limited and needed some extra care. Adapted testTextframeGradient. Adapted SdOOXMLExportTest1, testTdf94238 Adapted SdOOXMLExportTest1, testTdf128345GradientAxial Adapted SdOOXMLExportTest2, testTdf105739 Adapted SdOOXMLExportTest3, testTdf127372 Adapted SdOOXMLExportTest3, testTdf127379 Adapted SdMiscTest, testFillGradient Adapted testTextframeGradient Adapted ScFiltersTest3, testTdf129789 Adapted SdUiImpressTest, testPageFillGradient Adapted SdOOXMLExportTest1, testTdf128345GradientLinear by using better double-to-integer rounding (basegfx::fround) in DrawingML::WriteGradientStop. After double calculations this makes the tansition to integer correct and stable. Also took back change at testTdf128345ChartArea_CG_TS_export which showed the same flaw before. 2nd look @testTdf128345Legend_CS_TG_axial_export made me add that stuff again and adapt the axial ColorStop adding in the export to not export the middle enty twice. Extended test a little bit, too. Only do not add value if it starts at 0.0 aka StartColor, else adding it is corect. Adapted some tests CPPUNIT_ASSERT to CPPUNIT_ASSERT_EQUAL after being pointed to it from gerrit_linux_clang_dbgutil build. Change-Id: I4a993053da8960035671b655e67908f36e59b5fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150763 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-25Add script to find unused using declarationsGabor Kelemen
As a complementer to clang-tidy-12 --checks="-*,misc-unused-using-decls" Pros: - simple, fast! - finds some more unused declarations, somehow - works on non-linux specific parts of the code - clang-tidy (for me) trips on files with external headers, this does not Change-Id: If2db989114ac5c2841ed2e89ff7bd7a9e419f567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150612 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23tdf#148251 Use std::swap instead of using temporary valuesNabeel Siddiqui
Change-Id: I7733ba595634f41ef0a0902ea37d694276417871 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149087 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-20Add a bit of consistencyMike Kaganski
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-20return this map by const&Noel Grandin
Change-Id: I471bdc5ceb85d19332d32abc8469f90f28947eee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150699 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20Run clang-tidy with misc-unused-using-decls on modules [a-c]*Gabor Kelemen
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-19loplugin::unusedmethodsNoel Grandin
Change-Id: I6a07860edb13588b83345babeb53675aedc43f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-17Resolves: tdf#146068 don't crash when MA(central) lacks dataCaolán McNamara
Change-Id: I2c9b78f4d1a963bb71abb21068e61e6983ade777 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150484 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-04jsdialog: enable and make async chart line prop dialogSzymon Kłos
Change-Id: I21817b21fe6d2ce0a6f6bd784c0e24fe35b17fec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149502 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150014 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2023-04-02make some methods final in chart OPropertySetNoel Grandin
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-02map->unordered_map in chart OPropertySetNoel Grandin
no need for ordering here Change-Id: I7e0928284c98aca297d4452e65efd8a4f3b1e56d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149941 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-01fix locking in chart::DiagramNoel Grandin
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-04-01use more XVclWindowPeerNoel Grandin
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere. Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-31crashtesting: XDataSeries OPropertySetHelper::getFastPropertyValue crashCaolán McNamara
seen with gcc --version gcc (Debian 10.2.1-6) 10.2.1 20210110 similar to commit ad59487053bcd267b53febde0cecbd64c7f94cc0 Author: Caolán McNamara <caolanm@redhat.com> Date: Sun Mar 19 20:40:35 2023 +0000 crashtesting: frequent XDiagram OPropertySetHelper::getFastPropertyValue crash Change-Id: If190e0c51a0b983165ff6f36bb2185456ea6bade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149819 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-30use more concrete types in chart2Noel Grandin
Change-Id: Iaefad282d40c83f58758b41db9b14f6e95552354 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149742 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin
Change-Id: I1ba60b690a0402d1a98f792c86ddd033e0c39ed0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more get/setFastPropertyValue in chart2Noel Grandin
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 Grandin
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 Grandin
Change-Id: I932d8a45d525b1b629a0aaee96a1643b155069f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149692 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29fix bug in WrappedRegressionCurvesProperty::setValueToSeriesNoel Grandin
ever since commit 1cd3e2038010cb37bda82d38dd058b793b7eec26 Author: Tomaž Vajngerl <quikee@gmail.com> Date: Sat Jun 29 18:43:16 2013 +0200 Multiple trendline removing and changing type support. Change-Id: Ibd24d0831932f25e60c05a00450d611e15875102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149691 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin
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 Grandin
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 Grandin
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 McNamara
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 Grandin
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-29expand out ChartModelHelper::findDiagramNoel Grandin
since it just calls findFirstChartDiagram Change-Id: I21eb9a747127ad54f3b5875074a7bf7ffbf79e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin
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 Grandin
Change-Id: I818253350bd954d3a2a0f302493c896eb2e26994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149675 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-29use more concrete types in chart2Noel Grandin
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-29use more concrete types in chart2Noel Grandin
Change-Id: I7ec6df57504b3515be09796016b6db02521e5d67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149673 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28use more concrete types in chart2Noel Grandin
Change-Id: I067e9424a77fb1d835f2847bba3c3f2cda3430f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-28move switchRightAngledAxes from ThreeDHelper to DiagramNoel Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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-24loplugin:stringadd in c*Noel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static-> thread-safe-static in chart2Noel Grandin
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 Grandin
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-23rtl::Static-> thread-safe-static in chart2Noel Grandin
Change-Id: Ie629e4e2d4e3a56894bc964b8bb50dac5823cf4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete type in chart2Noel Grandin
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 Grandin
Change-Id: I33deb726da5a59093b1104696da7c80ce830b7e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149335 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete type in chart2Noel Grandin
Change-Id: I215bf2a6e2fbd4cdd57fd14c2d34fb11a0d2a862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22use more concrete type in chart2Noel Grandin
Change-Id: I92e0cb707b0fdd8e82ba350919294584904f2c68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149333 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-22simplify ViewLegendEntryNoel Grandin
we never have more than one FormattedString Change-Id: Id61a2a89a053f49da758a2bb888cef189515458f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>