Code

Export/Import text as text + some bug-fixes.
[inkscape.git] / src / extension / internal / pov-out.cpp
index 54d49a79a35e546daa656a3e49c6d7ec7e3fa180..7ed7408db3632ddd8031a26910b22e5b28f1afe2 100644 (file)
@@ -120,13 +120,14 @@ static const char *dstr(double d)
 /**
  *  Output data to the buffer, printf()-style
  */
-void PovOutput::out(char *fmt, ...)
+void PovOutput::out(char const *fmt, ...)
 {
     va_list args;
     va_start(args, fmt);
-    g_vsnprintf(fmtbuf, 4096, fmt, args);
+    gchar * output = g_strdup_vprintf(fmt, args);
     va_end(args);
-    outbuf.append(fmtbuf);
+    outbuf.append(output);
+    g_free(output);
 }
 
 
@@ -327,7 +328,7 @@ void PovOutput::doCurves(SPDocument *doc)
         SPStyle *style = SP_OBJECT_STYLE(shape);
         /* fixme: Handle other fill types, even if this means translating gradients to a single
            flat colour. */
-        if (style && (style->fill.type == SP_PAINT_TYPE_COLOR))
+        if (style && (style->fill.isColor()))
             {
             // see color.h for how to parse SPColor
             float rgb[3];