summaryrefslogtreecommitdiff
path: root/sc/source
AgeCommit message (Collapse)Author
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07HAVE_CXX_CWG1579_FIX is always true nowStephan Bergmann
...(according to <http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579> it is fixed in C++14), but for safety, leave the configure.ac check in for some longer. Change-Id: Ibd2f0cac228117e35ac299e2fe74207394c900cd Reviewed-on: https://gerrit.libreoffice.org/64773 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07HAVE_CPP_INLINE_VARIABLES is always true nowStephan Bergmann
...but for safety, leave the configure.ac check in for some longer. Also remove now-redundant SAL_INLINE_VARIABLE again (which was LIBO_INTERNAL_ONLY). Change-Id: Id049e0cb84b4f97f5859f1b16b867b39b448dec0 Reviewed-on: https://gerrit.libreoffice.org/64772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07Find actual data area inside the main-range...Dennis Francis
and trim all ranges to match this actual data area. Don't do this optimization for COUNTIFS where there is no main-range. This optimization is also turned off if any of the parameter ranges are not double-refs. Benefits in cases like - =SUMIFS(A:A, B:B, ">=20", C:C, "<=10") and the is data only in say A1:A10000 and rest are empty. Range trimming in this case saves lot of execution time and memory (for vConditions and vRefArrayConditions). Change-Id: I6b4ad91e23f89dc48603b98000bcef4dbdb03112 Reviewed-on: https://gerrit.libreoffice.org/64657 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-12-07sc: Peel off a pimplTakeshi Abe
Change-Id: I8797ccc165fb0a6060c6232babc299114411130a Reviewed-on: https://gerrit.libreoffice.org/64707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07lok: Insert shapes directly into the document.Mike Kaganski
Change-Id: I182aa395ce0f4e4185c9c85a866dec89499842f9
2018-12-07sc: Drop ineffective SetError()Takeshi Abe
as GetNewMat() already sets error FormulaError::MatrixSize when returning null. In fact IllegalArgument is irrelevant here. Change-Id: Ib7354c2e861b666deef1353b2c26d876668d77e3 Reviewed-on: https://gerrit.libreoffice.org/64420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07tdf#121759 Revert "tdf#99296 - Disable headers/footers by default"Heiko Tietze
This reverts commit 08b5048198d59441cb8033ed14cd17e68c943004. Disabled h/f lead to an inactive menu entry (tdf#121759). Also, the change was not accepted by the OP (tdf#99296). See discussion on the mailing list, Gerrit, and BZ. Change-Id: Ie3dcf14c173a1813da05d8f2a9c8f2eda14cee46 Reviewed-on: https://gerrit.libreoffice.org/64727 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-12-07tdf#105225 Add palette choice to calc tab background color dialogJim Raykowski
Change-Id: I9891a20d3bc3de51fec84fb54c7aae42f7142662 Reviewed-on: https://gerrit.libreoffice.org/64329 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07remove unused XMLShapeExportFlags::NO_CHART_DATANoel Grandin
dead since commit ec712408961a4a2efc667a7af83a21209907f9eb Date: Fri Nov 20 11:58:22 2009 +0100 chartpositioning: #i100778# chart positioning excluding labels Change-Id: Ibc7f23d51a0ba4ac1e63cd89a28298d95a405110 Reviewed-on: https://gerrit.libreoffice.org/64718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-06print also contents of OpenCL buffers in debug outputLuboš Luňák
Specifically, the input arguments of the run programs and the results buffer. This should make it much simpler to check if an OpenCL program works correctly. Change-Id: I0667082bf9a88757c8bda0c7ed54e2fc918534d7 Reviewed-on: https://gerrit.libreoffice.org/64547 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05Resolves: tdf#121887 RowModel::mnRow is 1-based, alwaysEike Rathke
Basically this was always wrong. Original code didn't treat the r attribute as optional and resulted in an invalid -1 row for such cases, hence the RowModel wasn't applied later. Then commit af8e6f4f544ecd01d3eda5f38bbd4779d5e8b2c6 CommitDate: Wed May 29 22:05:02 2013 +0200 r is an optional attribute in c and r, fdo#65059 introduced a 0-based SheetDataContext::mnRow but assigned that to a 1-based RowModel::mnRow as well if r attribute was missing, and did not update SheetDataContext::mnRow if r attribute was given. commit ff56553e34dfed01b9226ce7a516dbeb6da32124 CommitDate: Thu Mar 13 18:39:22 2014 -0400 fdo#76032: This row index is 1-based whereas our own mnRow is 0-based. then correctly assigned the decremented r attribute to SheetDataContext::mnRow but did not touch the assignment to RowModel::mnRow if r was not given. Probably confused by the ++mnRow already there which is correct but not sufficient for the assignment. Which we now finally fix herewith.. Change-Id: Iae1563ed01b95e7852ddad4fd59374c07186b493 Reviewed-on: https://gerrit.libreoffice.org/64580 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-12-05tdf#51671, implement feature to disable legend entry for seriesMarkus Mohrhard
No UI and no ODF or OOXML support yet. Change-Id: I839c195e9c42f074838ff6592331f7cdd13b6cd2 Reviewed-on: https://gerrit.libreoffice.org/64583 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-12-05loplugin:singlevalfields in scNoel Grandin
Change-Id: Ia18d05b80f90a2333faf41029e7ae66fbd52dc78 Reviewed-on: https://gerrit.libreoffice.org/64599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05OpenCL FVSCHEDULE() error checkingLuboš Luňák
Change-Id: If93a9ea6e0265ba616b4a1fbe138d310ea3e8693 Reviewed-on: https://gerrit.libreoffice.org/64546 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05OpenCL SQRT() error checkingLuboš Luňák
Change-Id: I6208cf21f53d1a2a0eb4f08962c7bddcc372aab5 Reviewed-on: https://gerrit.libreoffice.org/64545 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05OpenCL NORMDIST() error checkingLuboš Luňák
Change-Id: I15636a64ad869bf874fc6e2ada87842050da1a9a Reviewed-on: https://gerrit.libreoffice.org/64544 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05fix OpenCL ROUND() when the second parameter is negativeLuboš Luňák
Change-Id: Ibbf374f72e83609a602504d9ffde922896338c2c Reviewed-on: https://gerrit.libreoffice.org/64543 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05better/sane error checking in OpenCL BESSELJ()Luboš Luňák
Change-Id: I1f1945e7fd2721a320ab11196385e22a70d3da70 Reviewed-on: https://gerrit.libreoffice.org/64542 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-05remove unused SfxCallMode enum valueNoel Grandin
Change-Id: Ie092724ac22088d607f6250fbed764269b3707ba Reviewed-on: https://gerrit.libreoffice.org/64571 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused svx::ShapeProperty enum valueNoel Grandin
Change-Id: Iafc65902ed00206ff80dfc135c1ae767893abeca Reviewed-on: https://gerrit.libreoffice.org/64566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused SdrSwapGraphicsMode enumNoel Grandin
Change-Id: Iec7660563e96f821f72caae5047820f425ca69fb Reviewed-on: https://gerrit.libreoffice.org/64565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05remove unused GraphicManagerDrawFlags enumNoel Grandin
Change-Id: I12ef5e6257db337c4432b251bc92107a2c2ea88b Reviewed-on: https://gerrit.libreoffice.org/64557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05tdf#117332: select replaced text to properly replace it next timeMike Kaganski
... othervise the next drag event will insert the new range immediately after the just inserted, resulting in invalid reference. Regression after commit 42aece949ec96c775b31216bddd723aa5321e966 don't replace content of formula field when selecting range, tdf#58635 Change-Id: I7dfdc1ce041ebadf4406dbb605676d87cd489efa Reviewed-on: https://gerrit.libreoffice.org/64574 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-04fixes for OpenCL COVAR()Luboš Luňák
Change-Id: Ie171eea334de65b993554146c11adb95e0dbb85e Reviewed-on: https://gerrit.libreoffice.org/64245 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-04make OpenCL SLOPE() handle problems more gracefullyLuboš Luňák
It's silly to just return NaN just because the function can't handle something. If nothing else, at least a proper error should be reported (or in this case, the fallback to the core function will take care of it). Change-Id: I9c971082f4c5c9836318cf63d15fa7c278274273 Reviewed-on: https://gerrit.libreoffice.org/64244 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-04check that OpenCL NORMDIST() takes a proper number of argumentsLuboš Luňák
Change-Id: I885a1b70556311f5a0862fec24a3596dbeada5d6 Reviewed-on: https://gerrit.libreoffice.org/64243 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-04opencl SERIESSUM does not handle plain double argumentsLuboš Luňák
sc_subsequent_filters_test in ScFiltersTest::testFunctionsODS() also checks "SERIESSUM(2;3;2;3)", which the opencl code does not handle. At least bail out gracefully instead of returning 0. Change-Id: I154dca8cc437a6225b4eb98012232d80683f0114 Reviewed-on: https://gerrit.libreoffice.org/64242 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-04fix opencl YIELDDISCLuboš Luňák
Otherwise the yielddisc unittest fails. Change-Id: I2ebb0fbf9d4aea6678c91d0289418991aa92dbb5 Reviewed-on: https://gerrit.libreoffice.org/64241 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-04tdf#117425 - Increase the length of the Name Box drop down menuheiko tietze
Now 20 MRU plus... Change-Id: I069021bf1f42da793f7ec79a7e0eacbea519bc14 Reviewed-on: https://gerrit.libreoffice.org/64515 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-12-04remove unused enum SfxObjectShellFlagsNoel Grandin
Change-Id: I594e7beb3fb320b70ffe4dd98fee46c833f443dc Reviewed-on: https://gerrit.libreoffice.org/64453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-03check in opencl for MROUND to take exactly 2 argumentsLuboš Luňák
Otherwise the mround unittest fails in opencl mode. Change-Id: I6c8866495bbb44ff7dfc075ba4aac58d80dac7c7 Reviewed-on: https://gerrit.libreoffice.org/64240 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03add a macro for detecting incorrect number of parameters in openclLuboš Luňák
Change-Id: Id8253537025cc373c1ff183c0059158489e11750 Reviewed-on: https://gerrit.libreoffice.org/64239 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03restore incorrectly removed codeLuboš Luňák
149a4d7566 removed NeedParallelReduction() even though the code should be there. I'm not sure about GenSlidingWindowFunction(), since the base class is a template, but better revert that one too. Also revert that part of 73e6a7975b that removed the subsequently no longer used functions. Change-Id: I932ffd58f9528ec840c4575078f8356640eb5420 Reviewed-on: https://gerrit.libreoffice.org/64249 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03add ^ (=power) and - (=unary minus) to OpenCLSubsetOpCodesLuboš Luňák
Both of these are trivial and quite common mathematical operations. Unary minus is a bit complicated in that unary '-' is the same symbol as binary '-' and so there needs to be a hack to expand the '-' from the list to both of the opcodes ocSub and ocNegSub. Change-Id: I556e20e161c22dc89919afffbf904c1ef1d552ff Reviewed-on: https://gerrit.libreoffice.org/64362 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03fix OpenCL PEARSON()Luboš Luňák
Some error checking, but also simply use "if(cond) code;" rather than "if(!cond) try-to-set-benign-values-that-will-break-things-nevertheless". Change-Id: Ic0c296273ba4c174dba5e96eadeeee4005988142 Reviewed-on: https://gerrit.libreoffice.org/64342 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03make OpenCL SUM() treat empty cells properlyLuboš Luňák
The data vector may not have all values (if last cells are empty). In that case GetRefRowSize() is larger than GetArrayLength(). Other cases in this function had a similar check, this one was missing it for some reason (with the 'gid0' removed, since it's a fixed position). Change-Id: I01692b51d6ed22ee6db419508cacf556fb9e644d Reviewed-on: https://gerrit.libreoffice.org/64237 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03make sure FetchVectorRefArray() never triggers Interpret()Luboš Luňák
Test::testFormulaRefUpdateRange could trigger this, leading to recursion that wasn't handled properly by the code, since it wasn't expected to happen at late time (ScDependantsCalculator should have already caught it). This is all caused by the fact that FetchVectorRefArray() fetches also all rows before the given rows (to make the caching simpler I suppose). But that fetching could lead to Interpret() calls. Therefore, make ScDependantsCalculator in OpenCL mode check also all rows above. Change-Id: Iaecc105663df21b01443759287cec605470d34a5 Reviewed-on: https://gerrit.libreoffice.org/64236 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03restore functionality of OpenCL ParallelReductionVectorRef classLuboš Luňák
These functions were removed in 149a4d7566, although they quite clearly do serve a purpose, and then e9586cf0b5 removed the no longer used variables. Without this, ParallelReductionVectorRef class simply does not work. E.g. SUM(B1:B250) would not sum all the cells, but just one (testcase is Test::testFormulaRefUpdateRange with OpenCL forced). Change-Id: Iad1aeba2fbae2b4fc1d4236030adbb9ce6d972a1 Reviewed-on: https://gerrit.libreoffice.org/64235 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03simply abort if SC_FORCE_CALCULATION has unknown valueLuboš Luňák
This is a debug tool and it's better to get it this way rather than the code doing something else e.g. because of a typo. Change-Id: I5ac7e7bd6ecaa15fe935d53df63e3c369e0f8f16 Reviewed-on: https://gerrit.libreoffice.org/64234 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03remove unused functionLuboš Luňák
Change-Id: If965471464b4d3b2ded41951f8078d2e4dcaad10 Reviewed-on: https://gerrit.libreoffice.org/64233 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03fix OpenCL PRODUCT when there are actually no valuesLuboš Luňák
PRODUCT() when there are no arguments (or all cells are empty) is 0. Change-Id: I4bcb9afe84d08833526255da0c61f6847d68ea36 Reviewed-on: https://gerrit.libreoffice.org/64232 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03make sure opencl is not used from withing ocTableOpLuboš Luňák
Table operations do some tricks with reusing a cell with different values, and this confuses opencl handling, which operates on a group as a whole. Possibly relevant only with SC_FORCE_CALCULATION=opencl, sc_subsequent_filters_test fails in testDataTableOneVarXLSX(). Change-Id: I55e0d238061c8a45a2388ccf6c769ff6a1fddbcc Reviewed-on: https://gerrit.libreoffice.org/64230 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03fix opencl INTRATELuboš Luňák
No idea why somebody thought pow() would be better than a mere division. Without this the unittest fails because of a slightly different result. Change-Id: Ibbde8b872049be310ac98389634aab6eab154ca6 Reviewed-on: https://gerrit.libreoffice.org/64229 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03sync PI value used in opencl SQRTPI to the one used in scaddinsLuboš Luňák
Otherwise the sqrtpi unittest fails in opencl mode. This value is less precise, but consistency should be more important here, not to mention that float doesn't have that high precision anyway. Change-Id: I8e85b7029d33932c81009e5d48e0fe2164c68dcf Reviewed-on: https://gerrit.libreoffice.org/64228 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03treat second argument of opencl's dollarde/dollarfr as integerLuboš Luňák
That's how the scaddins implementation works, and the unittests fail in opencl mode without this. Change-Id: I08ea7dd0a0222408abf899d2da649be53f314a4c Reviewed-on: https://gerrit.libreoffice.org/64227 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03disable opencl implementation of AMORDEGRCLuboš Luňák
It fails sc_financial_functions_test with SC_FORCE_CALCULATION=opencl. Change-Id: If43928df8b1382eb7518fc99b6eee1759d822058 Reviewed-on: https://gerrit.libreoffice.org/64225 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-12-03avoid crash in opencl AMORDEGRC and AMORLINT argument handlingLuboš Luňák
The last argument is optional and defaults to 0 according to docs. Change-Id: I2e3aeb1da13b119e03e5bca18a63447e0fdc77fa Reviewed-on: https://gerrit.libreoffice.org/64224 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>