path: root/sc/source
AgeCommit message (Collapse)AuthorFilesLines
2014-12-23Don't crash when nIndex < 0Matúš Kukan1-1/+1
Change-Id: I24ba4365d9d5f78e875ea51382c6b1f864b2e5fe (cherry picked from commit e225b0925b371bd33d40d97c240bd3165b628464) Reviewed-on: Reviewed-by: Markus Mohrhard <> Tested-by: Markus Mohrhard <>
2014-12-22fdo#85258 differentiate between empty cell and empty result in matrixEike Rathke3-21/+87
Change-Id: I79259224e411f9c1a6e852623d9d49cf89a03c27 (cherry picked from commit 069698de192ef7e8d3582398e4542c175cabb987)
2014-12-22comment on COUNTBLANK() why we do what we doEike Rathke1-3/+11
Change-Id: I67c00ad672d7509b52fd50e4b5b3e18e72dc22c2 (cherry picked from commit ce6f9cbb5f46921ba6670c0b057463d61d05d46e)
2014-12-22Resolves fdo#87558: Duplication in Last Used Functions sidebar listJulien Nabet1-1/+4
Change-Id: If15199e205671d3e96e5c2b2940c0a6defced0e0 Reviewed-on: Reviewed-by: Markus Mohrhard <> Tested-by: Markus Mohrhard <>
2014-12-19valgrind: initialize theseCaolán McNamara1-3/+3
Change-Id: I6440832fe508689ffa8e20fa17827528331e3585
2014-12-18fdo#68385 update references only if cut originates from the same documentEike Rathke1-5/+10
Change-Id: Ia7b27309251cf9e47505c58d8ed0172d134280f4 (cherry picked from commit f2ac9fab2677a6a718f251baef75d3cae96d1f01)
2014-12-18Resolves: fdo#86978 append formula cells to track instead of treeEike Rathke2-2/+15
Cells in FormulaTree are assumed to be tracked already and their dependents be notified. Also postpone tracking until all listeners are established. Change-Id: I7f27fba979fe231e3d3cd071fcc8a273142cb3f3 (cherry picked from commit 573f5dfba805b733dd2da62bde3cd5d9d25879d9)
2014-12-16Resolves: fdo#87245 crash because clip doc doesn't own DocumentPoolCaolán McNamara1-1/+1
multiple documents sharing the same doc pool so can't unset its secondary here. Here the assumption is that SharePooledResources has always been called on Clip or Undo docs (otherwise persumably need a flag which SharePooledResources toggles on) Change-Id: Ibcdbe5f698102dc683c290d3bd581c31e214765f (cherry picked from commit 7a85674c93150d6f5a59e998158909365b47d761) Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-12-16implement an actually working setErrorCell() from BIFF error codesEike Rathke3-10/+18
Not that we're currently using that, but.. Change-Id: I67b8fc324779875ba14e2d69204c40fe27cc180e (cherry picked from commit ca9a81b2ca858b82e863e1e6f917928916fea79e)
2014-12-16construct grouped ScFormulaCell with bDirty=true, fdo#79249 relatedEike Rathke1-1/+1
Noticed when loading with fdo#79249 fix where oox::xls::applyCellFormulas() groups the consecutive =#N/A formulas. Only A1 result was displayed, other cells were displayed empty. Change-Id: I3a541f74d3d25e1515a1c6d47f02ec6a8e817c93 (cherry picked from commit a1dc5e97da273bf35d58d54e625149022569a993)
2014-12-16fdo#79249 call formula compiler with error stringEike Rathke1-1/+6
... instead of attempting to stringize a NaN coded error value. Regression introduced with 30a20743ae17e6e02183a65603d38968253b3ffb Change-Id: Ia7a8ca39938820ac75db169404446fa696c6ee1b (cherry picked from commit 994607b55104b9ae4554554c13b001b8d5d513b6)
2014-12-16correct error string, #N/A instead of #NAEike Rathke1-1/+1
is that mapping used at all? Change-Id: I15019072b6e812b9ffe29d3ee6afacd9ab526948 (cherry picked from commit 758755e31b3d9e1ed2eab522d4794282178346ac)
2014-12-16fdo#87119: Don't use of the broken "Software" group interpreterTor Lillqvist3-7/+16
FormulaGroupInterpreterSoftware is known to be broken, says moggi. We should not use it as a fallback to OpenCL. Not sure whether it makes sense, but let's keep it in the code for now. Make using it conditional on setting the environment variable SC_ALLOW_BROKEN_SOFTWARE_INTERPRETER (to any value). Only a developer who wants to work on it should set that. sc::FormulaGroupInterpreter::getStatic() can now return NULL, adapt callers accordingly. Change-Id: I20f6e2658f556e2d4a0687f3730dccdbedb88603 Reviewed-on: Reviewed-by: Kohei Yoshida <> Tested-by: Kohei Yoshida <>
2014-12-15no separator really means no separator, fdo#83027Markus Mohrhard1-2/+1
Change-Id: I612a46701e7447db63f38ed709e8693d0533710d Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <>
2014-12-12rhbz#1116534 crash when pasting over a formulaDavid Tardon3-23/+52
When pasting CSV data into existing document, we cannot use the ScImportExport optimization for insertion, because the cells can already have content (a grouped formula in this case). So use appropriate ScDocument functions, even if that means the import is slower. This is a regression from commit 93959db4d8846cfdfb87ab647c4d457fb09bb869 "use DocumentImport for csv import, related fdo#69006". Change-Id: I92f70abca0542d796e3aa674b28a31053fff00d0 (cherry picked from commit bf97980c8d5d5fbc63a08b8834c10fe903152b75)
2014-12-12resolved fdo#86809 connect filter conditions correctlyEike Rathke1-3/+10
Maybe since 0960ec3e1b7b0d872d1f84d2d56f480a4df08b21 all conditions of a single filter stack were OR connected, regardless whether filter-and was given in the file. Change-Id: Ifb423ccc7deb42bb6bba0bfc810607633f2c342c (cherry picked from commit b500e60b32b5cf8fd61beb7476c2c29e65aee3e4)
2014-12-11fdo#86572: Increment row position *only when* the row ref is relative.Kohei Yoshida1-2/+5
This is just a simple oversight. Change-Id: I024777c46641cce3410a20f40c48f47ad6a5dade (cherry picked from commit 52781a55441cb270ffecc2522d1e069141a21607)
2014-12-11resolved fdo#87237 propagate error values through matrix comparisonsEike Rathke1-44/+52
Apparently introduced with 8e8b43a03e77dd251876c1de0ac06eeeb09192cd the comparison results were stored as boolean values, effectively discarding any infinite double values and error values encoded as NaN values. Change-Id: I1fb6f46894a0bee02a37e28b7e6cc84f8c051f28 (cherry picked from commit 3c405ff82fcc9f8f044833420485c54658064636)
2014-12-10Deteremine the script type of source cell during paste replication.Kohei Yoshida7-14/+58
Doing this ahead of time eliminates the need to update script types of all replicated cells after the paste. This makes significant performance impact. Change-Id: Ic4f7d7b2fe152bd5640ddb1dae01cc2ed757657e (cherry picked from commit 808fd5fbd8868dfd95c8a38676815798fa2b79c4)
2014-12-11fdo#86215 pool new ScPatternAttr if source and destination are different docsEike Rathke1-3/+5
Change-Id: Icdb68af83a0b208f9a427ee61ae18020c8835a41 (cherry picked from commit d9c15867e914d91a7e86c499ffb6ee62f5b443f6)
2014-12-10paste from system from the top left of selectionDavid Tardon1-1/+17
For example, 1. echo -e "5,6\n7,8" 2. select the lines and copy them to clipboard 3. select an area in Calc, starting from bottom right 4. paste 5. select comma as data separator in the CSV import dialog I think most people would expect the data to appear in the selected area, but currently it would be inserted starting from active cell (which is the bottom right cell of the selection). Change-Id: Ief0e05deda18928a832dca2a261f8493ac9a03a9 Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <> (cherry picked from commit 781639eb84fc09d0260092238c3f50216f15a3ff) Reviewed-on:
2014-12-10Globally disable threading for these for now.Kohei Yoshida1-0/+1
It doesn't win us much performance-wise (as it turned out), and causes weird crashers with large documents. Change-Id: I0566ce850b8f6656e6f9821c653b7a825a7874a3 (cherry picked from commit e0425f9493e25fa14f11505d9ebc12a2fe78d4b6)
2014-12-09Resolves: fdo#86786 take of a copy of the MarkDataCaolán McNamara1-2/+1
so macros that trigger on changed data don't change invalidate interators into them behind our back Change-Id: Ib7e626b4ec3eea3bd0b1f57f17280a008bb4060e (cherry picked from commit 1c43d48c62db766ffdf23e8f20ed07cbd7a660ee)
2014-12-09fdo#82312 - Excel chart has a wrong sizeMarkus Mohrhard1-0/+20
bug introduced in commit 0c7f35277575fee8594737f5b2842dfac2c6d04f "remove SvStream::operator>> methods" Change-Id: I72a1c05b3a4a3f3a250055775eb2d35b3114406d Reviewed-on: Reviewed-by: Markus Mohrhard <> Tested-by: Markus Mohrhard <>
2014-12-09surely it makes no sense to ignore return of Sanitize[Col|Row]Caolán McNamara1-2/+2
Change-Id: I24ef940bcf4b2a7c5f40185f91ee234c844185f8 (cherry picked from commit e5c2fe0412585bc83bd6a99fc37a7c47eb8c3641)
2014-12-09fdo#84295 change context menu 'Style' entry to 'Format'Yousuf Philips1-1/+1
Change-Id: I177573294643bf9410bb42a3708b719250ff4a0c Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2014-12-09in ScFormulaCell dtor remove cell also from FormulaTrackEike Rathke1-0/+1
It could happen that during a SetDirty/Notify cycle a formula cell is appended to the formula track but not tracked yet so doesn't end up in the formula tree. If it was deleted then without removing it from the track the cell pointer shortly after was moved into the tree, possibly setting pFormulaTree (and/or pEOFormulaTree) to that cell if it was the last cell, and if immediately after that a new ScFormulaCell was allocated at exactly the same memory location it virtually ended up as a successor of itself in the formula tree ... leading to a crash if pCode was accessed in a subsequent RemoveFromFormulaTree because the cell was assumed to be already in the tree. Change-Id: I9d1885a26b85c2331a084b5f89a2d7373cf2df0f (cherry picked from commit 1e9aa174865cc65b132a8b3e728b8a5adbcd8b90)
2014-12-08coverity#1257111 Uninitialized pointer fieldCaolán McNamara1-0/+1
Change-Id: I82c771f0ca7d2593a6f34dd84689cf055f9cf3f3 (cherry picked from commit 32e38e1ec703dcdcff484eae3634a69e0d9c864e)
2014-12-08Don't treat clew as part of an "external" clcc moduleTor Lillqvist2-3/+1
There is no obvious authoritative upstream for clew anyway, so it causes philosophical problems for distros. For a while, we used to use a zip archive from the "clcc" project on SourceForge that included clew.c and clew.h. (Before that we also just had clew.c and clew.h in our source repo.) So, drop the external/clcc module and have clew.c and clew.h in the source repo again. But this time clew is in a module of its own, not in sc. This re-introduces "No need to have OpenCL optional at configure-time" This reverts commit 764836cb00e8e6dfd2ab48e080a166ec90359e01. Change-Id: I413142f4f9f8399489f9c3e5327132822f07a454 Reviewed-on: Reviewed-by: David Tardon <> Tested-by: David Tardon <>
2014-12-08don't update range name if ref not in update range, fdo#85304Markus Mohrhard1-0/+3
Change-Id: I1ccfacd98bd10f6ae1d4eaf7a705fe8863045697
2014-12-08we need the SdrPage for deleting the notes, fdo#86166Markus Mohrhard2-0/+10
The SdrPage that contains the shapes for the note captions is deleted before the notes. Prevent that case by deleting the notes before deleting the SdrPage. Change-Id: I13727cea7df0b033fb386a6a8e20dcadec743335
2014-12-08import part for: " use correct xml element name, related fdo#45266"Markus Mohrhard2-1/+2
Change-Id: Ied71383fc837c7e667455f84937801e8d45f2989
2014-12-08import part for put that attribute into an extension namespaceMarkus Mohrhard2-0/+6
Change-Id: Ie3618e44416a0765877e4b09e41e058d2808cdee
2014-12-08remove invalid attribute that is not read anywayMarkus Mohrhard1-2/+0
Change-Id: Id7770ffda49ba7bc0ebc780c67c56b81152213f7
2014-12-08correct order of xml elements, related fdo#45266Markus Mohrhard1-1/+1
Change-Id: I03ea0e5bb064222e50dc08a682091ec3e23bf11d
2014-12-08Revert "No need to have OpenCL optional at configure-time"David Tardon1-0/+2
As long as this requires bundling clcc, not allowing to disable it is unacceptable. This reverts commit 3b0b76462aa54f60bc9823d9c6ef64e5e35c1208. Conflicts: Change-Id: I12b3d5e3325bbd03cd98e1fb5139705d694493c2 (cherry picked from commit 764836cb00e8e6dfd2ab48e080a166ec90359e01)
2014-12-07add ReorderParam.mbHasHeaders to include in Undo range markEike Rathke2-1/+20
Undo Sort did not select/mark the original range if it included header row/column. (cherry picked from commit ec1b1af8af7ead149f96c09e16402e66e0973372) umm.. row is row and col is col (cherry picked from commit 413a0655adec3e9364bc94afff638a5a9f88560c) 26c62fa1fc97aa0dd4eda1102422e5f012a126eb Change-Id: Ie4c800e7a44fd910c871731673093400c6400e4a
2014-12-07handle all fill cases correctly, fdo#86754Markus Mohrhard1-1/+1
That special case only works if the whole source range contains formula cells. For now we just limit it to the special case of a single source cell. Change-Id: I71ccfde06edd97e5a9c78da22053583d05aac411
2014-12-07we need the original context that contains the data, fdo#85856Markus Mohrhard1-2/+1
Change-Id: I107201ab736b548f010d813540e0a9cec7402e79
2014-12-06Fix incorrect adjustment of range references during sort.Kohei Yoshida8-6/+263
... as a result of the introduction of range-based area listeners. With this change, the insertRangeData() function for ucalc no longer needs the additional bGroupListening flag. All tests pass with group listening enabled at all times. Conflicts: sc/inc/listenerquery.hxx Change-Id: I9b9fb9443c727ff62badbd60ec9cd94094eb5a45
2014-12-05Ctrl+A and Data Sort took ages to broadcast ALL cellsEike Rathke3-12/+14
... now that also empty cells are to be broadcasted. Set dirty and broadcast only the effective data range as determined by Sort. This is more a workaround, a cleaner solution would be to refactor the SetDirty() algorithm to iterate only through broadcasters and use AreaBroadcast() to notify area listeners. However, this can also be easily backported to 4-3. Change-Id: I6d68ca0088cec6a8328a3e93364ac928ef69babe (cherry picked from commit 9a568c41ccd1ccf6073758973da5914a44f629d2)
2014-12-05trim also empty leading column ranges, fdo#81501 follow-upEike Rathke1-1/+4
Change-Id: Ieaeea85149e4b6d263b112205bb17c155e2d12be (cherry picked from commit c7b57c6c2b15a4b9f65dafb642e3f1da402e62ca)
2014-12-05actually use identical code for both byRow and byCol, fdo#81501 follow-upEike Rathke1-7/+4
Change-Id: I982e03a12dd80be0787f22dce4495065775e7de0 (cherry picked from commit 1e4235f8b2dc693b0fb1edade9db25a631bdbf94)
2014-12-05Fix high memory usage when sorting cells in Calc. (fdo#81501)Supreme Aryal1-0/+2
Empty columns were being unnecessarily included in the sorting range which caused extra allocation. This happens when you select the entire sheet to sort. There was already code to skip empty trailing cells in rows but not to skip empty columns. Change-Id: Ieac22647bb13165cbf66cb1a93f567e5169fff6a Reviewed-on: Reviewed-by: Eike Rathke <> Tested-by: Eike Rathke <> (cherry picked from commit c50d8bf596f527bb53b86dd04da652ed72f2c549)
2014-12-05loplugin:unusedvariablecheckStephan Bergmann1-3/+0
Change-Id: I48c2421598152b64d40237eb0e917a680a27b643 (cherry picked from commit 71bed3b736957d09a5379725ce5c97f5166ea30d)
2014-12-05-Werror,-WshadowStephan Bergmann1-6/+8
Change-Id: Ia03dc71a3d4e4380258e7f8d2ebc3c9f32d83493 (cherry picked from commit f05c37d3fdc8ef6839c6ebe43ae1a375f3073def)
2014-12-05Create 2 variants of SortReorderByRow.Kohei Yoshida1-107/+211
One for IsUpdateRefs() true, the other for IsUpdateRefs() false. Change-Id: I2b18e2b8a9770fd9499dd9fc0d26397e67c1e8ae (cherry picked from commit 13d64505214c33555dfbd61dbd9a177906df4981)
2014-12-05Extract this code block into an own function.Kohei Yoshida1-100/+126
This code block is sufficiently self-contained. Change-Id: I0eb2d3ee8175af60394ff4c408a9c245f77044d8
2014-12-05I got the terms 'union' and 'intersection' mixed up.Kohei Yoshida2-7/+7
When I said 'Union' originally, I meant 'Intersection'. Let's fix that. Change-Id: Iaef5035bb1dbb676c63bd17b3650266605104181 (cherry picked from commit c62cf85d482b82b41551ab5e7893c3b22ae5df6f)
2014-12-04removal of font name, font size and text alignment from context menusYousuf Philips1-14/+0
apply the change made for writer in fdo#81132 to the other modules Change-Id: Ic7f3252048be070c7e4d5e6ff1b7463b5af9d489 Reviewed-on: Reviewed-by: Jan Holesovsky <> Tested-by: Jan Holesovsky <>