Lines Matching refs:repr

49  * repr: the root node in a document or any other node.
51 void sp_attribute_clean_tree(Node *repr) {
53 g_return_if_fail (repr != NULL);
58 sp_attribute_clean_recursive( repr, flags );
65 void sp_attribute_clean_recursive(Node *repr, unsigned int flags) {
67 g_return_if_fail (repr != NULL);
69 if( repr->type() == Inkscape::XML::ELEMENT_NODE ) {
70 Glib::ustring element = repr->name();
74 sp_attribute_clean_element(repr, flags );
78 for(Node *child=repr->firstChild() ; child ; child = child->next()) {
93 void sp_attribute_clean_element(Node *repr, unsigned int flags) {
95 g_return_if_fail (repr != NULL);
96 g_return_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE);
98 Glib::ustring element = repr->name();
99 Glib::ustring id = (repr->attribute( "id" )==NULL ? "" : repr->attribute( "id" ));
103 sp_attribute_clean_style(repr, flags );
106 List<AttributeRecord const> attributes = repr->attributeList();
123 repr->setAttribute( (*iter_d).c_str(), NULL, false );
131 void sp_attribute_clean_style(Node *repr, unsigned int flags) {
133 g_return_if_fail (repr != NULL);
134 g_return_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE);
137 SPCSSAttr *css = sp_repr_css_attr( repr, "style" );
138 sp_attribute_clean_style(repr, css, flags);
140 // Convert css node's properties data to string and set repr node's attribute "style" to that string.
141 // sp_repr_css_set( repr, css, "style"); // Don't use as it will cause loop.
145 repr->setAttribute("style", NULL );
147 repr->setAttribute("style", value.c_str());
157 Glib::ustring sp_attribute_clean_style(Node *repr, gchar const *string, unsigned int flags) {
159 g_return_val_if_fail (repr != NULL, NULL);
160 g_return_val_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE, NULL);
164 sp_attribute_clean_style(repr, css, flags);
183 void sp_attribute_clean_style(Node* repr, SPCSSAttr *css, unsigned int flags) {
185 g_return_if_fail (repr != NULL);
188 Glib::ustring element = repr->name();
189 Glib::ustring id = (repr->attribute( "id" )==NULL ? "" : repr->attribute( "id" ));
194 if( repr->parent() ) css_parent = sp_repr_css_attr_inherited( repr->parent(), "style" );