Commit Graph
7529 Commits
Author SHA1 Message Date
Noel Grandin 3e76797384 move comphelper::string::toInt32 to o3tl
so we can use it in places where we cannot include comphelper

Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08 20:44:43 +02:00
Noel Grandin 36e0e88b28 use more subView when converting to Int32
Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08 13:18:41 +02:00
Julien Nabet e0bd17c169 tdf#148395: CRASH: doubleclick on chart OLE Object (bandaid)
Change-Id: I623d2cf4b4665cd33e30ef0891d831370faf2553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132591
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2022-04-06 18:55:46 +02:00
Noel Grandin 3e1e0af376 loplugin:stringviewparam convert methods using match
which converts to a combination of substr and o3tl::starts_with

Change-Id: I5b01a181b9e6bee3483e4f49f1a9426abcc682d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132458
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-03 10:01:48 +02:00
Caolán McNamara fc6d597a93 Related: tdf#117162 use a marginally tidier but riskier fix for trunk
Change-Id: I94a836d7424eb561af623fee9d3a7e6d307cf065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132287
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30 09:39:39 +02:00
Caolán McNamara 78f7bd90b9 Resolves: tdf#117162 ImportDocumentHandler expects data provider to exist
already in its ctor

which changed since...

commit 9009663deb
Date:   Sun Feb 26 22:48:06 2017 +0100

    tdf#83257 [API-CHANGE] Pivot chart implementation

which defers it, take a probably safely backportable approach here to
fix it.

Change-Id: I1863791af7ae737f337993833a9cf1429a3a8028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132286
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30 09:39:22 +02:00
offtkp b0dfc41013 replace dynamic C style arrays with std::vector in Splines.cxx
replaced all instances of dynamic C style arrays, removed delete
statements as they are no longer needed

also now removed a pointless loop for an std::swap

Change-Id: I0438b1fa944dc6ae8c6a3cc488645504ab30c3df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132278
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2022-03-29 18:31:08 +02:00
offtkp f54ed0bcaa replace temporary value swap with std::swap
Replaced 3 occurences of temporary value swap with
C++ standard std::swap

Change-Id: Ib4dea821da8e93e8d18a3ebe55a7e47a010c9de9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132194
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-29 13:34:30 +02:00
Bartosz Kosiorek a2d49b680c tdf#147906 change sqrt(a * a + b * b) occurences to std::hypot(a, b)
Change-Id: Ic84899bf34f98382e6cc1ffc14310b1667279ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132214
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-29 09:17:42 +02:00
Stephan Bergmann a29f055491 -Werror,-Wunused-but-set-variable
...since its uses got commented out with
a9cc010064 "chart2: Weld ChartTypePanel"

Change-Id: I5296ba7ed746df13e8174063f148ff2ce970756c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132224
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28 20:07:19 +02:00
offtkp ab9896bfda tdf#147906 change all sqrt(a * a + b * b) occurences to std::hypot(a, b)
Other changes:
In Splines.cxx, no longer divides dx, dy with fDiffMax because we
switched to std::hypot, and hypot avoids intermediate overflows.

Change-Id: I8c459a0e56deb86606fc9b1bf3e68b132a60705d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132073
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-28 11:43:28 +02:00
Julien Nabet 70cda6eff0 tdf#148157: assertion after set "Between tick marks", click outside the chart
See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=179065

Change-Id: Id21f52d5cc33bbe99c27b7a8bdff056249c4d4fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132027
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-25 11:33:54 +01:00
Noel Grandin 7619bd3a38 loplugin:unusedmethods
Change-Id: I59c9e52997e80174a3aa7f81bacdfb29e47be0a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131952
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-23 11:03:52 +01:00
Michael Weghorn fe09f12d83 chart a11y: Drop bSendGlobally param from AccessibleBase::BroadcastAccEvent
Setting it didn't have any effect in practice:
If set to `true`, it resulted in
`vcl::unohelper::NotifyAccessibleStateEventGlobally` getting
called, which calls
`XExtendedToolkit::fireFocusGained` or
`XExtendedToolkit::fireFocusLost`, but the only implementations
in `VCLXToolkit` do nothing.

Interestingly, the documentation for `XExtendedToolkit` in
`offapi/com/sun/star/awt/XExtendedToolkit.idl` says:

>    @deprecated
>        This interface was only implemented in an intermediate developer
>        release anyway.
>
>    @since OOo 1.1.2

but the interface is still used in various places across the
code base...

Change-Id: I4681c28c9d18cf1953be5127765f4aa94563662d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-18 13:21:00 +01:00
Justin Luth cfd82e7a2c tdf#128747 chart2: don't overwrite labels
In almost every case, the values of a labeledDataSequence
create a new column, and therefore the label is attached
to the last column.

However, in the case where there are no values at all,
then this function is not called (for the value portion),
resulting in no new column being created,
and thus the label overwrote the previous series label.

