...to keep UBSan from complaining about illegal downcasts from FormulaToken to
ScToken (which were practically harmless, given that ScToken did not add any
data members).
Change-Id: I8fdc026eec363442cc4b720b71d65c972b4a4446
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.
Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
This is done intentionally because we do need correct table index when
resolving external reference. This requires we do need to allocate array
with the same sheet size as the remote document. But we don't allocate
Table instances for remote sheets that we don't reference, to save
memory.
Change-Id: I27fb6228f0e4558327aa4a04a6bccce8d2f1085f
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>
This way, even after the loaded doc shells get purged due to timeout,
we won't reload those external documents from disk again. One caveat
is that we currently don't pre-populate empty cells even if they are
referenced by the host document.
Change-Id: I1de2987836bf2fc5d9d7044b406fb99faa534164
To prevent collision with the timer wanting to purge the doc cache
while updating external links.
Also, show progress bar, and make the timer interval and the document
cache life span longer.
Change-Id: I325984c8fa68425a2621cf8f9c016463291afc89
Rather than just clearing the existing caches and loading the external
documents on demand as the formula cells gets re-calculated. This has two
advantages: 1) when the loading itself fails, we can keep the existing cache
rather than turning all affected cells to error cells, and 2) this prevents
on-demand loading after the external linkes get refreshed, which can make
scrolling very slow & painful.
Change-Id: Ie8243f6f94c5e477964413ab83f6b4b746fe3220
I could not reproduce the crash of that bug (probably having more memory
available), but the backtrace had nTabSpan = -2 implicitly casted to
size_t leading to allocation of a huge amount of memory with
vector::reserve(), which ScRange::Justify() exactly prevents.
Change-Id: Idb79e1be62649922ba793cab01e00011479fade9
To ensure that string comparison with those from the external ref cache
works correctly in functions such as VLOOKUP.
Change-Id: Ib5a466cb6c4b26439abe61b0c17406fc8139f6c0
Regression introduced with 8fde288523
Crash happened under ScExternalRefManager::maybeLinkExternalFile()
pLinkMgr->InsertFileLink(). ScDocument::GetLinkManager() introduced
GetDocLinkManager().getLinkManager(bAutoCalc) leading to the LinkManager
being created only if bAutoCalc is set, which may not be the case during
file import. Changed to unconditionally create the LinkManager again so
the link can actually be inserted. Whatever the intention was, that
needs rework.
Change-Id: I2ae66ac7f62c3cfd92c5bf1a147feb06b0155275
Note that there is no need to check for empty(), because
matrix is always initialized with all empty elements in this code.
Change-Id: If05b3b12d7209b99fcbb09f7c97e74476fb9ce06
Reviewed-on: https://gerrit.libreoffice.org/7098
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
These get updated from reference parser code (ScAddress, ScRange etc)
which may be run from multiple threads.
Change-Id: I5a1aaa4b51d9b9fb032458eb5e89f0652887184e
With this, both ScColumn and ScMatrix store svl::SharedString as their
string values, instead of OUString.
Change-Id: I3faece94d98f774881fd72b3ed5f6143504cd350