summaryrefslogtreecommitdiff
path: root/chart2/source/view
AgeCommit message (Collapse)AuthorFilesLines
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin1-1/+1
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-09Recheck include/ with IWYUGabor Kelemen1-0/+1
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-07rtl::Static -> function local staticNoel Grandin1-3/+2
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski2-2/+2
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 McNamara2-6/+6
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>
2021-02-23loplugin:refcounting in chart2Noel1-19/+9
Change-Id: I4949e67aae74631acc138a3a52621705cda0dd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111353 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-22[API CHANGE] tdf#133423 Implement chart:regression-moving-typeSamuel Mehrbrodt2-2/+8
Change-Id: Icb967367fbf12e5a1566b7f18ebe5e3d8a3534f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110748 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-18tdf#92768 Add rendering support for hiding title object in chart2Quan Nguyen3-1/+18
Change-Id: Ice6335d52d53dcbaa8711f9669597bf5321ecd7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08tdf#94235 Add support for series name in data series labelsSamuel Mehrbrodt3-4/+14
including ODF/OOXML import/export (and test) Change-Id: Id5a5194630a67476f7c5390294400a00ea3ad42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110338 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-06Use more conversion functions from <tools/UnitConversion.hxx>Mike Kaganski3-5/+6
This unifies conversion functions to provide both floating-point and integral overloads, with correct rounding for the latter. Also sanitizing code it templatized to allow reuse if needed. Change-Id: Ibe1c9fe4d5baa226c600445779dbaf7dc41a02cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110487 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-04use more getSdrObjectFromXShapeNoel3-37/+16
Change-Id: Ia237643ab040425f231f781c86e7e060f0b53717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110400 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-29loplugin:stringviewparam extend to new..Noel4-7/+7
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-26loplugin:passstuffbyrefNoel2-2/+2
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-25chart2: Merge some if'sDr. David Alan Gilbert2-5/+3
Spotted by cppchecker, some sets of if's that can be merged since they have identical conditions. Change-Id: I28c35767eb96e31ab059abcfc014423704c988f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109862 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-01-16make the Color constructors explicitly specify transparencyNoel1-4/+4
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12transparency->alpha in tools::ColorNoel1-1/+1
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-09fix coverity parse errorsCaolán McNamara1-2/+2
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-02introduce Degree100 strong_int typeNoel1-2/+2
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-02use SdrAngleItem for SCHATTR_STARTING_ANGLENoel Grandin1-1/+1
Change-Id: Ibe6b882806df1b30e38f4461284a7514f4407b3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-28tdf#121281 pie chart: improve data label positionTünde Tóth2-37/+66
to avoid chart distortion. Move the data label to inside the chart area when it goes outside the border. Change-Id: I78669ed601f28129944ac8f61c6478d386322b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107829 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-12-28use SdrAngleItem for SCHATTR_TEXT_DEGREESNoel Grandin1-1/+2
as a precursor to introdcing a strong_int type for hundredths of a degree Change-Id: I63fbaf7e24e50ad90e524ae3c484dfb81b831aef Change-Id: I1949b3c0b3af3acc386bd80e35175fd8742688e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26New loplugin:stringliteralvarStephan Bergmann1-2/+3
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-16tdf#136816: fix hidden legend entries in "Column and Line" chartsTünde Tóth1-11/+6
Regression from commit: 300e65cc47f3d6ae1563350757dbfadc080d7452 (tdf#123268 fix lost chart if all legend entries are hidden) Change-Id: Id59cd8d681dada123feadbe7910be7fbc7ec37f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107757 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-12-16tdf#138777 pie chart: improve long data label widthTünde Tóth1-15/+10
to avoid chart distortion. Reduce the maximum text width of data point label shape based, because in some cases the long data label flowed out of the chart. Change-Id: I045c81ecc6ce579e1f472d7ea67e04315ce9c60b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107585 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel2-11/+11
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#138181 Chart OOXML: fix deleted legend entries of pie chartsTünde Tóth1-3/+16
The legend of the pie chart showed deleted legend entries too when VaryColorsByPoint was false. Change-Id: I6fc978af0db6e2d39d7f451e765d7ef81c73a05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105943 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel7-12/+12
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-22tdf#123936 Formatting files in module chart2 with clang-formatPhilipp Hofer9-62/+66
Change-Id: Ie4dea73190040e5716fe531cf35fae20d7e175db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105650 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-17tdf#138204 Chart OOXML Import: doesn't show placeholderBalazs Varga1-0/+1
for CELLRANGE data label field type. Add CELLRANGE to enum com::sun::star::chart2::DataPointCustomLabelFieldType, like we do at CELLREF, while both of them are not implemented, see commit 790f9abeb1a1167ad5ab84c5fb855b36669c125b (tdf#114821 import complex data labels in bar chart). Regression from commit: 0d2340998415fb4b2f794054c62ef61c83e32155 (tdf#136061 Chart ODF/OOXML: fix missing custom labels) Change-Id: I8e0f4ca9db6e613a190cbda31504a7542fc13a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105934 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-17tdf#138018 don't show leader lines inside pie chartTünde Tóth1-15/+23
Show leader lines to data labels in custom position only outside of pie chart, as intended. Change-Id: I87dee2d33f4f876ffca208f69a069e1f0bcee688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105920 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-12tdf#137874 Chart OOXML import: fix pie chart legend entriesTünde Tóth1-1/+3
Pie chart legend changed when VaryColorsByPoint was false. Change-Id: I8022e5290f2269a902b4417f91d2e454f088c553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105172 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-11loplugin:stringviewNoel1-1/+1
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen8-8/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-26tdf#137505 OOXML Import: Custom shape in chart: fix font sizeBalazs Varga1-0/+1
The default font size of text in shapes is 12pt in LibreOffice, nevertheless, we used 24 pt for font size in custom shapes inside chart objects during ooxml import. Change-Id: I69d02374bc4b4781e2ca617913c642999b3d5fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104429 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-21use tools::Long in basegfx..chart2Noel11-29/+33
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20cid#1468269 Uninitialized scalar fieldCaolán McNamara1-1/+3
Change-Id: I4457019570571c810265bf721cdefb0bdd65dd7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104551 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-19tdf#134121 pie chart: add leader linesTünde Tóth2-40/+79
to data labels with custom position. See commit 769433ad93040bc81f06672c8a2c01e2b76fece3 (tdf#90749 chart: add leader lines to custom data label positions) Change-Id: If5d912cc04993e59bd5ab93b644ea49ba8642b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104410 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-19tdf#137154 pie chart: improve Outside position of data labelsTünde Tóth1-12/+8
Some pie chart data labels were too close to the pie with Outside placement. Change-Id: I0eecdfc32601bdfa8bb3115183f9ca723a9f945b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103683 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-09tdf#134978 Chart OOXML Import: fix pie chart label custom positionTünde Tóth1-2/+5
Follow-up of commit dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3 (tdf#130032 Chart OOXML Import: fix data label custom position). Change-Id: Iaaf4ae654ac0c1b4896a53be6034e6c027412df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102981 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06loplugin:const* make some params and methods constNoel1-1/+1
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02tdf#137116 pie chart: improve BestFit position of data labelsTünde Tóth2-73/+44
Regression from commit: 2e1a1054a4a98415057e72269ace9db075d3b191 (tdf#136752 pie chart: improve data label position) Change-Id: I66943684957a220c81db7f928fbb47700b78d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103610 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-01loplugin:reducevarscope in canvas,chart2Noel4-6/+5
Change-Id: I6c73e609cc8ce0ed9cf0f5a6b68c6e299bf26a44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-24Fix typo in codeAndrea Gelmini1-3/+3
It passed "make check" on Linux Change-Id: Icf1d8dae0f357aabeeda70f8c059e4cbf785df89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103309 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-23Fix typoAndrea Gelmini1-1/+1
Change-Id: I29de3e8483f3a6921bdf3d402fd10d0d587da2c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103250 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-23tdf#136752 pie chart: improve data label positionTünde Tóth2-22/+52
to avoid chart distortion. Set the maximum text width of data point label shape based to the 80% of the remaining space, when text wrapping is enabled and the label placement is AVOID_OVERLAP. Change-Id: I174089ec62df3aa21b5d1f26f74d475945d83684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102744 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara1-2/+2
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-15tdf#133227 chart UI: option to hide leader linesBalazs Varga1-0/+1
between data points and displaced data labels of a data series. Follow-up of the following commits related to the new UNO property ShowCustomLeaderLines for data labels: commit e2f4e65a7b8024c00b049eebf0d87637efda7f24 (tdf#134571 chart2, xmloff: add loext:custom-leader-lines) commit 5d67d70b26706ce8a08612c12a68821f984210a2 (tdf#134563 Add UNO API for custom leader lines) Change-Id: Id8a953b16ff737ca924c0c2c3241fba4e3ac904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102221 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-09improve loplugin:unusedvarsglobalNoel Grandin1-2/+0
to find any global variable, was checking the wrong property of VarDecl Change-Id: I454b4e0c1701bb0771768a1ee10cd738c4ab0726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-04tdf#124176 Use #pragma once in chart2George Bateman52-166/+52
This commit was carried out mostly by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: Ifee23b494264f895e5612952d0875cac064e4132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100181 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-02tdf#136061 Chart ODF/OOXML: fix missing custom labelsBalazs Varga1-1/+1
by UNO extensions ShowCustomLabel in DataPointLabel.idl and CUSTOM in ChartDataCaption.idl, fixing OOXML/ODF import/export. We should display custom data label even if DataPointLabel is disabled (e.g. category name and/or value fields are not displayed). Note: import of the embedded chart of the DOCX unit test document uses also ODF format in the background, testing also the extension of the native file format. Change-Id: I73e21f1e69fddec9f3b4163c46b6582cd1c74b5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101640 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>