Commit Graph

183 Commits

Author SHA1 Message Date
08e3e6c223 fdo#73148 add options to Calc function AGGREGATE
matrix-ranges not supported

Change-Id: I902c78da6d9c7a4a5f8c5e4a7e1678b69d49a6fe
Reviewed-on: https://gerrit.libreoffice.org/9449
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-07-08 10:23:03 +00:00
9a741fcad4 loplugin:unreffun: also warn about unused function templates
Change-Id: I4a6280f47ca3c4a77b4e42fe05d79ded7fc30ef1
2014-06-27 07:51:51 +02:00
37e6631cc5 remove whitespace
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-06-25 05:41:10 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
8f36da2614 coverity#707994 Uninitialized scalar field
Change-Id: I295cbb23529f614c35f39c756c555dd9eabe8623
2014-05-23 14:16:06 +01:00
2bac61013e fix-includes.pl: sc
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-05-11 01:55:39 +02:00
4beb6136bd coverity#707994 Uninitialized scalar field
Change-Id: I65c96e12bb75cc7ee7db9643be2c385891f80c75
2014-05-10 21:13:01 +01:00
5090939e27 coverity#707996 Uninitialized scalar field
Change-Id: Id7027b2e511729e5d70c628e75545dc307e429a5
2014-05-10 21:13:01 +01:00
75f5d9d214 typo: postion -> position 2014-04-14 12:32:40 +02:00
c4c51709ea whitespace cleanup in sc
Change-Id: Id1dcadcac179c52977e48a6912ce4d5fd542f60c
2014-04-06 17:19:54 +02:00
6f3545833e coverity#738789 Uninitialized pointer field
Change-Id: I990e8ba0e2b8ad2a43a33343ac832e42777e28cb
2014-04-02 15:51:44 +01:00
a8c9edffd4 coverity#707994 Uninitialized pointer field
Change-Id: I667f93be72bd5d6cc68725b7cb5d97e30d8df521
2014-03-19 15:37:58 +00:00
c078d5fef9 fdo#75642: Check the high position block correctly.
Change-Id: I25deabf69e78c6e0354e8a528ab88891a30f9aec
2014-03-13 10:24:39 -04:00
f88e69b52c coverity#707995 Uninitialized scalar field
Change-Id: Idef908843df92bad5283d36c3412090dd3b7c709
2014-03-09 19:17:31 +00:00
0e3dfb6586 coverity#707996 Uninitialized scalar field
Change-Id: I793e8753b941af768544d8082e8946f56122b54c
2014-03-09 19:17:30 +00:00
84862db95a Remove visual noise from sc
Conflicts:
	sc/source/ui/inc/docfunc.hxx

Change-Id: I9314437ed3dd60e84d28c08ac0a2d1ed7bd1daf8
Reviewed-on: https://gerrit.libreoffice.org/8301
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-03 11:04:44 -06:00
d0edd3dc7d remove unused code in ScCellIterator
Specifically:
  ScCellIterator::getValue()
  ScCellIterator::hasNumeric() const

Change-Id: If15c627789576772bb220ece0b9dd143b1374a1b
2014-02-27 10:27:34 +02:00
297c4d4021 remove unused code ScDBQueryDataIterator::DataAccessInternal::setPos
Change-Id: If59f5b99a792ff5eafc0e027a84ca07b89a86c81
2014-02-27 10:27:32 +02:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
6124183d7b WaE: private fields 'mnStartRow' and 'mnEndRow' are not used
Change-Id: I067ad401608552df45275d0cbb73e486e93461ba
2014-02-14 08:40:23 +02:00
377d749ff8 fdo#74558: Re-implement BinarySearch() to disregard empty cell blocks.
The old code before the calc core refactoring took advantage of the old
calc storage which did not store empty cells at all.  The new storage does
"store" empty cell blocks, and it did negatively affect the binary search
used for VLOOKUP.  The revised binary search code properly skips empty cell
blocks so that it will work more like the old algorithm in 4.1.

This change also fixes fdo#72348, which was caused by the same root cause.

Change-Id: Ic20cc54d8dae26b62f5e9193cd21dad06ad10a3e
2014-02-13 20:36:32 -05:00
738bd2cfd4 fdo#74507: Ensure that we have non-null pointer to ScColumn.
Else it would cause a null pointer dereferencing when "precision as shown"
option is set.

