diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-06-11 14:25:52 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-06-11 14:25:52 +0000 |
| commit | 3b39f6fb0fac1eb0457de170a9af7b7ad629bc71 (patch) | |
| tree | 00c1f7790d3c689e8a1ed6e40e10309c7c979da8 /src/attributes.cpp | |
| parent | Fix a typo that spawned a lot of "unused parameter" warnings when compiling (diff) | |
| download | inkscape-3b39f6fb0fac1eb0457de170a9af7b7ad629bc71.tar.gz inkscape-3b39f6fb0fac1eb0457de170a9af7b7ad629bc71.zip | |
A little cleaning up of attributes.
(bzr r14977)
Diffstat (limited to 'src/attributes.cpp')
| -rw-r--r-- | src/attributes.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp index 646c2ab0c..24c16d5fc 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -14,6 +14,7 @@ #include <glib.h> // g_assert() #include "attributes.h" +#include <iostream> typedef struct { gint code; @@ -28,15 +29,24 @@ static SPStyleProp const props[] = { {SP_ATTR_INVALID, NULL}, /* SPObject */ {SP_ATTR_ID, "id"}, + {SP_ATTR_STYLE, "style"}, {SP_ATTR_INKSCAPE_COLLECT, "inkscape:collect"}, {SP_ATTR_INKSCAPE_LABEL, "inkscape:label"}, + /* SPRoot */ + {SP_ATTR_VERSION, "version"}, + {SP_ATTR_INKSCAPE_VERSION, "inkscape:version"}, + {SP_ATTR_WIDTH, "width"}, + {SP_ATTR_HEIGHT, "height"}, + {SP_ATTR_VIEWBOX, "viewBox"}, + {SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"}, + {SP_ATTR_ONLOAD, "onload"}, + {SP_ATTR_SODIPODI_DOCNAME, "sodipodi:docname"}, /* SPItem */ {SP_ATTR_TRANSFORM, "transform"}, + {SP_ATTR_SODIPODI_TYPE, "sodipodi:type"}, {SP_ATTR_SODIPODI_INSENSITIVE, "sodipodi:insensitive"}, - {SP_ATTR_SODIPODI_NONPRINTABLE, "sodipodi:nonprintable"}, {SP_ATTR_CONNECTOR_AVOID, "inkscape:connector-avoid"}, {SP_ATTR_CONNECTION_POINTS, "inkscape:connection-points"}, - {SP_ATTR_STYLE, "style"}, {SP_ATTR_TRANSFORM_CENTER_X, "inkscape:transform-center-x"}, {SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"}, {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"}, @@ -53,14 +63,6 @@ static SPStyleProp const props[] = { {SP_ATTR_TARGET, "target"}, {SP_ATTR_INKSCAPE_GROUPMODE, "inkscape:groupmode"}, {SP_ATTR_INKSCAPE_EXPANDED, "inkscape:expanded"}, - /* SPRoot */ - {SP_ATTR_VERSION, "version"}, - {SP_ATTR_WIDTH, "width"}, - {SP_ATTR_HEIGHT, "height"}, - {SP_ATTR_VIEWBOX, "viewBox"}, - {SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"}, - {SP_ATTR_INKSCAPE_VERSION, "inkscape:version"}, - {SP_ATTR_ONLOAD, "onload"}, /* SPNamedView */ {SP_ATTR_VIEWONLY, "viewonly"}, {SP_ATTR_SHOWGUIDES, "showguides"}, @@ -99,6 +101,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_BBOX, "inkscape:snap-bbox"}, {SP_ATTR_INKSCAPE_SNAP_NODE, "inkscape:snap-nodes"}, {SP_ATTR_INKSCAPE_SNAP_OTHERS, "inkscape:snap-others"}, + {SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, "inkscape:snap-from-guide"}, {SP_ATTR_INKSCAPE_SNAP_ROTATION_CENTER, "inkscape:snap-center"}, {SP_ATTR_INKSCAPE_SNAP_GRID, "inkscape:snap-grids"}, {SP_ATTR_INKSCAPE_SNAP_GUIDE, "inkscape:snap-to-guides"}, @@ -120,7 +123,6 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG {SP_ATTR_INKSCAPE_LOCKGUIDES, "inkscape:lockguides"}, {SP_ATTR_UNITS, "units"}, - {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, /* SPColorProfile */ {SP_ATTR_LOCAL, "local"}, {SP_ATTR_NAME, "name"}, @@ -130,6 +132,9 @@ static SPStyleProp const props[] = { {SP_ATTR_POSITION, "position"}, {SP_ATTR_INKSCAPE_COLOR, "inkscape:color"}, {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, + /* Measure tool */ + {SP_ATTR_INKSCAPE_MEASURE_START, "inkscape:measure-start"}, + {SP_ATTR_INKSCAPE_MEASURE_END, "inkscape:measure-end"}, /* SPImage */ {SP_ATTR_X, "x"}, {SP_ATTR_Y, "y"}, @@ -139,6 +144,7 @@ static SPStyleProp const props[] = { /* (Note: XML representation of connectors may change in future.) */ {SP_ATTR_CONNECTOR_TYPE, "inkscape:connector-type"}, {SP_ATTR_CONNECTOR_CURVATURE, "inkscape:connector-curvature"}, + {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, {SP_ATTR_CONNECTION_START, "inkscape:connection-start"}, {SP_ATTR_CONNECTION_END, "inkscape:connection-end"}, {SP_ATTR_CONNECTION_START_POINT, "inkscape:connection-start-point"}, @@ -544,6 +550,8 @@ sp_attribute_lookup(gchar const *key) if(g_str_equal(const_cast<void *>(static_cast<void const *>(props[i].name)), key)) return GPOINTER_TO_UINT(GINT_TO_POINTER(props[i].code)); } + // std::cerr << "sp_attribute_lookup: invalid attribute: " + // << (key?key:"Null") << std::endl; return SP_ATTR_INVALID; } |
