Commit Graph
1297 Commits
Author SHA1 Message Date
Stephan Bergmann d7ada1052f -Werror=maybe-uninitialized
Change-Id: Id243f28f267a5ea22625e277d6272f8514d33ad9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-19 20:32:18 +00:00
Noel Grandin a8b21abb09 Move cppu::BaseMutex up to the base class OPropertySet
Change-Id: I0e51987714e32ece19609c7a6d500995e6fc3601
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143674
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-06 09:11:18 +00:00
Noel Grandin ec6502a1f6 tdf#151846 Restore XChartTypeTemplate
Which I removed in commit 58766f997d.

Turns out it does have some usefulness for extensions. So restore most
of it. The exception is the getDataInterpreter method, for which I have
added a placeholder, so that the restored class has the same vtable
layout as the original.

Change-Id: Ief9b48ef2c408580bc24b5a8a0e11131edb3b943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142908
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-19 15:50:48 +01:00
Stephan Bergmann 179c9cbcb0 Elide a redundant var
...following up on 7b63242ea7 "tdf#145538 - Use
range based for loops"

Change-Id: Ice88c86e01e69e49b9fca920d61fe6d56763f134
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141498
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-18 14:40:39 +02:00
OmkarAcharekar 7b63242ea7 tdf#145538 - Use range based for loops
Change-Id: Ia4f795dc9bb59b6d1ee54daae49ac195bbc92a0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141434
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2022-10-17 22:16:12 +02:00
Mike Kaganski 3d236177be Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.

Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-10-11 12:46:01 +02:00
Noel Grandin d9e044f04a use more string_view in chart2
Change-Id: I2afe0b5f82d1704a29bc80a969ee099eec90d3a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140590
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-26 15:19:54 +02:00
Noel Grandin 65062ceaae use more std::u16string_view in chart2
Change-Id: I3617efa2e7fd55e6c1007338fd3c52aa9bbf13b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140232
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-20 13:11:56 +02:00
Noel Grandin 716a810425 no need to use an OUStringBuffer here
can just return the substring we need

Change-Id: I9d605cb809f58fcf60c0ae2e29aaff17baa9faa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-19 18:44:53 +02:00
Stephan Bergmann 91ba9654ba Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxx
...so that its TOOLS_WARN_EXCEPTION can be used in
comphelper/source/misc/logging.cxx in a follow-up commit.  (And while at it,
rename from diangose_ex.h to the more appropriate diagnose_ex.hxx.  The
comphelper module is sufficiently low-level for this immediate use case, so use
that at least for now; o3tl might be even more suitable but doesn't have a
Library until now.  Also, for the immediate use case it would have sufficed to
only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION,
TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of
include/tools/diagnose_ex.h into an additional new
include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move
the complete include file as is.)

Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18 17:10:19 +02:00
Tomaž Vajngerl 300ea910ba chart2: add UI to the data table
This adds a new object type "Data Table", with all the object
identifiers and converters of properties.
The data table is now shown in the drop-down of chart elements.
A properties dialog was added, which allows to change properties
of a data table. This contains the area, line and font tab pages
and a new tab page specific for data tables, to change if the
horiz. or vert. borders, key or the outline should be show.

Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138246
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-14 18:15:53 +02:00
Caolán McNamara 6f954f5026 crashtesting: null date assert seen on loading forum-fr-25994.ods
presumably part of this problem is since:

commit 22c7da0ca5
Date:   Wed Mar 19 04:50:20 2014 +0100

    the type in the Any is a util::Date and not a DateTime, fdo#74549

and we also have...

    rOutProperties.emplace_back( "NullDate",
                  PROP_DOCUMENT_NULL_DATE,
                  ::cppu::UnoType<css::util::DateTime>::get(),
                  beans::PropertyAttribute::MAYBEVOID );

which has DateTime and not Date, but we can get this set as either Date and
DateTime, so just accept both.

Change-Id: If77af5bb74755d2196527112665facf27a4d1403
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137911
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-07 11:23:03 +02:00
Noel Grandin 0351bec874 use more o3tl::span
which means we can reserve precisely the right number of entries when
building maps

Change-Id: I580414699289369de4730caae09829bbd8759e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25 10:00:23 +02:00
Noel Grandin b7c260aee3 clang-tidy modernize-pass-by-value in chart2
Change-Id: I73ae444487571fb61a02a2c813c060d269d52a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13 16:04:27 +02:00
Noel Grandin f71606c920 new loplugin:moveit
look for local variables that can be std::move'd to parameters

