Commit Graph

832 Commits

Author SHA1 Message Date
dedf0a28d5 loplugin:defaultparams
Change-Id: I03541b984db147f8bd3ed35f83e297cf7eecd7f0
2015-10-20 11:44:54 +02:00
1716b3a338 remove some useless comments
found with git grep '// /'

Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745
2015-10-13 10:07:49 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
c1df3a34dd loplugin:literaltoboolconversion
Change-Id: Ie2d1b466f5773799347aac59d7b5dc25f283b920
2015-10-09 09:30:54 +02:00
32b2668f2f Moving average trendline equation: remove initialisation
Change-Id: I3fa01a2d03e7de6438d0db0685e53e6b7ca6c25a
Reviewed-on: https://gerrit.libreoffice.org/19218
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-09 07:19:16 +00:00
9a94e06a36 tdf#70673 Improve exponential trend line equation
Use negative Y if there is only 1 positive Y
Skip some 0 or 1 in some corner case.
Add minus sign if intercept is missing
Simplify writing of equation

Change-Id: I4b164568c87c54934a38ff2d0cd72133f7fece26
Reviewed-on: https://gerrit.libreoffice.org/19033
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-09 07:19:00 +00:00
391f181c9f chart2: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.

Change-Id: I6f3d8488a63a5bed271ab70ad6f024e9869906cc
Reviewed-on: https://gerrit.libreoffice.org/19143
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-08 09:06:46 +00:00
432ca61669 Improve polynomial trend line equation
Skip coefficient if its value is 1 (or near 1)

Change-Id: I39a5630cc76250ded1ab22709522344d42fcc0e9
Reviewed-on: https://gerrit.libreoffice.org/19037
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-07 10:47:57 +00:00
9ed8ec510c Improve Power trend line equation
Skip intercept value if it is near 1

Change-Id: Ie52b2ac06c53c2e85b3c465be28081f6dc0ad2cb
Reviewed-on: https://gerrit.libreoffice.org/19038
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-07 06:42:06 +00:00
ce9d48e5f5 Log trend line equation: Remove useless variable
Change-Id: I70e960742b4af2c1ab234b6d1c681254c0627b03
Reviewed-on: https://gerrit.libreoffice.org/19138
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-07 06:40:53 +00:00
05e61719e2 loplugin:mergeclasses
Change-Id: If918532fcc860e3deacd9c86dd7a2d554e4f748d
2015-10-07 08:27:25 +02:00
7b9b559035 clang-analyzer-deadcode.DeadStores
Change-Id: I09d518a81b392bef444d7e01aa08ce30a2aee984
2015-10-06 15:31:17 +02:00
338ef54e40 clang-analyzer-deadcode.DeadStores
Change-Id: I12efd66cdacbe73080855694fe397136ea59aabd
2015-10-06 15:31:16 +02:00
94ebb58443 clang-analyzer-deadcode.DeadStores
Change-Id: If852229c04eb5787fb017cf13f483d406d60bf07
2015-10-06 15:31:16 +02:00
7704f81121 Trend line equation: remove useless defines
Change-Id: I9a2089f1f7e3b0e881d4136293d557efb3c1ef1c
Reviewed-on: https://gerrit.libreoffice.org/19001
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-30 06:50:07 +00:00
a6e622480f Fix typos
Change-Id: Icf15b5ea2e5b9cd62645bab2f9ccaada948322a7
Reviewed-on: https://gerrit.libreoffice.org/18940
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 06:00:42 +00:00
9320b9600a loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: Iff591fb7cd434805998fdd14b94c4dd9654ba55e
2015-08-31 08:04:33 +02:00
70a30fd179 loplugin: defaultparams
Change-Id: I65c0ed65b20f606cf1409a3158ff1ef1e2d6cd9f
2015-08-14 10:52:46 +02:00
9d370f2bb9 move date/time guess work to SvNumberFormatter::GuessDateTimeFormat()
Change-Id: I26f7c47f5b3cf4a3c4274832448d9c8076981af0
2015-08-12 14:34:28 +02:00
0f4b3cb7d3 if we have a number formatter then use it, dammit..
Change-Id: I2d70bed4d9cf6f0ef4556a327c51fc5c10fcd2be
2015-08-10 17:12:45 +02:00
ae9a59382f if we have a number formatter then use it, dammit..
Change-Id: I43b777bb0b3f53682bab7af4643b29e2bd313caa
2015-08-10 17:12:43 +02:00
711b34d590 tdf#92997 obtain a date/time edit format according to field value
Bloody workaround hack for the fact that Chart does not handle
category/x-axis times internally and is not able to pass its own axis
numberformat to its own databrowser editor.

Change-Id: I016695ad0104366c0bb636b449a2014ade31aca3
2015-08-10 15:20:02 +02:00
6295e65437 Revert "provide a few more common property names"
This reverts commit 6301e1e8b983f099d1f93140a3fb54c635206ac6.
2015-07-28 00:59:12 +02:00
5af433b092 Revert "provide some common fill property name aliases"
This reverts commit 3d32e9f81b263884ec0a3b262e71ae78fcb892b7.
2015-07-28 00:59:12 +02:00
38ecca9b30 inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code

Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-27 08:18:16 +02:00
6301e1e8b9 provide a few more common property names
Change-Id: I574af7999f8a76457dd61e66854db191b8876dfa
2015-07-26 00:27:01 +02:00
3d32e9f81b provide some common fill property name aliases
They are mapped to the same entry as the exisiting ones but make it much
easier to select the correct property name.

