diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-08-20 12:53:17 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-08-20 12:53:17 +0000 |
| commit | e92962ddc609aaba91d1b9781ea044e84bafeb1b (patch) | |
| tree | dc25d7d48782832e2c8073f63a2dec4a26081cf8 /src/id-clash.cpp | |
| parent | round-off incoming png resolution to 0.1 dpi (Bug 165952 comment 20) (diff) | |
| download | inkscape-e92962ddc609aaba91d1b9781ea044e84bafeb1b.tar.gz inkscape-e92962ddc609aaba91d1b9781ea044e84bafeb1b.zip | |
Fix for 165865 : markers must take object's stroke color
(bzr r11614)
Diffstat (limited to 'src/id-clash.cpp')
| -rw-r--r-- | src/id-clash.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/id-clash.cpp b/src/id-clash.cpp index 12bb65a26..d8299652b 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -79,6 +79,9 @@ const char* clipboard_properties[] = { "fill", "filter", "stroke", + "marker-end", + "marker-mid", + "marker-start" }; #define NUM_CLIPBOARD_PROPERTIES (sizeof(clipboard_properties) / sizeof(*clipboard_properties)) @@ -111,6 +114,7 @@ find_references(SPObject *elem, refmap_type *refmap) g_free(uri); } } + } return; // nothing more to do for inkscape:clipboard elements } @@ -153,6 +157,20 @@ find_references(SPObject *elem, refmap_type *refmap) } } + /* check for url(#...) references in markers */ + const gchar *markers[4] = { "", "marker-start", "marker-mid", "marker-end" }; + for (unsigned i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) { + const gchar *value = style->marker[i].value; + if (value) { + gchar *uri = extract_uri(value); + if (uri && uri[0] == '#') { + IdReference idref = { REF_STYLE, elem, markers[i] }; + (*refmap)[uri+1].push_back(idref); + } + g_free(uri); + } + } + /* check for other url(#...) references */ for (unsigned i = 0; i < NUM_OTHER_URL_PROPERTIES; ++i) { const char *attr = other_url_properties[i]; @@ -244,6 +262,7 @@ fix_up_refs(const refmap_type *refmap, const id_changelist_type &id_changes) gchar *style_string = sp_repr_css_write_string(style); it->elem->getRepr()->setAttribute("style", style_string); g_free(style_string); + } else { g_assert(0); // shouldn't happen } |
