summaryrefslogtreecommitdiffstats
path: root/src/svg/stringstream.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-01-14 08:13:09 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-01-14 08:13:09 +0000
commit7f7da4643d6909af5cd58b2f24846774e3af509b (patch)
tree1fec13b3616ecc90fb251bb9e643aefc43c80c43 /src/svg/stringstream.cpp
parentSome additional docs (diff)
parentInitial cut of disabling floating windows on window managers with problems. (diff)
downloadinkscape-7f7da4643d6909af5cd58b2f24846774e3af509b.tar.gz
inkscape-7f7da4643d6909af5cd58b2f24846774e3af509b.zip
* Merge from trunk
* Update to new snapping API * Modify the join action slightly (bzr r8846.2.11)
Diffstat (limited to 'src/svg/stringstream.cpp')
-rw-r--r--src/svg/stringstream.cpp25
1 files changed, 25 insertions, 0 deletions
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++