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
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
... and not on the result vector if that isn't included.
Actually implements a TODO introduced with
c008dc483f8c6840803983e7e351cec6fdd32070
Change-Id: Ic6c7ae70651aca21f22f10f76f94eb8690536bef
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
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
With this, both ScColumn and ScMatrix store svl::SharedString as their
string values, instead of OUString.
Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
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
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
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
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
The old style cell storage is no more. Currently the code is buildable,
but crashes during unit test.
Change-Id: Ie688e22e95c7fb02b9e97b23df0fc1883a97945f