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
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>
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
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
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
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
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
We already do that for the pool helper. It would only make sense to do
it for shared strings as well.
Change-Id: I813d262799af6f0c1d3fa12246ad973f852ac199
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
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
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
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
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