Code

fix include paths
[inkscape.git] / src / extension / internal / bluredge.cpp
index 16c6d0eb9fe15df4047e5d7f000d5aa7b8d3ea2f..4a732fb495c193e67828fddbe302ac22e8decbaa 100644 (file)
@@ -39,7 +39,7 @@ namespace Internal {
     \return Whether the load was sucessful
 */
 bool
-BlurEdge::load (Inkscape::Extension::Extension *module)
+BlurEdge::load (Inkscape::Extension::Extension */*module*/)
 {
     // std::cout << "Hey, I'm Blur Edge, I'm loading!" << std::endl;
     return TRUE;
@@ -51,7 +51,7 @@ BlurEdge::load (Inkscape::Extension::Extension *module)
     \param  document What should be edited.
 */
 void
-BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document)
+BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
 {
     Inkscape::Selection * selection     = ((SPDesktop *)document)->selection;
 
@@ -71,7 +71,8 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View
         SPItem * spitem = *item;
 
         std::vector<Inkscape::XML::Node *> new_items(steps);
-        Inkscape::XML::Node * new_group = sp_repr_new("svg:g");
+        Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document->doc());
+        Inkscape::XML::Node * new_group = xml_doc->createElement("svg:g");
         (SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group);
 
         double orig_opacity = sp_repr_css_double_property(sp_repr_css_attr(SP_OBJECT_REPR(spitem), "style"), "opacity", 1.0);
@@ -82,7 +83,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View
         for (int i = 0; i < steps; i++) {
             double offset = (width / (float)(steps - 1) * (float)i) - (width / 2.0);
 
-            new_items[i] = (SP_OBJECT_REPR(spitem))->duplicate();
+            new_items[i] = (SP_OBJECT_REPR(spitem))->duplicate(xml_doc);
 
             SPCSSAttr * css = sp_repr_css_attr(new_items[i], "style");
             sp_repr_css_set_property(css, "opacity", opacity_string);
@@ -116,9 +117,9 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View
 }
 
 Gtk::Widget *
-BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view)
+BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * /*view*/, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
 {
-    return module->autogui(NULL, NULL);
+    return module->autogui(NULL, NULL, changeSignal);
 }
 
 #include "clear-n_.h"