diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-04-17 02:02:15 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-04-17 10:12:50 +0200 |
commit | 3750025d3290fd4db6b18dcc33c9c077b05af524 (patch) | |
tree | 2da7a5ac6a1312ef83fdebde568c922e72b5c17e | |
parent | 0218b6e907b08e4acf1831bfe054af3b23086872 (diff) |
limit the range shrinking in charts to really large ranges, fdo#70609,
Also improves the situation for fdo#55697.
It is just the fist step to a better algorithm.
Change-Id: I15de1ca6604e585fcf5690f0d903c757d641e765
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 832f59c4e878..bfa2599435c3 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1379,6 +1379,8 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens, return true; } +#define SHRINK_RANGE_THRESHOLD 10000 + class ShrinkRefTokenToDataRange : std::unary_function<ScTokenRef, void> { ScDocument* mpDoc; @@ -1398,6 +1400,9 @@ public: ScSingleRefData& s = rData.Ref1; ScSingleRefData& e = rData.Ref2; + if(abs((e.Col()-s.Col())*(e.Row()-s.Row())) < SHRINK_RANGE_THRESHOLD) + return; + SCCOL nMinCol = MAXCOL, nMaxCol = 0; SCROW nMinRow = MAXROW, nMaxRow = 0; |