Code

From trunk
[inkscape.git] / src / svg / svg-path-geom-test.h
index 32a2ed2319d6162262da7246fbaf85ca0095b091..7358c6d6917c79e11631cc719b2681c9697b9e36 100644 (file)
@@ -3,7 +3,7 @@
 #include "2geom/curves.h"\r
 #include "2geom/pathvector.h"\r
 #include "svg/svg.h"\r
-#include "prefs-utils.h"\r
+#include "preferences.h"\r
 #include "streq.h"\r
 #include <stdio.h>\r
 #include <string>\r
@@ -391,11 +391,12 @@ public:
     void testMinexpPrecision() {\r
         Geom::PathVector pv;\r
         char * path_str;\r
-        // Default values\r
-        prefs_set_int_attribute("options.svgoutput", "allowrelativecoordinates", 1);\r
-        prefs_set_int_attribute("options.svgoutput", "forcerepeatcommands", 0);\r
-        prefs_set_int_attribute("options.svgoutput", "numericprecision", 8);\r
-        prefs_set_int_attribute("options.svgoutput", "minimumexponent", -8);\r
+        // Default values
+        Inkscape::Preferences *prefs = Inkscape::Preferences::get();\r
+        prefs->setBool("/options/svgoutput/allowrelativecoordinates", true);\r
+        prefs->setBool("/options/svgoutput/forcerepeatcommands", false);\r
+        prefs->setInt("/options/svgoutput/numericprecision", 8);\r
+        prefs->setInt("/options/svgoutput/minimumexponent", -8);\r
         pv = sp_svg_read_pathv("M 123456781,1.23456781e-8 L 123456782,1.23456782e-8 L 123456785,1.23456785e-8 L 10123456400,1.23456785e-8 L 123456789,1.23456789e-8 L 123456789,101.234564e-8 L 123456789,1.23456789e-8");\r
         path_str = sp_svg_write_path(pv);\r
         TS_ASSERT_RELATION( streq_rel , "m 123456780,1.2345678e-8 0,0 10,1e-15 9999999210,0 -9999999210,0 0,9.99999921e-7 0,-9.99999921e-7" , path_str );\r