Change-Id: I6f334284825c809f50a35c4566889b01950734ce
2015-07-26 00:24:38 +02:00
7410217b7d loplugin:unusedmethods chart2
Change-Id: Ib7e8824e9e7f912963fbf07111ee3aa97773ceca
Reviewed-on: https://gerrit.libreoffice.org/17167
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-20 06:34:23 +00:00
5c420fcdf9 tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, in chart2.

Change-Id: Ib145860cf757d932fd5710f92c7f9ce33904b619
2015-07-17 09:39:04 +02:00
701e21b25d tdf#91725: Use lighter default colour for minor grid lines
Change-Id: I4be2adac1004ad4ace474c9a271cf8e21986da07
Reviewed-on: https://gerrit.libreoffice.org/16819
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-07-09 22:46:40 +00:00
2b5ebcc45b chart2: typed Link<>
Change-Id: I98c882d64cb4d6430390ac705f3f2208dd523598
2015-07-08 08:59:06 +02:00
95f8846186 coverity#1308146 Uninitialized scalar field
Change-Id: Ida37b83fed0ff5f76fab38153d2e8021a398faa1
2015-06-24 14:04:46 +01:00
a726ba2a7a coverity#1308147 Uninitialized scalar field
Change-Id: I1021b02aa2dc9afffa34d52ddfc71f683a594a0e
2015-06-24 14:04:46 +01:00
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
35fd66e864 tdf#70673 Power trendline: enable negative Y values
With a negative intercept, Y values can be negative

Change-Id: I9c23cc89b74498f7e7c7bcee00057627768f48aa
Reviewed-on: https://gerrit.libreoffice.org/15357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Philippe Jung <phil.jung@free.fr>
2015-06-22 09:57:49 +00:00
cad19fa841 tdf#70673 Exponential trendline: enable negative Y values
With a negative intercept, Y values can be negative

Rebase with forced intercept fec037e68f0dea164915fbfe1db4699a3861adf4

Conflicts:
	chart2/source/tools/ExponentialRegressionCurveCalculator.cxx

Change-Id: Ie351c006fb1688ef3e657da7ce0789a9da1317f0
Reviewed-on: https://gerrit.libreoffice.org/15353
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Tested-by: Philippe Jung <phil.jung@free.fr>
2015-06-22 09:57:14 +00:00
d16e154c62 Revert "tdf#92231 Potential regression curve calculation is wrong"
This reverts commit e0e285574244e855fd148ab7320b1aeb5914655a.

Wrong fix

Change-Id: Iddcbb84efbfc88013c6f2a217cb44061016c043b
Reviewed-on: https://gerrit.libreoffice.org/16405
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Tested-by: Philippe Jung <phil.jung@free.fr>
2015-06-21 22:22:39 +00:00
e0e2855742 tdf#92231 Potential regression curve calculation is wrong
Fixes potential regression curve class.

For potential regression curve algorithm, we try to get y = C * D^x
Switching to neperian logs:
   ln(y) = ln(C) + x ln(D)
So we make a linear regression and get
   slope = ln(D) => D = exp(slope)
   intercept = ln(C) => C = exp(intercept)

The current code computes the linear regression between log(y) and
log(x)
It should be between ln(y) and x.
Moreover, the slope is ln(D) so exp(slope) should be returned.
Finally, in getCurveValue, the return value is y = C x^D which is wrong

Change-Id: If8c952001229d3436be48abfef87c8302cf0544f
Reviewed-on: https://gerrit.libreoffice.org/16400
Reviewed-by: Philippe Jung <phil.jung@free.fr>
Tested-by: Philippe Jung <phil.jung@free.fr>
2015-06-21 17:26:26 +00:00
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
01532b1ab8 Fix typos
Change-Id: I28cfc629dc3d6ef54128615452667ccce86c1072
Reviewed-on: https://gerrit.libreoffice.org/16297
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:05:58 +00:00
bc14d27dd0 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If5ab427ab320e2623df182e6143c4e7123610eae
2015-06-08 16:23:25 +02:00
0f71828a95 cppcheck: noExplicitConstructor
Change-Id: I8b03c27188b02c3c4a9a9fbbe0df1fb1ae1c5caf
2015-06-08 11:14:38 +01:00
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04 06:35:44 +00:00
5bf6fecde7 tdf#91054: cleanup weirdo function prototypes
cleanup the folders chart2/ and ucb/

Change-Id: Ia5f230703e55da5710eaa52bbd9e22a6395a49ad
Reviewed-on: https://gerrit.libreoffice.org/15832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-21 06:34:45 +00:00
23b439a664 convert DEFAULTCONSTANT constant to scoped enum
Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3
2015-05-20 09:52:09 +02:00
bfcb2a1a75 convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06 09:01:29 +02:00
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
fec037e68f tdf#72361 Forced intercept for exponentiial trendline
Change-Id: I252a4994d2ee981018d07d6fac7ffe639f065d3e
Reviewed-on: https://gerrit.libreoffice.org/15334
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-04-29 14:14:01 +00:00
820fca753b loplugin:simplifybool
Change-Id: Ie7b1a6c7e60d888e2f070b817d3c34814e5835ae
2015-04-24 12:36:19 +02:00
ac1130130b Use comphelper::SequenceAsHashMap::getUnpackedValueOrDefault<bool>
...instead of ...<sal_Bool>; plus ensuing loplugin:implicitboolconversion

Change-Id: I5400e9d3175b9fe9b6088d37fe6bf3275314d7d0
2015-04-23 17:03:58 +02:00