summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2015-02-08coverity#1242895 Untrusted loop boundCaolán McNamara
Change-Id: Ib54ed3f18c91142f1c217f618d88e36a646cf931
2015-02-08Avoid OpenCL compilation error when multiple RAND() calls in a formulaTor Lillqvist
Simply surround the Random123 code snippet with an ifdef guard. Change-Id: I370a3c37226d31bfbe703e5b7936b2180aee1784
2015-02-08Create proper error when dividing by zeroTor Lillqvist
Create a so-called "double error", i.e. a NaN with a error code payload. Change-Id: I6d538426c184b30d067f8ef6035b49f3a8986f12
2015-02-08Add a couple of SAL_INFOs to trace the vector refsTor Lillqvist
Change-Id: I6b71e320359d025bf8cf31637dabb1bc35d581fb
2015-02-08Add one more case for string argument handling when attempting to use OpenCLTor Lillqvist
If a function takes numeric arguments but there are only string arguments, but the settings say strings are to be treated as zero anyway, we can go the OpenCL path. Also add a few informative comments. Change-Id: I40b64cf040c986cfc2b26a2a778711f3cd397186
2015-02-08Handle string arguments better when attempting to use OpenCLTor Lillqvist
If a function/operator that takes numeric arguments but not string arguments is passed string arguments anyway, handle that with OpenCL only if the (document-specific!) setting for text-to-number conversion is ZERO (treat strings as zero, which is how our OpenCL code for such functions/operators works). Otherwise let the code fall back to the traditional interpreter. Change-Id: I351da75b225baf4b721cd1ab67ce5094dbc5e458
2015-02-08Add ScCalcConfig field to DynamicKernelArgumentTor Lillqvist
It will be needed to be able to adapt OpenCL code generation to the text-to-number conversion settings. To get the document-specific ScCalcConfig into the DynamicKernelArgument, we have to pass it along in lots of places to constructors of various DynamicKernelArgument subclasses. Originally it comes from the maCalcConfig field of FormulaGroupInterpreterOpenCL, inherited from FormulaGroupInterpreter. Change-Id: Iac6a83e8081ab973e8b7e8161de79e411d2ed2dd
2015-02-08Be prepared to handle error codes encoded in NaNs ("double error")Tor Lillqvist
Change-Id: I84576139d271d05977ff8bfa4de4820ef523d69e
2015-02-07databaroptions.ui: Reduce row spacing, right-align new Fill labelAdolfo Jayme Barrientos
See also tdf#87356 Change-Id: I4866afb179fa2425f4ba6be48dde33461b00c255 Reviewed-on: https://gerrit.libreoffice.org/14356 Reviewed-by: Katarina Behrens <bubli@bubli.org> Tested-by: Katarina Behrens <bubli@bubli.org>
2015-02-07Some compilers need explicit OUString() in return expressionTor Lillqvist
Change-Id: Ideb64a7cf6fd4ad563b0e4bfab5583af1ecefd54
2015-02-07Not all platforms have std::to_string(), urkTor Lillqvist
Change-Id: Ie930f2110bc1c10ac3ada9e266ca25d4ebdea5cd
2015-02-07ERROR is a macro on Windows, try ILLEGAL thenTor Lillqvist
Change-Id: Iae0c5308f77657c6a55bafd372ce7e4db5ef4aab
2015-02-07We (will) need ScCalcConfig also for formula groupsTor Lillqvist
The settings for interpretation of text (string) cells as numbers affect whether OpenCL can be used or not to get expected results, when operating on vectors that contain also text cells. Change-Id: I0a7fd657038846ba762aa6ee6a95c001aea8f124
2015-02-07Turn StringConversion into a C++11 scoped enumerationTor Lillqvist
Change-Id: I353a62bac6c8bf00b20c93d9778fc45ade5d502c
2015-02-07Output meStringConversion symbolicallyTor Lillqvist
Change-Id: Ibcd8cb12525fbce33fbfd208ee8e357c904ffd4f
2015-02-07Introduce SetResultError()Tor Lillqvist
Change-Id: I0645b7a58e9f3dfc6c431844805ab87add8745ad
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: Ieeca9fe957e7bc6a4cf9d7d6ac57f9ed150aab78
2015-02-06Resolves: tdf#83461 do not override MatColsRows if already setEike Rathke
ScMatrixFormulaCellToken::SetMatColsRows() via ScFormulaCell::SetMatColsRows() is used during document import and preselected cell area input of an array formula. Do not override existing values with subsequent result matrix dimensions. Change-Id: I9e844b5064ea276f3cbcb680eb1127c344328e00
2015-02-06shared_ptr<T>(new T(args)) -> make_shared<T>(args)Caolán McNamara
and boost:make_shared->std::make_shared Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
2015-02-06Report errors from clRelease*() APIsTor Lillqvist
Change-Id: Id30afe5bf954e26515bf8cca6f1ee8bc018fb835
2015-02-06Unmap the host buffer only after done accessing itTor Lillqvist
Most likely 64c479e9da02f724e1870649c99fac92f5f27cd3 accidentally made the code unmap the host buffer before it is accessed, but the code continued to work by accident in many (most?) cases. Either because in the case of OpenCL devices that share memory with the CPU, the host buffer *is* the OpenCL buffer, so even if the host buffer is "unmapped", it still exists. In the case of GPU device with separate memory, using the host buffer after unmapping corresponds simply to a case of use after free of a heap-allocated buffer, which often happens to work. Found by code reading. Change-Id: I9e2b4574077a267938702c0f81c4b1cba9c9a183
2015-02-06Improve OpenCL error messagesTor Lillqvist
Add the name of the function that failed to the OpenCLError class. Log OpenCL failure in a couple of more places (where OpenCLError is not thrown). Print OpenCL errors symbolically instead of numerically where applicable. Change-Id: I60f910e9ea7b75af7ec506553d7a73ad99ba4366
2015-02-06Move OpenCLError::strerror() from sc to opencl, and rename to errorString()Tor Lillqvist
There is nothing Calc-specific in this function, and surely it will be good to output OpenCL errors symbolically also in the opencl module. Change-Id: Ibe7d0d036f24dd87e06b8290224e1033dda0f3d1
2015-02-06The ISNAN ifdefs can go awayTor Lillqvist
ISNAN was defined unconditionally since long, and even the original authors of this stuff started removing those conditionals last summer. for F in `git grep -l ISNAN sc`; do unifdef -DISNAN -B -o $F $F; done Change-Id: I61df4066d0ecc23b6ce26bac8f3fbdfaf4aceac4
2015-02-05try to avoid overflows in some compare functionsMichael Stahl
Change-Id: I6144d7d6527dc401b7f1b577d1a227361e39e7bb
2015-02-05convert all remaining BOOST_STATIC_ASSERT to static_assertCaolán McNamara
and we can include a few less headers Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-02-05Related tdf#87356: import data bar [non-]gradient from OOXMLKatarina Behrens
Strange, I somehow believed this already works not only for ODF but also for OOXML. Wasn't the case Change-Id: I5e06fd7bccbe2e59b13f9f56188374193b10a009
2015-02-05Revert "ODF export: don't write invalid "group-name" attribute"Lionel Elie Mamane
This reverts commit 2d4b87f0c1bfd97185a89c18d5b7680d11a958d6. The reverted commit leads to the following regressions: - Basic dialogs (which were not targeted, but impacted, by the reverted commit) with several RadioButtons sharing a group-name (as they will have a tendency to do) cannot be loaded anymore, since the implementation assumes (and checks) that names are unique. - Even in forms, where a RadioButton had both a form:name and a form:group-name attribute, the form:name attribute wins and thus RadioButtons that has the same group-name but different form:name (as they will tend to do) will not anymore be mutually exclusive, which defeats their point. Additionally, since it did not change the UI parts (property editor window), the user was still presented with two different editable properties "Name" and "Group Name", where "Group Name" was empty... Change-Id: I1bff532a5a7336cf2eb0579bcd4e2d16be6480fe
2015-02-05Resolves: tdf#88792 do not hold a ScFormulaCell** in group area listenerEike Rathke
... as the mdds storage segment may change when a formula cell is inserted at a position such that two segments are merged into a new one. Change-Id: I449a89005418aff7ea12099ea931b786959dbc3b
2015-02-05Updated all precompiled headers.Ashod Nakashian
Change-Id: I955c8ac4dbe002d23531df7eb10fb4444d6b5157 Reviewed-on: https://gerrit.libreoffice.org/14292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-04Seems that BS() does something else than I thoughtKatarina Behrens
XclXmlUtils::ToPsz is the one I needed Change-Id: If4aee9a2a9c943535d7e07b08f61b419ac2c8a22
2015-02-04Add Add, Sub, Mul and Div back to the default OpenCL opcode subsetTor Lillqvist
The code falls back to the traditional interpreter when necessary. This reverts commit ad582ce757f671a6271648e22a136f2d238cc15e. Change-Id: I4cbafba2c469c0814dcc5c5210db5ce495e6b641
2015-02-04Check number of cells referenced by group instead of group sizeTor Lillqvist
Put using it in #if 0 for now, though. This reverts commit 2021275f8fc33d9917d5fef58959a95da1dc7e6f. Change-Id: Ia6541df12ee97747badbbedd758873688190b00c
2015-02-04coverity#1242895 Untrusted loop boundCaolán McNamara
Change-Id: I5d97849e46db5e4582387ade085134fdde6a0358
2015-02-04coverity#1266450 Explicit null dereferencedCaolán McNamara
Change-Id: Ie675dc47d6008aa3ce947f8969895f32eb20b8c4
2015-02-03Typo: selction/slection -> selectionJulien Nabet
Change-Id: I3f405d9525d3afb6534166fd733cabf7779a2846
2015-02-03Fix TYPEINFO_VISIBILITY vs. TYPEINFO_VISIBILITY_OVERRIDEStephan Bergmann
Change-Id: Ia6494c611e6596fa4811c2751bb96294a3950f17
2015-02-03more build fixingMarkus Mohrhard
2015-02-03try to fix the buildMarkus Mohrhard
2015-02-03add some SAL_INFO to group area listener and formula cell ctor/dtorEike Rathke
guess we'll need them more often.. Change-Id: I0ef149fc5edceee765419764bf0efa571ba9d977
2015-02-03tdf#39468 translate German variable in sc export filterChris Sherlock
Change-Id: Icdd126714b988517bdbbe49b203951afd92f8a17 Reviewed-on: https://gerrit.libreoffice.org/14297 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03tdf#39468 translate export option comments for sc filterChris Sherlock
Change-Id: Id8136d3d35436d5e81ff79b9c548474128e9c076 Reviewed-on: https://gerrit.libreoffice.org/14296 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03sc: typo in OSL_ENSURE (XclExpChLabelRange::Convert)Chris Sherlock
Change-Id: I1bfd54fccc6a40a7a845317975a5d5e232b290e9 Reviewed-on: https://gerrit.libreoffice.org/14299 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03callcatcher: shave off some moreCaolán McNamara
Change-Id: I8ed7028f865bd4a6425859ab3b57ed8e928a78e4
2015-02-03Related tdf#87356: export data bar [non-]gradient to OOXMLKatarina Behrens
Change-Id: Ibdbad2f8b5471698337fb7838dadd6188b1add7d
2015-02-03tdf#87356: Enable switching between gradient and solid fill data barKatarina Behrens
Could use a checkbox instead of listbox here, since our LB has only 2 values, but with listbox it'll be easier to add more fill types in the future Change-Id: I67cd94b9b49b06434e4a22788b032425c3728e7f
2015-02-03tdf#88960 Scientific format: add/remove digits with buttonsLaurent Balland-Poirier
Use buttons "Add Decimal Place" or "Delete Decimal Place" to change the number of significant digits with scientific format (also works for "General" format) Improve format management for "red for negative" to be compatible with tdf#88999 Change-Id: Id681afc4fc73674c9823172c6cd71925e63b867f Reviewed-on: https://gerrit.libreoffice.org/14264 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-03tdf#88999 Modify number of decimal for scientific also (UI and Sidebar)Laurent Balland-Poirier
Scientific format was excluded from being able to increase/decrease number of decimals, red for negative or thousand separator in UI Format > Cells > Numbers and Sidebar > Number Format Change-Id: I56b175a26fc5ba46b9964390f9c098d5d93c73dc Reviewed-on: https://gerrit.libreoffice.org/14293 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-02Related: fdo#88455 crash using delete in available fieldsCaolán McNamara
Change-Id: I4ac5fe6f42b425ee96124b2dde39ff397a081638
2015-02-02callcatcher: shave off a few moreCaolán McNamara
Change-Id: Ie48cf7f89c8c826e56409c2493e1e1250086f10a