diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2016-01-04 17:36:56 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-01-04 17:38:36 +0100 |
commit | 6415b9e4d1ee58029837ca76843c03e589c18ba4 (patch) | |
tree | 6a51a90d291a60a44092e5c137c8d386123b6d81 /chart2/source/view | |
parent | 3dd8ad95810cc8b6d4b089d8533a5e23e23b4c79 (diff) |
use correct decimal separator
Change-Id: I342e9b5355c3ea09eede6c47b0f209f538ee82cb
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/charttypes/VSeriesPlotter.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index d0f230fc181b..475eca90738b 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -80,6 +80,8 @@ #include <svx/unoshape.hxx> #include <comphelper/sequence.hxx> +#include <vcl/svapp.hxx> +#include <vcl/settings.hxx> #include <functional> #include <map> @@ -413,7 +415,11 @@ OUString VSeriesPlotter::getLabelTextForValue( VDataSeries& rDataSeries } else { - sal_Unicode cDecSeparator = '.';//@todo get this locale dependent + + const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper(); + OUString aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep(); + assert(aNumDecimalSep.getLength() > 0); + sal_Unicode cDecSeparator = aNumDecimalSep.getStr()[0]; aNumber = ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_G /*rtl_math_StringFormat*/ , 3/*DecPlaces*/ , cDecSeparator ); } @@ -1269,7 +1275,10 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( } else { - sal_Unicode aDecimalSep( '.' );//@todo get this locale dependent + const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper(); + OUString aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep(); + assert(aNumDecimalSep.getLength() > 0); + sal_Unicode aDecimalSep = aNumDecimalSep.getStr()[0]; aFormula.append( ::rtl::math::doubleToUString( fR*fR, rtl_math_StringFormat_G, 4, aDecimalSep, true )); } |