Empty-value columns are excluded in later code,
so perhaps we shouldn't addDataSequenceToMap either,
but I don't know the implications of that.

Change-Id: Iad4ab54552b3c6b144feb2bc223ddae538316fa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130946
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-03-16 10:28:42 +01:00
Dennis Francis 64631ddcf3 lokCalcRTL: chart-edit: no bounding box
Fix for selections(svx-marks) similar to the fix for chart edit mode
tile painting

```
4fd2a14c6ee68f0574766ec7ec3dca35debe9d20
lokCalcRTL: global RTL: fix chart edit mode rendering
```

Conflicts:
	chart2/source/controller/main/ChartController.cxx

Change-Id: I2b5a2af7023b09254b8471b750122bec10126bde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131091
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131572
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-03-15 08:28:46 +01:00
Noel Grandin 69b5f0b657 loplugin:constparams
Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-11 10:05:39 +01:00
Mike Kaganski dcd5fa0a7b Drop misguided test added in 82a1d32d3d
The documented precondition is that index must not be greater than
the length of string. Just assert that, and fix the found misuse.

The added test is for in-place replacement, just in case.

Change-Id: I3c545a6f0bf913fe93e2bef83ce733359c193065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131232
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2022-03-09 14:04:03 +01:00
Noel Grandin 6f652725fc make some svx methods const
Change-Id: If04a160c46b8dbf641ca9d115d1560f17e87ce4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131043
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-05 11:59:04 +01:00
Noel Grandin 3e23161baf use SfxItemSet::GetItemIfSet in chart2
Change-Id: I1e5eeb8b29d2139a9c3e72c645bae9a8fb5dffff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-28 11:00:05 +01:00
Ouyang Leyan 7c5cfe5435 tdf#146463 Apply data series filter to the chart legend
Consider a data series as hidden if there is no unfiltered value, do not
consider data labels. It solves a regression introduced when working on
tdf#134059.

Change-Id: I6072bf469137d70e0aa353ffbeb0d0a1216ffa5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-28 09:27:07 +01:00
Caolán McNamara 779d659d99 cid#1500452 Using a moved object
and

cid#1500429 Using a moved object

Change-Id: Iecd989345cc043149ff1a2e24da4f6070c014c6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130568
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-26 11:33:06 +01:00
Noel Grandin 2baf13e903 use more TypedWhichId
Change-Id: I6ab3ca829bc08e672736dd8dd41ba714d7172090
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-24 19:31:38 +01:00
Caolán McNamara e63ad6a136 cid#1500434 Dereference after null check
Change-Id: I10d7c70c40a41301752854b898d8d763ec6d6b72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130485
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-24 13:06:58 +01:00
Justin Luth dfd0717b3f tdf#127720 chart2: create new columns for error bars
This is basically a copy/paste of the bubble chart fix
for tdf#103984 against the same LO 4.4 regression.

No exist unit tests had error bars. Very interesting.

make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testPPTXChartErrorBars

Change-Id: I81ff91ee2ba75277502a8e261106bf5837a8903b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130444
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-23 20:52:31 +01:00
Caolán McNamara ea1600eb54 Resolves: tdf#147292 the area of the tooltip is wrong
gen happens to make use of the current mouse point so it gets shown
anyway while gtk uses the designated area which isn't in the expected
units or screen relative positions

Change-Id: I11fdb09ad4ce2965d2f2e27fb1427c9d93de7a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130442
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 19:02:10 +01:00
Caolán McNamara 1af6ac5448 cid#1500434 Dereference after null check
Change-Id: I1a9531446fbd5f977d02775f5d25696aba16287d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130431
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 14:56:00 +01:00
Caolán McNamara efa6c3db72 cid#1500643 Dereference before null check
Change-Id: I1456b9a935c167344e0a56c7339da2c702a43e0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130419
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 12:16:39 +01:00
Caolán McNamara b2965afb8b cid#1500665 Dereference before null check
Change-Id: I451c0faad1060ff7e97ef24af61940f402e1b243
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130416
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-23 12:15:37 +01:00
Noel Grandin 06b7f930a5 tdf#64914 small improvements
(1) do not read the config inside a hot loop

(2) do not create a SvxShapeGroup only to remove it

Change-Id: I8ff3840d0972d2f617a326a67d18260e44220f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130331
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22 11:39:19 +01:00
Noel Grandin b77e806f93 eliminate a layer of conversion in createSymbol2D
speeds up loading large charts

Change-Id: I935971e21dd5384d8f3e04e0022fd81c2c1c8232
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22 09:14:19 +01:00
Noel Grandin 56cd3b2b5d tdf#64914 slow opening large chart
shaves 2% off the load time by avoid the cost of
comphelper::getFromUnoTunnel

