summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8585297)
raw | patch | inline | side by side (parent: 8585297)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 25 Oct 2006 05:33:24 +0000 (05:33 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 25 Oct 2006 05:33:24 +0000 (05:33 +0000) |
out it, we cannot even store an rgba32 color in an attribute\!
src/prefs-utils.cpp | patch | blob | history | |
src/prefs-utils.h | patch | blob | history | |
src/xml/repr-util.cpp | patch | blob | history | |
src/xml/repr.h | patch | blob | history |
diff --git a/src/prefs-utils.cpp b/src/prefs-utils.cpp
index a0851a3543693ffbe22d83c8aa653384192b29c7..e365966bd31e3a003f944dab5e0d7046ffa0b7f1 100644 (file)
--- a/src/prefs-utils.cpp
+++ b/src/prefs-utils.cpp
void
-prefs_set_int_attribute(gchar const *path, gchar const *attr, gint value)
+prefs_set_int_attribute(gchar const *path, gchar const *attr, long long int value)
{
Inkscape::XML::Node *repr = inkscape_get_repr(INKSCAPE, path);
if (repr) {
}
}
-gint
-prefs_get_int_attribute(gchar const *path, gchar const *attr, gint def)
+long long int
+prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def)
{
Inkscape::XML::Node *repr = inkscape_get_repr(INKSCAPE, path);
if (repr) {
/**
\brief Retrieves an int attribute guarding against screwed-up data; if the value is beyond limits, default is returned
*/
-gint
-prefs_get_int_attribute_limited(gchar const *path, gchar const *attr, gint def, gint min, gint max)
+long long int
+prefs_get_int_attribute_limited(gchar const *path, gchar const *attr, long long int def, long long int min, long long int max)
{
Inkscape::XML::Node *repr = inkscape_get_repr(INKSCAPE, path);
if (repr) {
- gint const v = sp_repr_get_int_attribute(repr, attr, def);
+ long long int const v = sp_repr_get_int_attribute(repr, attr, def);
if (v >= min && v <= max) {
return v;
} else {
diff --git a/src/prefs-utils.h b/src/prefs-utils.h
index 3cd2998e5a16264314d90995ff0af0a3639d783d..1293ca5b8d9afe901da7ba02d891e703949da151 100644 (file)
--- a/src/prefs-utils.h
+++ b/src/prefs-utils.h
#include <glib/gtypes.h>
-void prefs_set_int_attribute(gchar const *path, gchar const *attr, gint value);
-gint prefs_get_int_attribute(gchar const *path, gchar const *attr, gint def);
-gint prefs_get_int_attribute_limited(gchar const *path, gchar const *attr, gint def, gint min, gint max);
+void prefs_set_int_attribute(gchar const *path, gchar const *attr, long long int value);
+long long int prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def);
+long long int prefs_get_int_attribute_limited(gchar const *path, gchar const *attr, long long int def, long long int min, long long int max);
void prefs_set_double_attribute(gchar const *path, gchar const *attr, double value);
double prefs_get_double_attribute(gchar const *path, gchar const *attr, double def);
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 83231e5da54586d686949ca60b97112382b84690..42b957d438da11b857b5266032c5a9ee68d1b9bd 100644 (file)
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
return g_ascii_strtod(result, NULL);
}
-int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, char const *key, int def)
+long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, char const *key, long long int def)
{
char *result;
@@ -330,7 +330,7 @@ int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, char const *key, int de
if (result == NULL) return def;
- return atoi(result);
+ return atoll(result);
}
/**
diff --git a/src/xml/repr.h b/src/xml/repr.h
index c30dcf66a549c4d13d53ffeae5713c8e6712597e..dc96cb3e6435a71dbbd7a4cffe222b8fa8795d5a 100644 (file)
--- a/src/xml/repr.h
+++ b/src/xml/repr.h
@@ -227,7 +227,7 @@ unsigned sp_repr_set_svg_double(Inkscape::XML::Node *repr, gchar const *key, dou
/// \deprecated !
double sp_repr_get_double_attribute(Inkscape::XML::Node *repr, gchar const *key, double def);
/// \deprecated !
-int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, gchar const *key, int def);
+long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, gchar const *key, long long int def);
/* End Deprecated? */
int sp_repr_compare_position(Inkscape::XML::Node *first, Inkscape::XML::Node *second);