Commit Graph

287 Commits

Author SHA1 Message Date
b2ee0235e8 fdo#80501: Ensure that we notify each listener only once.
Change-Id: If2ce4643ff58c7c2ba326d749698dd5196a108dc
2014-07-30 11:04:49 -04:00
37e6631cc5 remove whitespace
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-06-25 05:41:10 +02:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
9ea3e3a2fb column storage might be changed, related lp#990868
Change-Id: Ibd196484c8c5199e7398726a250082c266a89229
2014-06-07 04:48:17 +02:00
054213e86b fdo#78976: Correct way to determine the end position for matrix check.
Change-Id: Ifd6acd85a9bf33742cb62327a3b8a4320f35d0f3
2014-05-27 14:48:50 -04:00
8d54796bf1 enhance pass-by-ref plugin to detect large arguments
Detect arguments larger than 64 chars passed by value.

Change-Id: I9b0ea9ccb99d115984a26eab67c9cf6afd5f6cae
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-20 11:17:22 +02:00
ffa2229a8e remove dead code
Change-Id: Ic4fb478921714429af138ca212bd7f67f408d434
2014-05-13 12:00:27 +02:00
28fe3628ed o3tl::default_deleter->boost::checked_deleter
has the same result

Change-Id: Ifbebcfb26c6fc54d03522c924da86837d7dfa3b9
2014-05-12 20:25:40 +01:00
e2f94a8e2c Move this function object to o3tl.
Change-Id: I9d1710fbed3c5753e84ed343c5136ab87909624d
2014-05-12 13:47:31 -04:00
2bac61013e fix-includes.pl: sc
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-05-11 01:55:39 +02:00
7fbe0f5619 fdo#77806: Use the common block position set for start and end listening.
Else an invalid iterator may result, which would eventually leads to a
crash.

Change-Id: Ie909de61244d661c72a3450cc69b29fbb218a248
2014-05-01 12:17:45 -04:00
3c4fb52d8f fdo#78079: Re-work sort by column to get it to do the right thing.
Also fixed reference update problem.

Change-Id: I06e6115ef969a011fdd5c92d5eb1927fb7ae789b
2014-05-01 01:18:50 -04:00
dafce0665c fdo#77728: Re-compile tokens when named range is updated.
Change-Id: Icd9f8c60d9e105478abb5b5ad64e969623830a4c
2014-04-25 00:58:14 -04:00
bc3b3d1dc6 Avoid possible memory leaks in case of exceptions
Change-Id: I03096fe1da8a111312f9384b94cfcb2ead7b3d38
2014-04-24 23:52:26 +09:00
3f41b12c66 SwapRow() is no more!
Good riddance.  It was optimized for the old cell storage.

Change-Id: I374194fe211d5b13dd60dbb68b9511a366fb32bd
2014-04-23 21:08:26 -04:00
daaa302677 Move cell notes too when sorting.
Change-Id: Ibb330aa6f515d756c5578296fd9c83aa235a59fd
2014-04-23 21:08:23 -04:00
97c0f88afc Store cell text attribute pointers during initialization.
This will be used later when re-ordering rows.

Change-Id: I47504b49be11174b0002b1af1cbce9b8b7f2531c
2014-04-23 21:08:19 -04:00
355baf5734 fdo#75741: Re-implement CompileNameFormula for formula groups.
Change-Id: I57e1e464ac5f7abc10ce5ea5752e036ddb6cf6d7
2014-04-07 14:43:16 -04:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
003a27a14d fdo#74322: Handle moving of named ranges correctly.
But named ranges are adjusted if and only if the references are absolute.

Change-Id: I6c5287b413884b045f1a798c6c6683aa17863f24
2014-03-25 22:37:10 -04:00
474b2ea601 fdo#76470: Avoid joining new formula cells individually.
Instead, insert the formula cells in the group first, then only try to join
the top and bottom cells afterward. Otherwise the grouping would get messed
up and a problem would ensue.

