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-22 09:40:07 +0200 |
commit | 7eb4c0e476240448b9da227be27c312c53447350 (patch) | |
tree | 0f84e3a4f422e4e164530e5469bc63a282ce9b77 /sc | |
parent | 5e198e97a5cef9a837f7cd509753f9089492a235 (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
Reviewed-on: https://gerrit.libreoffice.org/9078
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc')
-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 8754057dc893..093dbbe36d53 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1372,6 +1372,8 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens, return true; } +#define SHRINK_RANGE_THRESHOLD 10000 + class ShrinkRefTokenToDataRange : std::unary_function<ScTokenRef, void> { ScDocument* mpDoc; @@ -1391,6 +1393,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; |