summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)Author
2019-08-30tdf#103988 OOXML export: fix bubble chart MSO interoperabilityBalazs Varga
Write <c:bubble3D val="0"/> into each <CT_BubbleSer> OOXML element to allow file opening in MSO without removing the (previously "corrupted") bubble chart. Change-Id: Idf31a0d3d8f98a3be4c9a3b29e65d4d4c582be53 Reviewed-on: https://gerrit.libreoffice.org/78259 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-30tdf#114657 OOXML chart export: fix broken chart with NaN X valueBalazs Varga
Export c:pt elements only for numbers instead of replace the correct X values with the sequence 1, 2, 3..., when the X values contain a NaN value. This reverts commit a211c754003f98bc8f7761224a0b265bd224f61f "fdo77216-Charts-Scattered chart: Chart gets distorted on RT" Change-Id: I6d0bec870b5317575d93eff407b3ec2ada56431e Reviewed-on: https://gerrit.libreoffice.org/78221 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-30tdf#124083 OOXML import: fix broken charts with missing value XBalazs Varga
Importing NaN value X, ie. where only "ptCount" was defined without explicit data, messed up the charts replacing all X values with sequence 1, 2, 3..., showing data points in wrong X positions, also showing the invalid "NaN" data points. Now internal data table contains the original X values, including NaNs, fixing broken charts. Change-Id: Ic3c69e15095d9b29643f5daef8f58c58b4a442db Reviewed-on: https://gerrit.libreoffice.org/78177 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23weld SwMailMergeWizardCaolán McNamara
Change-Id: I03a7fd1f7676792387155db986d710a001887c8d Reviewed-on: https://gerrit.libreoffice.org/77977 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-22weld chart CreationWizardCaolán McNamara
Change-Id: I7ee88c1e1b0eca5c2510a4bbba8b60c0d8a4e3e8 Reviewed-on: https://gerrit.libreoffice.org/77954 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-21tdf#101322 Chart OOXML Export: fix missing subtitleBalazs Varga
Concatenate subtitle and main title texts, if both exist, just like at the XLS/DOC export, because OOXML does not support subtitles. If we only have a subtitle, export the whole subtitle shape instead of the title shape, keeping its properties. Change-Id: If6a27c023fcce58f4549a0edad44027bb0348b93 Reviewed-on: https://gerrit.libreoffice.org/77499 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-19loplugin:constvars in chart2..connectivityNoel Grandin
Change-Id: I35d450b022af870df4e57714363892554a4ae917 Reviewed-on: https://gerrit.libreoffice.org/77722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-19Fix typosAndrea Gelmini
Change-Id: I6bd4d8955be608efc5c11bdc22f53a119cd45557 Reviewed-on: https://gerrit.libreoffice.org/77678 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17move RoadmapWizard to vclCaolán McNamara
Change-Id: Iae2f5e0ac52dcf862035508db3a22cfd86d02d8f Reviewed-on: https://gerrit.libreoffice.org/76903 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16move WizardMachine to vclCaolán McNamara
Change-Id: I55cc4a6c1ad111a22a43fd66a3cd01b5b02fb7cb Reviewed-on: https://gerrit.libreoffice.org/76902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in basic..cuiNoel Grandin
Change-Id: I15d825de3201808d188b461415f78a4d81b64127 Reviewed-on: https://gerrit.libreoffice.org/77494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-14tdf#124243 fix import of deleted X axis of 3D chartsBalazs Varga
3D charts imported from ODF and DOCX showed the deleted X axis. Change-Id: I3316d08af3acd122e5f75fbf0031dda6a337edbd Reviewed-on: https://gerrit.libreoffice.org/77432 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-10Fix typosAndrea Gelmini
Information is always singular Change-Id: I55275d7c2fd76c3ec0ae4a98aa952777feb90460 Reviewed-on: https://gerrit.libreoffice.org/75645 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-08-07tdf#125337 Chart DOCX Import: fix missing empty data series columnsBalazs Varga
Create an empty column for a data series with NAN values, ie. where only "ptCount" was defined without explicit data. Also data series appear in the right order. Change-Id: I4eac94c2b9f34c84c4c19e4717cafbd440b20087 Reviewed-on: https://gerrit.libreoffice.org/77026 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-08-05tdf#126686 Chart: fix crashBalazs Varga
Regression from commit: fa0a981af41a2606541eec1cb20a379a739691e0 (tdf#114166 DOCX chart import: fix missing complex categories) Change-Id: I164ed45280fcf7034fa3be82fd80efc4f03e5ed9 Reviewed-on: https://gerrit.libreoffice.org/76972 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2019-08-01tdf#126244 Chart view: fix rotation of complex category labelsBalazs Varga
The first level of vertical category axis labels orientation should be horizontal, other levels should be rotated to 90°. Also do not allow text break for complex vertical category axis labels. Change-Id: I01a6d9f753e767927fa71e2967dc3e6bad270565 Reviewed-on: https://gerrit.libreoffice.org/76754 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): chart2Stephan Bergmann
Change-Id: I9fb8e2853b5ddb1f9fe589f4e47828025ea52915 Reviewed-on: https://gerrit.libreoffice.org/76692 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30tdf#126524 Use shorter default name for unnamed data seriesGabor Kelemen
Change-Id: I2c67a50c36f6b09dc15d70ec44b95d47792b33e2 Reviewed-on: https://gerrit.libreoffice.org/76298 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-07-28loplugin:oncevarNoel Grandin
Change-Id: I3c014f53607a849c743a2fd1aa47d03d5af978fb Reviewed-on: https://gerrit.libreoffice.org/76495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-24tdf#114166 DOCX chart import: fix missing complex categoriesBalazs Varga
Now complex category labels are visible, and the inner data table contains the correct texts of the category columns. Note: repeating call of createDataSequenceByValueArray() API function can create all columns of the complex categories. See also commit 6c4e21a234f12e1310ba06f9859e08b424acf8bf "bnc#812796: Correctly handle static value array for OOXML charts." Change-Id: I333b79be35a24a912bb9e662116d0c85809a8fb2 Reviewed-on: https://gerrit.libreoffice.org/75776 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-07-22cid#1451627 Division or modulo by float zeroCaolán McNamara
Change-Id: Ifb4b446edb3da3096230e99a898e2fa8c4e9d66c Reviewed-on: https://gerrit.libreoffice.org/76098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-19loplugin:referencecasting in canvas..chart2Noel Grandin
Change-Id: I3a3671b5c44d1a7e5ca320d3d76dd5d902382cbc Reviewed-on: https://gerrit.libreoffice.org/75935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-18cid#1448440 silence Dereference null return valueCaolán McNamara
Change-Id: I1dce0d6a40086539cbcadeaf9a669f4640dbc730 Reviewed-on: https://gerrit.libreoffice.org/75817 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-18cid#1448236 Use after freeCaolán McNamara
Change-Id: Id7a0ad49a8e73a6b12a0f40c4b8f62b1e1d64356 Reviewed-on: https://gerrit.libreoffice.org/75810 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-17tdf#94300: custom gradients apply also from chart sidebarKatarina Behrens
Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2 Reviewed-on: https://gerrit.libreoffice.org/75693 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-07-16cid#1448478 Dereference befoew null checkCaolán McNamara
Change-Id: Ia73e6d02d8a8b06012f207820d0d579cfc08c541 Reviewed-on: https://gerrit.libreoffice.org/75718 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-16cid#1448243 Using invalid iteratorCaolán McNamara
return early on error paths Change-Id: I5d4f05585bb8c4b7d3fbe6824b8aa97785098ec5 Reviewed-on: https://gerrit.libreoffice.org/75662 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-16cid#1448300 Using invalid iteratorCaolán McNamara
Change-Id: Ibf3c2f90834e40f06ee1ba55480bd1d345642059 Reviewed-on: https://gerrit.libreoffice.org/75663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-15tdf#126193 Chart OOXML: Export Multi-level category labelsBalazs Varga
Fix export of Multi-level category axis labels with the correct OOXML tags (as the OOXML Standard requested) in the correct order. Also fix tdf#126195: but only the export part of the whole fault, which combined (united) the text of the category axis labels at different levels. Change-Id: Iefcef00818a3bb2ee1671bf693335904be471722 Reviewed-on: https://gerrit.libreoffice.org/75299 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-06-28tdf#126115 Chart OOXML Export: fix individual markerBalazs Varga
Export linechart custom (individual) datapoint marker settings into a <dPt> tag, as the OOXML Standard requires. Change-Id: I939196c9ea6e091ac9dadb4d62dd85d5408d599c Reviewed-on: https://gerrit.libreoffice.org/74837 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-06-26tdf#126033 chart: hide removed marker of a single data pointBalazs Varga
instead of showing a black square. Note: the patch fixes also the OOXML import (see the unit test). Change-Id: Ie578db3dd9ba310b0ce972832269acd5ae501778 Reviewed-on: https://gerrit.libreoffice.org/74690 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21tdf#124817 OOXML chart import: fix missing symbolsBalazs Varga
OOXML chart symbols with undefined fill color attribute were imported as invisible white symbols. Fixed by using line color of these symbols. Change-Id: Ie4314ed56b63daa82fe30b111aeae9e358ff2b4b Reviewed-on: https://gerrit.libreoffice.org/74286 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-06-21simplify some getSupportedServiceNamesNoel Grandin
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-20Also filter out fUnscaledLogicX being NaNStephan Bergmann
...which doesn't get filtered out by the following checks against the pPosHelper->getLogicMin/MaxX() range, but leads to -fsanitize=float-cast-overflow down the road when casting the propagated NaN in double fDepth to sal_Int32 when loading xlsx/tdf80820-1.xlsx as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=80820#c0>): > chart2/source/view/main/ShapeFactory.cxx:438:36: runtime error: nan is outside the range of representable values of type 'int' > #0 in chart::ShapeFactory::impl_createCube(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::drawing::Position3D const&, com::sun::star::drawing::Direction3D const&, int, bool) at chart2/source/view/main/ShapeFactory.cxx:438:36 > #1 in chart::ShapeFactory::createCube(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::drawing::Position3D const&, com::sun::star::drawing::Direction3D const&, int, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, std::__debug::map<rtl::OUString, rtl::OUString, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&, bool) at chart2/source/view/main/ShapeFactory.cxx:385:46 > #2 in chart::BarChart::createDataPoint3D_Bar(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::drawing::Position3D const&, com::sun::star::drawing::Direction3D const&, double, int, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, int) at chart2/source/view/charttypes/BarChart.cxx:337:39 > #3 in chart::BarChart::createShapes() at chart2/source/view/charttypes/BarChart.cxx:836:42 > #4 in chart::ChartView::impl_createDiagramAndContent(chart::CreateShapeParam2D const&, com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:1608:25 > #5 in chart::ChartView::createShapes2D(com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:3037:41 > #6 in chart::ChartView::createShapes() at chart2/source/view/main/ChartView.cxx:2506:5 > #7 in chart::ChartView::impl_updateView(bool) at chart2/source/view/main/ChartView.cxx:2558:17 [...] Change-Id: I25c743e4b98d9c7d98182144d30cb8c9782864ad Reviewed-on: https://gerrit.libreoffice.org/74467 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-20tdf#39593 Remove chart::ExplicitValueProvider::getExplicitValueProviderArkadiy Illarionov
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I8a457dc2aa701957f463b31bd6cc112337999aad Reviewed-on: https://gerrit.libreoffice.org/74377 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-18tdf#111824 Chart OOXML Export: fix Z axis labelsBalazs Varga
Export 3D barchart Z ("deep") axis properties into <serAx> xml tag, as the OOXML Standard requires. Change-Id: I8ee2282a28e9b4bdea6e96c96256f832b1a1aada Reviewed-on: https://gerrit.libreoffice.org/74170 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-06-18tdf#42949 Fix IWYU warnings in include/svx/[t-v]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I345b8c54890b5bc27f51addd2e6e73ba68b6b327 Reviewed-on: https://gerrit.libreoffice.org/73977 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-17Add comphelper::getUnoTunnelImplementation templateArkadiy Illarionov
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-15Avoid -fsanitize=float-divide-by-zeroStephan Bergmann
...when loading xls/tdf117254-4.xls as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=117254#c5>): > chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:189:32: runtime error: division by zero > #0 in chart::PolynomialRegressionCurveCalculator::recalculateRegression(com::sun::star::uno::Sequence<double> const&, com::sun::star::uno::Sequence<double> const&) at chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:189:32 > #1 in chart::VSeriesPlotter::createRegressionCurvesShapes(chart::VDataSeries const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool) at chart2/source/view/charttypes/VSeriesPlotter.cxx:1343:22 > #2 in chart::AreaChart::impl_createSeriesShapes() at chart2/source/view/charttypes/AreaChart.cxx:539:17 > #3 in chart::AreaChart::createShapes() at chart2/source/view/charttypes/AreaChart.cxx:965:5 > #4 in chart::ChartView::impl_createDiagramAndContent(chart::CreateShapeParam2D const&, com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:1608:25 > #5 in chart::ChartView::createShapes2D(com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:3037:41 > #6 in chart::ChartView::createShapes() at chart2/source/view/main/ChartView.cxx:2506:5 [...] Leaving aRSquared initialized to 0.0 when the divisor is zero is in line with the code prior to 00cb825ab3f16a94f1e8311ba0c24f72588e788e "fdo#75538 R^2 calculation for trendline similar to LINEST function" and with the recent nearby change f44d14e5f3909a4271034ba02da92ed2dee7b89c "Avoid -fsanitize=float-divide-by-zero". Change-Id: If2c17ad178788982729f647b4c695d3788fad500 Reviewed-on: https://gerrit.libreoffice.org/74068 Tested-by: Jenkins Reviewed-by: Laurent BP <laurent.balland-poirier@laposte.net> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-14Avoid -fsanitize=float-divide-by-zeroStephan Bergmann
...as happens with `--convert-to pdf xls/rhbz499466-2.xls` with xls/rhbz499466-2.xls as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at <https://bugzilla.redhat.com/show_bug.cgi?id=499466#c1>): > chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:73:14: runtime error: division by zero > #0 in chart::PolynomialRegressionCurveCalculator::recalculateRegression(com::sun::star::uno::Sequence<double> const&, com::sun::star::uno::Sequence<double> const&) at chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:73:14 > #1 in chart::VSeriesPlotter::createRegressionCurvesShapes(chart::VDataSeries const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool) at chart2/source/view/charttypes/VSeriesPlotter.cxx:1341:22 > #2 in chart::AreaChart::impl_createSeriesShapes() at chart2/source/view/charttypes/AreaChart.cxx:539:17 > #3 in chart::AreaChart::createShapes() at chart2/source/view/charttypes/AreaChart.cxx:965:5 > #4 in chart::ChartView::impl_createDiagramAndContent(chart::CreateShapeParam2D const&, com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:1608:25 > #5 in chart::ChartView::createShapes2D(com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:3037:41 [...] Change-Id: I1ef70aa90256a5fcc84151d869d8ffc6acfbbb0e Reviewed-on: https://gerrit.libreoffice.org/74055 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-14Avoid -fsanitize=signed-integer-overflowStephan Bergmann
...as happens when loading xls/fdo76137-3.xls as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e, the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=76137#c6>): > chart2/source/view/charttypes/PieChart.cxx:1110:81: runtime error: signed integer overflow: 2025540036 + 157276681 cannot be represented in type 'int' > #0 in chart::PieChart::rearrangeLabelToAvoidOverlapIfRequested(com::sun::star::awt::Size const&) at chart2/source/view/charttypes/PieChart.cxx:1110:81 > #1 in chart::ChartView::impl_createDiagramAndContent(chart::CreateShapeParam2D const&, com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:1651:23 > #2 in chart::ChartView::createShapes2D(com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:3037:41 Change-Id: I52a8363db2ca37dbcf56e1c136d9ee2223add945 Reviewed-on: https://gerrit.libreoffice.org/74048 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-14Avoid -fsanitize=float-divide-by-zeroStephan Bergmann
...as happens with `--convert-to pdf xls/fdo53482-2.xls` with xls/fdo53482-2.xls as obtained by xls/fdo53482-2.xls (i.e., the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=53482#c25>): > chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:190:38: runtime error: division by zero > #0 in chart::PolynomialRegressionCurveCalculator::recalculateRegression(com::sun::star::uno::Sequence<double> const&, com::sun::star::uno::Sequence<double> const&) at chart2/source/tools/PolynomialRegressionCurveCalculator.cxx:190:38 > #1 in chart::VSeriesPlotter::createRegressionCurvesShapes(chart::VDataSeries const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool) at chart2/source/view/charttypes/VSeriesPlotter.cxx:1341:22 > #2 in chart::AreaChart::impl_createSeriesShapes() at chart2/source/view/charttypes/AreaChart.cxx:539:17 > #3 in chart::AreaChart::createShapes() at chart2/source/view/charttypes/AreaChart.cxx:965:5 > #4 in chart::ChartView::impl_createDiagramAndContent(chart::CreateShapeParam2D const&, com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:1608:25 > #5 in chart::ChartView::createShapes2D(com::sun::star::awt::Size const&) at chart2/source/view/main/ChartView.cxx:3037:41 The division aSumError/aSumTotal is there ever since the code's introduction in e6a0cc2d6cb37bf4e04861173c7e55b307513778 "fdo#35712 polynomial and moving average regression lines", and quikee suggested this fix on IRC. Change-Id: Ic9cd7b8aaa8451e1230fca8137bad29e28f6477f Reviewed-on: https://gerrit.libreoffice.org/74036 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-14loplugin:logexceptionnicely in chart2Noel Grandin
Change-Id: Ib7933723e5506578bbc85cc431d54d1ed8466376 Reviewed-on: https://gerrit.libreoffice.org/74019 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12tdf#75659 Chart: fix empty legend at not available legend namesBalazs Varga
by using localized versions of "Unnamed Series 1" etc. Note: OOXML files don't contain the default or fallback legend names used by MSO in this case, so the original empty string replacement of the missing names resulted bad chart import. Change-Id: I2897c70d9003e1ab3241dd569de0d79821d896b1 Reviewed-on: https://gerrit.libreoffice.org/73817 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-06-12Add missing test dependency on instdir/share/config/images_*.zipStephan Bergmann
...without which `make clean && make CppunitTest_chart2_export` would fire > cppunittester: vcl/source/gdi/bmpacc.cxx:39: BitmapInfoAccess::BitmapInfoAccess(Bitmap &, BitmapAccessMode): Assertion `xImpBmp && "Forbidden Access to empty bitmap!"' failed. at > __GI___assert_fail at /usr/src/debug/glibc-2.28-95-g7423da211d/assert/assert.c:101 > BitmapInfoAccess::BitmapInfoAccess(Bitmap&, BitmapAccessMode) at vcl/source/gdi/bmpacc.cxx:39 > BitmapReadAccess::BitmapReadAccess(Bitmap&, BitmapAccessMode) at vcl/source/gdi/bmpacc.cxx:88 > BitmapWriteAccess::BitmapWriteAccess(Bitmap&) at vcl/source/gdi/bmpacc.cxx:327 > Bitmap::AcquireWriteAccess() at vcl/source/bitmap/bitmap.cxx:385 > vcl::ScopedBitmapAccess<BitmapWriteAccess, Bitmap, &Bitmap::AcquireWriteAccess>::ScopedBitmapAccess(Bitmap&) at include/vcl/scopedbitmapaccess.hxx:53 > BitmapDisabledImageFilter::execute(BitmapEx const&) const at vcl/source/bitmap/BitmapDisabledImageFilter.cxx:30 > BitmapFilter::Filter(BitmapEx&, BitmapFilter const&) at vcl/source/bitmap/bitmapfilter.cxx:23 > ImplImage::getBitmapEx(bool) at vcl/source/image/ImplImage.cxx:107 > ImplImage::getBitmapExForHiDPI(bool) at vcl/source/image/ImplImage.cxx:137 > Image::Draw(OutputDevice*, Point const&, DrawImageFlags, Size const*) at vcl/source/image/Image.cxx:124 > OutputDevice::DrawImage(Point const&, Size const&, Image const&, DrawImageFlags) at vcl/source/outdev/bitmap.cxx:1323 > OutputDevice::DrawImage(Point const&, Image const&, DrawImageFlags) at vcl/source/outdev/bitmap.cxx:1307 > ToolBox::ImplDrawItem(OutputDevice&, unsigned long, unsigned short) at vcl/source/window/toolbox.cxx:2817 > ToolBox::Paint(OutputDevice&, tools::Rectangle const&) at vcl/source/window/toolbox.cxx:3663 > ScInputWindow::Paint(OutputDevice&, tools::Rectangle const&) at sc/source/ui/app/inputwin.cxx:427 > PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:300 > vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:604 > PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:540 > vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:610 > PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:540 > vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:610 > PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:540 > vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:610 > vcl::Window::Update() at vcl/source/window/paint.cxx:1323 > StatusBar::StartProgressMode(rtl::OUString const&) at vcl/source/window/status.cxx:1325 > framework::ProgressBarWrapper::start(rtl::OUString const&, int) at framework/source/uielement/progressbarwrapper.cxx:111 > framework::StatusIndicatorInterfaceWrapper::start(rtl::OUString const&, int) at framework/source/uielement/statusindicatorinterfacewrapper.cxx:52 > SfxProgress::SetState(unsigned int, unsigned int) at sfx2/source/bastyp/progress.cxx:236 > ScProgress::SetState(unsigned long, unsigned long) at sc/inc/progress.hxx:86 > ScfProgressBar::IncreaseProgressBar(unsigned long) at sc/source/filter/ftools/fprogressbar.cxx:129 > ScfProgressBar::ProgressAbs(unsigned long) at sc/source/filter/ftools/fprogressbar.cxx:186 > ScfProgressBar::IncreaseProgressBar(unsigned long) at sc/source/filter/ftools/fprogressbar.cxx:121 > ScfProgressBar::ProgressAbs(unsigned long) at sc/source/filter/ftools/fprogressbar.cxx:186 > ScfProgressBar::Progress(unsigned long) at sc/source/filter/ftools/fprogressbar.cxx:194 > XclExpProgressBar::Progress() at sc/source/filter/excel/xehelper.cxx:142 > XclExpRow::XclExpRow(XclExpRoot const&, unsigned int, XclExpRowOutlineBuffer&, bool, bool, unsigned short) at sc/source/filter/excel/xetable.cxx:1862 > XclExpRowBuffer::GetOrCreateRow(unsigned int, bool) at sc/source/filter/excel/xetable.cxx:2398 > XclExpRowBuffer::AppendCell(std::shared_ptr<XclExpCellBase> const&, bool) at sc/source/filter/excel/xetable.cxx:2138 > XclExpCellTable::XclExpCellTable(XclExpRoot const&) at sc/source/filter/excel/xetable.cxx:2589 > ExcTable::FillAsTableBinary(short) at sc/source/filter/excel/excdoc.cxx:420 > ExcDocument::ReadDoc() at sc/source/filter/excel/excdoc.cxx:741 > ExportBiff5::Write() at sc/source/filter/excel/expop2.cxx:107 > lcl_ExportExcelBiff(SfxMedium&, ScDocument*, SvStream*, bool, unsigned short) at sc/source/filter/excel/excel.cxx:176 > ScFormatFilterPluginImpl::ScExportExcel5(SfxMedium&, ScDocument*, ExportFormatExcel, unsigned short) at sc/source/filter/excel/excel.cxx:212 > ScDocShell::ConvertTo(SfxMedium&) at sc/source/ui/docshell/docsh.cxx:2368 > SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1510 > SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&) at sfx2/source/doc/objstor.cxx:2833 > SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objstor.cxx:2690 > SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objserv.cxx:326 > SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:3026 > SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1697 > ChartTest::save(rtl::OUString const&) at chart2/qa/extras/charttest.hxx:131 > ChartTest::reload(rtl::OUString const&) at chart2/qa/extras/charttest.hxx:138 > Chart2ExportTest::testTrendlineXLS() at chart2/qa/extras/chart2export.cxx:547 [...] due to an earlier > warn:vcl:30580:30580:vcl/source/image/ImplImage.cxx:63: Failed to load scaled image from sc/res/sc26047.png at 1 Change-Id: Iffb47b846f9aa3823b57684fbbd8f3d8388e5e6b Reviewed-on: https://gerrit.libreoffice.org/70825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-11tdf#42949 Fix IWYU warnings in include/svx/[sS][v-Z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie2a4122d67d2d40732e6fd00b584f33edd802c5b Reviewed-on: https://gerrit.libreoffice.org/73476 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>