From 3fe705e15cdc4bb77073e0b9fb84e1fd3951f52f Mon Sep 17 00:00:00 2001 From: joncruz Date: Thu, 26 Feb 2009 05:59:05 +0000 Subject: [PATCH] Purged unused static function --- src/sp-namedview.cpp | 53 -------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 159ebc31d..383f35416 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -55,7 +55,6 @@ static Inkscape::XML::Node *sp_namedview_write(SPObject *object, Inkscape::XML:: static void sp_namedview_setup_guides(SPNamedView * nv); static gboolean sp_str_to_bool(const gchar *str); -static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit); static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color); static SPObjectGroupClass * parent_class; @@ -947,58 +946,6 @@ static gboolean sp_str_to_bool(const gchar *str) return FALSE; } -/* fixme: Collect all these length parsing methods and think common sane API */ - -static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit) -{ - if (!str) { - return FALSE; - } - - gchar *u; - gdouble v = g_ascii_strtod(str, &u); - if (!u) { - return FALSE; - } - while (isspace(*u)) { - u += 1; - } - - if (!*u) { - /* No unit specified - keep default */ - *val = v; - return TRUE; - } - - if (base & SP_UNIT_DEVICE) { - if (u[0] && u[1] && !isalnum(u[2]) && !strncmp(u, "px", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PX); - *val = v; - return TRUE; - } - } - - if (base & SP_UNIT_ABSOLUTE) { - if (!strncmp(u, "pt", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PT); - } else if (!strncmp(u, "mm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_MM); - } else if (!strncmp(u, "cm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_CM); - } else if (!strncmp(u, "m", 1)) { - *unit = &sp_unit_get_by_id(SP_UNIT_M); - } else if (!strncmp(u, "in", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_IN); - } else { - return FALSE; - } - *val = v; - return TRUE; - } - - return FALSE; -} - static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color) { if (!str) { -- 2.30.2