[Libreoffice-commits] core.git: 2 commits - chart2/source sc/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Wed Apr 16 17:11:32 PDT 2014
chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx | 3 ++-
chart2/source/inc/FastPropertyIdRanges.hxx | 3 ++-
sc/source/ui/unoobj/chart2uno.cxx | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 0ce6d9bcea7c37a7cb2c42e8393e2e20780bd171
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 826e74b..348c86d 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;
commit b7ba33e4a0a2094b9e515249d9da0c30a1272402
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Thu Apr 17 01:28:38 2014 +0200
fix non unique property handle
Change-Id: I110feee77ab65bc8f528e85cba7c74063937b086
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx
index 20e366c..5625242 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedGL3DProperties.cxx
@@ -9,6 +9,7 @@
#include "WrappedGL3DProperties.hxx"
#include "Chart2ModelContact.hxx"
+#include "FastPropertyIdRanges.hxx"
#include <unonames.hxx>
#include <WrappedProperty.hxx>
#include <DiagramHelper.hxx>
@@ -24,7 +25,7 @@ namespace {
enum
{
- PROP_GL3DCHARTTYPE_ROUNDED_EDGE
+ PROP_GL3DCHARTTYPE_ROUNDED_EDGE = FAST_PROPERTY_ID_START_GL_3D
};
class WrappedGL3DProperty : public WrappedProperty
diff --git a/chart2/source/inc/FastPropertyIdRanges.hxx b/chart2/source/inc/FastPropertyIdRanges.hxx
index 0c24f46..d848bab 100644
--- a/chart2/source/inc/FastPropertyIdRanges.hxx
+++ b/chart2/source/inc/FastPropertyIdRanges.hxx
@@ -40,7 +40,8 @@ enum FastPropertyIdRanges
FAST_PROPERTY_ID_START_CHART_SPLINE_PROP = FAST_PROPERTY_ID_START + 15000,
FAST_PROPERTY_ID_START_CHART_STOCK_PROP = FAST_PROPERTY_ID_START + 16000,
FAST_PROPERTY_ID_START_CHART_AUTOPOSITION_PROP = FAST_PROPERTY_ID_START + 17000,
- FAST_PROPERTY_ID_START_SCALE_TEXT_PROP = FAST_PROPERTY_ID_START + 18000
+ FAST_PROPERTY_ID_START_SCALE_TEXT_PROP = FAST_PROPERTY_ID_START + 18000,
+ FAST_PROPERTY_ID_START_GL_3D = FAST_PROPERTY_ID_START + 19000
};
} // namespace chart
More information about the Libreoffice-commits
mailing list