X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsvg%2Fsvg-color.cpp;h=9040d6e4389ae02a900ae6338304c98ede446bdc;hb=08552a5241b350988214a3fc4b8f55e9cd2bbdaa;hp=677c81c1a30b3a12aa9051585e9b8766d77c80f5;hpb=2588b6d8fedef60869a774d83bc7582e8caba7a1;p=inkscape.git diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp index 677c81c1a..9040d6e43 100644 --- a/src/svg/svg-color.cpp +++ b/src/svg/svg-color.cpp @@ -17,19 +17,25 @@ # include "config.h" #endif -#include "prefs-utils.h" -#include "svg-color.h" -#include "svg-icc-color.h" +#include +#include // sprintf +#include +#include #include #include #include +#include // g_assert #include #include #include #include -#include // sprintf #include + #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);