summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table3.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-12-02fdo#86762 re-establish listeners to move cell broadcastersEike Rathke1-82/+163
... for UpdateReferenceOnSort=false (cherry picked from commit 6c2111f17089eb667bf526561d7667d17825e822) Conflicts: sc/source/core/data/table3.cxx fdo#86762 broadcast also empty cells after sort (cherry picked from commit 08793e08c7e9cefe594c49130f782725e386c463) Conflicts: sc/inc/column.hxx sc/source/core/data/column.cxx sc/source/core/data/document.cxx sc/source/core/data/table2.cxx sc/source/ui/docshell/dbdocfun.cxx fdo#86762 re-establish listeners on moved broadcasters ... also in SortReorderByColumn() similar to SortReorderByRow() (cherry picked from commit e119f3883513aeaa49f332362620e955dc8b453f) Conflicts: sc/source/core/data/table3.cxx e275a754c530d6039ed14304900dd71416f36e46 7665dcc90d70fcf3b08bef0adb9ab6aaff1cdcdf Change-Id: Id90288660e317d6e47ee01ee3b5ff9058cfa18df Reviewed-on: https://gerrit.libreoffice.org/13275 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-11-25fix fdo#79441 again and keep references to other sheets during sortEike Rathke1-0/+4
... also if other references are not updated. References to other sheets are never to be treated as relative during sort, they are always absolute, even if they have relative row/column part references. Broken again during the big sort mess. Even if there was a unit test, which didn't help as it got disabled / adapted to the change.. (cherry picked from commit f0e7364603c9566bc158303c515c3274ccba62ca) Backported. Change-Id: Ic0e61c5e1cb0728e20725c29e450ab0eb55c3305 Reviewed-on: https://gerrit.libreoffice.org/13118 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-11-25fdo#83765 do not update references in SortReorderByColumn() if disabledEike Rathke1-1/+2
Similar to SortReorderByRow() (cherry picked from commit 115a4b7ca36f65d93070d2e81048320d202e87a3) Conflicts: sc/inc/column.hxx Change-Id: I2d2fe243c91a663b14e5bd75ee30225d1b8073da Reviewed-on: https://gerrit.libreoffice.org/13117 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-11-20fdo#85215: Don't adjust references wrt cell position when disabled.Kohei Yoshida1-2/+5
Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788 (cherry picked from commit 10fc138307afb4b39baddb0d56eb8e986e5d29ea) Signed-off-by: Eike Rathke <erack@redhat.com>
2014-11-03fdo#85215: Ensure that formula broadcasting works after sort.Kohei Yoshida1-0/+15
When the reference update on sort is turned off. Change-Id: I547dd1525a638dd447fe331e22583af4a7947308 (cherry picked from commit 1eb82c78a223d9a0b2bb5c3f5c129c1ee8bdf303) Reviewed-on: https://gerrit.libreoffice.org/12113 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-10-30fdo#81633: Add a hidden configuration option to toggle ref update on sort.Kohei Yoshida1-49/+66
This option is defaulted to off for 4.3 for back-compatibility. Reviewed-on: https://gerrit.libreoffice.org/11902 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sc/inc/inputopt.hxx sc/qa/unit/ucalc.cxx sc/source/core/tool/inputopt.cxx Change-Id: I5ac686e96742df40f7d8ba5ffec23806db2988a6 (cherry picked from commit c357fb2dbdc54d9ee8471ce4e9f9381e74a6deed) Signed-off-by: Andras Timar <andras.timar@collabora.com>
2014-09-23fdo#83764: Ensure that the row position is below MAXROW.Kohei Yoshida1-2/+5
When attempting to split formula groups, else multi_type_vector would try to locate a block outside its logical range. Change-Id: I424ede112138de459b5ba3bff5e021c4407ccf3d (cherry picked from commit 0ef6263ed2b31b8f9e431971e6c5e8928996c1c8) Reviewed-on: https://gerrit.libreoffice.org/11519 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2014-08-27Resolves fdo#81084 fdo#81696 fdo#80874 fdo#81010 : sort causes crashDeena Francis1-0/+4
Change-Id: I8fb9ec26bc549c264bfbf30177d720b20677b319 Reviewed-on: https://gerrit.libreoffice.org/11102 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit c25ac84688b596b9990d382d550f0514161b78c2) Reviewed-on: https://gerrit.libreoffice.org/11138 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-08-22correct references after sort, fdo#79441Eike Rathke1-2/+65
5c6ee09126631342939ae8766fe36083d8c011e3 introduced a different algorithm for reference handling during sort. Unfortunately that clashed with the SC_CLONECELL_ADJUST3DREL introduced a little earlier resulting in relative 3D references effectively being "adjusted" twice. Furthermore, in-sort-range range references to one row (or column) were not adapted to the move at all if the formula within the range listened only to ranges and not a single cell. Added collecting and adjusting area listeners for this. Last but not least, external (relative) references need to be treated the same as internal 3D references, making them point to the same location after the sort. (cherry picked from commit 69adec3ec051ff94f600ab899506ca9d645a8b56) Conflicts: sc/inc/types.hxx sc/source/core/data/bcaslot.cxx Plus necessary parts of 27182231acd3a0c9898a8dba78b76dc8a827b4c0 related to bcaslot changes. Change-Id: I492768b525f95f1c43d1c6e7a63a36cce093fa5a Reviewed-on: https://gerrit.libreoffice.org/10930 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-07-28fdo#81617: Split formula groups at sort range boundaries.Kohei Yoshida1-0/+8
Otherwise, partially sorting a range may crash, or at best incorrectly update formula references. Change-Id: Iefcb86d205d83ccc5b684048bfd9aadabf6e13eb (cherry picked from commit a3fc7f20089062afa4f778e70ba8be84032a30a7) Reviewed-on: https://gerrit.libreoffice.org/10583 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-07-21fdo#81309: Adjust references during sort.Kohei Yoshida1-127/+340
(cherry picked from commit 5c6ee09126631342939ae8766fe36083d8c011e3) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sc/inc/sortparam.hxx sc/source/ui/docshell/dbdocfun.cxx sc/source/ui/undo/undodat.cxx sc/inc/formulacell.hxx sc/qa/unit/filters-test.cxx sc/qa/unit/ucalc.cxx sc/source/core/data/documen3.cxx sc/source/ui/docshell/dbdocfun.cxx Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f (cherry picked from commit e31300e8749ac7de07bbcb91c6ae28559238e60c) Signed-off-by: Andras Timar <andras.timar@collabora.com>
2014-07-14resolved fdo#79441 keep 3D references intact during sortEike Rathke1-1/+2
Change-Id: I9e96d8e7cb99a3c280dd24495eefb9efd6d10888 (cherry picked from commit e463de2a56453a0d2cb0b5b58e96f7639f37cdd1) Reviewed-on: https://gerrit.libreoffice.org/10240 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-05-01fdo#78079: Re-work sort by column to get it to do the right thing.Kohei Yoshida1-23/+72
Also fixed reference update problem. (cherry picked from commit 3c4fb52d8fc89fe43983991ed2339295b2e0ef8c) Conflicts: sc/inc/column.hxx Change-Id: I06e6115ef969a011fdd5c92d5eb1927fb7ae789b Reviewed-on: https://gerrit.libreoffice.org/9220 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-04-30fdo#75058: Optimize autofilter item filling for non-tree items.Kohei Yoshida1-2/+7
(cherry picked from commit 878a5dabff4669fb606a461e11eaf286d0c8b07f) (cherry picked from commit 0b03f7ed575838f90e6b1ebec3538a3a214f81fb) Conflicts: sc/source/ui/cctrl/checklistmenu.cxx sc/source/ui/inc/checklistmenu.hxx Change-Id: I1b3ae601726401a0e70fb1a05b9a90c43773794c Reviewed-on: https://gerrit.libreoffice.org/9211 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-04-25fdo#72741, fdo#76607: Backport of Calc sort rework.Kohei Yoshida1-93/+436
This change requires mdds 0.10.3 as the baseline. Conflicts: configure.ac sc/inc/fstalgorithm.hxx sc/source/core/data/column.cxx sc/source/core/data/table3.cxx sc/source/ui/docshell/dbdocfun.cxx Change-Id: Ia6d2bf1ee17e96c30b6d5310f5c49e5a4404e094 Reviewed-on: https://gerrit.libreoffice.org/9144 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2014-01-06fdo#73001: Simplify the selection function logic & calculate correct results.Kohei Yoshida1-23/+8
Fixing a bug and cleaning up the code all at the same time. And don't forget to write test for it as well. Change-Id: Ia0322c4bebd4c5debcbfa4bb0902afbe581208b2 (cherry picked from commit 4a7a6b46c0dc779581f271b9e6c13c365eca7ab8)
2013-11-28resolved fdo#71589 reimplemented horizontal range lookupEike Rathke1-0/+42
Regression introduced with ebdd9c300718bce454ef56a31d5d8fb699fc1822 (first eaea417bfdf8d06df2b7f2e42c904c32ce77e871) that removed the bMixedComparison member from ScQueryParam under the false assumption that is was only used to emulate a legacy Excel behavior. In fact it was also needed to do the at least horizontal range lookup in sorted mixed data, though didn't evaluate exactly the same conditions as Excel and defined in ODFF. Reimplemented a similar behavior for the new code structures but this time also checking for the additional condtion that a query ByString does not return the last numeric result and vice versa, which previously was missing. Change-Id: I46061777879ba5301bfcaca2d50cf87a994f93f2 (cherry picked from commit f0701470858f57a855ba57c0c2283e52953db327)
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin1-2/+2
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-06Modify ScFormulaCell's ctor to take a const reference to ScTokenArray.Kohei Yoshida1-1/+1
Instead of a pointer to ScTokenArray, and then clone its instance. If the token array gets cloned in ctor, take a const reference. Change-Id: I280fd7eb9eaea9905dbf954a1ace904ab0814dfe
2013-10-23Re-implement cell note storage using mdds::multi_type_vector.Laurent Godard1-83/+2
Change-Id: I34ea91e360e2a6b85d65f970c6e43db687d213ca
2013-10-23clean up places accessing the NULL at the of an OUStringNoel Grandin1-3/+3
There were only a couple of real bugs fixed, but we're a little bit safer now. This also fixes the assert and the comment in OUString::operator[] about this. Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-21drop CharSet typedefCaolán McNamara1-1/+1
Change-Id: Ia160d7cbaa2ee71773483c3f91306f89cdad5947
2013-10-11Use shared string's fast equality check for ValidQuery().Kohei Yoshida1-12/+26
Change-Id: Ib84087a10cc10a7533e64c4e8998354b52017df7
2013-10-11Add isEmpty() to SharedString. This simplies a lot of its call sites.Kohei Yoshida1-1/+1
Change-Id: I0ebc43abe59ac317c053a4f606dbe376d85c03b0
2013-10-11Store svl::SharedString in query entry items, and adjust all call sites.Kohei Yoshida1-8/+13
Change-Id: Ifd3bbb84c7abbe983a017a169c7e05914ef33450
2013-10-08Store svl::SharedString in document cell storage instead of OUString.Kohei Yoshida1-2/+2
With this, both ScColumn and ScMatrix store svl::SharedString as their string values, instead of OUString. Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350
2013-10-08convert sc/source/core/data/*.cxx from String to OUStringNoel Grandin1-14/+14
and fix a bug in ScDPCache::ValidQuery where an inner loop was re-using an outer loop counter. Change-Id: Ie750234a079646bdb7174983814d8d9caf52f491
2013-07-30More of the same. Will this ever end, I'm starting to wonder...Kohei Yoshida1-6/+6
Change-Id: I36bc90e8477cba306e107fb6d6e47f5732161df8
2013-07-25resolved fdo#67249 use ScFieldEditEngine to resolve field contentEike Rathke1-1/+1
ScEditUtil::GetString() iterated over the paragraphs of an EditTextObject where GetText() does not resolve field content but returns the embedded field markers. To resolve field content an ScFieldEditEngine is needed. This makes it necessary to pass an ScDocument* to obtain the ScFieldEditEngine from, or for cases where there is no ScDocument in the context use a static ScFieldEditEngine which unfortunately is not capable of resolving document specific fields of course, such as DOCINFO_TITLE and TABLE. Also added unit test. Change-Id: Ife3c23b2fec2514b32303239d276c49869786eb5
2013-07-02Re-implement the COUNT function for efficiency.Kohei Yoshida1-0/+31
By taking advantage of the block structure of the new cell storage. Change-Id: Ib953c14d364ccdff7df5caf70d57cec86189e3be
2013-07-02OUString convertion for unotoolsNorbert Thiebaud1-6/+6
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707 Reviewed-on: https://gerrit.libreoffice.org/4659 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-25Resolves: #i119637# "Case sensitive" in "Special Filter" dialog can not work.Wang Lei1-1/+0
Patch by: Clarence GUO Review by: Wang Lei (cherry picked from commit 0f04f29fbc7c1f3700343304c01e8934b6dad45b) Conflicts: sc/source/core/data/table3.cxx Change-Id: I7ffa7b82dc88b78982af2d5291f6c15b88a81c4c
2013-06-24Switch to using multi_type_vector for cell storage.Kohei Yoshida1-133/+164
The old style cell storage is no more. Currently the code is buildable, but crashes during unit test. Change-Id: Ie688e22e95c7fb02b9e97b23df0fc1883a97945f
2013-05-21fdo#46808, Convert some XMultiServiceFactory to XComponentContextNoel Grandin1-1/+1
and remove unnecessarily storing the global XComponentContext Change-Id: Ifb230b88661fea38d96a9d7f0994f92b9632ef79
2013-05-09Add this back. This was removed by accident.Kohei Yoshida1-0/+4
Change-Id: I9efa8dad078ca4f0bf1d338a5aab72ff7e65980f
2013-05-09Remove broadcaster from ScBaseCell, remove ScNoteCell and CELLTYPE_NOTE...Kohei Yoshida1-15/+2
and Calc is now officially broken. Let's start fixing this bit by bit... Change-Id: I383c88245fe1e573666da636c6a8ca8815352ce7
2013-04-20fdo#63154: Change Min/Max/Abs for std::min/max/absMarcos Paulo de Souza1-2/+2
Now all these usages were removed from LO. Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6 Reviewed-on: https://gerrit.libreoffice.org/3326 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2013-03-28Remove GetErrorCode() from ScBaseCell; only relevant for ScFormulaCell.Kohei Yoshida1-4/+5
Change-Id: I5c41fc88bf138411ded334f823ab6187401c96df
2013-03-28Remove some headers in cell.hxx.Kohei Yoshida1-0/+1
Change-Id: Ic99967a3ef6a35ca4fc465054e0d4de512cafb43
2013-03-28Move ScFormulaCell into its own header source files: formulacell.?xx.Kohei Yoshida1-1/+1
Change-Id: I65f2cb12c06784b5bcf6c6a2fad773825b6c409c
2013-03-27GetInputString() now takes ScRefCellValue instead of ScBaseCell.Kohei Yoshida1-1/+4
Change-Id: Ibf746351eb111a03be4f00ec719a4428c5fe47a4
2013-03-16sc: translate some debug messagesThomas Arnhold1-2/+2
Change-Id: I0c741d2cda4568aef81a18788a764f3ef679660c
2013-03-04RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removalsKrisztian Pinter1-20/+20
Change-Id: Ica78f316d481130c28da83f92561206518342eaa Reviewed-on: https://gerrit.libreoffice.org/2483 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-02-19fdo#38838 ScGlobal::GetRscString() now returns OUString instead of String.Jean-Noël Rouvignac1-2/+2
Cleaned up the call sites. Change-Id: I6c688cecd4f872ed064ccfa3af4b402a779860dc Reviewed-on: https://gerrit.libreoffice.org/2155 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-12-04re-base on ALv2 code. Includes:Michael Meeks1-23/+14
Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-11-30fdo#46808, use service constructor for i18n::CollatorNoel Grandin1-1/+1
Change-Id: I15a360723e335345aad09e73fcb0f6815ed9e0d4
2012-11-01No more "increase / decrease of recalc level" for drawing objects.Kohei Yoshida1-12/+0
That scheme made it extremely hard to determine when the object's positions get recalculated. It's better to figure out when to recalc drawing objects' positions, and call SetDrawPageSize() manually at that point (and only once!) Change-Id: I05d9b693cfc9310f5472ed8287c7a2e36646f4d7
2012-10-12mark lcl_ functions static or rename them if they are not local at allLuboš Luňák1-1/+1
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html Change-Id: I231f0b367bf0b513c6c1ce4c4cfdb7c3dc8660d5
2012-10-10fix for fdo#53814 Revert "there should be no need any more for this check"Noel Power1-0/+4
This reverts commit bea018a7040c36e91487b27c7b59c6c8a970bf5f.
2012-10-06adpat ScTable methods to overlapping conditional formatsMarkus Mohrhard1-17/+0
Change-Id: I2f63ac7884f0897aa47fd4ee35b8af06553c311c