Change-Id: I4fdd5326c029032a636d8225b5fb16cbde427c7d
2014-03-22 09:51:41 -04:00
8b368d808e Unregister all listeners first then re-register them.
It's safe this way in case we are transferring them within the same
column.  Any empty broadcasters are checked and purged at the end.

Change-Id: Ib2d46e616cde4923720ad21cb101d3a97dc8c5d9
2014-03-15 11:48:18 -04:00
88955714d3 fdo#71491: Adjust reference during undo of drag-n-drop of cell range.
Also with this commit, the signature of SvtListener::Notify() changes,
by dropping the first argument which nobody uses.  This change was necessary
in order to call it directly without needing to pass any broadcaster instance.

Change-Id: I6a1e97f0fb1e070d1d8f7db614690b04c9e8024e
2014-03-15 00:15:06 -04:00
0698c49ccd fdo#72741 - swap values only inside a formula group.
Speeds up sorting large ranges containing formula groups by a
computational order or two: can sort 1 million rows of =A1 in sub 10s

Change-Id: I729c801e68154986956b1726e1c35ef973cc4248
2014-03-14 16:36:06 +00:00
18909ddb30 fdo#75977: Clear sheet deleted flags for affected references when undoing.
This will allow formula cells to restore deleted references when they get
recalculated.  With this change, SetDirty() that previosly took no argument
has been renamed to SetAllFormulasDirty(), and it now takes one argument that
stores context information.

Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5
2014-03-12 22:00:07 -04:00
693be3a6e4 coverity#707988 Uninitialized scalar field
Change-Id: I06b82d24d4be50e023aa1a1d8aa386d3138d1990
2014-03-09 21:20:11 +00:00
3cea6bb577 More consistent number format inheritence policy.
The new policy is to always inherit number format of a formula cell
from its reference unless the cell already has an explicit number format
set.

Also to avoid recalculating formula cells on load just because they have
the 'General' number format.  This leads to excessive re-calculation of
formula cells upon load even when the cells already have results cached.

Change-Id: I28128d3fef296e09e62bea72e8aab75de9876239
2014-03-08 18:09:51 -05:00
f32df2d590 fdo#75053: Adjust reference update on shift for formula groups.
This is similar to my earlier fix for reference update on moving of
cells.

Change-Id: I592599507bfcab12f611eeae7b56c99da6c31919
2014-02-28 21:28:57 -05:00
79d03eb090 fdo#75386: Totally fix reference update during range move.
It was just not working at all due to multiple reasons.  The
reference update needed to be reworked for formula groups such that
the token array is adjusted only for the top cell but all formula cells
still needed to be processed afterwards.  The bound check also needed
to be done against the old range prior to the move, not the new range
after the move.

During undo, the paint had to be deferred until after the two calls to
DoUndo() else the formula cells would get re-calculated before the
values were placed back to their old positions, causing them to mis-
calculate wrong values.

Change-Id: Iba66f80a413e0539cac5ab619226cd6f7a04f317
2014-02-25 22:53:39 -05:00
1da03a88a9 fdo#74209: This search algorithm had another issue. This fixes it.
When the search range was i.e. 1-3, and the match was found at 5, the old
code would return 5 when in fact it should have failed.  This change would
honor the end position and limit the search within specified search range.

Change-Id: If12a92fd3930ad128a5b0699a1addd96fb3a8eba
2014-02-10 22:40:33 -05:00
1e3ef350d7 fdo#74414: No need to incremenet nRow here... It's just plain wrong.
Change-Id: Iecdbb3eba46ddf2f2bc4f2334c7d45a4e2d801c8
2014-02-08 09:45:50 -05:00
bba69a3449 resolved fdo#74622 re-intern shared strings copied between documents
Change-Id: I64719e12be1f1c61bc86c99f1698f35db87d97be
2014-02-07 21:30:33 +01:00
bc504b5adf fdo#74556: Correctly handle note captions life cycles.
When copying notes to clipboard, we don't clone captions but leave them
pointing to the original captions objects. Also, during undo and redo,
we need to clear all caption pointers to prevent them from being deleted
when the ScPostIt objects get deleted. The undo and redo of caption objects
are handled in the drawing layer afterwards.

