diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
commit | ef15a5a4acd3174752484c6aeb570d4d6444b645 (patch) | |
tree | 3d1d5b58f85737aa46241aea4c4dabea520cecc2 /chart2 | |
parent | a1b0ce05e851e9724c046888a01869eddf9e9db2 (diff) | |
parent | c309ce0227a14330094191c1ef15fa00899defcb (diff) |
Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6
Conflicts:
desktop/source/app/sofficemain.cxx
instsetoo_native/util/openoffice.lst
solenv/inc/minor.mk
Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/tp_ChartType.src | 4 | ||||
-rw-r--r-- | chart2/source/view/charttypes/Splines.cxx | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/chart2/source/controller/dialogs/tp_ChartType.src b/chart2/source/controller/dialogs/tp_ChartType.src index 049ef897f795..0f4966aff14d 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.src +++ b/chart2/source/controller/dialogs/tp_ChartType.src @@ -257,11 +257,11 @@ ModalDialog DLG_SPLINE_PROPERTIES Repeat = TRUE ; Spin = TRUE ; Minimum = 1 ; - Maximum = 100 ; + Maximum = 15 ; StrictFormat = TRUE ; Unit = FUNIT_CUSTOM ; First = 1 ; - Last = 100 ; + Last = 15 ; SpinSize = 1 ; }; FixedLine FL_SPLINE_DIALOGBUTTONS diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx index 5f29c41e365c..eac5b4a96911 100644 --- a/chart2/source/view/charttypes/Splines.cxx +++ b/chart2/source/view/charttypes/Splines.cxx @@ -35,6 +35,8 @@ #include <algorithm> #include <functional> +#define MAX_BSPLINE_DEGREE 15 + //............................................................................. namespace chart { @@ -702,7 +704,9 @@ void SplineCalculater::CalculateBSplines( // ODF1.2 spec variable p OSL_ASSERT( nResolution > 1 ); OSL_ASSERT( nDegree >= 1 ); - sal_uInt32 p = nDegree; + + // limit the b-spline degree to prevent insanely large sets of points + sal_uInt32 p = std::min<sal_uInt32>(nDegree, MAX_BSPLINE_DEGREE); rResult.SequenceX.realloc(0); rResult.SequenceY.realloc(0); |