Kaydet (Commit) 0ce6d9bc authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

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
üst b7ba33e4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment