100 Commits
Author SHA1 Message Date
Luboš Luňák 1c53f5b664 introduce ScTable::GetColumnData() (tdf#151182)
This is intended to handle possibly unallocated columns similarly
to CreateColumnIfNotExists(), but unlike that one this one does not
allocate, if the column is not allocated then the default column
data is returned. This is intended for reading of columns.

Change-Id: Ic3b637eb3d16bac69ebc7ecd389973407db4f7fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140737
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-29 16:19:18 +02:00
Luboš Luňák e47e0cb0ad make sure SharedString::EMPTY_STRING is interned in pools (tdf#150647)
Without this, it may not actually be there, so interning "" would
use a different string instance, and then comparing with
SharedString::getEmptyString() would actually compare non-equal.

Change-Id: I22660f63aa321e3a8f72cfb96df1db56e08fbb84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140402
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2022-09-23 11:51:24 +02:00
Luboš Luňák e301b61fd4 reduce excessive code repetition when matching opcode in opencl
I.e. use "ugly" macros to make code more nice.

Change-Id: I053dd2313c140dbc6b25073d67155a1284c6b310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140398
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:07:31 +02:00
Luboš Luňák 1af18947bf drop opencl implementation of MEDIAN()
Input data to this function is not required to be sorted, so implementing
this would mean sorting it in opencl, which is not exactly trivial and
not worth the effort. There also exist algorithms that find the median
without sorting an array, but they work by guessing it and looping until
their guess is right, so again, not worth the trouble. I'd say there's
nothing to be gained here from using opencl.

Change-Id: Ic6d6efdfc59b9058bdae50d07d8039db481dfb75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140397
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:06:57 +02:00
Luboš Luňák e0061a955e remove unused or duplicated opencl helper functions
These mostly exist in "old" and _new variants which are more or less
the same, sometimes there are minor differences. Keep just the _new
ones, everything still seems to work, all tests pass.

Change-Id: I903ea3f11bad6c5e1301febe03974469eb414368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140396
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:06:39 +02:00
Luboš Luňák 78c6e9efa8 fix handling of string arguments in opencl
As one of the code comments said the code used string hashes to represent
strings and this was a broken idea. But the basic idea of that is actually
valid, so just implement that properly and use it only for comparing
strings. See the code comment in opbase.cxx for technical details.

Change-Id: I113d6b4d5e1e78bbe2c05aafc0572605e2595ad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140395
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:06:13 +02:00
Luboš Luňák 87e4520fdb fix and simplify ocInt in opencl
This is what core does, it also extends the range (the casting to int
variant limited to the range of the int, which the core variant doesn't).

Change-Id: Ib93bc57b38c0927f9732742d116d0f40700a0abb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140394
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:01:17 +02:00
Luboš Luňák 799bde0490 make ocTrunc and ocRoundDown the same in opencl
It's that way in core too.

Change-Id: Ic1100ed637a310b8073256b95a261023b32df827
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140373
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:00:51 +02:00
Luboš Luňák 1c1195a09e ocAnd/ocOr are not actually binary operators
They are listed in the SC_OPCODE_START_BIN_OP group, but AND(A1:A30)
is fine.

Change-Id: I397d1f8dc6bff450116dd46b6b1da7ffe447efb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140372
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:00:35 +02:00
Luboš Luňák 9f884bc933 add SAL_INFO about which formula group will be interpreter by opencl
It's actually not said anywhere in the otherwise extensive opencl
debug output.

Change-Id: I978239d045436c05457b1c0e3e00b672889b9279
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140371
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 18:00:16 +02:00
Luboš Luňák af5aaddee5 fix opencl ocMod
Basically copied from core.

Change-Id: Ic46e6ed77d1e75fcd4dfb8c641a8f592d577cab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140370
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 17:59:53 +02:00
Luboš Luňák 43f2cdb3b4 fix incorrect as_double usage in opencl
as_double interprets the binary representation, it is not a cast.

Change-Id: I3034a36b84fbf458b8818af1e2255b532d21d229
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140369
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 17:59:36 +02:00
Luboš Luňák 64426b95bd fix opencl round(), roundup() and rounddown()
These are quite tricky due to rounding errors, the pown() used
to "shift" the decimal point left-right increases the rounding error,
so this must be compensated for. The round adjustment is based
on rtl_math_round(), the up/down variants check for valid 12 places.

Change-Id: I940f11f4e913665a5248463cf826ab5e5dcbe797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140368
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 17:58:57 +02:00
Luboš Luňák 18d2347aea fix opencl ocHypGeomDist
Logic primarily based on e58b3f9876.

Change-Id: Ib5c7912a20d13ee9e841afca9b5c77f2ce43f917
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140367
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 17:58:39 +02:00
Luboš Luňák be36394708 fix opencl RATE()
Simply copy&paste&adjust the core implementation.

Change-Id: Iaba774b6a606d5ed323e2423c1d1261358814ba6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140366
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-22 17:58:12 +02:00
Luboš Luňák bdb576ea88 fix/simplify opencl GEOMEAN()
I don't quite see why this one would need such a special handling,
when most other functions (e.g. the very similar HARMEAN()) can do
with just generic handling.

Change-Id: I31f3772ffdf9540178a42f11ae4e376023ad2413
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140257
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:24:26 +02:00
Luboš Luňák b764e5e053 fix opencl WEIBULL and ZTEST functions
Sync them with their core versions.

Change-Id: I8890b13c0be8ac1da91132ec7e294f542dcc577e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140256
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:24:15 +02:00
Luboš Luňák ebc0db7ace fix and simplify opencl functions that calculate difference from mean
ocVar, ocStDev etc. Besides the copy&paste reductions, these also
need to use fsub_approx() otherwise they can fail with large numbers.

Change-Id: Ic96caaa0d5711d811a27b0e2034db357a71b9fa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140255
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:23:49 +02:00
Luboš Luňák 380b42bd1b fix and enable some disabled opencl functions
Change-Id: Ic7bd01edcc7297317b390567590821ce00e5ef22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140254
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:23:36 +02:00
Luboš Luňák ab561d7437 fix/simplify opencl DDB() and VDB()
Change-Id: I7de072defa1f8a1020c0d974bd519e6d2f604381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140253
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:23:20 +02:00
Luboš Luňák 2e983926e8 various small opencl code fixes and error checking
Change-Id: I9f1d109887faf11a86be83da050983292e99da49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140252
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:23:03 +02:00
Luboš Luňák b79796ced8 fix some opencl financial functions (PMT, IPMT, etc.)
These are mostly copy&paste from ScInterpreter and adapted.

Change-Id: Ib05021556a34b2eb35d0e51673636f50f150732f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140251
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:22:50 +02:00
Luboš Luňák be60dd63f4 remove opencl implementations of ocDB* functions
- These are hard/impossible to implement properly, since they all
use 'SearchCriteria' argument, which is an expression to be matched,
and already strings are hard in opencl and parsing/evaluating/whatever
an expression would be so complex. Maybe number matching or very basic
expressions would be possible, but not much more.
- The opencl implementations of these are (hopefully) very unlikely
to be ever used, since they generally do not make much sense to be used
in formula groups (except if the result is repeated in the group).
As such, simply remove these, as it's just not worth it.

Change-Id: If007c84c1ff684a94cfce0fe171691d9b3578658
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140250
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:22:35 +02:00
Luboš Luňák 33f2422661 rework handling of empty cells in opencl code
Some of the code handling ranges of cells wants empty cells to be zero,
some wants to skip them, and few want special handling. So just make
three generic cases that handle these, which somewhat simplifies this
while still allowing flexibility where needed. Also handle better
Test::testFuncSUMXMY2, which works on a pair of ranges, sets a cell
in one to a value and another is empty, in this case it is necessary
to iterate over this pair with SkipEmpty even if for the second one
it's beyond GetArrayLength().

Change-Id: I6c8edaaadb02ffe2a6a7a9399347909008ea188e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140249
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-21 10:22:16 +02:00
Luboš Luňák 424595a599 fix and simplify openCL *A functions (COUNTA,MINA, etc.)
These work just like their non-A counterparts, they just also accept
strings and treat them as zeros. So instead of having a duplicated
function for everything, use the basic functions, detect that string
arguments should be treated this way and then convert them in the input
data. This as a side-effect also makes
the ScCalcConfig::StringConversion::ZERO part work (no idea if that's
even been used).

Change-Id: I3385b5363c15b0ae45ff191df00ac357e80bd3c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140226
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:54:03 +02:00
Luboš Luňák 68ae079807 reduce opencl copy&paste (gaussinv)
Change-Id: I44e5c74c903bab46a54b5b855f2665d924ac91fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140225
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:53:47 +02:00
Luboš Luňák 7dc92d6016 fix opencl AND() to treat empty cell in svSingleVectorRef as core does
Functions_Excel_2016.fods incorrectly used "=AND(Sheet2.C22;C33)"
instead of the correct "=AND(Sheet2.C22:C33)" (colon vs semicolon),
and C33 is an empty cell. The return however was true because empty
cells get special treatment because of Excel compatibility.

Change-Id: I6d0b28280059fd6fc945e77c7b5d714b5e4727a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140224
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:53:32 +02:00
Luboš Luňák 7c86dd5819 fix opencl FTEST()
Change-Id: I72a6e7e36a8514c1d3c824a70829ebf026659262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140223
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:53:19 +02:00
Luboš Luňák b2c334d76d simplify opencl code in op_array.cxx
Change-Id: I4379683fa239e6f7c543350b645addffa784ba70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140222
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:52:51 +02:00
Luboš Luňák e39f5eedc0 fix and simplify opencl IRR(), MIRR(), XIRR() and XNPV()
Change-Id: Ie57e43458f7fa5a769806d0fe3054745ec71c99e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140221
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 17:52:27 +02:00
Luboš Luňák 8615b10636 an implicit intersection requires a svDoubleVectorRef
This was claiming e.g. =TTEST(A1:A10,B1:B10,1,2) had implicit intersections
because the 3rd and 4th arguments were found to be implicit intersections.

Change-Id: I9cba7e63330dd170ef0ea1ab03d33a653000e669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140189
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:46:30 +02:00
Luboš Luňák 66ad69f5b3 correct handling of 'nested' in opencl vectors
The 'nested' arguments means the value is used inside a loop, which
already implicitly does range checking.

Change-Id: I71ccbded2f9d623f58d11f11316aab28385f1614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140193
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:46:10 +02:00
Luboš Luňák 4c2b8db781 reduce opencl copy&paste in op_statistical.cxx (svDoubleVectorRef pair)
Change-Id: I92daab29290c9d72f7531b25950c7f52084cc0bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140192
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:45:48 +02:00
Luboš Luňák 0513d1954c reduce opencl copy&paste when handling a pair of svDoubleVectorRef
Some functions run one loop iterating two svDoubleVectorRef.

Change-Id: I849becd7863a1740277e6da9625bc7daad4b5274
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140191
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:45:30 +02:00
Luboš Luňák b014adf12d error handling in openCL FORECAST(), MIRR() and SERIESSUM()
Change-Id: Ied72d13953ebd765fc0ed8838b557487f5f74e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140190
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:45:02 +02:00
Luboš Luňák 4797becd04 reduce opencl copy&paste WRT simple loops with svDoubleVectorRef
Change-Id: Id68808d5b390c0771e82bf391930a840f423c1e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140188
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:44:50 +02:00
Luboš Luňák f0466cabc2 reduce opencl copy&paste also when handling svDoubleVectorRef
This is for when a simple loop is enough to handle the ranges.

Change-Id: Ia2fa3b6944573f30fafea614a9ec51a21c7e8226
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140187
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:44:30 +02:00
Luboš Luňák 2adc8a32ff reduce opencl copy&paste and fix in op_statistical.cxx
So far functions using svDoubleVectorRef are excluded.

Change-Id: Ie8a72d7f72de34c422b23bcc526ac66f6b170b10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140186
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:44:16 +02:00
Luboš Luňák c443a02ec9 reduce opencl copy&paste and fix in op_financial.cxx
Change-Id: Ia1cd64f68b75f445c15ec5f8088e9202fa39768e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140185
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-20 08:43:37 +02:00
Luboš Luňák bbc07c964e move code out of formulagroupcl.cxx to op_math* and opbase*
formulagroupcl.cxx is already large enough, move away code that
implements some operations and also move some type declarations
to a header.

Change-Id: I28fe59275f4fb89c3e530d77b08e7f2fcad02781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139971
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-19 17:29:58 +02:00
Luboš Luňák 3081749451 fix off-by-one in Calc shadow handling (tdf#150931)
A mistake from d48e684079, the number
is off as can be seen when compared to the bRightDiff part above.

Change-Id: Id87d69c45cd3336ab8a122a2cae505a16848cdf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139902
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-14 12:21:23 +02:00
Luboš Luňák 20de4e3ca3 do not check and refcount Info access to Skia bitmaps (tdf#150817)
VclCanvasBitmap keeps one around for no good reason, and I don't
feel like digging into it. Since there's no pixel data involved
in that case, let's assume the reader knows that the info about
the bitmap will not change. Making this difference is actually
what I suggested in 0e5b473a63.

Change-Id: I302a9c2c63c8b9474a541a963928933e223f4b45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139873
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-14 08:05:18 +02:00
Luboš Luňák f28087140a do not assert on "failed" Skia call because of empty size (tdf#150821)
There's no problem if the output size is actually empty.

Change-Id: I680766919c65fcaad6687f09af28f6e95575c228
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139830
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-13 17:17:29 +02:00
Luboš Luňák aa0d6cb529 clean up opencl helper functions
It seems a bit wasteful to use std::string for const strings.

Change-Id: I31bb38f5cdcd0210f6f91144b3c37abae9301333
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139487
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-13 09:05:34 +02:00
Luboš Luňák 85bf78b31b reduce opencl copy&paste in op_math.cxx
Change-Id: Ibe2afa6ca3720a6cec8b74af5c582cb946cf5396
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139486
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-13 09:05:19 +02:00
Luboš Luňák 7ed959dfe9 reduce opencl copy&paste in op_addin.cxx and op_logical.cxx
The svDoubleVectorRef stuff in OpAnd etc. didn't make sense, those
operators are required to do implicit intersection (which can be done
in sc core in ScCompiler::HandleIIOpCodeInternal()).

Change-Id: Ic970c8e649a651f6a804b5ed265fe2e08ff29681
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139485
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-13 09:05:06 +02:00
Luboš Luňák b58acf9362 reduce opencl copy&paste when generating function declaration
Change-Id: Ibe3677ed56423aeb0d19b510664bc402fc53366d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139484
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-13 09:04:51 +02:00
Luboš Luňák 6778f8ec5a fix and simplify opencl COMBIN()
Change-Id: I7568e3bb55cab31eb6e9b8644019a465333e8091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139200
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 13:03:42 +02:00
Luboš Luňák c3fdac32fe opencl MOD() fixes
Change-Id: I72c588f714a49ef6ed33657dc30b41ee10ecd5d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139199
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:04:46 +02:00
Luboš Luňák 8d687f4399 fix opencl FACT() implementation
Change-Id: I5b4525268c574c9edff2f4e8361b2b6d234c50f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139198
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:04:20 +02:00
Luboš Luňák 20caaffa82 check parameter count in opencl logical functions
Change-Id: If77bd146bd9eafd54afa1b82203d378ab9cd26d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139197
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:04:06 +02:00
Luboš Luňák 08b0c3b848 fixes to opencl rounding functions
Change-Id: I5cd99116a7230b8070051cbf6969a1fdd2f7fe62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139196
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:03:50 +02:00
Luboš Luňák 65a082168e use opencl's built-in PI values instead of hardcoded ones
Fixes a sc_subsequent_filters_test error because of =ACOT(-1)/PI()
getting slightly miscalculated.

Change-Id: I3846553cae55f463c34fba13663cad72c0e60b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139195
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:03:18 +02:00
Luboš Luňák 218b288d0c fix opencl trigonometric functions
Change-Id: Iacdae9fceff2feb198bd722e7e58e5e6dff5facc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139194
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:02:50 +02:00
Luboš Luňák 5aad29e382 add missing Calc test file opencl/compiler/precision.ods
Should have been included in 35ed13eba1 .

Change-Id: I3cf1a6b38e9893b5ec4ec4d6ffdfc4bf0ddba065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139477
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-06 12:02:22 +02:00
Luboš Luňák 372c7b231c use forced Calc calculation type even for single rows
It's for testing/debugging, so this should not get optimized.

Change-Id: Ib72eaa8ddb2c49ceee051856d977e2393bbb6966
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139173
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 16:22:23 +02:00
Luboš Luňák 2dc0e72f41 improve inheriting from std::num_put
These function in the base class are protected, and apparently some
GCC versions warn about other overloads being hidden.

Change-Id: I9d2e674b4fc9eedc97f586bbe4e4f21a6954b8a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139161
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 16:16:33 +02:00
Luboš Luňák 256086fc9b check parameter count in various opencl functions
Change-Id: I896331287ac5f7705f9fdfdb8e0786a894bc6eb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139077
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:21:53 +02:00
Luboš Luňák 0f44a1c044 error checking in opencl BIT* functions
Change-Id: Icf76d5d656226de8f96caf59be1d64cf13d07bbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139076
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:21:37 +02:00
Luboš Luňák 1e3cf15e2d do not return "random" values from opencl FTEST if it can't handle something
Change-Id: I539d184b015b79ce0511656ab5140bce8698397d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139075
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:21:24 +02:00
Luboš Luňák e306e86ac7 opencl LogNormDist cannot handle less than 4 arguments
Change-Id: I0669aed4b0cac5fc2165becb9bc8861a688272c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139074
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:21:05 +02:00
Luboš Luňák ea6ce6cb6a opencl, don't use GetBottom() as value for empty cells
I'm not quite sure what this GetBottom() thing is, but e.g. acosh()
treating empty cell as 1 is not right.

Change-Id: Id86ab979598603c12cec99ec5758c27a99589107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139078
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:04:25 +02:00
Luboš Luňák 35ed13eba1 make sure opencl generated code doesn't lose numbers precision
The default precision of both iostreams and stdio is 6 decimal places.
This means that e.g. =POWER(1.0000001,2) becomes 1, since buf << number
will write that first number simply as '1'.
Moroever some generated code actually doesn't compile because ambiguous
overloads, because '1' is an integer and not a double, thus floor(1)
is ambiguous, as there are only floating point overloads (and C/C++
are stupid about these conversions).
So force using a wrapper class that forces a higher precision and
the decimal separator. For debug builds, also avoid excessive precision.
Apparently, neither iostreams nor stdio are capable of simply printing
a reasonable floating point representation that wouldn't be too precise
or imprecise.

Change-Id: Ifa045712d90e6a6bbe5781ac3c805c989673dc8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139073
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:03:33 +02:00
Luboš Luňák 0b6520c4ac explicitly use BmpScaleFlag::NearestNeighbor when wanted
That is the algorithm that doesn't change colors, BmpScaleFlag::Fast
works the same way only because it's mapped to this algorithm
(which may not necessarily be the case forever).

Change-Id: Ibebfff668eaa1da93963f8e8601fec51cfdfca34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139128
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:01:51 +02:00
Luboš Luňák 0415aa11f6 fix limiting drawing of softedge effect (tdf#141981)
Apparently an empty viewport actually means everything should be drawn.

Change-Id: I55ae453a8f264d48222ade48a2953ab7d97c7f79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139125
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-09-01 12:01:07 +02:00
Luboš Luňák fc91d611a2 assert when formula group size is not large enough
That should never happen, as the size should originally come
from the formula group size.

Change-Id: Ic429ef498bb56d589c04a07d0fb44d9841deb19f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139090
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 16:46:23 +02:00
Luboš Luňák 7d3ff55a0d pow(x,-1) -> 1/x in opencl code
Ok, division is somewhat slow, but pow() is hardly going to be faster.

Change-Id: I1c0d94243a67d0cd77874eb6b9ee6b4ef9206240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139049
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:14:59 +02:00
Luboš Luňák 0fe3863a4e revert 'loplugin:flatten in sc' in sc/source/core/opencl
I have patches rewriting this code to be much cleaner, so this
won't be necessary and it makes it hard to rebase those patches.
Also at least the CheckVariables::CheckSubArgumentIsNan() change
actually makes the code worse.

Change-Id: I5d63c158c6883200e2c6e03d02e00f6672d6a1af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139048
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:14:34 +02:00
Luboš Luňák fd72a87868 fix opencl implementations of comparison operators
The normal core implementations use approximate comparison. Also
add the two missing operators.

Change-Id: I98f65b4fed70dd40f9087b6d98696b3bb10ea194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139053
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:14:14 +02:00
Luboš Luňák 067610f46a do not accept strings for opencl equal operator
This is part of "using string hashes for strings is kind of stupid"
removal. And it seems this is never used for all of Calc's tests.
Just keep it for numeric comparison.

Change-Id: I1c5e3b10c9cacf3d163a675373f14d879a857db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139052
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:13:54 +02:00
Luboš Luňák 975fa7d700 remove opencl implementation of CONVERT()
Part of removal of string handling in opencl (using the hash here
is not that bad, a hash collision is unlikely, but still).
And the code handles only two conversions (m<->km and sec<->min ?
I'm not even sure). And it seems it's not used a single time
for all of Calc's checks.
It could be added back if there's use for it (possibly with handling
the strings better, e.g. by converting them in the C++ code
to enumeration values passed to opencl).

Change-Id: I65a6ab51d8fb42c09d8a76a1e09f6f5fcbae099a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139051
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:13:37 +02:00
Luboš Luňák 19e64b69fe do not take strings for opencl <,>,<=,>= operations
OpenCL code doesn't actually work on strings themselves, but only on their
hashes. And comparing hashes doesn't necessarily have the same result
as comparing the strings themselves.
This is a part of preparation for removal of string handling in opencl,
as the whole idea of handling strings in opencl is probably stupid.

Change-Id: I8fa98bca0af14832f0d76135c1e195e1fb24451a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139050
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-31 09:13:13 +02:00
Luboš Luňák 73f9048c40 bail out in opencl unsorted vlookup as soon as a match is found
Change-Id: Ic2eda985f93c4eac26e08251c5bdbc36d7c03708
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139028
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-30 15:52:21 +02:00
Luboš Luňák ad2b6f1623 opencl vlookup, move constant condition out of a loop
There's no need to check in every loop iteration if the vlookup should
be sorted or unsorted, and this needless branching slows the execution.

Change-Id: I4f3072ddeaf54269cfec51043e84adb2571f0f73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139027
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-30 15:52:05 +02:00
Luboš Luňák 0db5b15e8e opencl VLOOKUP should not look up in other columns
VLOOKUP searches only the first column, I have no idea why this was
made to search all of them.

Change-Id: I3297a723a727ba3f56db9bbb320d5b868b247db7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139026
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-30 15:51:39 +02:00
Luboš Luňák 690458889f fix undoing range reducing to apply only to COUNTIFS (tdf#150618)
Before 7674399aac the code tried
to range-reduce all operations except for COUNTIFS, the commit added
handling also COUNTIFS and then later undo the rare cases when it
shouldn't be done, but the undo wasn't specific to COUNTIFS even
though it should have.

Change-Id: Ibdb6516a1ac7bc7d34f16f8a99781859e9fc7b60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138880
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-29 10:13:15 +02:00
Luboš Luňák 32cbd1c57d lok: make sure flushPendingLOKInvalidateTiles() is called
SwViewShellImp::AddPendingLOKInvalidation() collects invalidations,
but this was relying on something eventually calling
flushPendingLOKInvalidateTiles(), which wasn't guaranteed.
If e.g. a spellchecker caused an invalidation from in idle callback
and nothing else changed, then the LOK callback handling code
didn't know there was something pending. So add an explicit
call to ensure to notify about these pending invalidations.

Change-Id: I0a9cb0d5aba2fdbbac126cd8a4a3412bef1cab25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136531
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-25 10:28:35 +02:00
Luboš Luňák b1b2083ec2 try harder to ensure InterpretCellsIfNeeded() interprets (tdf#150499)
ScFormulaCell::Interpret() tries to interpret the whole formula group
(or the given range of it), but it's not guaranteed, and possibly
just the called cell will be interpreted. So if a specific range
really needs to be interpreted, handle that case.

Change-Id: I7fb563ae471eefd49e5bb6c92b6aff98c42a440e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138741
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-25 09:47:35 +02:00
Luboš Luňák c62a987ebc revert direct append to aToken in SvRTFParser::ScanText() (tdf#150151)
This reverts most of commit 09558e2f45,
the problem is that GetNextToken_() resets aToken, overwriting the value
created by this function.

Change-Id: I1daca07a6e01cfecfeff9fbf7c311b0d392d84d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138190
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-12 15:34:39 +02:00
Luboš Luňák 82553b46b6 fix checking glyph break position (tdf#150138)
Glyphs in RTL mode are in reverse, which includes the fast that
a cluster start is last, not first. So going back requires means
going back just one glyph, not a whole cluster. I'm not sure why
I originally did it this way, tdf#148954 works fine even this way,
so presumably I got confused.

Change-Id: I6ed0caf4e64e93e0643f7b88099bc7c992ea3329
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138144
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-12 12:13:32 +02:00
Luboš Luňák d21a23cb03 use the same vcl::text::TextLayoutCache when comparing text layout
Otherwise OutputDevice::ImplLayout() might use a temporary cache
just for the subtext while SalLayoutGlyphsCache would use cache
for the whole string, and those two might differ e.g. with an arabic
string starting with numbers when the subset is just the numbers.

Change-Id: Idea7ef277beae07e39e4a714088a7585361d13e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138143
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-08-12 12:12:33 +02:00
Luboš Luňák 9dff8edf97 Revert "avoid repeated writer layout calls with tiled rendering" (tdf#145396)
This was incorrect, the proper fix was my previous Writer commit.

This reverts commit b9c2207e1b.

Change-Id: I829da1633dd11cb0c6e944fbf5acef030fad7dc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137294
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-21 16:46:21 +02:00
Luboš Luňák 94bde29634 Revert "do not draw directly in SwViewShell in LOK mode"
It is actually needed to process SwViewShellImp's paint region,
as otherwise testTablePaintInvalidate::TestBody from
CppunitTest_sw_tiledrendering will end up in an infinite loop
repeatedly calling SwLayIdle ctor. That's what I tried to handle
in b9c2207e1b and got it wrong.

This reverts commit 2aa2d03ec4.

Change-Id: I25e897ea4e38db48cd969a3c21d677701f75a0aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137293
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-21 16:45:51 +02:00
Luboš Luňák c069dc2258 fix vcl::DeleteOnDeinit example in its docs
The ctor does not take 'new T', now it takes arguments that
are passed to T ctor.

Change-Id: I04b330d98dd84c86e00ec937a00d1097f21c55c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137039
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-14 09:23:17 +02:00
Luboš Luňák 6c58b01c79 move Skia setup code to a shared function
Change-Id: Ifcd434512854b5fedb0baf4ce1251a05f659b006
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137017
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-13 16:23:26 +02:00
Luboš Luňák 52e1a6a3e4 use a read-only stream when reading graphic data
EmbeddedObjectRef::GetGraphicStream() creates a writable
SvMemoryStream, read the graphics data into it and then returns
the stream, which will be afterwards used to decode the graphics.
But if the data is broken, incorrect seeking may cause a seek
way past the buffer, and since the stream is writable, it would
be done and cause problems such as running out of memory.
The VersionCompatRead class is one such place that reads size
from the stream and then seeks based on the read data.

Add SvMemoryStream::MakeReadOnly() that will change the stream
to be read-only after the initial read of the data into it.

Change-Id: I1d44aabaf73071a691adafa489e65e4f5e3f021d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137002
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-12 18:45:14 +02:00
Luboš Luňák 3dd03090ec close object tag if writing out the preview(?) fails
When writing out OLE frame, if a picture of it (or is it preview?)
is not available, the code bails out, but that leaves the object
tag unclosed. Since it sets only a warning and so it appears to
be non-fatal, close the tag properly before bailing out.

Change-Id: Ib8a6d692b0c3b4cb9ff5bcfe3c964efdaed3dab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136962
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-12 09:44:01 +02:00
Luboš Luňák e7cc4ceca4 include namespace when writing <div> tag in Writer HTML export
Change-Id: I5ae6cea44b1bff8dc55162e2f9cd6f034fe2857d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136897
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-08 19:58:27 +02:00
Luboš Luňák 1f201d76d6 do not write vspace/hspace attributes to reqif
These are not valid for the ReqIF-XHTML subset.

Change-Id: Ie68560c49ba43b0f728c6e51eeb33b4829bded93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136887
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-07 21:42:43 +02:00
Luboš Luňák b55a0eea78 don't try to use self-referencing ScSortedRangeCache (tdf#149752)
Both the documents from the bugreport use COUNTIF where the range
includes the cell itself. So trying to create ScSortedRangeCache
for the range would try to read the values of the cells in the range
including the cell itself, which would try to interpret COUNTIF,
which would recurse and deadlock on the mutex.

Change-Id: I95c33d0b75015dcd1d628740ef52c2d680864791
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136581
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-28 21:19:15 +02:00
Luboš Luňák 423f277cc0 fix ByValue lookups with ScSortedRangeCache
My fix for tdf#149071 actually disabled the optimization for all
ByValue lookups, because in fact all such lookups have maString set.
So lookups where the cells are a mix of numeric and string values
need different handling. A simple solution is detecting such a mix
when collecting the values for ScSortedRangeCache and disabling
the optimization in such a case. But it turns out that queries
containing such a mix are not that rare, as documents may e.g.
do COUNTIF($C:$C) where the given column has numeric values that
start with a textual header. So bail out only if the string cell
actually could affect the numeric query.
Also fix ScSortedRangeCache usage depending on query parameters,
different instances are needed for e.g. different ScQueryOp,
because the ScQueryEvaluator functions may return different
results (isQueryByString() is automatically true for SC_EQUAL).

Change-Id: Ib4565cbf6194e7c525c4d10d00b1c31707952a79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136403
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-26 20:27:19 +02:00
Luboš Luňák c92b92a3da rEntry.bDoQuery is always true for processed entries
As can be seen at the beginning of ScQueryEvaluator::ValidQuery()
in the for loop condition. Comes from 4fd1333ba4,
and I'm not quite sure if the passed value is really supposed
to be always true or if it's a mistake.

Change-Id: I44bde5d50ac70332d6e48ee583ffed13e664cd61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136396
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-26 20:26:48 +02:00
Luboš Luňák 5a9c4fc41e more efficient recalculations from xlsx import of pivot tables
The import of pivot tables in xlsx triggers recalculations, even
though it's not necessary. Fixing that properly seems complex given
how ScDPObject is designed, so at least ensure the calculation is
efficient (formula grouping is otherwise done only after pivot
table import). This can especially noticeable for formulas where
groups make a big difference (e.g. COUNTIFS uses ScSortedRangeCache
only for formula groups).

Change-Id: I8dbdf854880707a9707cdc9dc3d73fc1d6b6b000
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136362
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-26 20:26:13 +02:00
Luboš Luňák 9e170a35ee handle nullptr SharedString in ScQueryEvaluator (tdf#149679)
This may be the case if the string comes from ScMatrix::Get()
for ScMatValType::Empty.

Change-Id: I35013449611bf7ffd1bc74e023d76597af010724
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136347
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-24 08:38:32 +02:00
Luboš Luňák b901fd3b27 no need to explicitly spell out bodies of default functions
Change-Id: I7ed48c3f1005a0efe42d5378ed25e57ae63dd712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136346
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-23 21:37:54 +02:00
Luboš Luňák a6b9fbfc15 fix SwViewShellImp::AddPaintRect() for sub-rects (tdf#146536)
Using just two corners to build the new resulting rect works only
if the new rectangle actually really extends the previous one,
but the <= means that this may compress also rects that are already
contained in the previous rect, in which case it's necessary to
make sure to use union to get the larger coordinate).

Change-Id: Ie4303dfef903bded6d63625531e424a32cc01b06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136144
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-20 14:26:08 +02:00
Luboš Luňák 4dab8afe89 upstream Skia fix for Vulkan crash on texture binding (tdf#148624)
Change-Id: Ic16a516bfde04aba0336baca58f605d6cf9fd413
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136011
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-17 14:23:25 +02:00
Luboš Luňák 8a5beccc19 handle GC* pixmap functions on Mac reading past pixmap (tdf#145843)
The code passes adjusted position for pixel data in order to create
a sub-rect of the pixmap without copying, but at least on Intel Mac
the GC* functions then try to read the entire pixel row even though
it shouldn't be necessary. Since that may cause reading past the
pixmap data if the last line is involved, use entire pixmap width
to avoid that.

Change-Id: Ia08059b363d39dd465b2cadde5138ee045628f59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136003
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-17 06:16:28 +02:00
Luboš Luňák 1ac3b4ae83 share ScSortedRangeCache between threads
It's the same data for all threads, they access it as read-only,
so it doesn't make sense for each thread to build its own copy.

Change-Id: Ia1559c61d976bcce78661cae7e030bb8430aed7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135794
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-16 15:12:42 +02:00
Luboš Luňák e445eac863 allocate column in ScTable::DeleteBeforeCopyFromClip() (tdf#149554)
Change-Id: I22607f1dd0ec1c083f6a52a2ecccb976fc133687
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135864
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-06-16 10:04:29 +02:00