Change-Id: Ie8d2fdb916b575fff7e0217c45c18a2c799577cb
2014-02-07 12:00:39 -05:00
f74c0a42b0 Add RowHeightContext to stuff all parameters for SetOptimalHeights().
To help reduce the number of function arguments.

Change-Id: Ic29fff38f6cd844bdaac8ac4b440dfcaba55df61
2014-02-01 20:53:13 -05:00
f268b04b56 WaE: unused function 'advanceNonEmptyBlock'
Change-Id: I38b91f9e02c1addd8a0ef427b7b09cdf1a04ee95
2014-01-14 18:01:25 +02:00
bbdb7b43e6 sc: re-work ScHorizontalCellIterator to try to improve performance.
Add more unit tests, reduce the number of rows that we know are empty
that we iterate over while saving by shrinking the column set that
we scan as we go along.

Change-Id: Iebd817d9a8a01fa6abeaa24c4aace92233313e0f
2014-01-14 15:52:14 +00:00
a7d6e1f3eb resolved fdo#72949 evaluate criteria on the query range
... and not on the result vector if that isn't included.
Actually implements a TODO introduced with
c008dc483f8c6840803983e7e351cec6fdd32070

Change-Id: Ic6c7ae70651aca21f22f10f76f94eb8690536bef
2014-01-03 23:29:34 +01:00
6046207ea2 resolved fdo#73113 not string cell does not mean no string at cell
Introduced with c008dc483f8c6840803983e7e351cec6fdd32070 the
ScQueryCellIterator::BinarySearch() evaluated all non-string cells as
not being string, ignoring edit cells and formula cell string results.

Change-Id: I43be46dc8db35d6d0677086c345379ed4627b355
2014-01-02 20:57:03 +01:00
f070147085 resolved fdo#71589 reimplemented horizontal range lookup
Regression introduced with ebdd9c300718bce454ef56a31d5d8fb699fc1822
(first eaea417bfdf8d06df2b7f2e42c904c32ce77e871) that removed the
bMixedComparison member from ScQueryParam under the false assumption
that is was only used to emulate a legacy Excel behavior. In fact it was
also needed to do the at least horizontal range lookup in sorted mixed
data, though didn't evaluate exactly the same conditions as Excel and
defined in ODFF.

Reimplemented a similar behavior for the new code structures but this
time also checking for the additional condtion that a query ByString
does not return the last numeric result and vice versa, which previously
was missing.

Change-Id: I46061777879ba5301bfcaca2d50cf87a994f93f2
2013-11-28 00:15:41 +01:00
603b62c618 -Werror,-Wunused-function
Change-Id: I27d1bd3f4a94ba6951e5082509980f45cf48650c
2013-10-11 18:26:00 +02:00
7333881bb7 Formula tokens, formula cells and formula interpreters to use shared strings.
Change-Id: I5da99869fc7f61ce698180fa5daa9be9db9ac132
2013-10-11 12:14:27 -04:00
6255be7ca2 GetString() from ScMatrix to return SharedString.
And adjust all its call sites.

Change-Id: Ibb0c754e8fa105bd1a6035f2e0df5cee2d8491c4
2013-10-11 12:14:26 -04:00
a11e224e07 Store svl::SharedString in query entry items, and adjust all call sites.
Change-Id: Ifd3bbb84c7abbe983a017a169c7e05914ef33450
2013-10-11 12:14:24 -04:00
658fc68d57 Store svl::SharedString in document cell storage instead of OUString.
With this, both ScColumn and ScMatrix store svl::SharedString as their
string values, instead of OUString.

Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
2013-10-08 15:48:10 -04:00
c86b1a5c35 Change so that we won't have to include mtvelements.hxx in cellvalue.hxx.
Because mtvelements.hxx is very slow to parse by the compiler, and
cellvalue.hxx is included everywhere. Hopefully this will speed up the
compilation time of sc...

Change-Id: Ic9a9b8483c8325e4a91021f071f2391db8b57806
2013-09-12 21:18:02 -04:00
a50fe4298d These pieces of code are no longer needed.
Change-Id: I93a4abc84856a43d9d3a27ebadf111e589c62604
2013-09-01 14:48:49 -04:00
1ecdc7aaf6 resolved fdo#67249 use ScFieldEditEngine to resolve field content
ScEditUtil::GetString() iterated over the paragraphs of an
EditTextObject where GetText() does not resolve field content but
returns the embedded field markers. To resolve field content an
ScFieldEditEngine is needed.

