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>
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
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
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>
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>
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>
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>
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