index 3cbfcd86b38f7ff64901b3097f5cfeb1d532f9e5..65c01e7b687b3332f138f5ee9f941643687b663c 100644 (file)
--- a/src/svg/stringstream.cpp
+++ b/src/svg/stringstream.cpp
#include "svg/stringstream.h"
#include "svg/strip-trailing-zeros.h"
+#include "prefs-utils.h"
Inkscape::SVGOStringStream::SVGOStringStream()
{
/* 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. */
- ostr.precision(8);
+ ostr.precision(prefs_get_int_attribute("options.svgoutput", "numericprecision", 8));
}
Inkscape::SVGOStringStream &
{
/* Try as integer first. */
{
- long const n = long(d);
+ int const n = int(d);
if (d == n) {
os << n;
return os;
std::ostringstream s;
s.imbue(std::locale::classic());
- s.setf(std::ios::showpoint);
+ s.flags(os.setf(std::ios::showpoint));
s.precision(os.precision());
s << d;
os << strip_trailing_zeros(s.str());
{
/* Try as integer first. */
{
- long const n = long(d);
+ int const n = int(d);
if (d == n) {
os << n;
return os;
std::ostringstream s;
s.imbue(std::locale::classic());
- s.setf(std::ios::showpoint);
+ s.flags(os.setf(std::ios::showpoint));
s.precision(os.precision());
s << d;
os << strip_trailing_zeros(s.str());