diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-15 21:57:03 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-15 21:57:03 +0000 |
| commit | 6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch) | |
| tree | 1b991cc2736f84fb069666802d485bd29cff6394 /src/attributes.cpp | |
| parent | Update to limit options to radius = 0, radious > 0 or both (diff) | |
| parent | fix-bug-1557192. paint-order crash with multiple items (diff) | |
| download | inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip | |
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'src/attributes.cpp')
| -rw-r--r-- | src/attributes.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp index 991834cb2..646c2ab0c 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -41,6 +41,7 @@ static SPStyleProp const props[] = { {SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"}, {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"}, {SP_ATTR_INKSCAPE_HIGHLIGHT_COLOR, "inkscape:highlight-color"}, + {SP_ATTR_INKSCAPE_SPRAY_ORIGIN, "inkscape:spray-origin"}, /* SPAnchor */ {SP_ATTR_XLINK_HREF, "xlink:href"}, {SP_ATTR_XLINK_TYPE, "xlink:type"}, @@ -81,6 +82,7 @@ static SPStyleProp const props[] = { {SP_ATTR_FIT_MARGIN_LEFT, "fit-margin-left"}, {SP_ATTR_FIT_MARGIN_RIGHT, "fit-margin-right"}, {SP_ATTR_FIT_MARGIN_BOTTOM, "fit-margin-bottom"}, + {SP_ATTR_INKSCAPE_PAGECHECKERBOARD, "inkscape:pagecheckerboard"}, {SP_ATTR_INKSCAPE_PAGEOPACITY, "inkscape:pageopacity"}, {SP_ATTR_INKSCAPE_PAGESHADOW, "inkscape:pageshadow"}, {SP_ATTR_INKSCAPE_ZOOM, "inkscape:zoom"}, @@ -116,6 +118,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_PAGE_BORDER, "inkscape:snap-page"}, {SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"}, {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 */ @@ -126,6 +129,7 @@ static SPStyleProp const props[] = { {SP_ATTR_ORIENTATION, "orientation"}, {SP_ATTR_POSITION, "position"}, {SP_ATTR_INKSCAPE_COLOR, "inkscape:color"}, + {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, /* SPImage */ {SP_ATTR_X, "x"}, {SP_ATTR_Y, "y"}, @@ -290,6 +294,7 @@ static SPStyleProp const props[] = { /* SPRadialGradient */ {SP_ATTR_FX, "fx"}, {SP_ATTR_FY, "fy"}, + {SP_ATTR_FR, "fr"}, /* SPMeshPatch */ {SP_ATTR_TENSOR, "tensor"}, //{SP_ATTR_TYPE, "type"}, @@ -440,8 +445,8 @@ static SPStyleProp const props[] = { /* Text (css3) */ {SP_PROP_DIRECTION, "direction"}, - {SP_PROP_BLOCK_PROGRESSION, "block-progression"}, {SP_PROP_WRITING_MODE, "writing-mode"}, + {SP_PROP_TEXT_ORIENTATION, "text-orientation"}, {SP_PROP_UNICODE_BIDI, "unicode-bidi"}, {SP_PROP_ALIGNMENT_BASELINE, "alignment-baseline"}, {SP_PROP_BASELINE_SHIFT, "baseline-shift"}, @@ -533,21 +538,13 @@ static SPStyleProp const props[] = { unsigned sp_attribute_lookup(gchar const *key) { - static GHashTable *propdict = NULL; - - if (!propdict) { - unsigned int i; - propdict = g_hash_table_new(g_str_hash, g_str_equal); - for (i = 1; i < n_attrs; i++) { - g_assert(props[i].code == static_cast< gint >(i) ); - // If this g_assert fails, then the sort order of SPAttributeEnum does not match the order in props[]! - g_hash_table_insert(propdict, - const_cast<void *>(static_cast<void const *>(props[i].name)), - GINT_TO_POINTER(props[i].code)); - } + for (unsigned int i = 1; i < n_attrs; i++) { + g_assert(props[i].code == static_cast< gint >(i) ); + // If this g_assert fails, then the sort order of SPAttributeEnum does not match the order in props[]! + 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)); } - - return GPOINTER_TO_UINT(g_hash_table_lookup(propdict, key)); + return SP_ATTR_INVALID; } unsigned char const * |
