Code

Commenting out Whiteboard configure flag
[inkscape.git] / src / svg / svg-color.cpp
index 677c81c1a30b3a12aa9051585e9b8766d77c80f5..9040d6e4389ae02a900ae6338304c98ede446bdc 100644 (file)
 # include "config.h"
 #endif
 
-#include "prefs-utils.h"
-#include "svg-color.h"
-#include "svg-icc-color.h"
+#include <cstdlib>
+#include <cstdio> // sprintf
+#include <cstring>
+#include <string>
 #include <cassert>
 #include <math.h>
 #include <glib/gmem.h>
+#include <glib.h> // g_assert
 #include <glib/gmessages.h>
 #include <glib/gstrfuncs.h>
 #include <glib/ghash.h>
 #include <glib/gutils.h>
-#include <cstdio> // sprintf
 #include <errno.h>
+
 #include "strneq.h"
+#include "preferences.h"
+#include "svg-color.h"
+#include "svg-icc-color.h"
+
 using std::sprintf;
 
 struct SPSVGColor {
@@ -425,8 +431,9 @@ sp_svg_write_color(gchar *buf, unsigned const buflen, guint32 const rgba32)
 {
     g_assert(8 <= buflen);
 
+    Inkscape::Preferences *prefs = Inkscape::Preferences::get();
     unsigned const rgb24 = rgba32 >> 8;
-    if (prefs_get_int_attribute("options.svgoutput", "usenamedcolors", 0)) {
+    if (prefs->getBool("/options/svgoutput/usenamedcolors")) {
         rgb24_to_css(buf, rgb24);
     } else {
         g_snprintf(buf, buflen, "#%06x", rgb24);