off by default, since it doesn't do proper data flow analysis

Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10 13:13:15 +02:00
Stephan Bergmann aa1004c04b Use o3tl::make_unsigned, nPolygonIndex is already clamped to non-negative here
Change-Id: Ib174df281389b334396905a94fc395900e7d9eb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135290
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02 11:26:47 +02:00
Stephan Bergmann acb65a60be Use more appropriate index variable types
Change-Id: Ic2cf5512cabcda0ad476c43bcbc544d0d6dd2685
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135231
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01 14:15:58 +02:00
Stephan Bergmann e89e3a8b5a The return value of those getLength functions is guaranteed to be non-negative
...so use o3tl::make_unsigned when comparing it against an expression of
unsigned integer type, instead of casting that expression to a signed type

Change-Id: Ic47c6d96919b2aba2d16ce6d1a2a8e4c5761a480
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01 10:49:20 +02:00
Stephan Bergmann 66500b5041 Use some range-based for loops
Change-Id: I4935bf51c6c7e9be1e3f069c6c72e618eaa0b4a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135189
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31 19:08:24 +02:00
Stephan Bergmann 5060c50158 Use o3tl::make_unsigned in some places
...where a signed and an unsigned value are compared, and the signed value has
just been proven to be non-negative here

Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24 16:50:03 +02:00
Noel Grandin 8d00d5f364 instantiate Title directly in chart
which simplifies some code

Change-Id: I0c9aa212334a3dedd8a54f8deda6100d93b0be70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134743
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23 11:58:54 +02:00
Tomaž Vajngerl d5371ec062 chart2: add func. to convert from css::awt and B2IRectangle
Change-Id: I6da70d4559d1536b788228bcae64f5e43462d8e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133922
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-10 14:02:46 +02:00
Pragat Pandya 6abc09926c tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Tested-by: Jenkins
2022-05-09 20:42:03 +02:00
Noel Grandin 18715f6a63 remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is
actually slower, since we have to allocate more storage for the vector

Change-Id: I65677007d105f4783603df74113ebed6db0b551b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06 21:52:00 +02:00
Stephan Bergmann 6ad8a6398d Just use Any ctor instead of makeAny in chart2
Change-Id: I156cd5597a4b9e683913d9730b8d8bb22e8064f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133845
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-05 07:12:47 +02:00
Noel Grandin a0533a8d18 simplify RegressionCurveCalculator::getFormattedString
no need to format number as OString and then convert to OUString, just
format it as OUString

Change-Id: I2ad686c4d69302c545d483bcfe7a1a129ce38eac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133765
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03 20:21:33 +02:00
Noel Grandin ddef1e2c01 add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03 09:12:32 +02:00
Noel Grandin 5fe702f1b6 add o3tl::toUInt32
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26 19:37:20 +02:00
Gabor Kelemen dec2c5f3ca Recheck module chart2 with IWYU
See tdf#42949 for motivation

This time using the new --noexclude switch to recheck validity
of the excludelist; these were the obsolete exclusions

Change-Id: Ifdf79b30ebaf198082c2194611a2ed2b664e6f1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133309
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-25 16:47:35 +02:00
Gabor Kelemen fef939d8ff Recheck module chart2 with IWYU
See tdf#42949 for motivation

Change-Id: Id4cdca3eed8618c289f30913d506f8f2bd46f0bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133112
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-04-23 16:33:58 +02:00
Noel Grandin b0f24ca516 no need to make copies of the vector here
Change-Id: Ieca07df686668af252800089028146f0f55c26de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133201
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20 15:41:02 +02:00
Noel Grandin ab699bfdb3 new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view

Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-19 18:31:10 +02:00
Tomaž Vajngerl 216493f322 chart2: not really worth having a TrueGuard - just use ScopeGuard
Change-Id: Ia2436d4cc843540a51e00ee937b80303cb600851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133162
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-19 04:33:04 +02:00
Eike Rathke abe0080d66 Prepare SvNumberFormatter::GetEditFormat() to obtain for another locale
Change-Id: Iab8b9a802ebac60b52007754430352d3de925374
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133026
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2022-04-15 01:40:05 +02:00
Noel Grandin dbe92dcfa7 use more string_view in chart2
Change-Id: I9ab6cd3905bfb7c811e7ad14b54ced6c42d2e077
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133003
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14 15:13:34 +02:00
Noel Grandin fdfd517a6f loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents

Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13 08:38:53 +02:00
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
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
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
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
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
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 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 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 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 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 6e800111d6 use more concrete types in chart2, DataSource
Change-Id: I513491e8d39ee79edf8521d279bd32031cf22a93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129687
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-09 07:32:09 +01:00
Noel Grandin b314b5a061 use more concrete types in chart2, DataSeries
Change-Id: I80bc8961832a20c29b31f7618b9d2609f15ab3c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129642
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08 08:52:11 +01:00
Noel Grandin d9ff5556e7 use more concrete types in chart2, DataSeries
Change-Id: If92f6ff6f90d53a9dc6211fd9f071d4d3fce2997
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-07 18:28:05 +01:00