This makes it necessary to pass an ScDocument* to obtain the
ScFieldEditEngine from, or for cases where there is no ScDocument in the
context use a static ScFieldEditEngine which unfortunately is not
capable of resolving document specific fields of course, such as
DOCINFO_TITLE and TABLE.

Also added unit test.

Change-Id: Ife3c23b2fec2514b32303239d276c49869786eb5
2013-07-25 16:11:09 +02:00
ed76237e41 Reduce dependency on the matrix header.
Change-Id: Iade09d108aec78f8cbe92f9103f206d0c99fab8e
2013-07-01 18:55:53 -04:00
18cd17813e Move a common if statement into the function.
Change-Id: Ic13c9e7bdfea97c4f7782181dc70d6965ba0b6b9
2013-06-27 15:47:54 -04:00
f5357308c4 Avoid redundant if branches.
Instead of calling GetErrCode(), IsValue() and GetValue() individually,
do it all at once. This alone cuts about 12 seconds off in the calculation
involving a large spreadsheet document.

Change-Id: Iee94ca9dae00a2c33c0306cdf41bd7832e7ecd03
2013-06-27 15:47:53 -04:00
f9704bf73d The horizontal cell iterator was *still* broken. Let's fix it again.
And add a test for it.

Change-Id: If76a67e02ac6ad5199d664850bd8591bd3032f32
2013-06-25 11:08:52 -04:00
a31cea1be6 WaE: implicit conversion of NULL constant to 'bool'
Change-Id: I1cbfa318e75ac5c86c0c7d2dbc033601fec3d46c
2013-06-25 07:17:05 +03:00
2c92a92e2f Prevent crash during on-line spell checking.
The new ScHorizontalCellIterator internally uses iterators for each
column to track positions. This means that, if a cell value in the iteration
range chnages while the iteration is on-going, those internal iterators
get invalidated. Allow the client code to rehash the iterators when modifying
a cell content during iteration.

Having said that, it's best not to modify cells during iteration.

Change-Id: Ida453d4f883e1fbcbab4eb0401e37fea8c0b901d
2013-06-24 16:51:41 -04:00
8a39b8ce35 Turns out ScHorizontalIterator was still broken. Fix it for real.
And a unit test to accompany the fix.

Change-Id: I41e9451049d3c6ab7b3fd7904bcef3675979884c
2013-06-24 16:51:38 -04:00
2a1c5aba76 Fix ScCellIterator, which also fixes matrix handling in the formula engine.
This one alone fixes 2 unit test failures.

Change-Id: I3392f4567888447d867ed29f7ecda2474fae1547
2013-06-24 16:51:37 -04:00
e3b9168759 Fix the horizontal cell iterator.
I got its logic totally wrong. Now it works.

Change-Id: I79e556da19c7c0b0d8cecbb4875d6d21d5ec4208
2013-06-24 16:51:36 -04:00
3b0c069c9a Don't forget to return true if we are successful.
Else we'd never get out of this inifite loop....

Change-Id: I96e072eb79cce77302b27cad42da31f9a66c3401
2013-06-24 16:51:34 -04:00
1fe76b4017 Don't bail out on good condition.
It's a good thing to have found a table to work on.

Change-Id: I9b42ebb20041756b6086490dac4264d17369f83f
2013-06-24 16:51:29 -04:00
dabeb3d643 Move ScEditDataArray out of cell.?xx and into its own files.
Change-Id: I107cec7d70f4d00ff52cb071d69a615fbab8d9f2
2013-06-24 16:51:26 -04:00
c008dc483f Switch to using multi_type_vector for cell storage.
The old style cell storage is no more.  Currently the code is buildable,
but crashes during unit test.

Change-Id: Ie688e22e95c7fb02b9e97b23df0fc1883a97945f
2013-06-24 16:51:25 -04:00
267f7a630b preparations for inherited number format removal
Without inherited number format these calls are unnecessary.

Change-Id: I359cb217eb32d98df29bb6d2c0fbb14367e30425
2013-06-02 03:24:56 +02:00