chart2/source/view/charttypes/VSeriesPlotter.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
New commits: commit 6415b9e4d1ee58029837ca76843c03e589c18ba4 Author: Markus Mohrhard <[email protected]> Date: Mon Jan 4 17:36:56 2016 +0100 use correct decimal separator Change-Id: I342e9b5355c3ea09eede6c47b0f209f538ee82cb diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index d0f230f..475eca9 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 )); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
