From 0cf189f9ab1ac334b55e9059ad3905bed9edffc6 Mon Sep 17 00:00:00 2001 From: "Arcadie M. Cracan" Date: Wed, 2 Dec 2009 22:26:44 +0200 Subject: Merge GSoC2009 Connectors into trunk (bzr r8855) --- src/svg/stringstream.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/svg/stringstream.cpp') diff --git a/src/svg/stringstream.cpp b/src/svg/stringstream.cpp index 6b9e512a1..431d5d97b 100644 --- a/src/svg/stringstream.cpp +++ b/src/svg/stringstream.cpp @@ -66,6 +66,31 @@ operator<<(Inkscape::SVGOStringStream &os, Geom::Point const & p) return os; } +Inkscape::SVGIStringStream::SVGIStringStream():std::istringstream() +{ + this->imbue(std::locale::classic()); + this->setf(std::ios::showpoint); + + /* This one is (currently) needed though, as we currently use ostr.precision as a sort of + variable for storing the desired precision: see our two precision methods and our operator<< + methods for float and double. */ + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + this->precision(prefs->getInt("/options/svgoutput/numericprecision", 8)); +} + +Inkscape::SVGIStringStream::SVGIStringStream(const std::string& str):std::istringstream(str) +{ + this->imbue(std::locale::classic()); + this->setf(std::ios::showpoint); + + /* This one is (currently) needed though, as we currently use ostr.precision as a sort of + variable for storing the desired precision: see our two precision methods and our operator<< + methods for float and double. */ + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + this->precision(prefs->getInt("/options/svgoutput/numericprecision", 8)); +} + + /* Local Variables: mode:c++ -- cgit v1.2.3