[Libreoffice-commits] libmspub.git: src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Thu May 2 13:30:55 PDT 2013
src/lib/MSPUBSVGGenerator.cpp | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
New commits:
commit 54882a7c40241fad3ac62ef67c7e2752c11a0a6f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Thu May 2 22:30:30 2013 +0200
libwpd already does this conversion, so don't dupplicate
diff --git a/src/lib/MSPUBSVGGenerator.cpp b/src/lib/MSPUBSVGGenerator.cpp
index 4b5482f..8ca477b 100644
--- a/src/lib/MSPUBSVGGenerator.cpp
+++ b/src/lib/MSPUBSVGGenerator.cpp
@@ -35,23 +35,10 @@
static std::string doubleToString(const double value)
{
- std::ostringstream tempStream;
- tempStream << value;
-#ifndef __ANDROID__
- std::string decimalPoint(localeconv()->decimal_point);
-#else
- std::string decimalPoint(".");
-#endif
- if ((decimalPoint.size() == 0) || (decimalPoint == "."))
- return tempStream.str();
- std::string stringValue(tempStream.str());
- if (!stringValue.empty())
- {
- std::string::size_type pos;
- while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
- stringValue.replace(pos,decimalPoint.size(),".");
- }
- return stringValue;
+ WPXProperty *prop = WPXPropertyFactory::newDoubleProp(value);
+ std::string retVal = prop->getStr().cstr();
+ delete prop;
+ return retVal;
}
static unsigned stringToColour(const ::WPXString &s)
More information about the Libreoffice-commits
mailing list