summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-02-26 05:59:05 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-02-26 05:59:05 +0000
commitebea1c91fd156161be543c5e52566aefa13cd06b (patch)
tree56a86e6e7606e0991bec95a1b5c363e6721d3b30 /src/sp-namedview.cpp
parentSeveral icon name fixes (diff)
downloadinkscape-ebea1c91fd156161be543c5e52566aefa13cd06b.tar.gz
inkscape-ebea1c91fd156161be543c5e52566aefa13cd06b.zip
Purged unused static function
(bzr r7374)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp53
1 files changed, 0 insertions, 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) {