summaryrefslogtreecommitdiffstats
path: root/src/box3d.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-07-18 02:23:47 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-07-18 02:23:47 +0000
commitd0471e4de5ff9d31434c15b8036ce828041a238c (patch)
treee8be16696803ca9394ab7904561986a252bcb862 /src/box3d.cpp
parentMake string conversion of box coordinates locale-independent (fixes bug with ... (diff)
downloadinkscape-d0471e4de5ff9d31434c15b8036ce828041a238c.tar.gz
inkscape-d0471e4de5ff9d31434c15b8036ce828041a238c.zip
Use Inkscape's own code to write coordinates to svg (much nicer fix than commit #15449)
(bzr r3265)
Diffstat (limited to 'src/box3d.cpp')
-rw-r--r--src/box3d.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 1b467b178..dec5e9d17 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -17,6 +17,7 @@
#include <glibmm/i18n.h>
#include "attributes.h"
+#include "svg/stringstream.h"
#include "box3d.h"
static void sp_3dbox_class_init(SP3DBoxClass *klass);
@@ -422,11 +423,9 @@ static gchar *
sp_3dbox_get_corner_coords_string (SP3DBox *box, guint id)
{
id = id % 8;
- gchar str1[G_ASCII_DTOSTR_BUF_SIZE];
- gchar str2[G_ASCII_DTOSTR_BUF_SIZE];
- g_ascii_dtostr (str2, sizeof (str2), box->corners[id][NR::X]);
- return g_strjoin (",", g_ascii_dtostr (str1, sizeof (str1), box->corners[id][NR::X]),
- g_ascii_dtostr (str2, sizeof (str2), box->corners[id][NR::Y]), NULL);
+ Inkscape::SVGOStringStream os;
+ os << box->corners[id][NR::X] << "," << box->corners[id][NR::Y];
+ return g_strdup(os.str().c_str());
}
static std::pair<gdouble, gdouble>