Change-Id: I2b9cf0858dba5b3cac26db3ef501ea09779a795a
2014-02-05 23:06:27 -05:00
e12747c8cf -Werror,-Wunused-private-field
Change-Id: I86e069e14d82be311368662f5128b30a7d00be90
2014-02-05 09:43:12 +01:00
01a55d5605 Cover all the other "compile all formula cells" methods.
Change-Id: I434aeb97a32d4b70846c7b3a7c701f90f43bad8a
2014-02-04 15:39:09 -05:00
295a55b647 Use CompileFormulaContext in CompileDBFormula() and CalcAfterLoad().
Also make some adjustment in order to handle formula cell's "temp grammar"
correctly.

Change-Id: I6fdd5c67bb95e4de90ea71db624c9610c1e2febf
2014-02-04 13:49:09 -05:00
3e2ffb053f fdo#72470: Correctly calculate the first edit cell row position.
Else it could go into an infinite loop.

Change-Id: I269cd118dcb3ab83ea8a2243576a360d3d4bc142
2014-02-03 14:45:10 -05:00
f5d8029a45 fdo#74014: Broadcast changes during undo and redo after paste.
Change-Id: I271bbba5e5eb70e48274a4a062d125456af8ff6c
2014-01-29 15:46:06 -05:00
f571104ef3 fdo#69244: Avoid putting these cells in formula tree prematurely.
Marking the cell dirty alone appears to be sufficient to trigger resetting
of number format.  SetDirty() would mark it dirty *and* put the cell into
formula tree, which would prevent proper value propagation as seen in the
bug report.

Change-Id: Ie68f996112938fe286a9bd50c38404f9df6f4ca1
2014-01-27 19:11:55 -05:00
20b7476142 resolved fdo#71598 postpone SetDirty during Insert/Delete
... until after all listeners are re-established.

Change-Id: I9f6036d4bcc9206191959a88ed5439b9860ca268
2014-01-23 22:48:03 +01:00
42f551d524 resolved fdo#72293 correctly split grouped formulas and regroup
Grouped formulas need to be split at both edges of the deleted area,
regroup _after_ rows have been deleted.

Change-Id: I840806f30cef592e17b4cd3a33c81fd2a8309055
2014-01-15 23:14:05 +01:00
20ecc5b59d correct loops in UpdateNoteCaptions for notes
Change-Id: Icec072eea61a194d72ce00c58dfbd85b1ec85abb
Reviewed-on: https://gerrit.libreoffice.org/7390
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-01-11 16:07:56 +00:00
2528e5d905 fdo#73021 - avoid call crash on spell-check + unit test.
Change-Id: I3588ef45617bda440f970e54274cc0985b7baed5
2014-01-01 11:08:54 +00:00
21f053e2dd fdo#72874: Strip const-ness from pointer value when setting it to storage.
Else the pointer type would get demoted to a boolean type which would cause
the boolean version of overloaded function to get picked.

Change-Id: Ided7e8c67ef84b4323c8ad1123e0a2c30ce37e01
2013-12-27 17:44:53 -05:00
b383ddc28a -Werror,-Wunused-member-function
Change-Id: I89170a2d79605f72e40d5e7664458cad9590ec0b
2013-11-14 10:15:06 +01:00
fbdd02dd66 This is clearly a mistake.
Change-Id: Id87e120d80b823db9be989db7a7b2ac383304f77
2013-11-11 16:17:29 -05:00
a09f7fddb4 Modify ScFormulaCell's ctor to take a const reference to ScTokenArray.
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-11-06 20:40:21 -05:00
488b1ea1b9 Fix multiple operations with formula cell with indirect dependency.
Now the unit test passes.  Good.

Change-Id: I23fa8355805c192f43db0199f3628f2bf457a645
2013-11-04 13:59:18 -05:00
7504b3dd8c extend the position hint to GetRangeScriptType
brings a bit more performance benefits. Still not as much as I expected.

Change-Id: I1abead8694acdd965520a9353e84824a68672988
2013-10-30 23:13:21 +01:00