summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2015-02-17Resolves: tdf#88792 do not hold a ScFormulaCell** in group area listenerEike Rathke7-15/+79
... 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. (cherry picked from commit 47230a036fe35b9a7a7c0609232849fcbb51efcc) add some SAL_INFO to group area listener and formula cell ctor/dtor guess we'll need them more often.. (cherry picked from commit f8d6640afa3c8528d2a66741edc49a48c67902d3) let have FormulaGroupAreaListener a virtual dtor (cherry picked from commit 0fafb53d1c860388461f30e613a37c128c90ad79) 0ef149fc5edceee765419764bf0efa571ba9d977 1f5e246d68971124ef21e9c2d0db80499928998b Change-Id: I449a89005418aff7ea12099ea931b786959dbc3b Reviewed-on: https://gerrit.libreoffice.org/14413 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-17Don't call clReleaseProgram() on the same program twiceTor Lillqvist1-0/+1
If the clBuildProgram() failed, the lastSecondProgram variable kept as its value the already released program handle, and later we called clReleaseProgram() on it again. This is certainly wrong, and caused a crash at least with my OpenCL implementation. As such I am not sure if that lastOneProgram, lastSecondProgram etc dance is sane... Change-Id: Ia4b9f0df52bd7dd15efa914a0795fcf251c65969 Reviewed-on: https://gerrit.libreoffice.org/14409 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-17Handle (or not) string arguments better when using OpenCL for math opsTor Lillqvist5-287/+325
This is a combination of four commits from master. 9429cf24675ae6b3a954db560ca567c9413d0ab6: We need ScCalcConfig also for formula groups 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. 6dd1025ccf2bcbd2035ab141054950263c638747: Add ScCalcConfig field to DynamicKernelArgument It is 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. dcee6c01206cedf035db175c481cc5fe378bee3f: 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. 867cd1de71c774066e72fd30b4d6cde56c598d36: 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: I2c5769c4ae157561c0a3b267d8e1c92795963732 Reviewed-on: https://gerrit.libreoffice.org/14405 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/14408 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-17Resolves: tdf#39316 add matrix empty cells to ScInterpreter::QueryMatrixType()Eike Rathke3-7/+35
(cherry picked from commit eccbc97c7c224269fe261b8924e7866c3758ec91) add ScMatrix::IsEmptyResult() for tdf#39316 fix preparation (cherry picked from commit cf3f1d8dfeb45249eb60a30dba3243fe9a4a65e5) 9f2a3e6fa9f4ef43df672661afef996269b90a7a Change-Id: Ifa5d59e90afcfff66f2e8683fac2a9090ed615da Reviewed-on: https://gerrit.libreoffice.org/14429 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-17tdf#88576 fix handling of empty arguments in IF(), IFERROR() and IFNA()Winfried Donkers2-3/+8
Reviewed-on: https://gerrit.libreoffice.org/14415 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 0b75eda1090f92adc678ceff2565da2dc7d9328c) tdf#88576 check that two parameters are given for IFERROR() and IFNA() Otherwise the functions failed only for the error case resulting in #NULL! error. (cherry picked from commit 6583f4e30015164af4972921b5bb7880dfb65f65) eb987637698ab418fc0a60cd873e23878c9f497b Change-Id: I8acca26cf7398768a9e25f97f3a9e61754ab2179 Reviewed-on: https://gerrit.libreoffice.org/14422 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-12Handle zero or empty cells properly when using OpenCL for divisionTor Lillqvist5-12/+85
This is a combination of 5 commits from master: 4f4daf163e92d113b62cc19fb0b7f5ec05dce48a: Introduce SetResultError() f7c6089c0f5ac7976149d270f6d9694ef8ed7cfd: Be prepared to handle error codes encoded in NaNs ("double error") f6dfb3b4098f4554782e35fdb471ef69f2f53386: Create proper error when dividing by zero. Create a so-called "double error", i.e. a NaN with a error code payload. f5e7207053b857b6903a0ab9c161bed9ad7bcee9: Handle zero and empty cells (which also means zero) in OpenCL for division. Not sure if it makes sense to keep having OpDiv a subclass of Reduction. There is no DIV() function that would take a range of cells, so it isn't really comparable to the other Reducion subclasses. But let's keep hat as it is for now. We need to handle three cases specially in the OpenCL: Dividing by an empty cell which should produce an #DIV/0! error, dividing an empty cell by zero which also should produce #DIV/0!, and dividing an empty cell with anything else number which should produce 0. 9cef97adadc04361640c0dafc9363e5aed5a0ddd: Avoid OpenCL compilation error in some cases We do need to use GenSlidingWindowDeclRef(). We can't assume it is always a vector element that is taking part in the calculation. Change-Id: I57790d183a3dbe52906b8986454978fe2426ca76 Reviewed-on: https://gerrit.libreoffice.org/14404 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-09Resolves: tdf#83461 do not override MatColsRows if already setEike Rathke1-1/+1
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 (cherry picked from commit e32eff2bb4c12fdc33e476b9f12bb4bb71d22ebc) Reviewed-on: https://gerrit.libreoffice.org/14354 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-02-09Avoid OpenCL compilation error when multiple RAND() calls in a formulaTor Lillqvist1-0/+5
Simply surround the Random123 code snippet with an ifdef guard. Change-Id: I370a3c37226d31bfbe703e5b7936b2180aee1784 Reviewed-on: https://gerrit.libreoffice.org/14366 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-02-05Revert "ODF export: don't write invalid "group-name" attribute"Lionel Elie Mamane1-2/+1
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 Reviewed-on: https://gerrit.libreoffice.org/14338 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-02-04Check number of cells referenced by group instead of group sizeTor Lillqvist4-1/+46
Put using it in #if 0 for now, though. This reverts commit 1fd902d4b851c534cf7473dd13983fc2c46500ed Change-Id: I7bb3efdc594bf7f1a61b037bf3488dae4ca119c9 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-02-03Resolves: rhbz#1179642 crash in GetFocus with empty mpPreviouslyFocusedListBoxCaolán McNamara1-2/+3
Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76 (cherry picked from commit dae7d2089516d9cf014b9fad0adb484f19282a29) Reviewed-on: https://gerrit.libreoffice.org/14161 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03Resolves: fdo#75565 reduce block on pasting rtf like we do for htmlCaolán McNamara1-1/+2
Change-Id: I74a9748a2e4981dc5d1677f06db7eceed9e4b108 (cherry picked from commit 0efbd9931ea854cf71c4c54ca3f3d55d6db1fa13) Reviewed-on: https://gerrit.libreoffice.org/14144 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03Resolves: tdf#88786 correct matrix sub operationEike Rathke2-3/+3
Change-Id: Ib5ce2ffe17cc34e0b3f04ebc06ea392707b7b9e6 (cherry picked from commit b435ca9e6f826704314f8a437c352aa799767bd4) Reviewed-on: https://gerrit.libreoffice.org/14208 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-03Related: fdo#88455 crash using delete in available fieldsCaolán McNamara2-8/+12
Change-Id: I4ac5fe6f42b425ee96124b2dde39ff397a081638 (cherry picked from commit 1746c886362b8525b04365dd6b7203b8098b99ba) Reviewed-on: https://gerrit.libreoffice.org/14290 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-02tdf#88810 avoid unnecessary massive O(U)String allocations in XLSX exportLászló Németh8-68/+105
ToOString(XclAddress/ScAddress) functions are replaced with ToOString(OStringBuffer&, XclAddress/ScAddress) ones, using the new shared OStringBuffer variable of XclExpRootData Cherry-picked from master: b2df899dbb038acfe3c47eef303345ceaf3725b8 (build fix) 99674f754323ca78ac45499439b9983b31ebd444 (append() for number to string conv.) f0152b737d9a196e83752a546154735efee5c2be (more cleanup) cc724c37232b721537d66c997a66c0d7866948ea (cleanup) 779581feed4886313746a71e9e738d736977be1b (original) Change-Id: I06b705e2159a1ef5990f9eb0ffedd20fe277c616 Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2015-01-30Resolves: tdf#88740 parse with locale decimal separatorEike Rathke1-6/+26
And use a proper string to double conversion and early bail out conditions. (cherry picked from commit 1884c0bbd40f0ded41d7a1656cb64fb1f6368c36) tdf#88740 fix sidebar angle rotation i18n (cherry picked from commit 9a7bf47098fe69b5c6069372708918ef94a9d597) use a less ugly string to double conversion, tdf#88740 follow-up And check string length before accessing characters.. (cherry picked from commit 3ba5ac834780fc2565aff99e42dd8c3b2202fba3) 30355f3aaf77b1952e21050e3593e575571d7aaa ac3c2bf2f67f0cc7fc106515a875512771676e01 f97a25cd2cab0dccf2154465da7c1235ef3ca8c6 Backport: added vcl/settings.hxx Change-Id: I6c89dd850405ad74ebd175800131cdcac19a8c86 Reviewed-on: https://gerrit.libreoffice.org/14243 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-26Revert "fdo#88810 avoid unnecessary massive O(U)String allocations in XLSX ↵Németh László5-71/+3
export" This reverts commit ace8f9c2a31795cc2329c6bb27deacde9f4c18df. (Interestingly, reverting the original patch in the master pushed this one in libreoffice-4-4 automatically, sorry.) Change-Id: I0d3048b58aea0c84fa0b287e711a5d7cda7ab8fc Reviewed-on: https://gerrit.libreoffice.org/14188 Reviewed-by: Németh László <nemeth@numbertext.org> Tested-by: Németh László <nemeth@numbertext.org>
2015-01-26fdo#88810 avoid unnecessary massive O(U)String allocations in XLSX exportLászló Németh5-3/+71
Change-Id: Ie6a024463e7ee9b0f4492b2431533708a578faf0
2015-01-25Resolves: tdf#81124 crash on setting autofilter on column with no contentCaolán McNamara1-1/+2
Change-Id: Id53e589789144d892427a8a4ec1af1926aa97b52 (cherry picked from commit 3a5fa612b4afb72b5f91877a5c52e25c7604ae1a) Reviewed-on: https://gerrit.libreoffice.org/14158 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-23make this work also for an overlapping merge range, fdo#87382 follow-upEike Rathke1-7/+18
... if the merged range ends behind the visble range. (cherry picked from commit e4fea6e67a05256c3ce6336bf054004015936310) get rid of C-style cast, fdo#87382 follow-up (cherry picked from commit 5865ab6bd27425912e2752020a966e2aac3279e5) 86dd6a96f69d9bedeabeebc04f953b9f22476543 Change-Id: Ib5e9ae57299614f42c9200da5641922dfd90ab60 Reviewed-on: https://gerrit.libreoffice.org/13877 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-23Resolves: fdo#88735 crash after calling sort after subtotal removalCaolán McNamara1-1/+1
Change-Id: Ia30271426ea47b7bf5af85d16591a02e6d52b3d9 (cherry picked from commit 0442cd217645aa4fdd924e4c2e4f90a77f1fbbad) Reviewed-on: https://gerrit.libreoffice.org/14139 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-23fix abuse of OUStringBuffer(int) ctorEike Rathke2-2/+4
Partial backport of 853c2fc71a96755a9dee629fd5d0e1cff9a48034 Change-Id: I14e26da332a829c6381ee9e07571171ebebe0ac0 Reviewed-on: https://gerrit.libreoffice.org/14132 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-23Resolves: fdo#88721 correct negated condition in range name validationEike Rathke1-1/+1
Fallout of 72b9dd277bab328c4d9227439e27e8c29b43fa7d String to OUString conversion. (cherry picked from commit 34f8864c9af563cbcd34352b3edefc67ba235ae7) Conflicts: sc/source/core/tool/rangenam.cxx Change-Id: I89a90da11790efba9e8ce4c9464dfca50b08c3ce Reviewed-on: https://gerrit.libreoffice.org/14120 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-22Resolves: fdo#88455 delete in empty data field crashesCaolán McNamara1-5/+10
Change-Id: I399bf576fe89283f839842959f06b8fe83f13b2b (cherry picked from commit 66df4d7d309ce237e4979d57b1069659ece1e3a5) Reviewed-on: https://gerrit.libreoffice.org/14107 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-22don't access empty range list, could be rhbz#1180312Eike Rathke1-0/+3
ScRangeList::DeleteArea() may remove an entire range, if it was the last range a subsequent call to ScConditionalFormat::DeleteArea() would attempt to access an invalid first element. Change-Id: I8d68c27963dc8561d61a94980093c271bd3aaffb (cherry picked from commit 9af8e14e67d354bb7736271a76a3dd8b6da78fd9) Reviewed-on: https://gerrit.libreoffice.org/13963 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-21Revert "Globally disable threading for these for now."Michael Meeks1-1/+0
This reverts commit d677bf455f08264096edd13e3306c55f74f7ee1d. It appears that the memory corruption was an out-of-memory condition on 32bit Windows, so restore XclExpRow threading for now. Change-Id: If8ca6640a3bc6196106426bd0477d48c556036e7 Reviewed-on: https://gerrit.libreoffice.org/14091 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-21fdo#88578: Focus on first checkbox when showing calc paste special dialogThomas Viehmann1-0/+1
Reviewed-on: https://gerrit.libreoffice.org/14071 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 83133f175c021b3f139c596a771b56d94cb3ed11) Change-Id: Ic0d82c710c09a099329fa76e2fb81c6c8613b334 Reviewed-on: https://gerrit.libreoffice.org/14083 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-21fdo88632: Make the Calc random functions non-random when requestedTor Lillqvist2-3/+4
We don't want such a mode to affect other uses of randomness, though. Thus use a separate random number generator object for these two functions, and use a fixed seed for it if the SC_RAND_REPEATABLE environment variable is set. As RAND() is implemented in sc, and RANDBETWEEN() is implemented in scaddins, it was a bit hard to figure out where to add the new functions needed, without having to over-engineer things with UNO. (This functionality is totally Calc-specific, but neither sc nor scaddins has any public (non-UNO) API.) Caolan suggested the formula module, which seems like a good enough place to me. Change-Id: Ic1c9ca165278d53036598b03b13b4ffbdc98a75e Reviewed-on: https://gerrit.libreoffice.org/14053 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-01-21Add RAND to the default subset of opcodes for which we trust our OpenCLTor Lillqvist1-0/+1
Change-Id: I1ca574f96ad84aa263bdcecbe549687fbf10d0d8 Reviewed-on: https://gerrit.libreoffice.org/14052 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-01-21Rewrite the RAND() OpenCL implementation to actually be randomTor Lillqvist1-21/+322
Use a so-called counter-based random number generator. Code from Random123, http://www.deshawresearch.com/resources_random123.html. Change-Id: Id47f84ef18eada64dcf47762a61ec3856c71760e Reviewed-on: https://gerrit.libreoffice.org/14050 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-01-20fdo#88623 replace std::deque with std::vector in xlsx savingLászló Németh2-3/+3
Change-Id: I0b9c44b405e2c617c60e11a1a15eaeb867cba57e Reviewed-on: https://gerrit.libreoffice.org/14036 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-19in COUNT() use ConvertStringToValue() for literal string argumentsEike Rathke1-6/+20
... to evaluate the string conversion configuration, instead of the hard coded locale dependent IsNumberFormat() This only for literals, not referenced cell values. Change-Id: I774b52f1e258294014d8ea6a62374dd1d262f022 (cherry picked from commit b5fab0c20550b724986ad8a59973b92b181e0478) Reviewed-on: https://gerrit.libreoffice.org/14026 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-19fdo#88339 Fixed Calc constrained image movementTrent MacAlpine1-3/+16
fixed on master by commit# 7a4a68e2515fa54e041004cf63042c1ead00d576 Change-Id: Id4143e0a8410e6a9589f941c2bda83074eaf4844 Reviewed-on: https://gerrit.libreoffice.org/14022 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-19rhbz#1136013: svx: try to make the ExternalToolEdit not crash all the timeMichael Stahl2-27/+6
This thing was starting a timer that re-starts itself forever, and when the file it was watching changed, it would just assume the drawing objects were still there (and the document, for that matter...) (cherry picked from commit 5f6bdce0c0ac687f418821ce328f2987bf340cda) Conflicts: sc/source/ui/drawfunc/graphsh.cxx Change-Id: I35f187f0828097a05618dc1733dce819fc6bffc6 Reviewed-on: https://gerrit.libreoffice.org/13995 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-19WaE: implicit conversion (IntegralToFloating) from bool to 'const double'Tor Lillqvist1-1/+1
Kohei says it is intentional, i.e. 1.0 or 0.0 should be passed, so say so explicitly to avoid warning. Change-Id: Ieff79d35f2b0770ea9de02b83d117ac90009f7d5 (cherry picked from commit a0b54683d9ee8987e80cf81746aa147d53bf661a)
2015-01-16fdo#88398: Handle group listeners correctly when splitting formula group.Kohei Yoshida7-8/+95
It's basically the same thing we do in ScDocument::DeleteArea(), implemented in ScDocument::SetValue() and SetString(). Change-Id: Ifcae31aaef0e00ed8659aa5e2b9b8e206dc1a099 (cherry picked from commit 4c93c341be1425401112eed3581e8b8a6308880d) Reviewed-on: https://gerrit.libreoffice.org/13946 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-14sc: fix use-after-free race in ScCellRangesBaseMichael Stahl1-0/+6
Probably 03cca068ed901d1862c440a6f414d17609785974 was not sufficient, because the ~ScCellRangesBase may access a deleted ScDocument after the early return. READ of size 8 at 0x61b000191cb0 thread T7 (cppu_threadpool) #0 0x2b3c8fd7c8b3 in ScDocument::RemoveUnoObject(SfxListener&) sc/source/core/data/documen3.cxx:863:9 #1 0x2b3c94517824 in ScCellRangesBase::~ScCellRangesBase() sc/source/ui/unoobj/cellsuno.cxx:1467:9 #2 0x2b3c9459cf98 in ScCellRangeObj::~ScCellRangeObj() sc/source/ui/unoobj/cellsuno.cxx:4786:1 #3 0x2b3c945eca28 in ScCellObj::~ScCellObj() sc/source/ui/unoobj/cellsuno.cxx:6088:1 #4 0x2b3c945ecef1 in ScCellObj::~ScCellObj() sc/source/ui/unoobj/cellsuno.cxx:6087:1 #5 0x2b3c945ed093 in non-virtual thunk to ScCellObj::~ScCellObj() sc/source/ui/unoobj/cellsuno.cxx:6088:1 #6 0x2b3c56cb35ec in cppu::OWeakObject::release() cppuhelper/source/weak.cxx:205:9 #7 0x2b3c94523d63 in ScCellRangesBase::release() sc/source/ui/unoobj/cellsuno.cxx:1772:5 #8 0x2b3c945a77ec in ScCellRangeObj::release() sc/source/ui/unoobj/cellsuno.cxx:4835:5 #9 0x2b3c945f842c in ScCellObj::release() sc/source/ui/unoobj/cellsuno.cxx:6128:5 #10 0x2b3c945fb953 in non-virtual thunk to ScCellObj::release() sc/source/ui/unoobj/cellsuno.cxx:6129:1 #11 0x2b3c7f305faa in bridges::cpp_uno::shared::freeUnoInterfaceProxy(_uno_ExtEnvironment*, void*) bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42:5 freed by thread T14 (cppu_threadpool) here: #0 0x43436b in operator delete(void*) (/data/lo/build_clang/instdir/program/soffice.bin+0x43436b) #1 0x2b3c9382462e in ScDocShell::~ScDocShell() sc/source/ui/docshell/docsh.cxx:2722:1 #2 0x2b3c93824d46 in virtual thunk to ScDocShell::~ScDocShell() sc/source/ui/docshell/docsh.cxx:2755:1 #3 0x2b3c58e2058a in SvRefBase::ReleaseRef() include/tools/ref.hxx:194:29 #4 0x2b3c58e12726 in tools::SvRef<SfxObjectShell>::~SvRef() include/tools/ref.hxx:52:24 #5 0x2b3c5a8a8f99 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() sfx2/source/doc/sfxbasemodel.cxx:247:5 #6 0x2b3c5a8a9141 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() sfx2/source/doc/sfxbasemodel.cxx:246:5 #7 0x2b3c5a7b1905 in SfxBaseModel::dispose() sfx2/source/doc/sfxbasemodel.cxx:795:5 #8 0x2b3c5a7c8146 in SfxBaseModel::close(unsigned char) sfx2/source/doc/sfxbasemodel.cxx:1418:5 Change-Id: Ia041dc6596d1b0b6b979a20fa93e1490c657e15b (cherry picked from commit c6dc3b9f9adb292ae42ba246082bc9dcb1445c6c) Reviewed-on: https://gerrit.libreoffice.org/13871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-12only delete cell content for CELLTYPE_NONE, fdo#88200Markus Mohrhard3-3/+15
Change-Id: I43463b56cabfea4c9ee2b98445f7fb522221197d Reviewed-on: https://gerrit.libreoffice.org/13842 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-12fdo#87382 Improper display of selected mergedHenry Castro1-2/+7
When left most cell is not in the visible window, Visible Range was not checked merged cells. Change-Id: I3c375c0f584e29444472224c74442bbd3d97b3ac Reviewed-on: https://gerrit.libreoffice.org/13832 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit d987ed29051b184aeb5151c1e080ad22c4637835) Reviewed-on: https://gerrit.libreoffice.org/13873
2015-01-10Resolves: fdo#85617 always store fully encoded external document nameEike Rathke5-12/+18
Also OOXML calls these API functions, this is the central place to handle it. (cherry picked from commit 97a8b3ed5e5bd42e213d3230fa764b0f5d10f0f2) write externalLink Relationship Target IURI encoded, fdo#85617 related (cherry picked from commit 7eb5e135422f1a5830a44d129300bc3fafb4627d) do not drop entire external reference, fdo#85617 related If there are no matching tab names for a FileId, preserve at least the known reference parts. In case of 2D references the sheet name is in the token if for example read from .xlsx, only for 3D references the second sheet name would be needed. The underlying makeExternalRefStr() and its subroutines handle the missing tabname elements gracefully. Still this situation is worth an assertion. (cherry picked from commit b6339617b1cc3136f9e527acd0746d712cd21643) Change-Id: I3df065af8e4ef44734f468fd455c3b7c93d7fbc6 Reviewed-on: https://gerrit.libreoffice.org/13835 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-10handle index based external refs in formulas in ooxml import, fdo#85617Markus Mohrhard1-3/+28
(cherry picked from commit 18cccd62fb5b730319878df6fac748d5cdf73f1f) return after finding the reference (cherry picked from commit cef36587674b6472471478524e87b1add4109507) that method is the same as in the base class (cherry picked from commit 02caf8f2eef75d8b5acb6a4ec40277355c3c6c6e) remove copy&paste code (cherry picked from commit 757ce63f7346aea132f11c3d9a328b0a1a776403) a22b97b0a45d8d840095737638c2ccf68373e27a 8cb6f59795d9461c0e02ab70d7edd60af1410c1f 5710856fdb9fb91573de89eeb5a29d3d106ad7a6 Change-Id: Ie4f43f041f5d614b9c2826c74574c854af05c266 Reviewed-on: https://gerrit.libreoffice.org/13671 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-08sc: ODF import of data pilot:Michael Stahl1-1/+0
Revert part of 8e417a8fed528034e946bd25e66ce346c1b5384d that looks unnecessary: this is used in ScXMLDataPilotMembersContext::CreateChildContext() which is below table:data-pilot-level which actually uses the data-pilot-member element, whereas the data-pilot-group element occurs below table:data-pilot-groups. Change-Id: I7a3183bd3dbfa98b3bdf5e581b700910025af965 (cherry picked from commit 4680eba921cccefc05587a42e8c7348cc95750a1) Reviewed-on: https://gerrit.libreoffice.org/13810 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-08improve performance of some matrix operations, related fdo#83187Markus Mohrhard3-16/+317
I0e6816a7f0d2dc051dff6a462724cb4a3c155289 fix error in last commit Icafbe6e5daab64e7431d80c8956143341eb2ef0b fix a few problems with my matrix commit I6e3fdf4bd26c952a59ad130dc6e5c9d1f3ff5f07 coverity#1260446 Uninitialized scalar field and coverity#1260447 Uninitialized scalar field I3aa5a1caf776fddc8b6029e96c24aa86b21de880 iterator::operator*() should return a reference Change-Id: Id09f555c5ece9e5cb60a2ae7bc2456d4343744f5 Reviewed-on: https://gerrit.libreoffice.org/13676 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07handle relative refs correctly in xls import, fdo#80091Markus Mohrhard1-2/+5
Change-Id: Ia70f96e1d31e71c56f03c828be0a4e49fff4b198 Reviewed-on: https://gerrit.libreoffice.org/13687 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07relative refs wrap around in xls, fdo#84556Markus Mohrhard2-7/+16
Change-Id: If84d468d4bd55ed55ccd517d0b078d283a1a9c38 Reviewed-on: https://gerrit.libreoffice.org/13694 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-01-07we want to compare two different cells, fdo#85353Markus Mohrhard1-1/+1
Change-Id: Ie612555a63a1eff79e6c35aeed3cfa27b948ad38 Reviewed-on: https://gerrit.libreoffice.org/13635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07reimplement shared formula import for xlsb, fdo#86734Markus Mohrhard4-12/+30
Change-Id: Ic5d678a2b1197ce8d83b308b0a4387bf657052d5 Reviewed-on: https://gerrit.libreoffice.org/13633 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07fix another validation error for OOXML, related fdo#40746Markus Mohrhard1-7/+11
e.g. exporting fdo40746-2.ods as OOXML Change-Id: I8a19ec2caecbc3687229d820ac2ec11fc01facd1 Reviewed-on: https://gerrit.libreoffice.org/13588 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07fix OOXML validation error, related fdo#40746Markus Mohrhard1-6/+10
e.g. fdo40746-2.ods exported to OOXML Change-Id: I48bc7a7d21ddc00eceaeb09970a2b1a60330fbf0 Reviewed-on: https://gerrit.libreoffice.org/13587 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-01-07fix OOXML validation errorsMarkus Mohrhard1-0/+6
Change-Id: Ieac082a3b312602eff5ec101529536d747fa3836 Reviewed-on: https://gerrit.libreoffice.org/13585 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>