summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2016-03-18ensure a correct index is assigned to a duplicated ScRangeData instanceEike Rathke1-0/+1
ScRangeName::insert() assigns an index only if the passed ScRangeData instance's index was 0. Duplicating an ScRangeData object duplicates also the index, so effectively two instances with the same index could be inserted to the named expressions collection, a following ScRangeName::findByIndex() retrieved one of them by chance. Change-Id: Ic141ffb1a683bda5907f4359167da84faf1649e1 (cherry picked from commit 336d816176650726f6d14539464d9fd28ddd032d) Reviewed-on: https://gerrit.libreoffice.org/23324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-15Resolves: tdf#93196 add RecursionCounter guard also to InterpretFormulaGroup()Eike Rathke1-19/+29
... same as for ScFormulaCell::InterpretTail() Change-Id: I444f259fe4e86ed0638a04f1b5d9272edd182e2e (cherry picked from commit 29ee431c1cf859c3d5a5041cff5cb04b89db27a0) Reviewed-on: https://gerrit.libreoffice.org/23280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-14tdf#98083: Always save cell formatKatarina Behrens5-13/+44
it was pretty bad idea not to save it for rich-formatted cells (tdf#92296) as there is more to cell format than just a font Due to a bug in xpath helper I'm backporting only part of the test (cherry picked from commit 7945cdf0ea570302a04550540848c03c0cd030ab) Change-Id: I0e5e7d7187c69519bb8f4de2b627e385fccd3d46 Reviewed-on: https://gerrit.libreoffice.org/23033 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-03-09Resolves: tdf#95226 second case, stack error count in JumpMatrix contextEike Rathke1-0/+14
For the early bail out on errors to work correctly and not prematurely end calculations the current error function needs to be stacked in JumpMatrix context, otherwise we may end up with ((nErrorFunction=74)>=(nErrorFunctionCount=2)) or some such.. (cherry picked from commit 62b40429946c0e5021912072dc79a60fc11fce06) Change-Id: I3559e15180694961585db92f6aa98a46430ae372 Reviewed-on: https://gerrit.libreoffice.org/23091 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-09Resolves: tdf#98297 exclude error values from COUNT in array/matrixEike Rathke3-9/+25
Backport of b2f5336b08b5f638f890a626eb2aeefaf499a79b Change-Id: I04ef53b8880243b3548e1b7fd926690dcb4a2137 Reviewed-on: https://gerrit.libreoffice.org/22846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-09Resolves: tdf#98389 check memory requirement of matrixEike Rathke4-113/+268
Attachment 123203 of tdf#98389 has external references of the form [1]Data!$1:$1048576 which effectively address the entire cell range of sheet Data and allocating a matrix for a billion cells attempted to allocate 8GB+xGB of memory which the system said no-no ... Some brave soul along the road once decided that a check on the number of elements wasn't needed anymore and dared to remove it during refactoring.. This change reintroduces the check and adds it also to other places that try to instanciate or resize a matrix. When allocation of a matrix for an external range reference fails it is checked whether the request is for such nasty entire rows or entire columns ranges and if so tries to shrink the range to the actual data area used, which at least in this case helps and works. Additionally it fixes a long standing bug in the cached area to array mapping which caused the cache to not be hit but instead the matrix was aquired over and over again for the same range, causing a serious performance bottle neck specifically for VLOOKUP and related functions where the same external range is used in a lot of cells. (cherry picked from commit 9e60bbdb3aa5f80ca80c9c4fdf7accd12c4a5d1c) Change in convertToTokenArray() backported to older code flow. disable means Enable(false), not true.. tdf#98389 related EnableAdjustHeight(true) lead to the side effect that when clearing the range of a pivot table during import, formulas in the same rows were recalculated with then empty data. Through xSheetOp->clearContents() in PivotTable::finalizeImport() of sc/source/filter/oox/pivottablebuffer.cxx In the case of the bugdoc attached to tdf#98389 that lead to all VLOOKUP() calls resulting in #N/A errors because an empty string was looked up. (cherry picked from commit 088ba465d6bb0931c7034d564a3077e21078cb13) e629ce871d255cc871671165c4da974f21041cec Backported to ScMatrix implementation of 5-0. setCellRangeData: check matrix size before operating, tdf#98389 follow-up Now that we can have the one element error matrix we can't blindly call ExecuteOperation() on it that would access elements out of bounds. (cherry picked from commit 9cae3a88587deaf22ee83b2e36487013a1220a3b) Backported to older code flow. b6e5525f685c9324235f128a943dd716ea7a3fca Change-Id: I35f67b48e665bf1cc8d672325c32b889f2e05c57 Reviewed-on: https://gerrit.libreoffice.org/23003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-07don't use same file in two testsMarkus Mohrhard2-2/+2
Change-Id: I853e5390cf5c3f6fe8ac8e00a876ed021c35a766 Reviewed-on: https://gerrit.libreoffice.org/22954 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/22960 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-19Resolves: tdf#97465 like wheel ignore swipe for sc input handler inputchangedCaolán McNamara1-0/+4
(cherry picked from commit e35f3b6a3357fc3832a9d68ed37ddb9b5320ef0a) (cherry picked from commit 113f000d38c34dd4dda6903976f8febf6d95375c) Change-Id: Ide7fe1388ffe6f85a1f459037316d03193470d8a Reviewed-on: https://gerrit.libreoffice.org/22156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-18tdf#92296: Fix off-by-one formatting of text runs on OOXML exportKatarina Behrens3-9/+14
This essentially reverts commit 8865ed2efecd03722d10e522265f31c99b13b2bb and implements a different fix for tdf#90812: If the formatting of entire cell is uniform, remove formatting of the leading text run and create corresponding cell style. In all other cases, write out formattings for each individual run. Change-Id: I7724b7a474f773f2cdc39e9150d843642fb05bbe Reviewed-on: https://gerrit.libreoffice.org/19811 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Related tdf#92296, tdf#90812: Make this test more strict i.e. not only make sure that rPr is there, but also test the text chunk has the right font colour ( it went off-by-one in regression caused by the fix of tdf#90812 ) Change-Id: I3788a845393686ed621743e117b7eb439e38e0b3 Reviewed-on: https://gerrit.libreoffice.org/22420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-02-02tdf#97150: tdf#94924: If we can't handle strings, don't try to thenTor Lillqvist1-0/+7
Fixes the VLOOKUP problem reported in tdf#94540 by falling back to non-OpenCL for such a case, where one of the columns passed to the VLOOKUP contained strings. And since a while, we don't claim to handle strings in VLOOKUP. Which is true. (cherry picked from commit 476bef70f1d9fd58b29a1f6fb95e54567b031acf) Change-Id: I4140c86bf8166beb8201aa90c075d9f4432d9173 Reviewed-on: https://gerrit.libreoffice.org/21874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-02Resolves: tdf#93151 handle ExpandRefs and mnColDelta the same as mnRowDeltaEike Rathke1-9/+93
(cherry picked from commit 02e69f0c3acec2c2e81692bc53c4356591a84ba5) Conflicts: sc/source/core/tool/token.cxx Change-Id: I8cd00494fc63124443fc01582296ef17f4cd5e27 Reviewed-on: https://gerrit.libreoffice.org/21821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-25tdf#96910 : Calc crashes while using "Insert Column Left" for large DocumentsYogesh1-5/+7
Change-Id: I6e813b7525a3d9b1db131db9f08fc20f7320345f Reviewed-on: https://gerrit.libreoffice.org/21661 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 208883398dcf9af6b88611097d1f75d5fbc9afad) Reviewed-on: https://gerrit.libreoffice.org/21792 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-01-25tdf#97308: fix logic with conditional "ends with"Julien Nabet1-2/+2
Change-Id: Ib9f9ed627dc37b11d8c3911aa4fe62141ff471c2 Reviewed-on: https://gerrit.libreoffice.org/21723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit a0a4ea3c636fc18cca6a3b2f9391996fb909e81f) Reviewed-on: https://gerrit.libreoffice.org/21731 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-19follow-up of tdf#89031Winfried Donkers1-1/+2
No function name hints or autocompletion when character right of caret is '$' Change-Id: I4fcfa6e29e5671e97743c7fc520953721d0bda24 Reviewed-on: https://gerrit.libreoffice.org/21577 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 1e2bcb3177d58e6f446296ae28fcff7f5da9b620) Reviewed-on: https://gerrit.libreoffice.org/21602
2016-01-18tdf#96198 accept WEEKNUM with only one parameter, tdf#50950 follow-upEike Rathke1-2/+5
Loading ISOWEEKNUM(date) maps to WEEKNUM(date) so accept the actual ISOWEEKNUM parameter count defined in ODFF. This also ensures forward compatibility with 5.1 where 3e5deb8ccfaf0b73fb6cf394822e560dc036a686 (cherry picked from commit 15494f0f99d1cf6f75e8c2996377b242af247bbf) converts ISOWEEKNUM(date,mode) to real ISOWEEKNUM(date) if mode!=1 as there is no matching WEEKNUM(date,mode) defined. This WEEKNUM here never implemented the ODFF WEEKNUM but a mix of ISOWEEKNUM and something undefined different. Change-Id: Ibd0d4483486a1db28cc600821baae9f13b9dd687 Reviewed-on: https://gerrit.libreoffice.org/21118 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-01-12tdf#90606 Crash when delete a large part of a column with shift cells leftArul1-6/+15
skipping splitFormulaCellGroup() and joinFormulaCellAbove() for nEndRow equal to MAXROW since nEndRow + 1 is not valid Change-Id: Iabfcb33bf58d20331841ca386cca4a91fd6598bf Reviewed-on: https://gerrit.libreoffice.org/21389 Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 975ceab198a06558875006bbd9a4d0a2708e416e) Reviewed-on: https://gerrit.libreoffice.org/21393
2016-01-07Resolves: tdf#94208 broadcast fill undo (for deleted cells)Eike Rathke1-0/+6
Change-Id: I0fb54956bffc77dad4236b326eee3af836017623 (cherry picked from commit ece5cc21aa7814be79016e0d285981c6ced4d9ee) Reviewed-on: https://gerrit.libreoffice.org/21207 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-12-21tdf#93949 ensure memory stream is properly flushedTomaž Vajngerl1-0/+1
Change-Id: I6d6a926f5d3fd62dd3b7b78a5721f6483b3b4ee7 (cherry picked from commit c6b11cf681f8e8d131031ea7e5d19c4b6473503a) Reviewed-on: https://gerrit.libreoffice.org/20842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-12-16Resolves: tdf#95440 SharedString are interned per document, re-internEike Rathke1-0/+4
... if literal strings are copied with formula expression tokens. (cherry picked from commit dad412e07f805a53ad73ce2e80d187a70c77e8de) Conflicts: include/formula/token.hxx Change-Id: I13526907bb6c2c605c6ed9584fa6e3f2b18623b8 Reviewed-on: https://gerrit.libreoffice.org/20731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-12-12tdf#73006 : Put results in correct cells after Text to ColumnsDennis Francis1-7/+24
Change-Id: I7a1653424edd93b2de0597ce8a94aa5f4fa85622 Reviewed-on: https://gerrit.libreoffice.org/20258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit d4c22dbb1c9d71bb83c218d339df83e8727e469c) Reviewed-on: https://gerrit.libreoffice.org/20675
2015-12-04tdf#83126: Find All: Don't ignore Search Direction Rows/Col optionJulien Nabet1-1/+1
bAll (ie "Find All") seems a little tricky for GetBackward but not for GetRowDirection method Change-Id: I47d2b378fb493bcdc1ad30902a3a677eedc50789 Reviewed-on: https://gerrit.libreoffice.org/20067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 71f0e4e5e2efee05bccf13698752e84f5059db5f) Reviewed-on: https://gerrit.libreoffice.org/20105 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-12-03Resolves: tdf#95629 quote CSV also if cell contains embedded '\r' CREike Rathke1-2/+3
Change-Id: I37fb62a53338a7edcac1c72153eefcee6096e6f9 (cherry picked from commit 129935443cfd9378e1263489fc4bf47aee1f1a46) Reviewed-on: https://gerrit.libreoffice.org/20340 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-12-03Resolves: tdf#95748 no group interpreter when calculations are runningEike Rathke1-1/+9
(cherry picked from commit d46203b55d92185ab2c1d3ac79761100d26aaee3) Conflicts: sc/source/core/data/formulacell.cxx Change-Id: I17283fc5e39da2d7222c302dd63522df69d0ad96 Reviewed-on: https://gerrit.libreoffice.org/20328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-23tdf#94214 ODFF function FINV incorrectly saved as COM.MICROSOFT.F.INVWinfried Donkers2-2/+2
Reviewed-on: https://gerrit.libreoffice.org/18792 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 5ba0f79e246ea970d16f366640c2ccd87e1d8786) Backported to 5-0 replacing the interim forward compatibility of 4a33435137e4d9fb7a85c527a37edc6780170d9a Change-Id: Ic053342fde436a7053c15e32683e09b9e91f5308 Signed-off-by: Eike Rathke <erack@redhat.com>
2015-11-20Resolves: tdf#95670 propagate ForceArray per parameterEike Rathke5-3/+15
Regression of b5cd11b4b02a85a83db77ba9d8d1763f0cd88cb1 It was always wrong to propagate ForceArray already if a function had a ForceArray parameter *somewhere*, we need to do this per parameter instead. (cherry picked from commit 49257e1da7e371fdea0fac080116b0511789cac7) Conflicts: formula/source/core/api/FormulaCompiler.cxx prevent ForceArray propagation on the same token, tdf#95670 follow-up This may happen if the last RPN token is put and the function has a ForceArray parameter but now again would be wrong if not all parameters are ForceArray. (cherry picked from commit b31b17e52b2b2b94999d68c4b2ed5c74ee7eed0a) 890fb6b5b88337033cfcf2e8189371ee39461205 -Werror,-Winconsistent-missing-override (cherry picked from commit 6edc492efd6fe2de15c1ae306b400ca054772ad1) Backported to SAL_OVERRIDE 3bb2764b625d44f6e0cecbdde3363440faef63b5 Change-Id: If188d45366279d9a7bf641edc7e4dd7095d6d035 Reviewed-on: https://gerrit.libreoffice.org/19993 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-11-20Resolves: tdf#89907 do not modify original ScViewData's ScMarkDataEike Rathke1-12/+12
Change-Id: I2ae5a06f9ffe29de0b1cc5875615010da75f4ae9 (cherry picked from commit d1225d60af08ed874ed72066ae0320617d4c8a91) Reviewed-on: https://gerrit.libreoffice.org/20020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-11-16tdf#92256: Don't save CONV_UNSPECIFIED string ref syntax valueKatarina Behrens3-9/+51
The following scenario is how it breaks: 1. user has ExcelA1 as her formula syntax setting, CONV_UNSPECIFIED (that means "same as formula syntax") as her string ref syntax setting 2. she saves the document, it will now contain CONV_UNSPECIFIED value 3. someone else with CalcA1 formula syntax setting opens the document ... since it contains CONV_UNSPECIFIED "same as formula syntax" value, it will use his CalcA1 formula syntax value to evaluate INDIRECT func => #REF! Avoid this by reading formula syntax/grammar value, mapping it to matching string ref syntax and saving that instead of CONV_UNSPECIFIED Change-Id: Ide62d81e6b70c2e9f2ff79648935788107475778 Reviewed-on: https://gerrit.libreoffice.org/19610 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/19983 Tested-by: Jenkins <ci@libreoffice.org>
2015-11-03read past end of pCellInfoCaolán McNamara2-1/+4
Change-Id: Ic024f8dd3aaf368877f5914c6106164508760da8 Reviewed-on: https://gerrit.libreoffice.org/19752 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 5ae015fc74330ac4c24b67370c59518084f1d201) Reviewed-on: https://gerrit.libreoffice.org/19755
2015-11-02tdf#92207 sc: Make the text background color button workMaxim Monastirsky4-0/+4
Change-Id: I687a58e17ce30ced101c4585884106cff9b6292b (cherry picked from commit 63e1369529838728d2878afc03bf9bb9cedb59d5) Reviewed-on: https://gerrit.libreoffice.org/19737 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-11-02Resolves: tdf#95395 force range reference to array only in array formula, ↵Eike Rathke1-1/+7
also tdf#95419 ... and not already if the function has a (ReferenceOr)ForceArray type parameter somewhere else in the parameter list. Regression triggered by commit 01eea7fe40c939311bf1920b6e8b4391a93c2e82 for MATCH, HLOOKUP and VLOOKUP first parameter, but behavior already present since OOo for LOOKUP; FORECAST in its first parameter, PROB, LINEST, LOGEST and TTEST in the last two parameters. Change-Id: I4a30ea3362f86274a048b0e3f47fa12da3001a3a (cherry picked from commit b5cd11b4b02a85a83db77ba9d8d1763f0cd88cb1) Reviewed-on: https://gerrit.libreoffice.org/19659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-10-30WaE: variable set but not used, in NDEBUG buildTor Lillqvist1-0/+3
Change-Id: I9c88c1a43228a98a355d8ba17b0a06de0c5418c4 (cherry picked from commit c58533fe4ada618eb6121d27362f7f540f26c3c0) Signed-off-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/19700
2015-10-26tdf#94485 Lower Calc background spellchecker prioJan-Marek Glogowski1-1/+1
The Calc spell checker idle handler is currently running in the REPAINT / MEDIUM priority class - much too high. This races with the Calc GUI repaint for large documents, like the one attached to tdf#94485. So move it to the LOWER priority queue, to fix the lagging GUI. Change-Id: I6e4b05dd1a977182ec13f7e3a05f0722f502f226 (cherry picked from commit 0db68ef9ca624cd0bda45c35c24a9abe106faf57) Reviewed-on: https://gerrit.libreoffice.org/19556 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-24tdf#95220: Check if DrawingLayer is not nullptrMike Kaganski1-1/+1
bool ScDocShell::isTiledRendering() const crashed without this check Change-Id: Idb7ace05eb1aa37cbc3d956503c046b0e9b9d0e5 Reviewed-on: https://gerrit.libreoffice.org/19570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 4fc31c1569ba1dc0e2e3aaf9eb8f0747776daa04) Reviewed-on: https://gerrit.libreoffice.org/19579
2015-10-24tdf#32834 : improve the precision of MDETERM calculationDennis Francis1-4/+5
MDETERM uses lcl_LUP_decompose() which as the name suggests does LUP decomposition. This patch allows additive cancellations to occur in a cleaner way while doing the *only* additive operation in LUP decomposition, that is while computing Shur complement. This patch does not change the high level semantics of the algorithm. Also note that this change makes improvement only in the case where matrix elements entered by the user are *integers*. The change allows MDETERM to evaluate to exact 0.0 for singular integer matrices. The steps to calculate Shur complement are : for i = k+1 to n aik = aik / akk; for j = k+1 to n aij = aij - akj*aik This is now modified as : for i = k+1 to n for j = k+1 to n aij = ( aij*akk - akj*aik ) / akk Without this change MDETERM() for certain singular matrices used to evaluate to a tiny non zero value, which also caused MINVERSE() to generate a wrong output. An example of such a matrix is : 1 2 3 4 5 6 7 8 9 Change-Id: Idd4211ddceab1b758fd05bfd57f7eecd5d4fd1a0 Reviewed-on: https://gerrit.libreoffice.org/19534 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit e1e73a97b20af862f2fb914cb16a4f74c3ad31cb) Reviewed-on: https://gerrit.libreoffice.org/19578
2015-10-22Resolves: tdf#91453 use configuration of text to number conversionEike Rathke6-282/+444
... also in arithmetic matrix operations. (combination of 4 commits): move ConvertStringToValue() implementation from ScInterpreter to ScGlobal In preparation of matrix calculations to use string conversion configuration and UI markers for cells containing strings that could be numeric values. Change-Id: Ifa9e45853dded249fa741c050ae1f106365f99ea (cherry picked from commit 329496c1f75f97d2e6119ceb214a2ea1fbadb17a) add half decoupled ScInterpreter::ConvertStringToValue() ... for back calls of ScMatrix in preparation of tdf#91453 Change-Id: Ife94d1675c1bc7c5611586e3f352ff69264469d7 (cherry picked from commit 6516d5e299bdf0e7aa03d1004763f6d10db48546) Resolves: tdf#91453 use configuration of text to number conversion ... also in arithmetic matrix operations. Change-Id: Ia00054d0af383e225d9d40b59da2dc28a817b65a (cherry picked from commit 466a20ef07f36d50a73a18ab119b3cc18b4babf4) Resolves: tdf#91453 use configuration of text to number conversion ... also in arithmetic matrix operations if both operands are matrix. Change-Id: I84609656b166b4e059d9496a5ed732a96e731164 (cherry picked from commit 778d03b59c62d21fd171b81c9fab3ba8496e319d) Reviewed-on: https://gerrit.libreoffice.org/19172 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-10-22Resolves: tdf#95226 fix broken IFERROR/IFNA array logicEike Rathke1-2/+3
Change-Id: I059248659f51746cfc1d06faeaadaf3d645c03d3 (cherry picked from commit 968e2faff6d4283dacd9010d31cb4c0df45eb7c5) Reviewed-on: https://gerrit.libreoffice.org/19519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-19tdf#94908 : Autofilter ok button is blockedDennis Francis1-0/+3
Reviewed-on: https://gerrit.libreoffice.org/19375 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit f34ac236b9ed96f5c9158f1d833afefadbdb9395) Conflicts: sc/source/ui/cctrl/checklistmenu.cxx Change-Id: I0a1ad60cb6eea26899604641f981642943b06347 Reviewed-on: https://gerrit.libreoffice.org/19452 Reviewed-by: Dennis Francis <dennisfrancis.in@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-19WaE: variable set but not used, in NDEBUG buildTor Lillqvist1-8/+8
Seems that people prefer this to be CPPUNIT_ASSERT() instead of assert(). My first thinking was that there is a slight difference in meaning; that assert() checks that the code (or, in this case, data) in the test *itself* is as expected while CPPUNIT_ASSERT() checks that the functionality *somewhere else* works as expected. But whatever. Change-Id: I93f7f8cf2b3aac9e8fc35baf2dcbad1a4003773f
2015-10-16tdf#94924: Add a more systematic OpenCL unit testTor Lillqvist2-0/+94
Avoid the horrible convention of hard-coding in a C++ unit test code addresses of data in the spreadsheet document being tested. Instead, mark the expected (= as calculated by Excel) and calculated (by LibreOffice) formula results, rectangular blocks of data, so that the C++ code can easily find it, and then compare. This is much more flexible. No need to edit hardoded row and column numbers in the C++ code when adding more test data. The systematic.xls file has documentation on how to maintain it. Change-Id: I4fb088fe21831dd3b3213d21916460a708aa0842 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-16tdf#94924: Return correct result 0 from OpenCL MIN and MAX when all args emptyTor Lillqvist1-5/+24
Used the same style as existing code, added a new virtual isMinOrMax() and add some special casing in Reduction::GenSlidingWindowFunction(), and fsim_count() and fmax_count() functions that count how many non-NaN numbers we actually see. As such, I am not sure at all that this is an ideal way to do this, but will have to do for now. Change-Id: I846a8d24f4563f8fae1a45971a4ce202ed918487 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-16tdf#94924: Return correct #DIV/0! error from AVERAGE in the OpenCL caseTor Lillqvist1-1/+5
Change-Id: If7326fd1242d90ff92e62d141714960476198605 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-16tdf#94924: Fix handling of empty cells in OpenCL divisionTor Lillqvist1-8/+4
Not sure why the code from f5e7207053b857b6903a0ab9c161bed9ad7bcee9 did not produce correct results any longer. Anyway, now OpenCL division works right in case of empty or zero cells. Clearly I need to add unit tests to make sure this stuff keeps working. In later commits. Change-Id: I93b787ad5da453af1601768308fb614a332ed142 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-16tdf#94924: Fix handling of empty cells in OpenCL subtractionTor Lillqvist1-14/+2
We get correct result by simplifying the code;) No need to have the outer "if (gid0 < X)" test around the calculation code generated by Reduction::GenSlidingWindowFunction(). The lhs and rhs check the gid0 range themselves and that leads to the desired result for subtraction. While fixing this I noticed that the handling of empty cells in division is also wrong. Will fix in another commit. Change-Id: Ia45bd81e692a17b0453cc79cd4673a00e119562a Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-15tdf#93318 reintroduce first/last button in Calc tab barTomaž Vajngerl1-2/+2
Seems that first/last button are still useful when there are a lot of tabs. Using ctrl+click is not discoverable enough for the users so for now bring the buttons back. Also turn on enabling/disabling buttons when they have some effect (this was turned off for Calc for unknown reasons). Change-Id: I6bbb04d44066ebc6b89fe3d941ecafdbb378284a (cherry picked from commit b6fe593c8a60cc689e1bbb4d92d7cad89785be0d) Reviewed-on: https://gerrit.libreoffice.org/19380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-10-15tdf#93044 - fix silly calc copy/paste lifecycle issue.Michael Meeks1-1/+1
Change-Id: Ic3d26f45251ff27bacd572f0cb7a7aadf091e808 Reviewed-on: https://gerrit.libreoffice.org/19386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-10-14tdf#91097 Substitute rectangle and ellipse uno commandsYousuf Philips1-2/+0
(cherry picked from commit 3080e4c09b7c4894d4f0f52c9beed4298f3fd23f) (cherry picked from commit fedf965c51a9f57e5cde203a3d15a6c244558002) (cherry picked from commit 4c2339d8177d610cc23619e787c1517ce8e8afd7) (cherry picked from commit 1bc911eca173131fdc6e7e3889d128fa03adbf72) Conflicts: framework/source/uielement/menubarmanager.cxx sc/uiconfig/scalc/menubar/menubar.xml sd/uiconfig/simpress/menubar/menubar.xml sw/uiconfig/swriter/menubar/menubar.xml Change-Id: Ib6578ddd7897d9c5d63b5dc8d8465f6107cc24a6 Reviewed-on: https://gerrit.libreoffice.org/19345 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-14Resolves: tdf#94514 more restrictive check on end of column specifierEike Rathke1-1/+1
... needed since we accept A:A entire column notation without the need of a row number being specified. Change-Id: I84f6a39e213a4b554e0188e73b4acb34c7a98460 (cherry picked from commit 14bb562b4a8776974391641adcc62ded013ffd2f) Reviewed-on: https://gerrit.libreoffice.org/19359 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-10-12tdf#93688: Set CalcA1|ExcelA1 syntax only for imported docsKatarina Behrens8-7/+95
those whose string ref syntax is unknown or can't be guessed i.e. don't use it for new documents (prefer user settings in that case) Conflicts: sc/qa/unit/subsequent_export-test.cxx Change-Id: I1355031cdd63e2a5c50064531011be71ae7f7b8f Reviewed-on: https://gerrit.libreoffice.org/19244 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-12crashtestig: infinite recurse in ooo32833-1.sxcCaolán McNamara1-1/+4
integralPhi is called with nan(0xfffff000001f6) which recurses through rtl_math_erfc->rtl_math_erf->rtl_math_erfc until we run out of stack Change-Id: Iab8a22fb23686d22d151f2508dbeb44ab47a76b7 (cherry picked from commit d2a07cd3214af27c5af601992e3c4a1a6e3b3dad) Reviewed-on: https://gerrit.libreoffice.org/19282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-09crashtesting: ooo95537-1.xls fails with a fAnz that is nanCaolán McNamara1-5/+5
so it happily passes the pre-cast string bounds check and blows up in the post-cast string access Change-Id: Ifd4d087b37e8a84d886e2f7833dfc773b8bf1343 (cherry picked from commit 5d826db15beaff4f0930724431d34f7103111591) Reviewed-on: https://gerrit.libreoffice.org/19280 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>