summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2018-12-03check in opencl for MROUND to take exactly 2 argumentsLuboš Luňák1-0/+1
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ňák3-0/+29
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ňák1-0/+17
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ňák1-0/+5
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ňák1-8/+11
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ňák1-0/+6
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ňák9-9/+107
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ňák1-0/+372
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ňák1-1/+2
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ňák1-4/+0
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ňák1-8/+19
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ňák1-0/+4
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ňák1-3/+2
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ňák1-1/+1
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ňák1-4/+4
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ňák1-2/+2
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ňák1-20/+34
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>
2018-12-03tdf#42949 Fix IWYU warnings in include/vcl/[n-r]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I5a4951e983078ab6b6cbf0e96b00a20584b85e20 Reviewed-on: https://gerrit.libreoffice.org/64398 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-03tdf#45904 Move XElementAccess Java tests to C++Jens Carl2-1/+10
Move XElementAccess Java tests to C++ for ScLabelRangesObj. Change-Id: Icf49fb7e8c24b169e4fe33ffed8cc1412d21f9e8 Reviewed-on: https://gerrit.libreoffice.org/64432 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-03tdf#45904 Move XIndexAccess Java tests to C++Jens Carl1-2/+9
Move XIndexAccess Java tests to C++ for ScLabelRangesObj. Change-Id: I448561be2395beb9448ffcfc29434a94468166cb Reviewed-on: https://gerrit.libreoffice.org/64431 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-03ofz#11679 avoid config using pathCaolán McNamara1-0/+4
Change-Id: I5629c4e0bbe29390db5350b05523409c48bbb84d Reviewed-on: https://gerrit.libreoffice.org/64434 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-02no need for approxFloorhimajin1000001-1/+1
Change-Id: Ie69be492f41e42714edea252af9054414b0b841a Reviewed-on: https://gerrit.libreoffice.org/64134 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-12-02loplugin:intvsfloat get this working reliablyNoel Grandin1-1/+1
Change-Id: Ifdf1a152f6bc2e2f6edae97a5191120f630f7e49 Reviewed-on: https://gerrit.libreoffice.org/64374 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-02weld ScShareDocumentDlgCaolán McNamara8-187/+121
Change-Id: I790f957c9ebc6d87a94a355c30215245aaabeb30 Reviewed-on: https://gerrit.libreoffice.org/64345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-02tdf#45904 Move XElementAccess Java tests to C++Jens Carl2-4/+14
Move XElementAccess Java tests to C++ for ScAnnotationsObj. Change-Id: Ife8c2d51a3aae409fa008c5ad2515a8976481771 Reviewed-on: https://gerrit.libreoffice.org/64407 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-02tdf#45904 Move XIndexAccess Java tests to C++Jens Carl1-0/+10
Move XIndexAccess Java tests to C++ for ScAnnotationsObj. Change-Id: Icbd34ffe4b4911754045e4a5dc511b3fb25d4dd0 Reviewed-on: https://gerrit.libreoffice.org/64404 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-01Rename testGetByIndex to testIndexJens Carl1-3/+4
Rename testGetByIndex to testIndex of sheet::XSheetAnnotations test cases so it won't collide with testGetByIndex of container::XIndexAccess. Change-Id: Ic48ffe954c9f4f00b68066ad5d0d2df89cc4dfd7 Reviewed-on: https://gerrit.libreoffice.org/64402 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-01tdf#39468 Translate German commentsJens Carl1-1/+1
Change-Id: I27e5e4604cd999d778eb84976b3bea0ef35122ee Reviewed-on: https://gerrit.libreoffice.org/64353 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-12-01tdf#45904 Move XIndexAccess Java tests to C++Jens Carl2-2/+8
Move XIndexAccess Java test to C++ for ScAreaLinksObj. Change-Id: I374b7301caf67c900b7a64920d2ac5b642a8c6fd Reviewed-on: https://gerrit.libreoffice.org/64376 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-01tdf#120703 PVS: the condition needs &&, not ||Mike Kaganski1-1/+1
... ever since commit 9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24 V560 A part of conditional expression is always false: nRangeNo < nRCount. The value range of unsigned short type: [0, 65535]. Actually, simple if (nRangeNo < nRCount) would be enough, given that if sal_uInt16 is less than another sal_uInt16, it cannot be equal to greatest sal_uInt16. But let's keep this redundant comparison, in case types or define changes later. Change-Id: I886a0bc847a8c30966dea3ea0670bcee9b43c7f1 Reviewed-on: https://gerrit.libreoffice.org/64021 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-01weld OfaAutocorrExceptPageCaolán McNamara1-6/+6
Change-Id: I735ca7d70045b278d6b885cc2de35bf76885b487 Reviewed-on: https://gerrit.libreoffice.org/64258 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-01tdf#45904 Move XElementAccess Java tests to C++Jens Carl1-16/+32
Move XElementAccess Java tests to C++ for ScAreaLinksObj. Change-Id: I89beb6a1c05d853e94ebbedb031d87484cb84b38 Reviewed-on: https://gerrit.libreoffice.org/64373 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-01tdf#45904 Move XElementAccess Java tests to C++Jens Carl2-2/+11
Move XElementAccess Java tests to C++ for ScCellsObj. Change-Id: If721582a36ef5a82fba20d4ec7e0806d1d0524d9 Reviewed-on: https://gerrit.libreoffice.org/64365 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-12-01Correct class nameJens Carl1-8/+8
Change-Id: I76b440e72a80f20d05af477a38e9695cb17cb979 Reviewed-on: https://gerrit.libreoffice.org/64354 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-11-30i#32345 Support a matrix of rank argument for LARGE()/SMALL()Takeshi Abe5-23/+141
This is a followup of e22ab5e6f6b0ea49231ca454a567133996306116. Change-Id: I7052e113173204f7cfcd40622f52c5d4e14b3aa9 Reviewed-on: https://gerrit.libreoffice.org/64139 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-11-30tdf#45904 Move XEnumerationAccess Java test to C++Jens Carl3-0/+145
Move XEnumerationAccess Java tests to C++ for ScCellsObj. Change-Id: I3ec78142db7cfa924bf5663ca44cca80b6a0e556 Reviewed-on: https://gerrit.libreoffice.org/64315 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-11-30add uitest fr bug tdf#121263Zdeněk Crhonek1-0/+51
Change-Id: I138e097c65bac9fb37d9b08b444cc5cb9627a4d8 Reviewed-on: https://gerrit.libreoffice.org/64260 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-11-30Specify label mnemonic widgetsMike Kaganski1-0/+2
Fixes: sc/uiconfig/scalc/ui/conditionalentry.ui: WARNING: 'GtkLabel' 'Label_minimum' does not specify what it labels within 'interface' sc/uiconfig/scalc/ui/conditionalentry.ui: WARNING: 'GtkLabel' 'Label_maximum' does not specify what it labels within 'interface' after commit b907fe59a819aaba75518dc1534eb71d9e378b74 Change-Id: Iff3340cd17fd6c31970fd2d01b49c55e60680978 Reviewed-on: https://gerrit.libreoffice.org/64325 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-30tdf#114113: handle quoted sheet namesMike Kaganski1-2/+18
Change-Id: I569903fc06448fe6ee7f948488319b6b1f1f8fbb Reviewed-on: https://gerrit.libreoffice.org/64334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-30tdf#42949 Fix IWYU warnings in sc/source/ui/*/hxxGabor Kelemen94-195/+351
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3a945828b4c74be7747850e3e0eab2f4adeb67fd Reviewed-on: https://gerrit.libreoffice.org/64140 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-30remove unused HeaderBarItemBits enum valuesNoel Grandin3-3/+3
Change-Id: I84752cb9d683cb22c96d91cc54d7c4dc474603fc Reviewed-on: https://gerrit.libreoffice.org/64269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30tdf#93005, tdf#100611, remove the incomplete ODC export featureMarkus Mohrhard9-136/+3
Change-Id: I96a3882cd412ea5d993971df7e20b1fd8da73642 Reviewed-on: https://gerrit.libreoffice.org/64283 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-11-30weld OfaAutocorrReplacePageCaolán McNamara2-5/+7
Change-Id: I143792cfe123942d44b2e39cb1910a5127b2f592 Reviewed-on: https://gerrit.libreoffice.org/64254 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-29Adds print even pages/print odd pages options in print dialogDaniel Silva3-14/+89
Change-Id: I17733d83cc652be8c5abaf20cd4b5e23d3a577a1 Reviewed-on: https://gerrit.libreoffice.org/57380 Tested-by: Jenkins Reviewed-by: Daniel Silva <danielfaleirosilva@gmail.com>
2018-11-29Configures page range in print dialogDaniel2-26/+15
Change-Id: I62bd9affc9e065d7afcc60296a72eae4612b0ddd Reviewed-on: https://gerrit.libreoffice.org/55840 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek1-1/+1
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-29tdf#42949 Fix IWYU warnings in include/vcl/[i-m]*Gabor Kelemen24-0/+25
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If1b2e04872eb0dd6725802c1709a9085f4cd8c91 Reviewed-on: https://gerrit.libreoffice.org/64141 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-29make OpenCL bail out if it can't handle multi-column refsLuboš Luňák8-1687/+1406
The opencl code splits SvDoubleRef into subarguments by each column, but many functions simply treat each subargument as one argument for the function, thus possibly getting things wrong (e.g. SUMPRODUCT would make a product of each column and sum those, rather than making a product of the whole SvDoubleRef). So bail out if multi-column SvDoubleRef is encountered, unless the function is known to handle this case properly (either it takes extra care, such as VLOOKUP, or it doesn't matter, such as SUM, AND, MAX). Change-Id: Ied89a2fc252fb35fe49796140489ff4588038e25 Reviewed-on: https://gerrit.libreoffice.org/64238 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-29calc threads cycle detection should not break computing a valueLuboš Luňák1-1/+3
If ScFormulaCell::Interpret() is called to actually compute the cell's value (bRunning==true), do not bail out on a detected cycle, it needs to be detected as an actual cyclic reference. Happens with testCopyPasteMixedReferenceFormula when during computing dependencies cell C1 actually has a cyclic dependency on itself. Without this change, it would simply use its previously computed value. Change-Id: Ibf90b118b87d3536f5014004ea4a1dbad93ab270 Reviewed-on: https://gerrit.libreoffice.org/63183 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-11-29Support occurrence number as REGEX() 4th argument, tdf#113977 follow-upEike Rathke2-70/+140
REGEX( Text ; Expression [ ; [ Replacement ] [ ; Flags|Occurrence ] ] ) REGEX(Text;Expression) extracts the first match of Expression in Text. If there is no match, #N/A is returned. REGEX(Text;Expression;Replacement) replaces the first match of Expression in Text, not extracted. If there is no match, Text is returned unmodified. REGEX(Text;Expression;Replacement;"g") replaces all matches of Expression in Text with Replacement, not extracted. If there is no match, Text is returned unmodified. REGEX(Text;Expression;;Occurrence) extracts the n-th match of Expression in Text. If there is no n-th match, #N/A is returned. If Occurrence is 0, Text is returned unmodified. REGEX(Text;Expression;Replacement;Occurrence) replaces the n-th match of Expression in Text with Replacement, not extracted. If there is no n-th match, Text is returned unmodified. If Occurrence is 0, Text is returned unmodified. Change-Id: Iadb705e4c76415c57bf510489410ec029344cca7 Reviewed-on: https://gerrit.libreoffice.org/64199 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins