[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sc/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Thu Apr 17 01:13:38 PDT 2014
sc/source/ui/unoobj/chart2uno.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 3750025d3290fd4db6b18dcc33c9c077b05af524
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Thu Apr 17 02:02:15 2014 +0200
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
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 832f59c..bfa2599 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;
More information about the Libreoffice-commits
mailing list