From c1aeec745cff8de1ffc861137b49361b8fe11275 Mon Sep 17 00:00:00 2001 From: johnce Date: Wed, 5 Aug 2009 05:56:35 +0000 Subject: [PATCH] SPDocument->Document --- src/application/editor.cpp | 16 ++++----- src/bind/javabind.cpp | 2 +- src/dialogs/clonetiler.cpp | 4 +-- src/dialogs/export.cpp | 16 ++++----- src/dialogs/xml-tree.cpp | 14 ++++---- src/display/canvas-axonomgrid.cpp | 2 +- src/display/canvas-grid.cpp | 8 ++--- src/display/nr-filter-image.cpp | 2 +- src/extension/effect.cpp | 2 +- src/extension/execution-env.cpp | 2 +- src/extension/extension.cpp | 24 +++++++------- src/extension/input.cpp | 4 +-- src/extension/output.cpp | 2 +- src/extension/patheffect.cpp | 4 +-- src/extension/print.cpp | 2 +- src/extension/system.cpp | 6 ++-- src/filters/blend.cpp | 4 +-- src/filters/colormatrix.cpp | 4 +-- src/filters/componenttransfer-funcnode.cpp | 4 +-- src/filters/componenttransfer.cpp | 4 +-- src/filters/composite.cpp | 4 +-- src/filters/convolvematrix.cpp | 4 +-- src/filters/diffuselighting.cpp | 4 +-- src/filters/displacementmap.cpp | 4 +-- src/filters/distantlight.cpp | 4 +-- src/filters/flood.cpp | 4 +-- src/filters/image.cpp | 4 +-- src/filters/merge.cpp | 4 +-- src/filters/mergenode.cpp | 4 +-- src/filters/morphology.cpp | 4 +-- src/filters/offset.cpp | 4 +-- src/filters/pointlight.cpp | 4 +-- src/filters/specularlighting.cpp | 4 +-- src/filters/spotlight.cpp | 4 +-- src/filters/tile.cpp | 4 +-- src/filters/turbulence.cpp | 4 +-- src/helper/action.cpp | 2 +- src/helper/pixbuf-ops.cpp | 4 +-- src/helper/png-write.cpp | 6 ++-- src/helper/stock-items.cpp | 22 ++++++------- src/jabber_whiteboard/session-manager.cpp | 10 +++--- src/live_effects/effect.cpp | 6 ++-- src/live_effects/lpeobject.cpp | 4 +-- src/trace/trace.cpp | 2 +- src/ui/clipboard.cpp | 38 +++++++++++----------- src/xml/rebase-hrefs.cpp | 2 +- 46 files changed, 143 insertions(+), 143 deletions(-) diff --git a/src/application/editor.cpp b/src/application/editor.cpp index 49010efdc..730188bdd 100644 --- a/src/application/editor.cpp +++ b/src/application/editor.cpp @@ -18,7 +18,7 @@ #endif /* - TODO: Replace SPDocument with the new Inkscape::Document + TODO: Replace Document with the new Inkscape::Document TODO: Change 'desktop's to 'view*'s TODO: Add derivation from Inkscape::Application::RunMode */ @@ -76,7 +76,7 @@ Editor::init() // gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL); bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR); - SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true); + Document *doc = sp_document_new (have_default? tmpl:0, true, true); g_return_val_if_fail (doc != 0, false); Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc); sp_document_unref (doc); @@ -96,7 +96,7 @@ Editor::getWindow() } /// Returns the active document -SPDocument* +Document* Editor::getActiveDocument() { if (getActiveDesktop()) { @@ -107,7 +107,7 @@ Editor::getActiveDocument() } void -Editor::addDocument (SPDocument *doc) +Editor::addDocument (Document *doc) { if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) { _instance->_documents = g_slist_append (_instance->_documents, doc); @@ -116,7 +116,7 @@ Editor::addDocument (SPDocument *doc) } void -Editor::removeDocument (SPDocument *doc) +Editor::removeDocument (Document *doc) { _instance->_document_set.erase(doc); if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) { @@ -125,7 +125,7 @@ Editor::removeDocument (SPDocument *doc) } SPDesktop* -Editor::createDesktop (SPDocument* doc) +Editor::createDesktop (Document* doc) { g_assert (doc != 0); (new Inkscape::UI::View::EditWidget (doc))->present(); @@ -227,13 +227,13 @@ Editor::reactivateDesktop (SPDesktop* dt) bool Editor::isDuplicatedView (SPDesktop* dt) { - SPDocument const* document = dt->doc(); + Document const* document = dt->doc(); if (!document) { return false; } for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) { SPDesktop *other_desktop=(SPDesktop *)iter->data; - SPDocument *other_document=other_desktop->doc(); + Document *other_document=other_desktop->doc(); if ( other_document == document && other_desktop != dt ) { return true; } diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp index aedd72e13..026486948 100644 --- a/src/bind/javabind.cpp +++ b/src/bind/javabind.cpp @@ -742,7 +742,7 @@ jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, js /* JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr; String s = getString(env, jstr); - SPDocument *doc = sp_document_new_from_mem(s.c_str(), s.size(), true); + Document *doc = sp_document_new_from_mem(s.c_str(), s.size(), true); */ return JNI_TRUE; } diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 55884fe4a..cd690a0d4 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -841,7 +841,7 @@ static NRArena const *trace_arena = NULL; static unsigned trace_visionkey; static NRArenaItem *trace_root; static gdouble trace_zoom; -static SPDocument *trace_doc; +static Document *trace_doc; static void clonetiler_trace_hide_tiled_clones_recursively (SPObject *from) @@ -857,7 +857,7 @@ clonetiler_trace_hide_tiled_clones_recursively (SPObject *from) } static void -clonetiler_trace_setup (SPDocument *doc, gdouble zoom, SPItem *original) +clonetiler_trace_setup (Document *doc, gdouble zoom, SPItem *original) { trace_arena = NRArena::create(); /* Create ArenaItem and set transform */ diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 0cde76657..56d50596c 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -538,7 +538,7 @@ sp_export_dialog (void) if (SP_ACTIVE_DOCUMENT && SP_DOCUMENT_URI (SP_ACTIVE_DOCUMENT)) { gchar *name; - SPDocument * doc = SP_ACTIVE_DOCUMENT; + Document * doc = SP_ACTIVE_DOCUMENT; const gchar *uri = SP_DOCUMENT_URI (doc); Inkscape::XML::Node * repr = sp_document_repr_root(doc); const gchar * text_extension = repr->attribute("inkscape:output_extension"); @@ -779,7 +779,7 @@ sp_export_selection_modified ( Inkscape::Application */*inkscape*/, switch (current_key) { case SELECTION_DRAWING: if ( SP_ACTIVE_DESKTOP ) { - SPDocument *doc; + Document *doc; doc = sp_desktop_document (SP_ACTIVE_DESKTOP); Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); if (bbox) { @@ -839,7 +839,7 @@ sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base) if ( SP_ACTIVE_DESKTOP ) { - SPDocument *doc; + Document *doc; Geom::OptRect bbox; doc = sp_desktop_document (SP_ACTIVE_DESKTOP); @@ -906,7 +906,7 @@ sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base) switch (key) { case SELECTION_PAGE: case SELECTION_DRAWING: { - SPDocument * doc = SP_ACTIVE_DOCUMENT; + Document * doc = SP_ACTIVE_DOCUMENT; sp_document_get_export_hints (doc, &filename, &xdpi, &ydpi); if (filename == NULL) { @@ -1213,7 +1213,7 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) switch ((selection_type)(GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(base), "selection-type")))) { case SELECTION_PAGE: case SELECTION_DRAWING: { - SPDocument * doc = SP_ACTIVE_DOCUMENT; + Document * doc = SP_ACTIVE_DOCUMENT; Inkscape::XML::Node * repr = sp_document_repr_root(doc); bool modified = false; const gchar * temp_string; @@ -1245,7 +1245,7 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) } case SELECTION_SELECTION: { const GSList * reprlst; - SPDocument * doc = SP_ACTIVE_DOCUMENT; + Document * doc = SP_ACTIVE_DOCUMENT; bool modified = false; bool saved = sp_document_get_undo_sensitive(doc); @@ -1466,7 +1466,7 @@ sp_export_detect_size(GtkObject * base) { } break; case SELECTION_DRAWING: { - SPDocument *doc = sp_desktop_document (SP_ACTIVE_DESKTOP); + Document *doc = sp_desktop_document (SP_ACTIVE_DESKTOP); Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); @@ -1478,7 +1478,7 @@ sp_export_detect_size(GtkObject * base) { } case SELECTION_PAGE: { - SPDocument *doc; + Document *doc; doc = sp_desktop_document (SP_ACTIVE_DESKTOP); diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index c8644fef9..32dee453a 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -69,7 +69,7 @@ static SPXMLViewContent *content = NULL; static gint blocked = 0; static SPDesktop *current_desktop = NULL; -static SPDocument *current_document = NULL; +static Document *current_document = NULL; static gint selected_attr = 0; static Inkscape::XML::Node *selected_repr = NULL; @@ -77,7 +77,7 @@ static void sp_xmltree_desktop_activate( Inkscape::Application *inkscape, SPDes static void sp_xmltree_desktop_deactivate( Inkscape::Application *inkscape, SPDesktop *desktop, GtkWidget *dialog ); static void set_tree_desktop(SPDesktop *desktop); -static void set_tree_document(SPDocument *document); +static void set_tree_document(Document *document); static void set_tree_repr(Inkscape::XML::Node *repr); static void set_tree_select(Inkscape::XML::Node *repr); @@ -119,8 +119,8 @@ static void on_attr_unselect_row_clear_text(GtkCList *list, gint row, gint colum static void on_editable_changed_enable_if_valid_xml_name(GtkEditable *editable, gpointer data); static void on_desktop_selection_changed(Inkscape::Selection *selection); -static void on_document_replaced(SPDesktop *dt, SPDocument *document); -static void on_document_uri_set(gchar const *uri, SPDocument *document); +static void on_document_replaced(SPDesktop *dt, Document *document); +static void on_document_uri_set(gchar const *uri, Document *document); static void on_clicked_get_editable_text(GtkWidget *widget, gpointer data); @@ -666,7 +666,7 @@ void set_tree_desktop(SPDesktop *desktop) -void set_tree_document(SPDocument *document) +void set_tree_document(Document *document) { if (document == current_document) { return; @@ -1262,7 +1262,7 @@ void on_desktop_selection_changed(Inkscape::Selection */*selection*/) blocked--; } -static void on_document_replaced(SPDesktop *dt, SPDocument *doc) +static void on_document_replaced(SPDesktop *dt, Document *doc) { if (current_desktop) sel_changed_connection.disconnect(); @@ -1271,7 +1271,7 @@ static void on_document_replaced(SPDesktop *dt, SPDocument *doc) set_tree_document(doc); } -void on_document_uri_set(gchar const */*uri*/, SPDocument *document) +void on_document_uri_set(gchar const */*uri*/, Document *document) { gchar title[500]; sp_ui_dialog_title_string(Inkscape::Verb::get(SP_VERB_DIALOG_XML_EDITOR), title); diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index a92e7cf5b..90bac6053 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -190,7 +190,7 @@ attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int } } -CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc) +CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc) : CanvasGrid(nv, in_repr, in_doc, GRID_AXONOMETRIC) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 5037c0375..710074a97 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -155,7 +155,7 @@ grid_canvasitem_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned NULL /* order_changed */ }; -CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument *in_doc, GridType type) +CanvasGrid::CanvasGrid(SPNamedView * nv, Inkscape::XML::Node * in_repr, Document *in_doc, GridType type) : visible(true), gridtype(type) { repr = in_repr; @@ -240,7 +240,7 @@ CanvasGrid::getGridTypeFromName(char const *typestr) * writes an child to repr. */ void -CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, GridType gridtype) +CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, Document * doc, GridType gridtype) { if (!repr) return; if (gridtype > GRID_MAXTYPENR) return; @@ -262,7 +262,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri * Creates a new CanvasGrid object of type gridtype */ CanvasGrid* -CanvasGrid::NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, SPDocument * doc, GridType gridtype) +CanvasGrid::NewGrid(SPNamedView * nv, Inkscape::XML::Node * repr, Document * doc, GridType gridtype) { if (!repr) return NULL; if (!doc) { @@ -420,7 +420,7 @@ attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int } } -CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPDocument * in_doc) +CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, Document * in_doc) : CanvasGrid(nv, in_repr, in_doc, GRID_RECTANGULAR) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index 2b799f8d2..4430907da 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -225,7 +225,7 @@ void FilterImage::set_href(const gchar *href){ feImageHref = (href) ? g_strdup (href) : NULL; } -void FilterImage::set_document(SPDocument *doc){ +void FilterImage::set_document(Document *doc){ document = doc; } diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index afc0668a9..c6b731a84 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -358,7 +358,7 @@ void Effect::EffectVerb::perform( SPAction *action, void * data, void */*pdata*/ ) { Inkscape::UI::View::View * current_view = sp_action_get_view(action); -// SPDocument * current_document = current_view->doc; +// Document * current_document = current_view->doc; Effect::EffectVerb * ev = reinterpret_cast(data); Effect * effect = ev->_effect; diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index 4a13890d7..a87cc6b64 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -179,7 +179,7 @@ ExecutionEnv::commit (void) { void ExecutionEnv::reselect (void) { if (_doc == NULL) { return; } - SPDocument * doc = _doc->doc(); + Document * doc = _doc->doc(); if (doc == NULL) { return; } SPDesktop *desktop = (SPDesktop *)_doc; diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 52d5f5148..c8dc30d8b 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -423,7 +423,7 @@ param_shared (const gchar * name, GSList * list) found parameter. */ const gchar * -Extension::get_param_string (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_string (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -432,7 +432,7 @@ Extension::get_param_string (const gchar * name, const SPDocument * doc, const I } const gchar * -Extension::get_param_enum (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_enum (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter* param = param_shared(name, parameters); return param->get_enum(doc, node); @@ -450,7 +450,7 @@ Extension::get_param_enum (const gchar * name, const SPDocument * doc, const Ink found parameter. */ bool -Extension::get_param_bool (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_bool (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -470,7 +470,7 @@ Extension::get_param_bool (const gchar * name, const SPDocument * doc, const Ink found parameter. */ int -Extension::get_param_int (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_int (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -490,7 +490,7 @@ Extension::get_param_int (const gchar * name, const SPDocument * doc, const Inks found parameter. */ float -Extension::get_param_float (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_float (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter * param; param = param_shared(name, parameters); @@ -509,7 +509,7 @@ Extension::get_param_float (const gchar * name, const SPDocument * doc, const In found parameter. */ guint32 -Extension::get_param_color (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) +Extension::get_param_color (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) { Parameter* param = param_shared(name, parameters); return param->get_color(doc, node); @@ -528,7 +528,7 @@ Extension::get_param_color (const gchar * name, const SPDocument * doc, const In found parameter. */ bool -Extension::set_param_bool (const gchar * name, bool value, SPDocument * doc, Inkscape::XML::Node * node) +Extension::set_param_bool (const gchar * name, bool value, Document * doc, Inkscape::XML::Node * node) { Parameter * param; param = param_shared(name, parameters); @@ -548,7 +548,7 @@ Extension::set_param_bool (const gchar * name, bool value, SPDocument * doc, Ink found parameter. */ int -Extension::set_param_int (const gchar * name, int value, SPDocument * doc, Inkscape::XML::Node * node) +Extension::set_param_int (const gchar * name, int value, Document * doc, Inkscape::XML::Node * node) { Parameter * param; param = param_shared(name, parameters); @@ -568,7 +568,7 @@ Extension::set_param_int (const gchar * name, int value, SPDocument * doc, Inksc found parameter. */ float -Extension::set_param_float (const gchar * name, float value, SPDocument * doc, Inkscape::XML::Node * node) +Extension::set_param_float (const gchar * name, float value, Document * doc, Inkscape::XML::Node * node) { Parameter * param; param = param_shared(name, parameters); @@ -588,7 +588,7 @@ Extension::set_param_float (const gchar * name, float value, SPDocument * doc, I found parameter. */ const gchar * -Extension::set_param_string (const gchar * name, const gchar * value, SPDocument * doc, Inkscape::XML::Node * node) +Extension::set_param_string (const gchar * name, const gchar * value, Document * doc, Inkscape::XML::Node * node) { Parameter * param; param = param_shared(name, parameters); @@ -608,7 +608,7 @@ Extension::set_param_string (const gchar * name, const gchar * value, SPDocument found parameter. */ guint32 -Extension::set_param_color (const gchar * name, guint32 color, SPDocument * doc, Inkscape::XML::Node * node) +Extension::set_param_color (const gchar * name, guint32 color, Document * doc, Inkscape::XML::Node * node) { Parameter* param = param_shared(name, parameters); return param->set_color(color, doc, node); @@ -671,7 +671,7 @@ public: If all parameters are gui_visible = false NULL is returned as well. */ Gtk::Widget * -Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +Extension::autogui (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (param_visible_count() == 0) return NULL; diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 689c1286f..ca5fdc29f 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -145,7 +145,7 @@ Input::check (void) Adobe Illustrator file can be transparent (not recommended, but transparent). This is all done with undo being turned off. */ -SPDocument * +Document * Input::open (const gchar *uri) { if (!loaded()) { @@ -156,7 +156,7 @@ Input::open (const gchar *uri) } timer->touch(); - SPDocument *const doc = imp->open(this, uri); + Document *const doc = imp->open(this, uri); if (doc != NULL) { Inkscape::XML::Node * repr = sp_document_repr_root(doc); bool saved = sp_document_get_undo_sensitive(doc); diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 742e938de..8e2fa5486 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -212,7 +212,7 @@ Output::prefs (void) could be changed, and old files will still work properly. */ void -Output::save(SPDocument *doc, gchar const *filename) +Output::save(Document *doc, gchar const *filename) { try { imp->save(this, doc, filename); diff --git a/src/extension/patheffect.cpp b/src/extension/patheffect.cpp index 8e3fc13f1..f6fa84f5b 100644 --- a/src/extension/patheffect.cpp +++ b/src/extension/patheffect.cpp @@ -28,14 +28,14 @@ PathEffect::~PathEffect (void) } void -PathEffect::processPath (SPDocument * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/) +PathEffect::processPath (Document * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/) { } void -PathEffect::processPathEffects (SPDocument * doc, Inkscape::XML::Node * path) +PathEffect::processPathEffects (Document * doc, Inkscape::XML::Node * path) { gchar const * patheffectlist = path->attribute("inkscape:path-effects"); if (patheffectlist == NULL) diff --git a/src/extension/print.cpp b/src/extension/print.cpp index 2d4177d60..f6f6bb1e5 100644 --- a/src/extension/print.cpp +++ b/src/extension/print.cpp @@ -49,7 +49,7 @@ Print::set_preview (void) } unsigned int -Print::begin (SPDocument *doc) +Print::begin (Document *doc) { return imp->begin(this, doc); } diff --git a/src/extension/system.cpp b/src/extension/system.cpp index d7e0eebf3..ad49c3d2a 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -59,7 +59,7 @@ static Extension *build_from_reprdoc(Inkscape::XML::Document *doc, Implementatio * * Lastly, the open function is called in the module itself. */ -SPDocument * +Document * open(Extension *key, gchar const *filename) { Input *imod = NULL; @@ -91,7 +91,7 @@ open(Extension *key, gchar const *filename) if (!imod->prefs(filename)) return NULL; - SPDocument *doc = imod->open(filename); + Document *doc = imod->open(filename); if (!doc) { throw Input::open_failed(); } @@ -184,7 +184,7 @@ open_internal(Extension *in_plug, gpointer in_data) * Lastly, the save function is called in the module itself. */ void -save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official) +save(Extension *key, Document *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official) { Output *omod; if (key == NULL) { diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp index 5998d7be3..26db781a0 100644 --- a/src/filters/blend.cpp +++ b/src/filters/blend.cpp @@ -35,7 +35,7 @@ static void sp_feBlend_class_init(SPFeBlendClass *klass); static void sp_feBlend_init(SPFeBlend *feBlend); -static void sp_feBlend_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feBlend_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feBlend_release(SPObject *object); static void sp_feBlend_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feBlend_update(SPObject *object, SPCtx *ctx, guint flags); @@ -94,7 +94,7 @@ sp_feBlend_init(SPFeBlend *feBlend) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feBlend_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feBlend_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPFeBlend *blend = SP_FEBLEND(object); diff --git a/src/filters/colormatrix.cpp b/src/filters/colormatrix.cpp index 55cfcbeb7..f3c336d71 100644 --- a/src/filters/colormatrix.cpp +++ b/src/filters/colormatrix.cpp @@ -34,7 +34,7 @@ static void sp_feColorMatrix_class_init(SPFeColorMatrixClass *klass); static void sp_feColorMatrix_init(SPFeColorMatrix *feColorMatrix); -static void sp_feColorMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feColorMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feColorMatrix_release(SPObject *object); static void sp_feColorMatrix_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feColorMatrix_update(SPObject *object, SPCtx *ctx, guint flags); @@ -91,7 +91,7 @@ sp_feColorMatrix_init(SPFeColorMatrix */*feColorMatrix*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feColorMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feColorMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feColorMatrix_parent_class)->build) { ((SPObjectClass *) feColorMatrix_parent_class)->build(object, document, repr); diff --git a/src/filters/componenttransfer-funcnode.cpp b/src/filters/componenttransfer-funcnode.cpp index e66f85e70..f74da8154 100644 --- a/src/filters/componenttransfer-funcnode.cpp +++ b/src/filters/componenttransfer-funcnode.cpp @@ -36,7 +36,7 @@ static void sp_fefuncnode_class_init(SPFeFuncNodeClass *klass); static void sp_fefuncnode_init(SPFeFuncNode *fefuncnode); -static void sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_fefuncnode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_fefuncnode_release(SPObject *object); static void sp_fefuncnode_set(SPObject *object, unsigned int key, gchar const *value); static void sp_fefuncnode_update(SPObject *object, SPCtx *ctx, guint flags); @@ -161,7 +161,7 @@ sp_fefuncnode_init(SPFeFuncNode *fefuncnode) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_fefuncnode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_fefuncnode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feFuncNode_parent_class)->build) { ((SPObjectClass *) feFuncNode_parent_class)->build(object, document, repr); diff --git a/src/filters/componenttransfer.cpp b/src/filters/componenttransfer.cpp index 557d884e0..fbfca3a35 100644 --- a/src/filters/componenttransfer.cpp +++ b/src/filters/componenttransfer.cpp @@ -32,7 +32,7 @@ static void sp_feComponentTransfer_class_init(SPFeComponentTransferClass *klass); static void sp_feComponentTransfer_init(SPFeComponentTransfer *feComponentTransfer); -static void sp_feComponentTransfer_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feComponentTransfer_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feComponentTransfer_release(SPObject *object); static void sp_feComponentTransfer_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feComponentTransfer_update(SPObject *object, SPCtx *ctx, guint flags); @@ -91,7 +91,7 @@ sp_feComponentTransfer_init(SPFeComponentTransfer */*feComponentTransfer*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feComponentTransfer_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feComponentTransfer_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feComponentTransfer_parent_class)->build) { ((SPObjectClass *) feComponentTransfer_parent_class)->build(object, document, repr); diff --git a/src/filters/composite.cpp b/src/filters/composite.cpp index 93c692f94..8265a611c 100644 --- a/src/filters/composite.cpp +++ b/src/filters/composite.cpp @@ -29,7 +29,7 @@ static void sp_feComposite_class_init(SPFeCompositeClass *klass); static void sp_feComposite_init(SPFeComposite *feComposite); -static void sp_feComposite_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feComposite_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feComposite_release(SPObject *object); static void sp_feComposite_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feComposite_update(SPObject *object, SPCtx *ctx, guint flags); @@ -93,7 +93,7 @@ sp_feComposite_init(SPFeComposite *feComposite) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feComposite_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feComposite_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feComposite_parent_class)->build) { ((SPObjectClass *) feComposite_parent_class)->build(object, document, repr); diff --git a/src/filters/convolvematrix.cpp b/src/filters/convolvematrix.cpp index 3e1c36f0a..cc9d62f8f 100644 --- a/src/filters/convolvematrix.cpp +++ b/src/filters/convolvematrix.cpp @@ -34,7 +34,7 @@ static void sp_feConvolveMatrix_class_init(SPFeConvolveMatrixClass *klass); static void sp_feConvolveMatrix_init(SPFeConvolveMatrix *feConvolveMatrix); -static void sp_feConvolveMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feConvolveMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feConvolveMatrix_release(SPObject *object); static void sp_feConvolveMatrix_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feConvolveMatrix_update(SPObject *object, SPCtx *ctx, guint flags); @@ -103,7 +103,7 @@ sp_feConvolveMatrix_init(SPFeConvolveMatrix *feConvolveMatrix) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feConvolveMatrix_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feConvolveMatrix_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feConvolveMatrix_parent_class)->build) { ((SPObjectClass *) feConvolveMatrix_parent_class)->build(object, document, repr); diff --git a/src/filters/diffuselighting.cpp b/src/filters/diffuselighting.cpp index bdc569083..e494e8ccd 100644 --- a/src/filters/diffuselighting.cpp +++ b/src/filters/diffuselighting.cpp @@ -32,7 +32,7 @@ static void sp_feDiffuseLighting_class_init(SPFeDiffuseLightingClass *klass); static void sp_feDiffuseLighting_init(SPFeDiffuseLighting *feDiffuseLighting); -static void sp_feDiffuseLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feDiffuseLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feDiffuseLighting_release(SPObject *object); static void sp_feDiffuseLighting_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feDiffuseLighting_update(SPObject *object, SPCtx *ctx, guint flags); @@ -111,7 +111,7 @@ sp_feDiffuseLighting_init(SPFeDiffuseLighting *feDiffuseLighting) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feDiffuseLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feDiffuseLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feDiffuseLighting_parent_class)->build) { ((SPObjectClass *) feDiffuseLighting_parent_class)->build(object, document, repr); diff --git a/src/filters/displacementmap.cpp b/src/filters/displacementmap.cpp index baa17d785..b05ee4db1 100644 --- a/src/filters/displacementmap.cpp +++ b/src/filters/displacementmap.cpp @@ -29,7 +29,7 @@ static void sp_feDisplacementMap_class_init(SPFeDisplacementMapClass *klass); static void sp_feDisplacementMap_init(SPFeDisplacementMap *feDisplacementMap); -static void sp_feDisplacementMap_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feDisplacementMap_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feDisplacementMap_release(SPObject *object); static void sp_feDisplacementMap_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feDisplacementMap_update(SPObject *object, SPCtx *ctx, guint flags); @@ -90,7 +90,7 @@ sp_feDisplacementMap_init(SPFeDisplacementMap *feDisplacementMap) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feDisplacementMap_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feDisplacementMap_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feDisplacementMap_parent_class)->build) { ((SPObjectClass *) feDisplacementMap_parent_class)->build(object, document, repr); diff --git a/src/filters/distantlight.cpp b/src/filters/distantlight.cpp index 41584c4a4..f25094798 100644 --- a/src/filters/distantlight.cpp +++ b/src/filters/distantlight.cpp @@ -35,7 +35,7 @@ static void sp_fedistantlight_class_init(SPFeDistantLightClass *klass); static void sp_fedistantlight_init(SPFeDistantLight *fedistantlight); -static void sp_fedistantlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_fedistantlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_fedistantlight_release(SPObject *object); static void sp_fedistantlight_set(SPObject *object, unsigned int key, gchar const *value); static void sp_fedistantlight_update(SPObject *object, SPCtx *ctx, guint flags); @@ -94,7 +94,7 @@ sp_fedistantlight_init(SPFeDistantLight *fedistantlight) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_fedistantlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_fedistantlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feDistantLight_parent_class)->build) { ((SPObjectClass *) feDistantLight_parent_class)->build(object, document, repr); diff --git a/src/filters/flood.cpp b/src/filters/flood.cpp index 625e35d42..941f36113 100644 --- a/src/filters/flood.cpp +++ b/src/filters/flood.cpp @@ -29,7 +29,7 @@ static void sp_feFlood_class_init(SPFeFloodClass *klass); static void sp_feFlood_init(SPFeFlood *feFlood); -static void sp_feFlood_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feFlood_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feFlood_release(SPObject *object); static void sp_feFlood_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feFlood_update(SPObject *object, SPCtx *ctx, guint flags); @@ -87,7 +87,7 @@ sp_feFlood_init(SPFeFlood *feFlood) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feFlood_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feFlood_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feFlood_parent_class)->build) { ((SPObjectClass *) feFlood_parent_class)->build(object, document, repr); diff --git a/src/filters/image.cpp b/src/filters/image.cpp index 0002ef94c..bdfbadee0 100644 --- a/src/filters/image.cpp +++ b/src/filters/image.cpp @@ -34,7 +34,7 @@ static void sp_feImage_class_init(SPFeImageClass *klass); static void sp_feImage_init(SPFeImage *feImage); -static void sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feImage_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feImage_release(SPObject *object); static void sp_feImage_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feImage_update(SPObject *object, SPCtx *ctx, guint flags); @@ -92,7 +92,7 @@ sp_feImage_init(SPFeImage */*feImage*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feImage_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { // Save document reference so we can load images with relative paths. SPFeImage *feImage = SP_FEIMAGE(object); diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp index 437cb4b55..9d82da7ae 100644 --- a/src/filters/merge.cpp +++ b/src/filters/merge.cpp @@ -30,7 +30,7 @@ static void sp_feMerge_class_init(SPFeMergeClass *klass); static void sp_feMerge_init(SPFeMerge *feMerge); -static void sp_feMerge_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feMerge_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feMerge_release(SPObject *object); static void sp_feMerge_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feMerge_update(SPObject *object, SPCtx *ctx, guint flags); @@ -88,7 +88,7 @@ sp_feMerge_init(SPFeMerge */*feMerge*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feMerge_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feMerge_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feMerge_parent_class)->build) { ((SPObjectClass *) feMerge_parent_class)->build(object, document, repr); diff --git a/src/filters/mergenode.cpp b/src/filters/mergenode.cpp index 8a4e0dd0a..42b4bc8db 100644 --- a/src/filters/mergenode.cpp +++ b/src/filters/mergenode.cpp @@ -26,7 +26,7 @@ static void sp_feMergeNode_class_init(SPFeMergeNodeClass *klass); static void sp_feMergeNode_init(SPFeMergeNode *skeleton); -static void sp_feMergeNode_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feMergeNode_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feMergeNode_release(SPObject *object); static void sp_feMergeNode_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feMergeNode_update(SPObject *object, SPCtx *ctx, guint flags); @@ -82,7 +82,7 @@ sp_feMergeNode_init(SPFeMergeNode *feMergeNode) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feMergeNode_build(SPObject *object, SPDocument */*document*/, Inkscape::XML::Node */*repr*/) +sp_feMergeNode_build(SPObject *object, Document */*document*/, Inkscape::XML::Node */*repr*/) { sp_object_read_attr(object, "in"); } diff --git a/src/filters/morphology.cpp b/src/filters/morphology.cpp index 9a34bbccb..6d91d9905 100644 --- a/src/filters/morphology.cpp +++ b/src/filters/morphology.cpp @@ -31,7 +31,7 @@ static void sp_feMorphology_class_init(SPFeMorphologyClass *klass); static void sp_feMorphology_init(SPFeMorphology *feMorphology); -static void sp_feMorphology_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feMorphology_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feMorphology_release(SPObject *object); static void sp_feMorphology_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feMorphology_update(SPObject *object, SPCtx *ctx, guint flags); @@ -90,7 +90,7 @@ sp_feMorphology_init(SPFeMorphology *feMorphology) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feMorphology_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feMorphology_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feMorphology_parent_class)->build) { ((SPObjectClass *) feMorphology_parent_class)->build(object, document, repr); diff --git a/src/filters/offset.cpp b/src/filters/offset.cpp index 61ea45ff2..3ae6994ce 100644 --- a/src/filters/offset.cpp +++ b/src/filters/offset.cpp @@ -30,7 +30,7 @@ static void sp_feOffset_class_init(SPFeOffsetClass *klass); static void sp_feOffset_init(SPFeOffset *feOffset); -static void sp_feOffset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feOffset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feOffset_release(SPObject *object); static void sp_feOffset_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feOffset_update(SPObject *object, SPCtx *ctx, guint flags); @@ -90,7 +90,7 @@ sp_feOffset_init(SPFeOffset *feOffset) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feOffset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feOffset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feOffset_parent_class)->build) { ((SPObjectClass *) feOffset_parent_class)->build(object, document, repr); diff --git a/src/filters/pointlight.cpp b/src/filters/pointlight.cpp index ce58cf13e..cc56b5f01 100644 --- a/src/filters/pointlight.cpp +++ b/src/filters/pointlight.cpp @@ -35,7 +35,7 @@ static void sp_fepointlight_class_init(SPFePointLightClass *klass); static void sp_fepointlight_init(SPFePointLight *fepointlight); -static void sp_fepointlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_fepointlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_fepointlight_release(SPObject *object); static void sp_fepointlight_set(SPObject *object, unsigned int key, gchar const *value); static void sp_fepointlight_update(SPObject *object, SPCtx *ctx, guint flags); @@ -97,7 +97,7 @@ sp_fepointlight_init(SPFePointLight *fepointlight) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_fepointlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_fepointlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) fePointLight_parent_class)->build) { ((SPObjectClass *) fePointLight_parent_class)->build(object, document, repr); diff --git a/src/filters/specularlighting.cpp b/src/filters/specularlighting.cpp index 03a0c7f96..9a3ac6811 100644 --- a/src/filters/specularlighting.cpp +++ b/src/filters/specularlighting.cpp @@ -32,7 +32,7 @@ static void sp_feSpecularLighting_class_init(SPFeSpecularLightingClass *klass); static void sp_feSpecularLighting_init(SPFeSpecularLighting *feSpecularLighting); -static void sp_feSpecularLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feSpecularLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feSpecularLighting_release(SPObject *object); static void sp_feSpecularLighting_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feSpecularLighting_update(SPObject *object, SPCtx *ctx, guint flags); @@ -113,7 +113,7 @@ sp_feSpecularLighting_init(SPFeSpecularLighting *feSpecularLighting) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feSpecularLighting_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feSpecularLighting_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feSpecularLighting_parent_class)->build) { ((SPObjectClass *) feSpecularLighting_parent_class)->build(object, document, repr); diff --git a/src/filters/spotlight.cpp b/src/filters/spotlight.cpp index 3b518f0b4..bd5d06f73 100644 --- a/src/filters/spotlight.cpp +++ b/src/filters/spotlight.cpp @@ -35,7 +35,7 @@ static void sp_fespotlight_class_init(SPFeSpotLightClass *klass); static void sp_fespotlight_init(SPFeSpotLight *fespotlight); -static void sp_fespotlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_fespotlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_fespotlight_release(SPObject *object); static void sp_fespotlight_set(SPObject *object, unsigned int key, gchar const *value); static void sp_fespotlight_update(SPObject *object, SPCtx *ctx, guint flags); @@ -107,7 +107,7 @@ sp_fespotlight_init(SPFeSpotLight *fespotlight) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_fespotlight_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_fespotlight_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feSpotLight_parent_class)->build) { ((SPObjectClass *) feSpotLight_parent_class)->build(object, document, repr); diff --git a/src/filters/tile.cpp b/src/filters/tile.cpp index 877f70b27..7bf03cde3 100644 --- a/src/filters/tile.cpp +++ b/src/filters/tile.cpp @@ -28,7 +28,7 @@ static void sp_feTile_class_init(SPFeTileClass *klass); static void sp_feTile_init(SPFeTile *feTile); -static void sp_feTile_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feTile_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feTile_release(SPObject *object); static void sp_feTile_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feTile_update(SPObject *object, SPCtx *ctx, guint flags); @@ -85,7 +85,7 @@ sp_feTile_init(SPFeTile */*feTile*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feTile_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feTile_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feTile_parent_class)->build) { ((SPObjectClass *) feTile_parent_class)->build(object, document, repr); diff --git a/src/filters/turbulence.cpp b/src/filters/turbulence.cpp index f3c143056..e348f796f 100644 --- a/src/filters/turbulence.cpp +++ b/src/filters/turbulence.cpp @@ -34,7 +34,7 @@ static void sp_feTurbulence_class_init(SPFeTurbulenceClass *klass); static void sp_feTurbulence_init(SPFeTurbulence *feTurbulence); -static void sp_feTurbulence_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_feTurbulence_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_feTurbulence_release(SPObject *object); static void sp_feTurbulence_set(SPObject *object, unsigned int key, gchar const *value); static void sp_feTurbulence_update(SPObject *object, SPCtx *ctx, guint flags); @@ -93,7 +93,7 @@ sp_feTurbulence_init(SPFeTurbulence *feTurbulence) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_feTurbulence_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_feTurbulence_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) feTurbulence_parent_class)->build) { ((SPObjectClass *) feTurbulence_parent_class)->build(object, document, repr); diff --git a/src/helper/action.cpp b/src/helper/action.cpp index 84d150615..8c2705e45 100644 --- a/src/helper/action.cpp +++ b/src/helper/action.cpp @@ -132,7 +132,7 @@ public: { _addProperty(share_static_string("timestamp"), timestamp()); if (action->view) { - SPDocument *document = action->view->doc(); + Document *document = action->view->doc(); if (document) { _addProperty(share_static_string("document"), document->serial()); } diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index f41342e42..1e364a37c 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -66,7 +66,7 @@ hide_other_items_recursively(SPObject *o, GSList *list, unsigned dkey) // to the call for the interface to the png writing. bool -sp_export_jpg_file(SPDocument *doc, gchar const *filename, +sp_export_jpg_file(Document *doc, gchar const *filename, double x0, double y0, double x1, double y1, unsigned width, unsigned height, double xdpi, double ydpi, unsigned long bgcolor, double quality,GSList *items) @@ -90,7 +90,7 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename, } GdkPixbuf* -sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, +sp_generate_internal_bitmap(Document *doc, gchar const */*filename*/, double x0, double y0, double x1, double y1, unsigned width, unsigned height, double xdpi, double ydpi, unsigned long bgcolor, diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp index 3ac900680..ad1b43c55 100644 --- a/src/helper/png-write.cpp +++ b/src/helper/png-write.cpp @@ -120,7 +120,7 @@ void PngTextList::add(gchar const* key, gchar const* text) } static bool -sp_png_write_rgba_striped(SPDocument *doc, +sp_png_write_rgba_striped(Document *doc, gchar const *filename, unsigned long int width, unsigned long int height, double xdpi, double ydpi, int (* get_rows)(guchar const **rows, int row, int num_rows, void *data), void *data) @@ -388,7 +388,7 @@ hide_other_items_recursively(SPObject *o, GSList *list, unsigned dkey) * * \return true if succeeded (or if no action was taken), false if an error occurred. */ -bool sp_export_png_file (SPDocument *doc, gchar const *filename, +bool sp_export_png_file (Document *doc, gchar const *filename, double x0, double y0, double x1, double y1, unsigned long int width, unsigned long int height, double xdpi, double ydpi, unsigned long bgcolor, @@ -400,7 +400,7 @@ bool sp_export_png_file (SPDocument *doc, gchar const *filename, width, height, xdpi, ydpi, bgcolor, status, data, force_overwrite, items_only); } bool -sp_export_png_file(SPDocument *doc, gchar const *filename, +sp_export_png_file(Document *doc, gchar const *filename, Geom::Rect const &area, unsigned long width, unsigned long height, double xdpi, double ydpi, unsigned long bgcolor, diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index 575197fee..936397480 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -35,9 +35,9 @@ -static SPObject *sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc); -static SPObject *sp_marker_load_from_svg(gchar const *name, SPDocument *current_doc); -static SPObject *sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc); +static SPObject *sp_gradient_load_from_svg(gchar const *name, Document *current_doc); +static SPObject *sp_marker_load_from_svg(gchar const *name, Document *current_doc); +static SPObject *sp_gradient_load_from_svg(gchar const *name, Document *current_doc); // FIXME: these should be merged with the icon loading code so they @@ -45,9 +45,9 @@ static SPObject *sp_gradient_load_from_svg(gchar const *name, SPDocument *curren // take the dir to look in, and the file to check for, and cache // against that, rather than the existing copy/paste code seen here. -static SPObject * sp_marker_load_from_svg(gchar const *name, SPDocument *current_doc) +static SPObject * sp_marker_load_from_svg(gchar const *name, Document *current_doc) { - static SPDocument *doc = NULL; + static Document *doc = NULL; static unsigned int edoc = FALSE; if (!current_doc) { return NULL; @@ -83,9 +83,9 @@ static SPObject * sp_marker_load_from_svg(gchar const *name, SPDocument *current static SPObject * -sp_pattern_load_from_svg(gchar const *name, SPDocument *current_doc) +sp_pattern_load_from_svg(gchar const *name, Document *current_doc) { - static SPDocument *doc = NULL; + static Document *doc = NULL; static unsigned int edoc = FALSE; if (!current_doc) { return NULL; @@ -126,9 +126,9 @@ sp_pattern_load_from_svg(gchar const *name, SPDocument *current_doc) static SPObject * -sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc) +sp_gradient_load_from_svg(gchar const *name, Document *current_doc) { - static SPDocument *doc = NULL; + static Document *doc = NULL; static unsigned int edoc = FALSE; if (!current_doc) { return NULL; @@ -194,7 +194,7 @@ SPObject *get_stock_item(gchar const *urn) gchar * base = g_strndup(e, a); SPDesktop *desktop = inkscape_active_desktop(); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); SPDefs *defs= (SPDefs *) SP_DOCUMENT_DEFS(doc); SPObject *object = NULL; @@ -263,7 +263,7 @@ SPObject *get_stock_item(gchar const *urn) else { SPDesktop *desktop = inkscape_active_desktop(); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); SPObject *object = doc->getObjectById(urn); return object; diff --git a/src/jabber_whiteboard/session-manager.cpp b/src/jabber_whiteboard/session-manager.cpp index a04ab05f0..b6d236be9 100644 --- a/src/jabber_whiteboard/session-manager.cpp +++ b/src/jabber_whiteboard/session-manager.cpp @@ -95,7 +95,7 @@ void SessionManager::initialiseSession(Glib::ustring const& to, State::SessionType type) { - SPDocument* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", type, to); + Document* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", type, to); InkboardDocument* inkdoc = dynamic_cast< InkboardDocument* >(doc->rdoc); if(inkdoc == NULL) return; @@ -317,7 +317,7 @@ SessionManager::checkInvitationQueue() Dialog::DialogReply reply = static_cast< Dialog::DialogReply >(dialog.run()); - SPDocument* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from); + Document* doc = makeInkboardDocument(g_quark_from_static_string("xml"), "svg:svg", State::WHITEBOARD_PEER, from); InkboardDocument* inkdoc = dynamic_cast< InkboardDocument* >(doc->rdoc); if(inkdoc == NULL) return true; @@ -350,10 +350,10 @@ SessionManager::checkInvitationQueue() //# HELPER FUNCTIONS //######################################################################### -SPDocument* +Document* makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, Glib::ustring const& to) { - SPDocument* doc; + Document* doc; InkboardDocument* rdoc = new InkboardDocument(g_quark_from_static_string("xml"), type, to); rdoc->setAttribute("version", "1.0"); @@ -382,7 +382,7 @@ makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, G // // \see sp_file_new SPDesktop* -makeInkboardDesktop(SPDocument* doc) +makeInkboardDesktop(Document* doc) { SPDesktop* dt; diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index de0535448..f92f7c2ab 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -246,7 +246,7 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj) } void -Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item) +Effect::createAndApply(const char* name, Document *doc, SPItem *item) { // Path effect definition Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); @@ -263,7 +263,7 @@ Effect::createAndApply(const char* name, SPDocument *doc, SPItem *item) } void -Effect::createAndApply(EffectType type, SPDocument *doc, SPItem *item) +Effect::createAndApply(EffectType type, Document *doc, SPItem *item) { createAndApply(LPETypeConverter.get_key(type).c_str(), doc, item); } @@ -576,7 +576,7 @@ Effect::getRepr() return SP_OBJECT_REPR(lpeobj); } -SPDocument * +Document * Effect::getSPDoc() { if (SP_OBJECT_DOCUMENT(lpeobj) == NULL) g_message("Effect::getSPDoc() returns NULL"); diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp index ec0dee0be..c7ca5e4aa 100644 --- a/src/live_effects/lpeobject.cpp +++ b/src/live_effects/lpeobject.cpp @@ -93,7 +93,7 @@ LivePathEffectObject::livepatheffect_init(LivePathEffectObject *lpeobj) * Virtual build: set livepatheffect attributes from its associated XML node. */ void -LivePathEffectObject::livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +LivePathEffectObject::livepatheffect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { #ifdef LIVEPATHEFFECT_VERBOSE g_message("Build livepatheffect"); @@ -250,7 +250,7 @@ LivePathEffectObject * LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users) { if (SP_OBJECT_HREFCOUNT(this) > nr_of_allowed_users) { - SPDocument *doc = SP_OBJECT_DOCUMENT(this); + Document *doc = SP_OBJECT_DOCUMENT(this); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *repr = SP_OBJECT_REPR (this)->duplicate(xml_doc); diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp index e2bd0e9f5..9afadbeaf 100644 --- a/src/trace/trace.cpp +++ b/src/trace/trace.cpp @@ -442,7 +442,7 @@ void Tracer::traceThread() engine = NULL; return; } - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; sp_document_ensure_up_to_date(doc); diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 7e41006be..e7e8a29dc 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -126,13 +126,13 @@ private: void _copyTextPath(SPTextPath *); Inkscape::XML::Node *_copyNode(Inkscape::XML::Node *, Inkscape::XML::Document *, Inkscape::XML::Node *); - void _pasteDocument(SPDocument *, bool in_place); - void _pasteDefs(SPDocument *); + void _pasteDocument(Document *, bool in_place); + void _pasteDefs(Document *); bool _pasteImage(); bool _pasteText(); SPCSSAttr *_parseColor(const Glib::ustring &); void _applyPathEffect(SPItem *, gchar const *); - SPDocument *_retrieveClipboard(Glib::ustring = ""); + Document *_retrieveClipboard(Glib::ustring = ""); // clipboard callbacks void _onGet(Gtk::SelectionData &, guint); @@ -149,7 +149,7 @@ private: void _userWarn(SPDesktop *, char const *); // private properites - SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it + Document *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node Inkscape::XML::Node *_root; ///< Reference to the clipboard's root node Inkscape::XML::Node *_clipnode; ///< The node that holds extra information @@ -311,7 +311,7 @@ bool ClipboardManagerImpl::paste(bool in_place) if ( target == CLIPBOARD_TEXT_TARGET ) return _pasteText(); // otherwise, use the import extensions - SPDocument *tempdoc = _retrieveClipboard(target); + Document *tempdoc = _retrieveClipboard(target); if ( tempdoc == NULL ) { _userWarn(desktop, _("Nothing on the clipboard.")); return false; @@ -328,7 +328,7 @@ bool ClipboardManagerImpl::paste(bool in_place) */ const gchar *ClipboardManagerImpl::getFirstObjectID() { - SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); + Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); if ( tempdoc == NULL ) { return NULL; } @@ -373,7 +373,7 @@ bool ClipboardManagerImpl::pasteStyle() return false; } - SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); + Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); if ( tempdoc == NULL ) { // no document, but we can try _text_style if (_text_style) { @@ -425,7 +425,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y } // FIXME: actually, this should accept arbitrary documents - SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); + Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); if ( tempdoc == NULL ) { _userWarn(desktop, _("No size on the clipboard.")); return false; @@ -482,7 +482,7 @@ bool ClipboardManagerImpl::pastePathEffect() return false; } - SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); + Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg"); if ( tempdoc ) { Inkscape::XML::Node *root = sp_document_repr_root(tempdoc); Inkscape::XML::Node *clipnode = sp_repr_lookup_name(root, "inkscape:clipboard", 1); @@ -513,7 +513,7 @@ bool ClipboardManagerImpl::pastePathEffect() */ Glib::ustring ClipboardManagerImpl::getPathParameter() { - SPDocument *tempdoc = _retrieveClipboard(); // any target will do here + Document *tempdoc = _retrieveClipboard(); // any target will do here if ( tempdoc == NULL ) { _userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard.")); return ""; @@ -537,7 +537,7 @@ Glib::ustring ClipboardManagerImpl::getPathParameter() */ Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId() { - SPDocument *tempdoc = _retrieveClipboard(); // any target will do here + Document *tempdoc = _retrieveClipboard(); // any target will do here if ( tempdoc == NULL ) { _userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard.")); return ""; @@ -769,10 +769,10 @@ Inkscape::XML::Node *ClipboardManagerImpl::_copyNode(Inkscape::XML::Node *node, * @param in_place Whether to paste the selection where it was when copied * @pre @c clipdoc is not empty and items can be added to the current layer */ -void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place) +void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *target_document = sp_desktop_document(desktop); + Document *target_document = sp_desktop_document(desktop); Inkscape::XML::Node *root = sp_document_repr_root(clipdoc), *target_parent = SP_OBJECT_REPR(desktop->currentLayer()); @@ -839,11 +839,11 @@ void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place) * @param clipdoc The document to paste * @pre @c clipdoc != NULL and pasting into the active document is possible */ -void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc) +void ClipboardManagerImpl::_pasteDefs(Document *clipdoc) { // boilerplate vars copied from _pasteDocument SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *target_document = sp_desktop_document(desktop); + Document *target_document = sp_desktop_document(desktop); Inkscape::XML::Node *root = sp_document_repr_root(clipdoc), *defs = sp_repr_lookup_name(root, "svg:defs", 1), @@ -863,7 +863,7 @@ void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc) */ bool ClipboardManagerImpl::_pasteImage() { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if ( doc == NULL ) return false; // retrieve image data @@ -993,9 +993,9 @@ void ClipboardManagerImpl::_applyPathEffect(SPItem *item, gchar const *effect) /** * @brief Retrieve the clipboard contents as a document - * @return Clipboard contents converted to SPDocument, or NULL if no suitable content was present + * @return Clipboard contents converted to Document, or NULL if no suitable content was present */ -SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target) +Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target) { Glib::ustring best_target; if ( required_target == "" ) @@ -1061,7 +1061,7 @@ SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_targ if ( in == inlist.end() ) return NULL; // this shouldn't happen unless _getBestTarget returns something bogus - SPDocument *tempdoc = NULL; + Document *tempdoc = NULL; try { tempdoc = (*in)->open(filename); } catch (...) { diff --git a/src/xml/rebase-hrefs.cpp b/src/xml/rebase-hrefs.cpp index ec43bb178..8d771fef2 100644 --- a/src/xml/rebase-hrefs.cpp +++ b/src/xml/rebase-hrefs.cpp @@ -199,7 +199,7 @@ Inkscape::XML::calc_abs_doc_base(gchar const *const doc_base) * * \param spns True iff doc should contain sodipodi:absref attributes. */ -void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_base, bool const spns) +void Inkscape::XML::rebase_hrefs(Document *const doc, gchar const *const new_base, bool const spns) { gchar *const old_abs_base = calc_abs_doc_base(doc->base); gchar *const new_abs_base = calc_abs_doc_base(new_base); -- 2.30.2