summaryrefslogtreecommitdiff
path: root/sc/inc/scmatrix.hxx
AgeCommit message (Collapse)Author
2016-06-15introduce ScMatrix::GetDoubleWithStringConversion() preparing for tdf#100409Eike Rathke
... as GetDouble() returns 0.0 for any string and we don't want to change that, most relevant places already check for numeric/text beforehand. Change-Id: Ifbc04e892f6f504040026042faa38674ced880fb
2016-05-04Replace namespace ScErrorCodes with formula...Kohei Yoshida
and remove that 'using namespace' statement in the header... Change-Id: I2f994af5088ce6d1ffe92c8d36285a4f6fdd2248 Reviewed-on: https://gerrit.libreoffice.org/24628 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-04-16fix last mdds perf problem in MatConcat, tdf#88849Markus Mohrhard
Change-Id: Idf00ff11e1aa4a3439e17938570385ee3b25726c Reviewed-on: https://gerrit.libreoffice.org/24125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-14loplugin:passstuffbyref in scNoel Grandin
Change-Id: I75c483972db787ea9c941eaac0df023f1929b09c
2016-03-23better use mdds in matrix concat, tdf#88849Markus Mohrhard
Change-Id: I6155b86d0afbefafdf982962ffd0216334834379 Reviewed-on: https://gerrit.libreoffice.org/23425 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-07Resolves: tdf#98389 check memory requirement of matrixEike Rathke
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. Change-Id: I35f67b48e665bf1cc8d672325c32b889f2e05c57
2016-03-02Resolves: tdf#98297 exclude error values from COUNT in array/matrixEike Rathke
Change-Id: I202dcc2a2b90ee8ed27815b97a2aad6e4df2f1b9
2016-02-18fix DEBUG_MATRIX buildMarkus Mohrhard
Change-Id: Iefffba765ff3e651fa0f6d4067ab3a335ec187c0 Reviewed-on: https://gerrit.libreoffice.org/22456 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-16-Werror,-Winconsistent-missing-overrideStephan Bergmann
Change-Id: I93690dcfefbda9f642b8bbe55b9e2f4f348d446d
2016-02-16single element access is really slow in mdds, tdf#67071Markus Mohrhard
Change-Id: I5491ba0bc44a9ce8844b31126835671c5d5abcaa Reviewed-on: https://gerrit.libreoffice.org/22386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-12-01sc interpreter: Move the code that can create a ScFullMatrix.Jan Holesovsky
For the operations that we haven't implemented directly in ScVectorRefMatrix yet, create the ScFullMatrix the same way as we used to do before, and call the appropriate method of ScFullMatrix. This commit only moves the code, does not turn the 'throw std::runtime_exception' into actually using the new ensureFullMatrix(). Change-Id: I336a4ddf07b0b60a5a41036e19c70a44ba575834
2015-11-24sc: Implement ScVectorRefMatrix.Jan Holesovsky
This is a ScMatrix implementation that operates directly on formula::DoubleVectorRefToken, saving tremendous amount of copying data back and forth. Change-Id: I027e6cb668ef40eb474773a0ce8d0eeefc1ab71c
2015-11-24sc: Introduce Abstract Base Class for ScMatrix, for a future rework.Jan Holesovsky
We want to introduce another type of ScMatrix that will directly contain DoubleVectorRefToken and operate on that. The idea is that it is pointless to construct a ScMatrix via lots of copying around, when we already have a nice array of doubles. Change-Id: I3e5d7b9e2e0f9b9bf350336a8582cfd852586b3f
2015-11-18use unique_ptr for pImpl in sc/Noel Grandin
Change-Id: I2516c83f8dfca1f1217be7dcb2a28f5dcd2f704e
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-11-06drop unneeded includeDavid Tardon
Change-Id: I0b4492d2db48f015d13be8472bf282b4554a2a4c
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-02Add ScMatrix method to collect multiple valuesŁukasz Hryniuk
Change-Id: I09b9b1bc62b084824dc0eaffd6ee500de11781fd Reviewed-on: https://gerrit.libreoffice.org/17594 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-10-02Add WalkElementBlocksMultipleValues and remove OpsŁukasz Hryniuk
WalkElementBlocksMultipleValues class is able to collect a few values at once. scmatrix.cxx were moved to matrixoperators.cxx Change-Id: Id069f89a58cce046fb3d4ddf6f49db0452bdfb36 Reviewed-on: https://gerrit.libreoffice.org/17593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-09-30Fix typosAndrea Gelmini
Change-Id: Ia41f4f0ca30ae3346d0720271478ec5bcdab797b Reviewed-on: https://gerrit.libreoffice.org/18967 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-07-22loplugin:unusedmethods scripting,scNoel Grandin
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7 Reviewed-on: https://gerrit.libreoffice.org/17263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-02use error value instead of string in array/matrix, tdf#89387 tdf#42481 relatedEike Rathke
Hopefully tdf#90391 will be solved, else we'll have to revert all MatOp work and do this change on the previous code. Change-Id: I4789ccf389558f3687d90c600a4f1a27c24a20d9
2015-03-31Revert "tdf#89387 Add functor for ScAmpersand"Eike Rathke
This reverts commit 9a7959cd63be7b2f36da8af25e7673a525c4d66c. It is not an equivalent replacement for the existing functionality, i.e. it lacks the number to string conversion done through SvNumberFormatter and instead of concatenating a numeric element produces an error value element.
2015-03-25tdf#89387 Add functor for ScAmpersandŁukasz Hryniuk
Change-Id: If89073cc6b21aad0f04f79e934aa2d646a057333 Reviewed-on: https://gerrit.libreoffice.org/14873 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-03-09tdf#89387 General functor and basic operationsŁukasz Hryniuk
Add a functor MatOp and ScMatrix methods for scalar-matrix operations, both unary and binary. It can be used for operations which modify each element for the matrix (in constrast to accumulating ones, like ScGCD or ScAmpersand). Split method for addition and substraction into two methods for consistency and simplicity. Change-Id: Ic040233429ee120ac325d7baf31a70bba232041d Reviewed-on: https://gerrit.libreoffice.org/14749 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-11add ScMatrix::IsEmptyResult() for tdf#39316 fix preparationEike Rathke
Change-Id: I9f2a3e6fa9f4ef43df672661afef996269b90a7a
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: Ieeca9fe957e7bc6a4cf9d7d6ac57f9ed150aab78
2014-12-22fdo#85258 differentiate between empty cell and empty result in matrixEike Rathke
Change-Id: I79259224e411f9c1a6e852623d9d49cf89a03c27
2014-12-22improve performance of some matrix operations, related fdo#83187Markus Mohrhard
Change-Id: I0e6816a7f0d2dc051dff6a462724cb4a3c155289
2014-12-11resolved fdo#87237 propagate error values through matrix comparisonsEike Rathke
Apparently introduced with 8e8b43a03e77dd251876c1de0ac06eeeb09192cd the comparison results were stored as boolean values, effectively discarding any infinite double values and error values encoded as NaN values. Change-Id: I1fb6f46894a0bee02a37e28b7e6cc84f8c051f28
2014-05-11fix-includes.pl: scThomas Arnhold
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
2014-02-14sal_Bool->boolNoel Grandin
Change-Id: If999fe4c29c3948ed60b482930cf6e0f5b1c0ede
2014-01-08resolved fdo#72929 buffer jump matrix' result matrix blocksEike Rathke
2013-12-04resolved fdo#72288 made case insensitive matrix string query work againEike Rathke
The SharedString stored at ScQueryEntry::Item was constructed from an OUString passed from ScMatrixValue::GetString() so rItem.maString.getDataIgnoreCase() in QueryEvaluator::compareByString() was NULL and never evaluated equal. Made ScMatrixValue::GetString() return a SharedString instead. Change-Id: I473d5724dfb97707fea58e6b72b1396c049b79c8
2013-10-19Construct and initialize result matrix in one step.Kohei Yoshida
It's faster this way, than first constructing it then populating it in two separate steps. Change-Id: I61d30ed33a63dcf4c89b18d80ae4c3217cc43015
2013-10-19Generate boolean comparison result array in one step.Kohei Yoshida
This is faster than doing it in two steps as was previously done. Change-Id: I1417e9c6add9d20ee8d68f0c1c91c7d24a0f79b3
2013-10-18Remove all uses of Pos and ConstPos. They are slow.Kohei Yoshida
Change-Id: I27f68e67eebfd1ce4be29b24147e5586c8f9f85e
2013-10-18Slightly optimize matrix value traversal.Kohei Yoshida
Change-Id: Idbcb2348ff7f4a5df32d66761849e3a92b4eb794
2013-10-18Faster way to add two result matrices.Kohei Yoshida
Change-Id: I347aec7de10a943d7f91c468cd6e393f980e53b6
2013-10-18Move the compare-matrix code to ScMatrix, for much faster execution.Kohei Yoshida
Change-Id: I3c4f255469b48cfd6f132503ff695e347d8ae912
2013-10-18Initial attempt to speed up matrix comparison.Kohei Yoshida
And move the value compare code to somewhere public. I'll be using it from the ScMatrix internal. This change requires mdds 0.9.1 which is yet to be released. Change-Id: I942133c85b614b3404006fa38af111ace9361fd4
2013-10-11GetString() from ScMatrix to return SharedString.Kohei Yoshida
And adjust all its call sites. Change-Id: Ibb0c754e8fa105bd1a6035f2e0df5cee2d8491c4
2013-10-08Store svl::SharedString in document cell storage instead of OUString.Kohei Yoshida
With this, both ScColumn and ScMatrix store svl::SharedString as their string values, instead of OUString. Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
2013-08-27matrix: add functions to lookup a double or string in columnsPierre-Eric Pelloux-Prayer
Allows efficient lookup, instead of doing per cell fetch + match. Change-Id: I3cd0d26a8fc91ed38fd339229fc0e948fb849f5e Reviewed-on: https://gerrit.libreoffice.org/5454 Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de> Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
2013-07-09These header inline methods cause linkage error on Windows.Kohei Yoshida
When the whole class / struct is marked SC_DLLPUBLIC. Change-Id: Id420a3ba083c8cdee71a99a282857d6abec55a31
2013-07-01Reduce dependency on the matrix header.Kohei Yoshida
Change-Id: Iade09d108aec78f8cbe92f9103f206d0c99fab8e
2013-07-01Rework SUMPRODUCT to reduce the number of block position lookups.Kohei Yoshida
Change-Id: I22b843142b76df1c51597a8138b1674286f78792
2013-07-01Better to calculate max and min value of matrix *in* the matrix itself.Kohei Yoshida
Change-Id: I410b345ac32550a188aa356e133ef8e0e9b13d9f
2013-06-24Fix ScCellIterator, which also fixes matrix handling in the formula engine.Kohei Yoshida
This one alone fixes 2 unit test failures. Change-Id: I3392f4567888447d867ed29f7ecda2474fae1547