X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flayer-fns.cpp;h=84f21cd979b2377dc214c5e384a28a8294ea2ce7;hb=8a2e76b7021b9b960d7c30801a1a14461d9b5939;hp=2d58796af59edf222146080c8ab6b5543e36a7af;hpb=5610aa55bc12809620f592a6de38a2f70628846b;p=inkscape.git diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp index 2d58796af..84f21cd97 100644 --- a/src/layer-fns.cpp +++ b/src/layer-fns.cpp @@ -3,6 +3,7 @@ * * Authors: * MenTaLguY + * Jon A. Cruz * * Copyright (C) 2004 MenTaLguY * @@ -16,9 +17,11 @@ #include "document.h" #include "sp-item-group.h" #include "xml/repr.h" -#include "algorithms/find-last-if.h" +#include "util/find-last-if.h" #include "layer-fns.h" +// TODO move the documentation comments into the .h file + namespace Inkscape { namespace { @@ -36,7 +39,7 @@ SPObject *next_sibling_layer(SPObject *layer) { using std::find_if; return find_if( - SP_OBJECT_NEXT(layer), NULL, &is_layer + layer->getNext(), NULL, &is_layer ); } @@ -174,7 +177,8 @@ SPObject *create_layer(SPObject *root, SPObject *layer, LayerRelativePosition po id = g_strdup_printf("layer%d", layer_suffix++); } while (document->getObjectById(id)); - Inkscape::XML::Node *repr=sp_repr_new("svg:g"); + Inkscape::XML::Document *xml_doc = document->getReprDoc(); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:g"); repr->setAttribute("inkscape:groupmode", "layer"); repr->setAttribute("id", id); g_free(id); @@ -212,4 +216,4 @@ SPObject *create_layer(SPObject *root, SPObject *layer, LayerRelativePosition po fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :