diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-04-17 02:02:15 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-04-17 02:08:59 +0200 |
commit | 0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171 (patch) | |
tree | 350fe3aa4ff876743826ecd4e4d05fd2618db6c5 | |
parent | b7ba33e4a0a2094b9e515249d9da0c30a1272402 (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 826e74bc76de..348c86d380ec 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1368,6 +1368,8 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens, return true; } +#define SHRINK_RANGE_THRESHOLD 10000 + class ShrinkRefTokenToDataRange : std::unary_function<ScTokenRef, void> { ScDocument* mpDoc; @@ -1387,6 +1389,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; |