Commit Graph

487 Commits

Author SHA1 Message Date
45db9b0976 Scope reduction.
Change-Id: Ib77fccaf0c418e875816ed553f3540190ac0caee
2014-07-30 21:41:49 -04:00
5021f29841 Remove some unused code
Change-Id: Ib1fb5108a858c35a5bbe8ba865e15660639725e3
Reviewed-on: https://gerrit.libreoffice.org/10593
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-07-29 14:20:36 +00:00
ce05c5e4b0 fix incorrect ScAnnotationsObj UNO API, fdo#80551
The used index was a sheet local index but the returned position was
from a global container.

Change-Id: I0b9e9e7e9618c72daf8e6417bca9d3a1cb23abb1
2014-06-27 10:05:45 +02: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
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
17979abf4f resolved rhbz#1101224 do not attempt to obtain names for NULL tabs
This happened when the HTML export via clipboard tried to resolve
conditional formats, where we have a temporary instance of a document
containing only the sheet to be exported.

Change-Id: Ic7498a1cab3eabede74773868287a2cc3edef052
2014-05-27 12:37:21 +02:00
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
7732f806df ODS load perf: avoid excessive calls to uppercase to compare tab names.
Change-Id: I37b9e49607c8c51f10bc8ff8fc342b02fdb8b7e1
2014-05-21 10:01:50 +01:00
49bf3a1f5f fdo#78402: Write test for this.
Also discovered that when the "precision as shown" option is set, the validity
list would only show the first item from the list.  Turn that option on in the
test.

Change-Id: I9aaeeb3358709d965f51e406668c72cb94541cdb
2014-05-13 12:37:14 -04: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
a45973a906 fdo#77806: Check the boundaries before accessing an array....
Change-Id: I0878f734599f566cde83183947cd7613c0f8d5c6
2014-05-09 11:46:06 -04:00
fe451fb94a fdo#78054: Initialize drawing layer when the document contains notes.
Don't be fooled even when the document doesn't have a drawing layer
initialized.  Sometimes a note creates caption on demand later, but if
the drawing layer isn't there the caption will not get created, which
ultimately causes this crash.

Change-Id: I37f4902fa84de91c9f793dc352127d9345a725e3
2014-05-05 15:27:15 -04:00
8f40305196 fdo#77209: Share string pool with clip documents.
We do the same with undo documents, and it will only make sense to do
the same with clip documents as well.  Also, put the sharing part into
a common method (for ease of tracking).

Change-Id: I342b22d95374ee06d16318a66ffea0ac5b42621c
2014-04-14 11:41:05 -04:00
c4c51709ea whitespace cleanup in sc
Change-Id: Id1dcadcac179c52977e48a6912ce4d5fd542f60c
2014-04-06 17:19:54 +02:00
2ec45841b9 rhbz#1080196: Delete the destination first then paste.
Deleting in-between pasting was causing the block iterators to become
invalid when the deletion took place, which resulted in a segfault.

Also cleaned up the bits about handling filtered rows.  It was using the
old row flag which is empty these days (so it never would have worked).
Plus we do bail out earlier if the destination contains a filtered row.

Change-Id: I78d3ee8bce1647c1c8685f92a3df3c38cc014811
2014-03-28 20:56:32 -04:00
5f01a51762 coverity#983375 Dereference before null check
Change-Id: Ib00b65a5c532c2968785c8783d43d1728b1dfb29
2014-03-22 17:50:27 +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
84862db95a Remove visual noise from sc
Conflicts:
	sc/source/ui/inc/docfunc.hxx

Change-Id: I9314437ed3dd60e84d28c08ac0a2d1ed7bd1daf8
Reviewed-on: https://gerrit.libreoffice.org/8301
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-03 11:04:44 -06:00
368d3aba40 remove unused code ScDocument::GetCellCount(short, short) const
Change-Id: I63f6bf43dade896858a78414beaafb9792831946
2014-02-27 10:27:31 +02:00
0a0290b252 remove unused code ScDocument::CountNotes()
Change-Id: Ic0f638f1e052b2d9117207f234d879638cbfc19a
2014-02-26 08:55:06 +02:00
10bf297024 remove unused code ScDocument::GetFormulaTokens
and consequently unused code
ScTable::GetFormulaTokens
ScColumn::GetFormulaTokens

Change-Id: Iad1fd45e67489bb8b0f9ed96a36b647e40e6f774
2014-02-26 08:55:04 +02:00
e752620bf5 fdo#75259: Let undo document share its string pool with the source doc.
We already do that for the pool helper.  It would only make sense to do
it for shared strings as well.

Change-Id: I813d262799af6f0c1d3fa12246ad973f852ac199
2014-02-24 13:13:51 -05:00
cdc8ebf964 fdo#74573: Delete ranges that are non-empty before pasting from clipboard.
The conditional formatting part is still not working. But other bits
appear to be working now.

Change-Id: Ia8a2cbe57cd2fa9ca9ad46635a91a1d8b99b0e7d
2014-02-18 16:51:18 -05:00
2ec3127da3 Ensure that vector array has a numeric array of NaN's for empty range.
With this change, we ensure that mpNumArray is never NULL even when the
range consists entirely of empty cells.  For an empty range, mpNumArray
will be non-NULL and filled with NaN's while mpStrArray will be NULL.

