diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2017-01-24 09:44:10 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2017-01-24 09:44:10 +0000 |
| commit | 3867766478056535d7d22e5afd432ca670d9a73f (patch) | |
| tree | 473b009701ac19c935c007f8bed48ddf41223e6e /src/live_effects/parameter/item-reference.cpp | |
| parent | update to trunk (diff) | |
| download | inkscape-3867766478056535d7d22e5afd432ca670d9a73f.tar.gz inkscape-3867766478056535d7d22e5afd432ca670d9a73f.zip | |
Fixing update to trunk
(bzr r15356.1.20)
Diffstat (limited to 'src/live_effects/parameter/item-reference.cpp')
| -rw-r--r-- | src/live_effects/parameter/item-reference.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/live_effects/parameter/item-reference.cpp b/src/live_effects/parameter/item-reference.cpp new file mode 100644 index 000000000..a775d93b7 --- /dev/null +++ b/src/live_effects/parameter/item-reference.cpp @@ -0,0 +1,44 @@ +/* + * The reference corresponding to href of LPE Item parameter. + * + * Copyright (C) 2008 Johan Engelen + * + * Released under GNU GPL, read the file 'COPYING' for more information. + */ + +#include "live_effects/parameter/item-reference.h" + +#include "sp-shape.h" +#include "sp-text.h" +#include "sp-item-group.h" + +namespace Inkscape { +namespace LivePathEffect { + +bool ItemReference::_acceptObject(SPObject * const obj) const +{ + if (SP_IS_SHAPE(obj) || SP_IS_TEXT(obj) || SP_IS_GROUP(obj)) { + /* Refuse references to lpeobject */ + if (obj == getOwner()) { + return false; + } + // TODO: check whether the referred item has this LPE applied, if so: deny deny deny! + return URIReference::_acceptObject(obj); + } else { + return false; + } +} + +} // namespace LivePathEffect +} // namespace Inkscape + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
