summaryrefslogtreecommitdiff
path: root/sc/source/core
AgeCommit message (Collapse)AuthorFilesLines
2015-10-07Probably good to move the more complicates test after the light-weight onesTor Lillqvist1-3/+3
We will return false if any of the tests here match, so good to test the trivial things first before ones involving a potentially complex function call. Change-Id: I531282041c888799d37d95ae773daa349e60a37d
2015-10-07tdf#94173: Calc doesn't save your own created autoformat presetsJulien Nabet1-0/+10
Auformat list (maData) is defined as "MapType" which itself is defined like this: boost::ptr_map<OUString, ScAutoFormatData> so default sorting is ascii 2 consequences: 1) Default didn't appear first 2) When adding a new autoformat entry when it was new first one of the list wasn't saved because of iterator was incremented first before looping See https://bugs.documentfoundation.org/show_bug.cgi?id=94173#c5 There were some other weird behaviors too according to comments of the bugtracker Regression from http://cgit.freedesktop.org/libreoffice/core/commit/?id=72c1b6141d590fb4479925ed8bc88b79357c2bfc Solution: Add a Compare so Default entry is always first one so the first time incremented iterator is ok and new entry (even if new first one in list) is saved Thank you Markus for the idea! (I was lost in Compare syntax) Reviewed-on: https://gerrit.libreoffice.org/18598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 652158c3f2c9cd0d6f71ecd14bf5d5cc02a71b50) use collator for UI visible sorting, tdf#94173 follow-up (cherry picked from commit a71febc99d2cfc2fe51dec8c0bca5d84d8577168) b9f7ebb087c1ce5008f43b2df3f1fadc41066ed1 Change-Id: I9ba0cdc63c66b747db102bb661cd09fbfe5996ae Reviewed-on: https://gerrit.libreoffice.org/19029 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/19152
2015-10-02follow up of tdf#94214Winfried Donkers1-0/+1
provide forward compatibility for name change of FINV Change-Id: I0afd2555be94c452172e5a357f2f0897be381863 Reviewed-on: https://gerrit.libreoffice.org/18814 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-10-02fix IterateMatrix for ifPRODUCT and ifSUMSQEike Rathke1-1/+2
... if more than one argument is passed to PRODUCT() or SUMSQ() and matrix/array arguments are involved the functions returned wrong results. For example, wrong behavior =PRODUCT({2,3},{4,5}) gave 6 =SUMSQ({2,3},{4,5}) gave 34 Correct is =PRODUCT({2,3},{4,5}) result 120 =SUMSQ({2,3},{4,5}) result 54 Change-Id: Iec7b136a5cc678416f28b1abfe19cd0901ef22b6 (cherry picked from commit c1780ad265ce5f6abb3b91a4f70bf2b3d7a47149) Reviewed-on: https://gerrit.libreoffice.org/18867 Reviewed-by: Łukasz Hryniuk <lukasz.hryniuk@wp.pl> Tested-by: Łukasz Hryniuk <lukasz.hryniuk@wp.pl>
2015-10-02Revert "Fix a bug in SUMSQ"Eike Rathke1-1/+0
This reverts commit 2c6b94672e8536ade098244c9c32e67dd23e119a. Just discovered that this is wrong, sorry for fuzz. Change-Id: I66f0d69ee6f558d2dc968ecdfff6f9dd42332a7e Reviewed-on: https://gerrit.libreoffice.org/18845 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-10-02Fix a bug in SUMSQŁukasz Hryniuk1-0/+1
The same one as was in SumMXMY2, with IterateResult. Change-Id: I18a5993493ca7514848baad25232f4c254c1e044 Reviewed-on: https://gerrit.libreoffice.org/18765 Reviewed-by: Łukasz Hryniuk <lukasz.hryniuk@wp.pl> Tested-by: Łukasz Hryniuk <lukasz.hryniuk@wp.pl> (cherry picked from commit 793d1aba304217dcea6707a4b8acf5ac09f62e5a) Reviewed-on: https://gerrit.libreoffice.org/18842 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17Resolves: tdf#93895 broadcast cell changes when multi-selection was pastedEike Rathke1-4/+12
It is not sufficient to collect the cells, one has to broadcast on the collection. (cherry picked from commit 97ad6393525a928b5dfe2a6562d7604446da7af0) Conflicts: sc/source/core/data/document.cxx Change-Id: I11f889936aff43f958c56789e539809289819752 Reviewed-on: https://gerrit.libreoffice.org/18575 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17Resolves: tdf#94249 do not remove broadcasters while iterators are in useEike Rathke3-12/+19
EndListeningContext holds BroadcasterStoreType iterators in its ColumnBlockPositionSet and collects broadcasters to purge them at the end. Removing broadcasters from ScColumn::maBroadcasters in between invalidates the iterators. Hence calling the "normal" EndListening() that removes a broadcaster when all listeners are gone while an EndListeningContext is in use is bad. Change-Id: Ibdd88469e91e6173ceff1f391c23ef7cb7c6f596 (cherry picked from commit e4a8ae0bf54476e9a0c9e1f5348c05f3cd838899) Reviewed-on: https://gerrit.libreoffice.org/18618 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-17Resolves: tdf#92995 do not delete caption objects that are held by UndoEike Rathke3-3/+25
Drag&Drop Undo is a special case of ownership.. Change-Id: I2fe7769c4d84efe09d432335d5d8e72d506bf7a1 (cherry picked from commit 44f34c1163882c2e3086282374fee9cd55ee211f) Reviewed-on: https://gerrit.libreoffice.org/18474 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31MATCH, HLOOKUP and VLOOKUP have a ReferenceOrForceArray parameterEike Rathke1-3/+3
tdf#91278 related Change-Id: Iab4728b07649bcbb1beb372e68369f3762b13a5c (cherry picked from commit 01eea7fe40c939311bf1920b6e8b4391a93c2e82) Reviewed-on: https://gerrit.libreoffice.org/17265 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31Resolves: tdf#88402 remember sort "has headers" at anonymous database rangesEike Rathke1-0/+21
Change-Id: I4a126f40589fd401f3a63f74be5e86e3df947ef6 (cherry picked from commit 33255f974fc712b9e9e2965a350c65a2195a7ae6) Reviewed-on: https://gerrit.libreoffice.org/17140 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-31Resolves: tdf#58838 do not use collation for Equal/NotEqual operatorsEike Rathke4-18/+28
Unicode collation ignores control characters and other specific characters, see http://www.unicode.org/charts/collation/chart_Ignored.html and thus is not suitable to be used for Equal/NotEqual operators. (cherry picked from commit 1e5e7b9323c3321a380edf86097ccc2e3f0a7a7a) Conflicts: sc/source/core/tool/interpr1.cxx Change-Id: Ib84713e1da59d92e07bc974d93b6def8217bb067 Reviewed-on: https://gerrit.libreoffice.org/17238 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-08-20Resolves: tdf#92749 invalidate lookup caches after initial hard recalcEike Rathke1-0/+8
... because the caches are not setup as listeners during when the document's hard recalc state is active. Change-Id: Ie7ec84ee64d046e3e55ce26b92824e94a2f660e9 (cherry picked from commit f7e493229bd949066b4d8984dce7678b8687d1ae) Reviewed-on: https://gerrit.libreoffice.org/17832 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20Resolves: tdf#93358 resync attribute pattern that may have changedEike Rathke1-1/+13
Change-Id: If3ce8feec940c7212fe467f39db868630522b17e (cherry picked from commit f089de7dc5c367a3123129b08a9050b3bacc4eba) Reviewed-on: https://gerrit.libreoffice.org/17766 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20Resolves: tdf#93098 replace remembered listener when replacing cellEike Rathke1-2/+14
... where SvtListener* is the base of ScFormulaCell* and lead to use after delete. Change-Id: I45b8e16f05cf5d4d0d4858dc9cd0c748f8184978 (cherry picked from commit ea29d320754fdb21b336cb78f816b8081371def9) Reviewed-on: https://gerrit.libreoffice.org/17727 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20Resolves: tdf#92448 check for numeric '.' only if sheet separator is '.'Eike Rathke1-1/+1
Change-Id: I427da08eed3fc5daed2bac4d588b66a3f03fd28c (cherry picked from commit 2fd3560e0815b547ada7d7f6557857fe3c8678ba) Reviewed-on: https://gerrit.libreoffice.org/17245 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-20Resolves: tdf#93388 broadcasting to removed listeners isn't a good ideaEike Rathke1-5/+15
This cures only a symptom, the underlying cause is that the broadcasters still are listed in maBulkGroupAreas. Change-Id: I9625483016a51eb6f6a7e3d58ed42c7dad3a57b3 (cherry picked from commit 2d4edd7de2e67db5bd17e7a89e2496611ebcc165) Reviewed-on: https://gerrit.libreoffice.org/17685 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03Resolves: tdf#92767 use ISO 8601 for internal date string representationEike Rathke1-0/+4
Change-Id: I481bf3295feb64827de2122234a9300d0b8ced40 (cherry picked from commit 3e17ed1fc2845da5a279d21ffa3ea51d637e515e) Reviewed-on: https://gerrit.libreoffice.org/17173 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-03execute the terrible bottle neck loop only if there are conditional formatsEike Rathke2-2/+15
(cherry picked from commit 2aefb89b299e7ebdca5bb35aa4e9059e59805715) Conflicts: sc/source/core/data/documen7.cxx Change-Id: Ic8bd65a728289c9fa1a0721b0ecbd9b4a48672ca Reviewed-on: https://gerrit.libreoffice.org/16903 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-08-03Resolves: tdf#84762 collect all recalc-always cells before setting any dirtyEike Rathke1-6/+14
(cherry picked from commit bf35419b68d7f100a634572236f7d593638981c8) Conflicts: sc/source/core/data/documen7.cxx Change-Id: I38f69bcbb9eb550fb97b0f84bc0cb486863060b4 Reviewed-on: https://gerrit.libreoffice.org/16872 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03use ScMatrix::IsValueOrEmpty() on math operators Mul/Div/Pow, tdf#91453Eike Rathke2-5/+18
... which aren't implemented at ScMatrix yet. Using IsValue() worked when errors were not propagated, and before that when errors were propagated because ScMatrix didn't have empty elements but instead was initialized to 0.0 Change-Id: Ib9c6d34f2e6a68e483b606923cbcc41a3c1d2f51 Reviewed-on: https://gerrit.libreoffice.org/16799 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03always justify a referenced range in order, tdf#92468Eike Rathke4-0/+123
(cherry picked from commit d24c6a0280b0287ee6c23ca89068323c6b7c3dd7) (re-)introduce ScComplexRefData::PutInOrder(), tdf#92468 (cherry picked from commit ad3d2b6c2e88d191d76f90eb5be927f7ca76c670) introduce ScTokenArray::AdjustReferenceOnCopy(), tdf#92468 (cherry picked from commit 369ee0b1faf79f1bd23c75ee04dd0dcc5bf283af) call ScTokenArray::AdjustReferenceOnCopy() in ScFormulaCell clone, tdf#92468 (cherry picked from commit 3ddaeaab37d585971e376de6ad7b0f06f55f2e1a) f551e02a77a416b95f74266de896391d1d72eb3c 0a7ac0d9d10e96223cd5f095a771aa6f9d271417 0dc0c3528b35bc6ea2525bafb94d72ee65e4791a Backported. Change-Id: Id69c58800d28f1733777f7931a20d8ee7bdf034f Reviewed-on: https://gerrit.libreoffice.org/16829 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-03end/restart group listening in DeleteSelection(), similar to DeleteArea()Eike Rathke1-0/+63
Reproducer: * in A1 enter =SUM(B1:C4) * copy A1 to clipboard * paste to A2 and A3 * formula in A2 is =SUM(B2:C5) A3 is =SUM(B3:C6) * select A2:A3 * hit Del key to delete the two cells * enter any numeric value in B2 => formula result in A1 is not updated Shift+Ctrl+F9 hard recalc updates Change-Id: I55e55b8cfe69e9273170ceaea4e6c046b3d4f7b7 (cherry picked from commit a49b8af4cf03ae08cb7a28f66e24368a7b08ae3f) Reviewed-on: https://gerrit.libreoffice.org/16838 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30tdf#44419 in second reference part stop number parsing at separatorEike Rathke1-0/+12
Change-Id: I70218bc41df0d56ab42d652aa7ac51733dc06f4b (cherry picked from commit 71dba79c1c84d693a59c53a8965caef0ddd1c2cc) Reviewed-on: https://gerrit.libreoffice.org/16496 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30Resolves: tdf#83365 push proper references in INDIRECTEike Rathke4-4/+96
... that take relative/absolute addressing and sheet 3D flag into account to be fed to reference extension via range operator. (cherry picked from commit fb6dd2a73074b9695bd8ddf7ba40f1819b03024e) properly inherit relative and 3D flags when extending, tdf#83365 related Commit 194e9f9bae28bdf22a9ed4779c1656ee693f3302 oversimplified things. (cherry picked from commit e503addfbbe45efe1a3c06392c66fb79c3c72d07) Change-Id: Iabe13ae384577e2d71ca87af6482ddccbf7ad0ac ea6a84c4a7be49af036690afbb1512ae2c1045a2 Reviewed-on: https://gerrit.libreoffice.org/16352 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30tdf#90717 prevent crash, not really fixedEike Rathke1-1/+32
Try to resync shared group top and length. Change-Id: I31bd0db7c1dceb880a22274edc4c3f20ce253095 (cherry picked from commit d8541c2a62121894bf87c91f1f89aea1ea30d680) Reviewed-on: https://gerrit.libreoffice.org/16533 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30Resolves: tdf#31577 volatile lookup ranges must not be cachedEike Rathke1-1/+7
Change-Id: Iac8574329c8c8e0bc0ac956993ccdd085372a6cc (cherry picked from commit 5e83f49e5d62587f427ad416f5188ce81506c05b) Reviewed-on: https://gerrit.libreoffice.org/16598 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-30a singleton must be fully parsed to be valid, tdf#44419 relatedEike Rathke1-2/+2
No trailing characters must be present in 1:1 or A:A full row/column references, e.g. 2:2,2 is not valid. The original cause is the lexical analyzer that accepted 2,2 as the second part after the range operator because ',' is also the group separator here, which needs further changes. Change-Id: Iff354469f7dcb4e0b6fa645c39cc1f8ebad4a6ea (cherry picked from commit c48af2b55a60492565b987ee65d98edc6bd94533) Reviewed-on: https://gerrit.libreoffice.org/16490 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-18Resolves: tdf#86305 clone upper left of matrix result if double tokenEike Rathke1-5/+14
Change-Id: I541577e0b99b0144a755e5755adc890c0ca8d204 (cherry picked from commit ffc1ffed11dc63a69fc2db04f12b3ea266b580fe) Reviewed-on: https://gerrit.libreoffice.org/16326 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-18do not access token data after token has been destroyedEike Rathke1-1/+1
Change-Id: I624e64745fd3874be3e1bd3df6bac18dfb17aebb (cherry picked from commit c1fc84ac140d519e0bfa7a607e36771682b08eed) Reviewed-on: https://gerrit.libreoffice.org/16258 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-18Resolves: tdf#91411 end listening only on selected sheetsEike Rathke1-4/+7
... not in cell areas of all sheets. (cherry picked from commit 80ec99db4325a439a8a3f1d420d0a80f8bf9c439) Conflicts: sc/source/core/data/document.cxx Change-Id: I8d19c15c6d8d89652ac5695214bc4dd930783087 Reviewed-on: https://gerrit.libreoffice.org/16303 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-18Resolves: tdf#89643 report builder function wizard segfaultsCaolán McNamara1-3/+4
regression from commit 3d6521280929ecacc53b7c358d29d0b5d31b3462 CommitDate: Thu Jul 31 22:14:25 2014 +0200 fix memory leak around function descriptions Found by Lsan. There are two implementations of getCategory, one (sc) returns a new one each time (hence the leak fix) and the other (reportdesign) returns a pointer to one that belongs to the manger (hence the crash). The code in formula really looks to me to expect that the getCategory return a pointer that "someone else" needs to look after, i.e. the reportdesign variant is the more correct so revert 3d6521280929ecacc53b7c358d29d0b5d31b3462 and to fix the leak make the sc own the ScFunctionCategories and just cache them like the reportdesign one does Change-Id: Ifd986301a54b4d20449e864697655cd973e0c4df (cherry picked from commit 7c3abee29c742593206b755b20a718c46f0780fa) (cherry picked from commit 73107eb3375f1671f549f0467be2812df9223848) Reviewed-on: https://gerrit.libreoffice.org/16232 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-06-18Resolves: tdf#91416 setting progress -> resize -> destroy formula contextCaolán McNamara3-7/+31
i.e. setting progress triggers ScTabView::DoResize and an InterpretVisible and InterpretDirtyCells which resets the mpFormulaGroupCxt that the current rCxt points to, which is bad, so disable progress for the duration of the GetResult loop Change-Id: I8e88cee4dd2308ef61dee934d300a38978833703 (cherry picked from commit e3c1a394a00cef416a81b89b6d5c204891abb286) Reviewed-on: https://gerrit.libreoffice.org/15926 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-06-14tdf#89972: also copy external reference statusMike Kaganski1-5/+13
fixes regression from commit 4467c67dc8bf17c67c70985c0d0ea64636884f9f, where the new optimized code path failed to properly register ScFormulaCell with ScExternalRefManager. Introduces a new public method in ScExternalRefManager: insertRefCellAsTmpl that registers a formula cell to listen to the same external references as template cell Introduces new property to ScFormulaCell: mbIsExtRef that indicates that some external references are referenced by this cell Also introduces new method ScExternalRefManager::hasCellExternalReference (for use in unit test, will be posted immediately) Change-Id: Iee07d7b51949fd31953b5fa662a213052eb85181 Reviewed-on: https://gerrit.libreoffice.org/16066 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 17282387d650e843e0f5a28611d91597ccd09970)
2015-06-123D refs with more than one sheet should not set sheets deleted, tdf#90001Markus Mohrhard1-4/+37
correct 3D reference update on sheet deletion, tdf#90001 follow-up be1b3daeeb64a44e577510561d02147b87db72c2 missed a few cases * a deleted reference start was shifted by two sheets instead of one if the formula was on a sheet before the deleted one * a deleted reference end was not correct if the formula was on a sheet behind the deleted one and used relative sheet reference * #REF! wasn't set when the entire referenced range was deleted (cherry picked from commit 20e4ccc6ba366cd70c9218e016ccff4025e3d816) b9c7492a651a8429fa1c411c8e447593e366e09d Change-Id: I501ad421c283ec6a1f2629aa424f4d4c32228516 Reviewed-on: https://gerrit.libreoffice.org/15043 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-06-12tdf#90996: don't overwrite comments in ScTable::FillFormulaVerticalMike Kaganski1-1/+1
IDF_CONTENTS includes IDF_NOTE, which should not be used here Change-Id: I904fbdbfcb97865a5682d9073e0ce2d5a2c694fb Reviewed-on: https://gerrit.libreoffice.org/16085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit a977937927729eaff61bd670fdd45d3508b19371) Reviewed-on: https://gerrit.libreoffice.org/16091
2015-06-12Resolves: tdf#90435 secondary pool set to that of temp docs drawing layersCaolán McNamara1-2/+2
overwriting the original one, and when the temp doc goes away then its drawing layer goes away autoamtically settings the secondary pools of the other pools it is a secondary of back to 0 (see also tdf#87245) Change-Id: Ie6dd8d615f81cf4d4776eaeac1cc2507b2abaa37 (cherry picked from commit 8ae25bbc092254f680e2976873f15bdbc26615ef) Reviewed-on: https://gerrit.libreoffice.org/16075 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-06-10check bounds in RPN tokens, tdf#90694 related and othersEike Rathke1-114/+163
Listeners are set up from references in RPN, so check those for bounds to catch also references resulting from named expressions, database ranges, tables, ... and references in the token code array that are not referenced in RPN. (cherry picked from commit 4baf76ddb39580678cf14019900be78bb9071d7b) Windows MSVC: cannot specify explicit initializer for arrays (cherry picked from commit 883ebe0283dc6bdf62f08191dede2a249f777f63) c42897ba6bb520c931f63e56d0f453ed14cfaa3d Change-Id: I54770b45818f4c0541a39815278d3271a77b345d Reviewed-on: https://gerrit.libreoffice.org/16154 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-10tdf#90694 reset group area listeners when splitting groupEike Rathke1-2/+14
(cherry picked from commit 2f6a06856ad8df0c11a112d1e457b408e9a7af1d) tdf#90694 reset group area listeners on correct top Follow-up on 2f6a06856ad8df0c11a112d1e457b408e9a7af1d, rTop is top of created group, listening needs to be ended on original (previous) group. (cherry picked from commit 5d6448a5131488eac3a6af16bff06140663c3db4) 1f975a0a6c85e649aa07ce5c6e97bc6e917ff9ce Change-Id: Ib3e85e1f7e12447fc2998711663ea1e9d1b322e5 Reviewed-on: https://gerrit.libreoffice.org/16104 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-10tdf#91425 CRASH - Calc Insert Columns LeftTakeshi Abe1-20/+26
This fix is a SCCOL variant of: commit c66d1b9fcc2244b4fd8940f17ebf4e772f09c84e Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu May 5 00:23:25 2011 -0400 fdo#36406: Let's not use invalidated iterators. std::set::erase(iterator) call invalidates the iterator of the erased element. We better not use it after the erase() call. Since the number of manual breaks should not be high enough to cause a performance bottleneck under normal usage, a safer linear copy should just be fine. Now, I'm not sure if this indeed is the cause of the erroneous amount of manual breaks in the test document, but I didn't see any other likely spot. Change-Id: I0c2e8f738949776aa7f8ea5528e2c0eeb9351c16 Reviewed-on: https://gerrit.libreoffice.org/16063 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 1ba1cbe48c40d649c33661abb32369c39a23fff4) Reviewed-on: https://gerrit.libreoffice.org/16081
2015-05-28Resolves tdf#67712 form controls and draw objectsHenry Castro1-0/+59
anchored to cell but changes position after reopening Also included tdf#68797 "FILEOPEN lost position of lines anchored to cell". It was marked as duplicate but the step to reproduce are different. Conflicts: sc/qa/unit/subsequent_filters-test.cxx Conflicts: sc/qa/unit/subsequent_export-test.cxx Reviewed-on: https://gerrit.libreoffice.org/15523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 487880b6882ec01c1b4679eae60bec484272a86b) Conflicts: sc/qa/unit/subsequent_export-test.cxx Change-Id: Ia1c4010f118749256077a0ecad6ca16b867d22f7
2015-05-08Resolves tdf#90757 ensure start row / end row order makes senseEike Rathke1-5/+4
... in case the header is the only row. Change-Id: I5e6046007a8d668f9834e108aaf8af0072629fc8 (cherry picked from commit 46fa99f61aff88f1697959a9d3c41a5c3c3c05e9) Reviewed-on: https://gerrit.libreoffice.org/15631 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-08Resolves: tdf#91078 check also DBData modified, not only named expressionsEike Rathke4-21/+35
This adds ScDocument& to all RefUpdate...Context; another approach could had been to add an UpdatedDBData similar to UpdatedRangeNames and gather those in the ScDBData::Update...() methods, but as long as ScDBData::IsModified() works that isn't necessary. (cherry picked from commit 848dc76e76c1c4a9040be4a0088c4d4527af6f40) Conflicts: sc/source/core/tool/token.cxx assume modified if an index has no corresponding ScDBData (anymore) (cherry picked from commit 4a53021f0662e08b56fd076f78ac182634fcec4c) 16cbc7d772f39c8778b8ba21a629ced6b0dbedeb Change-Id: Iae3ec6c8b8356cbd8acb2445489e91e7d6922fb3 Reviewed-on: https://gerrit.libreoffice.org/15654 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-23tdf#89957 prevent crash, not really fixedEike Rathke2-12/+46
See source code comment. (cherry picked from commit cff5ee864b2d87d74079697425d7895dbf1b2ba4) more SAL_INFO sc.core.grouparealistener (cherry picked from commit b03563571fb922636635ea72f2dbda18d736ff89) Conflicts: sc/source/core/tool/grouparealistener.cxx a3c75e626edee3ad28ad5b7eb80f729ae8aaa83f Change-Id: I3ab7ab6aec1d782de0733064fea031c895f28965 Reviewed-on: https://gerrit.libreoffice.org/15331 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-14use error value instead of string in array/matrix, tdf#42481 relatedEike Rathke3-53/+40
Change-Id: Iaacf5636749077efc6f91f0eb0bac477cfcf4553 Reviewed-on: https://gerrit.libreoffice.org/15129 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-04-14string access out of boundsEike Rathke1-9/+14
Another UniString to OUString conversion fallout. Change-Id: I5e62b049da3e7f8b5a892ea6aae7110a33564a46 (cherry picked from commit 9f52efa43b2d65c0b6c92790cc2859e752bf975f) Reviewed-on: https://gerrit.libreoffice.org/15286 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-04-14fix crash on re-export of fdo64646-4.xls back to xlsCaolán McNamara1-5/+7
Change-Id: Ic6d6e7d7d8d42af0fc739d964a1190d40f9dba2e (cherry picked from commit b56b5d449fc74809fddc9b9bbd1d9f8d244a0d10) Reviewed-on: https://gerrit.libreoffice.org/15190 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-04-04Resolves: tdf#35636 implement match on empty cellsEike Rathke6-21/+40
This implements search criteria "" and "=" to match empty cells in spreadsheet functions SUMIF, AVERAGEIF, COUNTIF, SUMIFS, AVERAGEIFS and COUNTIFS. Change-Id: I1b4a4c14bac7b974428bf64afb549707a0d75a90 (cherry picked from commit 01b615687fe0f39c65e0e8290db434db2f1ef8ac) Reviewed-on: https://gerrit.libreoffice.org/15091 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-04Resolves: tdf#88672 add missing return if error to not crashEike Rathke1-0/+1
Change-Id: Iae73c46d6ae5b141c3f5680b2623ee06205c22d2 (cherry picked from commit 3cae8ee10f297e42adf9f3b33809b4e7e3af2840) Reviewed-on: https://gerrit.libreoffice.org/15111 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-04-04we need a more intelligent increment for the iterator, tdf#90391Markus Mohrhard1-6/+26
Change-Id: I5a980f0b1ca47b18ce2e479e46971d7c6690c437 Reviewed-on: https://gerrit.libreoffice.org/15125 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/15126