diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 09:05:21 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 09:05:21 +0000 |
| commit | 7ddc9f155a2a0822e2e56d828bbdccc65c141081 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/display | |
| parent | Pot and Dutch translation update (diff) | |
| parent | Merge and cleanup of GSoC C++-ification project. (diff) | |
| download | inkscape-7ddc9f155a2a0822e2e56d828bbdccc65c141081.tar.gz inkscape-7ddc9f155a2a0822e2e56d828bbdccc65c141081.zip | |
GSoC C++-ificiation merge and cleanup.
(bzr r9946)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/canvas-grid.cpp | 9 | ||||
| -rw-r--r-- | src/display/nr-filter-image.cpp | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 34c60b140..df73eb78e 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -3,6 +3,7 @@ */ /* Copyright (C) Johan Engelen 2006-2007 <johan@shouraizou.nl> * Copyright (C) Lauris Kaplinski 2000 + * Abhishek Sharma */ /* As a general comment, I am not exactly proud of how things are done. @@ -11,8 +12,6 @@ * Don't be shy to correct things. */ -#define INKSCAPE_CANVAS_GRID_C - #include "sp-canvas-util.h" #include "util/mathfns.h" #include "display-forward.h" @@ -33,6 +32,8 @@ #include "canvas-grid.h" #include "canvas-axonomgrid.h" +using Inkscape::DocumentUndo; + namespace Inkscape { static gchar const *const grid_name[] = { @@ -247,7 +248,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri // first create the child xml node, then hook it to repr. This order is important, to not set off listeners to repr before the new node is complete. - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); + Inkscape::XML::Document *xml_doc = doc->getReprDoc(); Inkscape::XML::Node *newnode; newnode = xml_doc->createElement("inkscape:grid"); newnode->setAttribute("type", getSVGName(gridtype)); @@ -255,7 +256,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri repr->appendChild(newnode); Inkscape::GC::release(newnode); - sp_document_done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); + DocumentUndo::done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); } /* diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index b0b3ee184..9a39168c2 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -4,6 +4,7 @@ * Authors: * Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> * Tavmjong Bah <tavmjong@free.fr> + * Abhishek Sharma * * Copyright (C) 2007 authors * @@ -49,10 +50,10 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { if (!SVGElem) return 0; // prep the document - sp_document_ensure_up_to_date(document); + document->ensureUpToDate(); NRArena* arena = NRArena::create(); - unsigned const key = sp_item_display_key_new(1); - NRArenaItem* ai = sp_item_invoke_show(SVGElem, arena, key, SP_ITEM_SHOW_DISPLAY); + unsigned const key = SPItem::display_key_new(1); + NRArenaItem* ai = SVGElem->invoke_show(arena, key, SP_ITEM_SHOW_DISPLAY); if (!ai) { g_warning("feImage renderer: error creating NRArenaItem for SVG Element"); nr_object_unref((NRObject *) arena); @@ -100,7 +101,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { { g_warning("FilterImage::render: not enough memory to create pixel buffer. Need %ld.", 4L * width * height); } - sp_item_invoke_hide(SVGElem, key); + SVGElem->invoke_hide(key); nr_object_unref((NRObject *) arena); } @@ -118,7 +119,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { if ( !g_file_test( fullname, G_FILE_TEST_EXISTS ) ) { // Try to load from relative postion combined with document base if( document ) { - fullname = g_build_filename( document->base, feImageHref, NULL ); + fullname = g_build_filename( document->getBase(), feImageHref, NULL ); } } if ( !g_file_test( fullname, G_FILE_TEST_EXISTS ) ) { |