Change-Id: If5cead26ebe917af150cf7e39e17afe3f310beb7
2014-02-11 15:12:21 -05:00
4817ee4f6f coverity#1130441 Dereference before null check
Change-Id: I619cc45eccda4da9f9cb88028a3174d67e7011f9
2014-02-10 11:21:08 +00:00
0c12aa670b fdo#74573: Skip deletion of destination area when 'skip empty' is on.
Also, adjust handling of mix document aka paste functions with this
change.  When using paste function (add, subtract, etc), the behavior
between the 'skip empty' flag on and off makes no difference.  Let's
set the flag to off when paste function is used.

Change-Id: I67724ba923c9260b2c14464e4123b8445712dbaf
2014-02-06 14:15:05 -05:00
458c2482da Typo: s -> e
Change-Id: Iae7db3816ab2aac81e433bfe3562eefa38ef7f62
2014-02-05 23:21:35 -05: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
fe5d604ecf fdo#74556: Have ReleaseNote() really release note rather than destroying it.
Change-Id: I2d271476ae91354f33f19d074fa717b2a0b47ff7
2014-02-05 23:06:26 -05:00
01a55d5605 Cover all the other "compile all formula cells" methods.
Change-Id: I434aeb97a32d4b70846c7b3a7c701f90f43bad8a
2014-02-04 15:39:09 -05:00
b2f5524537 We can infer current grammar from the document.
Change-Id: Ia44bc612e9128adfc9be0d44ea8368215de950ba
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
99a262dc95 Finally found a way to get this test to fail.
Change-Id: I67cf68ee7e51794de374581016ffb13ebdff59d3
2014-02-03 14:45:09 -05:00
fc5eefc903 Add test code to exercise ScColumn::HasEditCells().
Change-Id: Ibacf3585a6d15d541a50cb7bb50905d34a7d598b
2014-02-03 11:49:21 -05:00
018500a73f fdo#74325: Ensure that all note objects have an sdr object before exporting.
Otherwise, if a note hasn't been displayed at least once before saving
that note would not get saved.  In the future, we should modify the export
code to not rely on SdrObject to check the presence of note.

Change-Id: Ib7ca3ac00a0c9cdd3a01facda7af479ef172afbe
2014-02-02 13:28:27 -05:00
f74c0a42b0 Add RowHeightContext to stuff all parameters for SetOptimalHeights().
To help reduce the number of function arguments.

Change-Id: Ic29fff38f6cd844bdaac8ac4b440dfcaba55df61
2014-02-01 20:53:13 -05:00
f5d8029a45 fdo#74014: Broadcast changes during undo and redo after paste.
Change-Id: I271bbba5e5eb70e48274a4a062d125456af8ff6c
2014-01-29 15:46:06 -05:00
80ea2822c3 Optimize copy-n-pasting of single cell replicated over a range.
This is a very common operation. Let's speed it up a bit.

TODO : Handle cell comments.

Change-Id: I5442bf19008475a9427b889c1eb641cacd8ff161
2014-01-24 21:27:10 -05:00
f634bc18a0 Use this scope tool instead.
Change-Id: I44d1762bb532fac403963bdebaa98228eebe8f05
2014-01-24 21:27:10 -05:00
e40f143bb4 What's up with this crap!?
Change-Id: I8863dbc1e1a8c437885d4363794698b8d8f27edf
2014-01-23 19:52:28 -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
8fd7a53d3c fix-up of 6b8704d974abd4ab7fb58036a961fa0b7136aaa7
Allocation happened also if no attributes were to be pasted and more
memory could had been allocated than actually used. Also that array of
arrays is entirely not needed.

Change-Id: I37a58eea9c42cdc96824ce3e8fba5109921fb35a
2014-01-22 01:09:12 +01:00
57b8e7c96b some clean-up of 6b8704d974abd4ab7fb58036a961fa0b7136aaa7
const methods, removed this->..., naming

Change-Id: I0db1cf445936bab04003062bc59ce0a0c2fc8b71
2014-01-22 01:09:11 +01:00
6b8704d974 Resolves: #i123909# Select one column, paste cell range...
with merged cell in, no response

(cherry picked from commit acc76cb44c51fbefc8f34009300acb9382c3ad27)

Conflicts:
	sc/inc/attarray.hxx
	sc/inc/column.hxx
	sc/inc/document.hxx
	sc/source/core/data/attarray.cxx
	sc/source/core/data/column2.cxx
	sc/source/core/data/documen3.cxx
	sc/source/core/data/document.cxx
	sc/source/core/data/table4.cxx

Change-Id: Id9c1e0fe86876da6e39ea2b34a484d69eb5d8633
2014-01-03 14:00:20 +00:00
f992400f6f count notes - GetNotesInRange now include last tab
- refactor tests
- add unit test on counting notes on a sheet

Change-Id: I6762a0e791a745b828800645effdfc044ac33710
Reviewed-on: https://gerrit.libreoffice.org/6954
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2013-12-06 05:46:16 -06:00