Change-Id: I9d0438bd0ad3cf753d34fe181481f3a57193651c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130284
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-22 08:07:23 +01:00
Caolán McNamara ff215479a8 cid#1500515 Dereference after null check
Change-Id: I6483c3a036c5c56c8c6515b5b8f08720c8bd1a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130269
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21 18:45:12 +01:00
Caolán McNamara a9a4b82c9f cid#1500458 Dereference after null check
Change-Id: Ic9626b0817ee65fbc6d68592c592c3c2e39d42e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130267
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21 14:45:45 +01:00
Noel Grandin 2cbf83e208 loplugin:unusedmethods
Change-Id: I58c60262ca543bafb4db4433dbb98b195f7571ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17 14:51:23 +01:00
Noel Grandin d4758f3d3d micro-optimisation: use std::move
Change-Id: I3acee160130185e65a154bf205fcdcf52b9f8797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130070
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17 14:20:46 +01:00
Noel Grandin 99b13eed21 loplugin:unusedfields
Change-Id: I07ec409ea3663e789b6505dbfc999666525ed97f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130062
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17 13:39:29 +01:00
Noel Grandin 7e5036bb57 loplugin:unnecessaryvirtual
Change-Id: I44c70bd930380d0e3f76524f37e6276cf4faeccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130061
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17 13:36:48 +01:00
Noel Grandin 9625db6544 simplify some vector construction
Change-Id: I0bd131066f5d70fb1dc1c4f851d4d6059994a6f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130002
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-16 17:58:03 +01:00
Noel Grandin 11a3e5707d tdf#147394 delete crash legend
regression from
    commit 63e8c2ccd3
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Sat Jan 29 21:21:27 2022 +0200
    use more concrete types in chart2, Diagram

Change-Id: I6598bb7c116bd94272a805e77751aa8cf5dc174a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129882
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-13 19:48:14 +01:00
Noel Grandin 9985cc1088 rtl::Static -> local static
Change-Id: I43059938f1fc814b2b8306258210a67d7a1fac84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129858
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-13 17:21:40 +01:00
Tomaž Vajngerl ca22f1ce70 chart2: Break labels text and limit the size to the axis size
Previously a long label wouldn't be broken into multiple lines
and be limited to the axis size if the chart sizing was automatic.
This would cause the label to distort the whole chart and make the
chart area very narrow. With this change the label text is limited
to the axis width and gets broken into multiple lines if this is
necessary.

BarChartVeryLongLabel.odp provides a test document which includes
automatic size and fixed size chart are. We make sure the area
that the label text occupies is not larger than the chart wall
size.

Change-Id: If58bfa3e51ab68f720f22df5416ae305401bcd34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129814
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-12 06:32:02 +01:00
Tomaž Vajngerl 92da88582a chart2: crop x-axis label if it's too long on fixed size charts
If the label text is too long on a fixed size chart area, crop it
as we can't resize the chart area to accomodate for text breaking
into multiple lines.

The algorithm to determine if cropping is needed has assumed that
we need this in case the x-axis label is vertical, so there was
no check to actually make sure the text is horizontal or vertical
and in case it was horizontal, it has taken height into account
and not width, so nothing got cropped.

Change-Id: I8e73027fc51722280418c9e0be34ce487c41171e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129813
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-12 06:31:49 +01:00
Noel Grandin c1c9071dd5 crashtesting ooo#ooo83229-2
this reverts part of
  commit b314b5a061
  use more concrete types in chart2, DataSeries
since writer uses it's own implementation of the XLabeledDataSequence
UNO interface

Change-Id: I52154dcee104ca17bfa63a3a8b11ef739cef147f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129772
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10 11:42:58 +01:00
Noel Grandin 5dfe561cff use more concrete types in chart2, SvxShape
Change-Id: Ieadcd95d7d75d925b2c5528ba231d4686d4fcb7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10 07:50:12 +01:00
Noel Grandin 5477193c9c use more concrete types in chart2, SvxShape
Change-Id: I9ae954f8efaec31d5b848c633e66adb62a13f3f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129737
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10 07:49:56 +01:00
Noel Grandin d1568521a0 can avoid UNO_QUERY here
Change-Id: Ie43759ab2771a40a0553eb61847766932cac2e47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129736
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-10 07:49:36 +01:00
Noel Grandin 7c62e59587 use more concrete types in chart2, Axis
Change-Id: Ia47fd6deedd0a1cf6bedc882cb9817206dfa88b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09 07:34:22 +01:00
Noel Grandin da7e9f8613 use more concrete types in chart2, Axis
Change-Id: Iab742573a18384adbd1a397326ca6f4998b45ef3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129689
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09 07:34:07 +01:00
Noel Grandin 11c4ec15f1 use more concrete types in chart2, Axis
Change-Id: Ia45eac5e63d4937310a52a88c142623274fd4e1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129688
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09 07:32:54 +01:00