diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-12-24 09:03:50 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-12-24 09:03:50 +0000 |
| commit | 497b9890e0cb85fced32d6958b465d40212db482 (patch) | |
| tree | e88edd2db9933208e9d53ca981c940a83f4211fc /src | |
| parent | Use gray for 'context-fill' and 'context-stroke' in marker selector. (diff) | |
| download | inkscape-497b9890e0cb85fced32d6958b465d40212db482.tar.gz inkscape-497b9890e0cb85fced32d6958b465d40212db482.zip | |
Remove sp_style_new_from_object()
(bzr r13822.1.1)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-object.cpp | 2 | ||||
| -rw-r--r-- | src/style.cpp | 18 | ||||
| -rw-r--r-- | src/style.h | 2 |
3 files changed, 3 insertions, 19 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 776b020d2..b0b482cf2 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -130,7 +130,7 @@ SPObject::SPObject() // vg, g, defs, desc, title, symbol, use, image, switch, path, rect, circle, ellipse, line, polyline, // polygon, text, tspan, tref, textPath, altGlyph, glyphRef, marker, linearGradient, radialGradient, // stop, pattern, clipPath, mask, filter, feImage, a, font, glyph, missing-glyph, foreignObject - this->style = sp_style_new_from_object(this); + this->style = new SPStyle( NULL, this ); // Is it necessary to call with "this"? this->context_style = NULL; } diff --git a/src/style.cpp b/src/style.cpp index a7e50b17a..464c402fa 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -476,7 +476,7 @@ SPStyle::clear() { // (this->*(i->second)).clear(); // } - // Release connection to object, created in sp_style_new_from_object() + // Release connection to object, created in constructor. release_connection.disconnect(); // href->detach() called in fill->clear()... @@ -899,7 +899,7 @@ SPStyle::write( guint const flags, SPStyle const *const base ) const { // Corresponds to sp_style_merge_from_parent() void SPStyle::cascade( SPStyle const *const parent ) { - // std::cout << "SPStyle::cascade" << std::endl; + // std::cout << "SPStyle::cascade: " << (object->getId()?object->getId():"null") << std::endl; for(std::vector<SPIBase*>::size_type i = 0; i != _properties.size(); ++i) { _properties[i]->cascade( parent->_properties[i] ); } @@ -1157,20 +1157,6 @@ sp_style_new(SPDocument *document) return style; } -// Called in: sp-object.cpp -/** - * Creates a new SPStyle object, and attaches it to the specified SPObject. - */ -SPStyle * -sp_style_new_from_object(SPObject *object) -{ - g_return_val_if_fail(object != NULL, NULL); - g_return_val_if_fail(SP_IS_OBJECT(object), NULL); - - SPStyle *const style = new SPStyle( NULL, object ); - return style; -} - // Called in display/drawing-item.cpp, display/nr-filter-primitive.cpp, libnrtype/Layout-TNG-Input.cpp /** * Increase refcount of style. diff --git a/src/style.h b/src/style.h index 1b1596458..5884f2459 100644 --- a/src/style.h +++ b/src/style.h @@ -284,8 +284,6 @@ public: SPStyle *sp_style_new(SPDocument *document); // SPStyle::SPStyle( SPDocument *document = NULL ); -SPStyle *sp_style_new_from_object(SPObject *object); // SPStyle::SPStyle( SPObject *object ); - SPStyle *sp_style_ref(SPStyle *style); // SPStyle::ref(); SPStyle *sp_style_unref(SPStyle *style); // SPStyle::unref(); |
