diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2009-08-06 14:17:17 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2009-08-06 14:17:17 +0000 |
| commit | 51c2905fd3e99955db2d823b79abb763d8097028 (patch) | |
| tree | 90128509479f5498e1125d1e4eb9cdc05bf6b6e6 /src/extension | |
| parent | Adding one more control to Smart Jelly (diff) | |
| download | inkscape-51c2905fd3e99955db2d823b79abb763d8097028.tar.gz inkscape-51c2905fd3e99955db2d823b79abb763d8097028.zip | |
Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily.
(bzr r8422)
Diffstat (limited to 'src/extension')
82 files changed, 229 insertions, 229 deletions
diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index c6b731a84..afc0668a9 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); -// Document * current_document = current_view->doc; +// SPDocument * current_document = current_view->doc; Effect::EffectVerb * ev = reinterpret_cast<Effect::EffectVerb *>(data); Effect * effect = ev->_effect; diff --git a/src/extension/effect.h b/src/extension/effect.h index 637d29c5c..c02ce542b 100644 --- a/src/extension/effect.h +++ b/src/extension/effect.h @@ -21,7 +21,7 @@ #include "prefdialog.h" #include "extension.h" -struct Document; +struct SPDocument; namespace Inkscape { namespace UI { diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index a87cc6b64..4a13890d7 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; } - Document * doc = _doc->doc(); + SPDocument * doc = _doc->doc(); if (doc == NULL) { return; } SPDesktop *desktop = (SPDesktop *)_doc; diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index c8dc30d8b..52d5f5148 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 Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_string (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -432,7 +432,7 @@ Extension::get_param_string (const gchar * name, const Document * doc, const Ink } const gchar * -Extension::get_param_enum (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_enum (const gchar * name, const SPDocument * 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 Document * doc, const Inksc found parameter. */ bool -Extension::get_param_bool (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_bool (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -470,7 +470,7 @@ Extension::get_param_bool (const gchar * name, const Document * doc, const Inksc found parameter. */ int -Extension::get_param_int (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_int (const gchar * name, const SPDocument * doc, const Inkscape::XML::Node * node) { Parameter * param; @@ -490,7 +490,7 @@ Extension::get_param_int (const gchar * name, const Document * doc, const Inksca found parameter. */ float -Extension::get_param_float (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_float (const gchar * name, const SPDocument * 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 Document * doc, const Inks found parameter. */ guint32 -Extension::get_param_color (const gchar * name, const Document * doc, const Inkscape::XML::Node * node) +Extension::get_param_color (const gchar * name, const SPDocument * 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 Document * doc, const Inks found parameter. */ bool -Extension::set_param_bool (const gchar * name, bool value, Document * doc, Inkscape::XML::Node * node) +Extension::set_param_bool (const gchar * name, bool value, SPDocument * 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, Document * doc, Inksc found parameter. */ int -Extension::set_param_int (const gchar * name, int value, Document * doc, Inkscape::XML::Node * node) +Extension::set_param_int (const gchar * name, int value, SPDocument * 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, Document * doc, Inkscap found parameter. */ float -Extension::set_param_float (const gchar * name, float value, Document * doc, Inkscape::XML::Node * node) +Extension::set_param_float (const gchar * name, float value, SPDocument * 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, Document * doc, Ink found parameter. */ const gchar * -Extension::set_param_string (const gchar * name, const gchar * value, Document * doc, Inkscape::XML::Node * node) +Extension::set_param_string (const gchar * name, const gchar * value, SPDocument * 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, Document * found parameter. */ guint32 -Extension::set_param_color (const gchar * name, guint32 color, Document * doc, Inkscape::XML::Node * node) +Extension::set_param_color (const gchar * name, guint32 color, SPDocument * 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 (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (param_visible_count() == 0) return NULL; diff --git a/src/extension/extension.h b/src/extension/extension.h index 8dcd1b393..48ca86cf7 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -72,7 +72,7 @@ #define INKSCAPE_EXTENSION_NS_NC "extension" #define INKSCAPE_EXTENSION_NS "extension:" -struct Document; +struct SPDocument; namespace Inkscape { namespace Extension { @@ -173,42 +173,42 @@ private: #endif public: bool get_param_bool (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); int get_param_int (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); float get_param_float (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); const gchar * get_param_string (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); guint32 get_param_color (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); const gchar * get_param_enum (const gchar * name, - const Document * doc = NULL, + const SPDocument * doc = NULL, const Inkscape::XML::Node * node = NULL); bool set_param_bool (const gchar * name, bool value, - Document * doc = NULL, + SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); int set_param_int (const gchar * name, int value, - Document * doc = NULL, + SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); float set_param_float (const gchar * name, float value, - Document * doc = NULL, + SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); const gchar * set_param_string (const gchar * name, const gchar * value, - Document * doc = NULL, + SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); guint32 set_param_color (const gchar * name, guint32 color, - Document * doc = NULL, + SPDocument * doc = NULL, Inkscape::XML::Node * node = NULL); /* Error file handling */ @@ -217,7 +217,7 @@ public: static void error_file_close (void); public: - Gtk::Widget * autogui (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal = NULL); + Gtk::Widget * autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal = NULL); void paramListString (std::list <std::string> & retlist); /* Extension editor dialog stuff */ diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp index e3421b26d..6090b72d0 100644 --- a/src/extension/implementation/implementation.cpp +++ b/src/extension/implementation/implementation.cpp @@ -79,7 +79,7 @@ Implementation::prefs_input(Inkscape::Extension::Input *module, gchar const */*f return module->autogui(NULL, NULL); } /* Implementation::prefs_input */ -Document * +SPDocument * Implementation::open(Inkscape::Extension::Input */*module*/, gchar const */*filename*/) { /* throw open_failed(); */ return NULL; @@ -91,7 +91,7 @@ Implementation::prefs_output(Inkscape::Extension::Output *module) { } /* Implementation::prefs_output */ void -Implementation::save(Inkscape::Extension::Output */*module*/, Document */*doc*/, gchar const */*filename*/) { +Implementation::save(Inkscape::Extension::Output */*module*/, SPDocument */*doc*/, gchar const */*filename*/) { /* throw save_fail */ return; } /* Implementation::save */ @@ -100,7 +100,7 @@ Gtk::Widget * Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, ImplementationDocumentCache * docCache) { if (module->param_visible_count() == 0) return NULL; - Document * current_document = view->doc(); + SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator<SPItem *> selected = @@ -134,7 +134,7 @@ Implementation::set_preview(Inkscape::Extension::Print */*module*/) unsigned int -Implementation::begin(Inkscape::Extension::Print */*module*/, Document */*doc*/) +Implementation::begin(Inkscape::Extension::Print */*module*/, SPDocument */*doc*/) { return 0; } diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h index 9f1894d95..9de70dce7 100644 --- a/src/extension/implementation/implementation.h +++ b/src/extension/implementation/implementation.h @@ -70,13 +70,13 @@ public: virtual Gtk::Widget *prefs_input(Inkscape::Extension::Input *module, gchar const *filename); - virtual Document *open(Inkscape::Extension::Input *module, + virtual SPDocument *open(Inkscape::Extension::Input *module, gchar const *filename); /* ----- Output functions ----- */ /** Find out information about the file. */ virtual Gtk::Widget *prefs_output(Inkscape::Extension::Output *module); - virtual void save(Inkscape::Extension::Output *module, Document *doc, gchar const *filename); + virtual void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename); /* ----- Effect functions ----- */ /** Find out information about the file. */ @@ -93,7 +93,7 @@ public: virtual unsigned set_preview(Inkscape::Extension::Print *module); virtual unsigned begin(Inkscape::Extension::Print *module, - Document *doc); + SPDocument *doc); virtual unsigned finish(Inkscape::Extension::Print *module); virtual bool textToPath(Inkscape::Extension::Print *ext); virtual bool fontEmbedded(Inkscape::Extension::Print * ext); diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index d207c1a19..e6ce40bc0 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -545,7 +545,7 @@ Script::prefs_output(Inkscape::Extension::Output *module) the incoming filename (so that it's not the temporary filename). That document is then returned from this function. */ -Document * +SPDocument * Script::open(Inkscape::Extension::Input *module, const gchar *filenameArg) { @@ -567,7 +567,7 @@ Script::open(Inkscape::Extension::Input *module, int data_read = execute(command, params, lfilename, fileout); fileout.toFile(tempfilename_out); - Document * mydoc = NULL; + SPDocument * mydoc = NULL; if (data_read > 10) { if (helper_extension.size()==0) { mydoc = Inkscape::Extension::open( @@ -623,7 +623,7 @@ Script::open(Inkscape::Extension::Input *module, */ void Script::save(Inkscape::Extension::Output *module, - Document *doc, + SPDocument *doc, const gchar *filenameArg) { std::list<std::string> params; @@ -757,7 +757,7 @@ Script::effect(Inkscape::Extension::Effect *module, pump_events(); - Document * mydoc = NULL; + SPDocument * mydoc = NULL; if (data_read > 10) { mydoc = Inkscape::Extension::open( Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG), diff --git a/src/extension/implementation/script.h b/src/extension/implementation/script.h index 0769c9a18..8e25fb351 100644 --- a/src/extension/implementation/script.h +++ b/src/extension/implementation/script.h @@ -73,7 +73,7 @@ public: /** * */ - virtual Document *open(Inkscape::Extension::Input *module, + virtual SPDocument *open(Inkscape::Extension::Input *module, gchar const *filename); /** @@ -85,7 +85,7 @@ public: * */ virtual void save(Inkscape::Extension::Output *module, - Document *doc, + SPDocument *doc, gchar const *filename); /** diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp index 9eea2dbeb..f34fea64a 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -136,7 +136,7 @@ XSLT::unload(Inkscape::Extension::Extension *module) return; } -Document * +SPDocument * XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename) { xmlDocPtr filein = xmlParseFile(filename); @@ -174,7 +174,7 @@ XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename) } g_free(s); - Document * doc = sp_document_create(rdoc, filename, base, name, true); + SPDocument * doc = sp_document_create(rdoc, filename, base, name, true); g_free(base); g_free(name); @@ -182,7 +182,7 @@ XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename) } void -XSLT::save(Inkscape::Extension::Output */*module*/, Document *doc, gchar const *filename) +XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const *filename) { /* TODO: Should we assume filename to be in utf8 or to be a raw filename? * See JavaFXOutput::save for discussion. */ diff --git a/src/extension/implementation/xslt.h b/src/extension/implementation/xslt.h index df9467d9e..45befb529 100644 --- a/src/extension/implementation/xslt.h +++ b/src/extension/implementation/xslt.h @@ -44,9 +44,9 @@ public: bool check(Inkscape::Extension::Extension *module); - Document *open(Inkscape::Extension::Input *module, + SPDocument *open(Inkscape::Extension::Input *module, gchar const *filename); - void save(Inkscape::Extension::Output *module, Document *doc, gchar const *filename); + void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename); }; } /* Inkscape */ diff --git a/src/extension/input.cpp b/src/extension/input.cpp index ca5fdc29f..689c1286f 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. */ -Document * +SPDocument * Input::open (const gchar *uri) { if (!loaded()) { @@ -156,7 +156,7 @@ Input::open (const gchar *uri) } timer->touch(); - Document *const doc = imp->open(this, uri); + SPDocument *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/input.h b/src/extension/input.h index d2aac9376..55d807ce2 100644 --- a/src/extension/input.h +++ b/src/extension/input.h @@ -37,7 +37,7 @@ public: Implementation::Implementation * in_imp); virtual ~Input (void); virtual bool check (void); - Document * open (gchar const *uri); + SPDocument * open (gchar const *uri); gchar * get_mimetype (void); gchar * get_extension (void); gchar * get_filetypename (void); diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp index 75d53927d..e907612fd 100644 --- a/src/extension/internal/bitmap/imagemagick.cpp +++ b/src/extension/internal/bitmap/imagemagick.cpp @@ -221,7 +221,7 @@ ImageMagick::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::Vi Gtk::Widget * ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - Document * current_document = view->doc(); + SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList(); diff --git a/src/extension/internal/cairo-png-out.cpp b/src/extension/internal/cairo-png-out.cpp index d849755b7..c81fdd029 100644 --- a/src/extension/internal/cairo-png-out.cpp +++ b/src/extension/internal/cairo-png-out.cpp @@ -48,7 +48,7 @@ CairoRendererOutput::check (Inkscape::Extension::Extension * module) } static bool -png_render_document_to_file(Document *doc, gchar const *filename) +png_render_document_to_file(SPDocument *doc, gchar const *filename) { CairoRenderer *renderer; CairoRenderContext *ctx; @@ -92,7 +92,7 @@ png_render_document_to_file(Document *doc, gchar const *filename) \param uri Filename to save to (probably will end in .png) */ void -CairoRendererOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +CairoRendererOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { if (!png_render_document_to_file(doc, filename)) throw Inkscape::Extension::Output::save_failed(); diff --git a/src/extension/internal/cairo-png-out.h b/src/extension/internal/cairo-png-out.h index a062ec8df..9b9bd6ffe 100644 --- a/src/extension/internal/cairo-png-out.h +++ b/src/extension/internal/cairo-png-out.h @@ -27,7 +27,7 @@ class CairoRendererOutput : Inkscape::Extension::Implementation::Implementation public: bool check(Inkscape::Extension::Extension *module); void save(Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *filename); static void init(); }; diff --git a/src/extension/internal/cairo-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp index d9cac666c..dff89c1ed 100644 --- a/src/extension/internal/cairo-ps-out.cpp +++ b/src/extension/internal/cairo-ps-out.cpp @@ -61,7 +61,7 @@ CairoEpsOutput::check (Inkscape::Extension::Extension * module) } static bool -ps_print_document_to_file(Document *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false) +ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false) { sp_document_ensure_up_to_date(doc); @@ -124,7 +124,7 @@ ps_print_document_to_file(Document *doc, gchar const *filename, unsigned int lev \param filename Filename to save to (probably will end in .ps) */ void -CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; @@ -188,7 +188,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const \param filename Filename to save to (probably will end in .ps) */ void -CairoEpsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; diff --git a/src/extension/internal/cairo-ps-out.h b/src/extension/internal/cairo-ps-out.h index 862571f0b..019b6b810 100644 --- a/src/extension/internal/cairo-ps-out.h +++ b/src/extension/internal/cairo-ps-out.h @@ -28,7 +28,7 @@ class CairoPsOutput : Inkscape::Extension::Implementation::Implementation { public: bool check(Inkscape::Extension::Extension *module); void save(Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *filename); static void init(); bool textToPath(Inkscape::Extension::Print *ext); @@ -40,7 +40,7 @@ class CairoEpsOutput : Inkscape::Extension::Implementation::Implementation { public: bool check(Inkscape::Extension::Extension *module); void save(Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *uri); static void init(); bool textToPath(Inkscape::Extension::Print *ext); diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 28cf406f2..d1462e52e 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -811,7 +811,7 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t cairo_scale(_cr, PT_PER_PX, PT_PER_PX); } else if (cairo_surface_get_content(_surface) != CAIRO_CONTENT_ALPHA) { // set background color on non-alpha surfaces - // TODO: bgcolor should be derived from Document + // TODO: bgcolor should be derived from SPDocument cairo_set_source_rgb(_cr, 1.0, 1.0, 1.0); cairo_rectangle(_cr, 0, 0, _width, _height); cairo_fill(_cr); diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp index 1e5404c50..b44e83449 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.cpp +++ b/src/extension/internal/cairo-renderer-pdf-out.cpp @@ -47,7 +47,7 @@ CairoRendererPdfOutput::check (Inkscape::Extension::Extension * module) } static bool -pdf_render_document_to_file(Document *doc, gchar const *filename, unsigned int level, +pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas) { @@ -118,7 +118,7 @@ pdf_render_document_to_file(Document *doc, gchar const *filename, unsigned int l tell the printing system to save to file. */ void -CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; diff --git a/src/extension/internal/cairo-renderer-pdf-out.h b/src/extension/internal/cairo-renderer-pdf-out.h index f916eed49..d76ffb4d4 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.h +++ b/src/extension/internal/cairo-renderer-pdf-out.h @@ -27,7 +27,7 @@ class CairoRendererPdfOutput : Inkscape::Extension::Implementation::Implementati public: bool check(Inkscape::Extension::Extension *module); void save(Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *filename); static void init(); }; diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp index 3414993e5..da88a5eae 100644 --- a/src/extension/internal/cairo-renderer.cpp +++ b/src/extension/internal/cairo-renderer.cpp @@ -460,7 +460,7 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx) Geom::Matrix t = t_on_document * t_item.inverse(); // Do the export - Document *document = SP_OBJECT(item)->document; + SPDocument *document = SP_OBJECT(item)->document; GSList *items = NULL; items = g_slist_append(items, item); @@ -567,7 +567,7 @@ CairoRenderer::renderItem(CairoRenderContext *ctx, SPItem *item) } bool -CairoRenderer::setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base) +CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base) { g_assert( ctx != NULL ); diff --git a/src/extension/internal/cairo-renderer.h b/src/extension/internal/cairo-renderer.h index 4197c6784..ab5d4cf58 100644 --- a/src/extension/internal/cairo-renderer.h +++ b/src/extension/internal/cairo-renderer.h @@ -50,9 +50,9 @@ public: void applyMask(CairoRenderContext *ctx, SPMask const *mask); /** Initializes the CairoRenderContext according to the specified - Document. A set*Target function can only be called on the context + SPDocument. A set*Target function can only be called on the context before setupDocument. */ - bool setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base); + bool setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base); /** Traverses the object tree and invokes the render methods. */ void renderItem(CairoRenderContext *ctx, SPItem *item); diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index ffba5af81..f400a3649 100644 --- a/src/extension/internal/emf-win32-inout.cpp +++ b/src/extension/internal/emf-win32-inout.cpp @@ -101,7 +101,7 @@ EmfWin32::check (Inkscape::Extension::Extension * /*module*/) static void -emf_print_document_to_file(Document *doc, gchar const *filename) +emf_print_document_to_file(SPDocument *doc, gchar const *filename) { Inkscape::Extension::Print *mod; SPPrintContext context; @@ -147,7 +147,7 @@ emf_print_document_to_file(Document *doc, gchar const *filename) void -EmfWin32::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +EmfWin32::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; @@ -2162,7 +2162,7 @@ typedef struct #pragma pack( pop ) -Document * +SPDocument * EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri ) { EMF_CALLBACK_DATA d; @@ -2365,7 +2365,7 @@ EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri ) // std::cout << "SVG Output: " << std::endl << *(d.outsvg) << std::endl; - Document *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE); + SPDocument *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE); delete d.outsvg; delete d.path; diff --git a/src/extension/internal/emf-win32-inout.h b/src/extension/internal/emf-win32-inout.h index 544cd75db..c62d7a4e9 100644 --- a/src/extension/internal/emf-win32-inout.h +++ b/src/extension/internal/emf-win32-inout.h @@ -28,10 +28,10 @@ public: bool check(Inkscape::Extension::Extension *module); //Can this module load (always yes for now) void save(Inkscape::Extension::Output *mod, // Save the given document to the given filename - Document *doc, + SPDocument *doc, gchar const *filename); - virtual Document *open( Inkscape::Extension::Input *mod, + virtual SPDocument *open( Inkscape::Extension::Input *mod, const gchar *uri ); static void init(void);//Initialize the class diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp index 822a0577b..d098f6466 100644 --- a/src/extension/internal/emf-win32-print.cpp +++ b/src/extension/internal/emf-win32-print.cpp @@ -116,7 +116,7 @@ PrintEmfWin32::setup (Inkscape::Extension::Print * /*mod*/) unsigned int -PrintEmfWin32::begin (Inkscape::Extension::Print *mod, Document *doc) +PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc) { gchar const *utf8_fn = mod->get_param_string("destination"); diff --git a/src/extension/internal/emf-win32-print.h b/src/extension/internal/emf-win32-print.h index bec3f9582..5c1d8439d 100644 --- a/src/extension/internal/emf-win32-print.h +++ b/src/extension/internal/emf-win32-print.h @@ -55,7 +55,7 @@ public: /* Print functions */ virtual unsigned int setup (Inkscape::Extension::Print * module); - virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc); + virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc); virtual unsigned int finish (Inkscape::Extension::Print * module); /* Rendering methods */ diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 2aea1cc64..64a099c8a 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -16,10 +16,10 @@ GdkPixbuf* pixbuf_new_from_file( char const *utf8name, GError **error ); namespace Extension { namespace Internal { -Document * +SPDocument * GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri) { - Document *doc = NULL; + SPDocument *doc = NULL; GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL ); if (pb) { /* We are readable */ diff --git a/src/extension/internal/gdkpixbuf-input.h b/src/extension/internal/gdkpixbuf-input.h index 373d53da3..9d5e6ccf7 100644 --- a/src/extension/internal/gdkpixbuf-input.h +++ b/src/extension/internal/gdkpixbuf-input.h @@ -9,7 +9,7 @@ namespace Internal { class GdkpixbufInput : Inkscape::Extension::Implementation::Implementation { public: - Document *open(Inkscape::Extension::Input *mod, + SPDocument *open(Inkscape::Extension::Input *mod, gchar const *uri); static void init(); }; diff --git a/src/extension/internal/gimpgrad.cpp b/src/extension/internal/gimpgrad.cpp index 9510b5ebd..5b3e0c16e 100644 --- a/src/extension/internal/gimpgrad.cpp +++ b/src/extension/internal/gimpgrad.cpp @@ -95,7 +95,7 @@ stop_svg(ColorRGBA const in_color, double const location) } /** - \brief Actually open the gradient and turn it into an Document + \brief Actually open the gradient and turn it into an SPDocument \param module The input module being used \param filename The filename of the gradient to be opened \return A Document with the gradient in it. @@ -129,7 +129,7 @@ stop_svg(ColorRGBA const in_color, double const location) document using the \c sp_document_from_mem. That is then returned to Inkscape. */ -Document * +SPDocument * GimpGrad::open (Inkscape::Extension::Input */*module*/, gchar const *filename) { Inkscape::IO::dump_fopen_call(filename, "I"); diff --git a/src/extension/internal/gimpgrad.h b/src/extension/internal/gimpgrad.h index 21ccfa215..45b76dd6d 100644 --- a/src/extension/internal/gimpgrad.h +++ b/src/extension/internal/gimpgrad.h @@ -26,7 +26,7 @@ class GimpGrad : public Inkscape::Extension::Implementation::Implementation { public: bool load(Inkscape::Extension::Extension *module); void unload(Inkscape::Extension::Extension *module); - Document *open(Inkscape::Extension::Input *module, gchar const *filename); + SPDocument *open(Inkscape::Extension::Input *module, gchar const *filename); static void init(); }; diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index 5a0523ba8..d4b35b261 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -81,7 +81,7 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc Geom::Rect bounding_area = Geom::Rect(Geom::Point(0,0), Geom::Point(100,100)); if (selection->isEmpty()) { /* get page size */ - Document * doc = document->doc(); + SPDocument * doc = document->doc(); bounding_area = Geom::Rect( Geom::Point(0,0), Geom::Point(sp_document_width(doc), sp_document_height(doc)) ); } else { @@ -171,7 +171,7 @@ PrefAdjustment::val_changed (void) Gtk::Widget * Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - Document * current_document = view->doc(); + SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList(); diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp index c1f057071..417755e19 100644 --- a/src/extension/internal/javafx-out.cpp +++ b/src/extension/internal/javafx-out.cpp @@ -701,7 +701,7 @@ bool JavaFXOutput::doCurve(SPItem *item, const String &id) /** * Output the tree data to buffer */ -bool JavaFXOutput::doTreeRecursive(Document *doc, SPObject *obj) +bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) { /** * Check the type of node and process @@ -749,7 +749,7 @@ bool JavaFXOutput::doTreeRecursive(Document *doc, SPObject *obj) /** * Output the curve data to buffer */ -bool JavaFXOutput::doTree(Document *doc) +bool JavaFXOutput::doTree(SPDocument *doc) { double bignum = 1000000.0; @@ -767,7 +767,7 @@ bool JavaFXOutput::doTree(Document *doc) } -bool JavaFXOutput::doBody(Document *doc, SPObject *obj) +bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj) { /** * Check the type of node and process @@ -842,7 +842,7 @@ void JavaFXOutput::reset() /** * Saves the <paths> of an Inkscape SVG file as JavaFX spline definitions */ -bool JavaFXOutput::saveDocument(Document *doc, gchar const *filename_utf8) +bool JavaFXOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8) { reset(); @@ -918,7 +918,7 @@ bool JavaFXOutput::saveDocument(Document *doc, gchar const *filename_utf8) */ void JavaFXOutput::save(Inkscape::Extension::Output */*mod*/, - Document *doc, gchar const *filename_utf8) + SPDocument *doc, gchar const *filename_utf8) { /* N.B. The name `filename_utf8' represents the fact that we want it to be in utf8; whereas in * fact we know that some callers of Extension::save pass something in the filesystem's diff --git a/src/extension/internal/javafx-out.h b/src/extension/internal/javafx-out.h index 246172c23..9c1c8778b 100644 --- a/src/extension/internal/javafx-out.h +++ b/src/extension/internal/javafx-out.h @@ -56,7 +56,7 @@ public: * API call to perform the output to a file */ virtual void save(Inkscape::Extension::Output *mod, - Document *doc, gchar const *filename); + SPDocument *doc, gchar const *filename); /** * Inkscape runtime startup call. @@ -109,10 +109,10 @@ private: * Output the SVG document's curve data as JavaFX geometry types */ bool doCurve(SPItem *item, const String &id); - bool doTreeRecursive(Document *doc, SPObject *obj); - bool doTree(Document *doc); + bool doTreeRecursive(SPDocument *doc, SPObject *obj); + bool doTree(SPDocument *doc); - bool doBody(Document *doc, SPObject *obj); + bool doBody(SPDocument *doc, SPObject *obj); /** * Output the file footer @@ -124,7 +124,7 @@ private: /** * Actual method to save document */ - bool saveDocument(Document *doc, gchar const *filename); + bool saveDocument(SPDocument *doc, gchar const *filename); //For statistics int nrNodes; diff --git a/src/extension/internal/latex-pstricks-out.cpp b/src/extension/internal/latex-pstricks-out.cpp index 924f9697e..4a469a750 100644 --- a/src/extension/internal/latex-pstricks-out.cpp +++ b/src/extension/internal/latex-pstricks-out.cpp @@ -47,7 +47,7 @@ LatexOutput::check (Inkscape::Extension::Extension * module) void -LatexOutput::save(Inkscape::Extension::Output *mod2, Document *doc, gchar const *filename) +LatexOutput::save(Inkscape::Extension::Output *mod2, SPDocument *doc, gchar const *filename) { Inkscape::Extension::Print *mod; SPPrintContext context; diff --git a/src/extension/internal/latex-pstricks-out.h b/src/extension/internal/latex-pstricks-out.h index a9910f4cc..a12cdc3c1 100644 --- a/src/extension/internal/latex-pstricks-out.h +++ b/src/extension/internal/latex-pstricks-out.h @@ -27,7 +27,7 @@ public: bool check(Inkscape::Extension::Extension *module); //Can this module load (always yes for now) void save(Inkscape::Extension::Output *mod, // Save the given document to the given filename - Document *doc, + SPDocument *doc, gchar const *filename); static void init(void);//Initialize the class diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index afc985e14..789e5ea34 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -64,7 +64,7 @@ PrintLatex::setup (Inkscape::Extension::Print *mod) } unsigned int -PrintLatex::begin (Inkscape::Extension::Print *mod, Document *doc) +PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc) { Inkscape::SVGOStringStream os; int res; diff --git a/src/extension/internal/latex-pstricks.h b/src/extension/internal/latex-pstricks.h index 4e310d6fd..a33e169e8 100644 --- a/src/extension/internal/latex-pstricks.h +++ b/src/extension/internal/latex-pstricks.h @@ -43,7 +43,7 @@ public: /* Print functions */ virtual unsigned int setup (Inkscape::Extension::Print * module); - virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc); + virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc); virtual unsigned int finish (Inkscape::Extension::Print * module); /* Rendering methods */ diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index e7e22414a..cc8489302 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -2367,7 +2367,7 @@ OdfOutput::reset() * Descends into the SVG tree, mapping things to ODF when appropriate */ void -OdfOutput::save(Inkscape::Extension::Output */*mod*/, Document *doc, gchar const *filename) +OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar const *filename) { reset(); diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h index 5ad1f1137..3854ddfe1 100644 --- a/src/extension/internal/odf.h +++ b/src/extension/internal/odf.h @@ -272,7 +272,7 @@ public: bool check (Inkscape::Extension::Extension * module); void save (Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *filename); static void init (void); diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index 76759259d..937fefb11 100644 --- a/src/extension/internal/pdf-input-cairo.cpp +++ b/src/extension/internal/pdf-input-cairo.cpp @@ -32,7 +32,7 @@ namespace Internal { static cairo_status_t _write_ustring_cb(void *closure, const unsigned char *data, unsigned int length); -Document * +SPDocument * PdfInputCairo::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { printf("Attempting to open using PdfInputCairo\n"); @@ -58,7 +58,7 @@ PdfInputCairo::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) { cairo_destroy(cr); cairo_surface_destroy(surface); - Document * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE); + SPDocument * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE); delete output; g_object_unref(page); diff --git a/src/extension/internal/pdf-input-cairo.h b/src/extension/internal/pdf-input-cairo.h index 15080bc14..5715b57c9 100644 --- a/src/extension/internal/pdf-input-cairo.h +++ b/src/extension/internal/pdf-input-cairo.h @@ -27,7 +27,7 @@ namespace Internal { class PdfInputCairo: public Inkscape::Extension::Implementation::Implementation { PdfInputCairo () { }; public: - Document *open( Inkscape::Extension::Input *mod, + SPDocument *open( Inkscape::Extension::Input *mod, const gchar *uri ); static void init( void ); diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 476f0daf6..c2d417f2c 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -589,7 +589,7 @@ void PdfImportDialog::_setPreviewPage(int page) { /** * Parses the selected page of the given PDF document using PdfParser. */ -Document * +SPDocument * PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { // Initialize the globalParams variable for poppler @@ -661,7 +661,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { Catalog *catalog = pdf_doc->getCatalog(); Page *page = catalog->getPage(page_num); - Document *doc = sp_document_new(NULL, TRUE, TRUE); + SPDocument *doc = sp_document_new(NULL, TRUE, TRUE); bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, false); // No need to undo in this temporary document diff --git a/src/extension/internal/pdfinput/pdf-input.h b/src/extension/internal/pdfinput/pdf-input.h index 968114ef3..6bf0f11a2 100644 --- a/src/extension/internal/pdfinput/pdf-input.h +++ b/src/extension/internal/pdfinput/pdf-input.h @@ -113,7 +113,7 @@ private: class PdfInput: public Inkscape::Extension::Implementation::Implementation { PdfInput () { }; public: - Document *open( Inkscape::Extension::Input *mod, + SPDocument *open( Inkscape::Extension::Input *mod, const gchar *uri ); static void init( void ); diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 686e44bb1..00bd8fa4d 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -77,7 +77,7 @@ struct SvgTransparencyGroup { * */ -SvgBuilder::SvgBuilder(Document *document, gchar *docname, XRef *xref) { +SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) { _is_top_level = true; _doc = document; _docname = docname; diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h index 1f84ffcc3..3b9192d31 100644 --- a/src/extension/internal/pdfinput/svg-builder.h +++ b/src/extension/internal/pdfinput/svg-builder.h @@ -18,7 +18,7 @@ #ifdef HAVE_POPPLER -class Document; +class SPDocument; namespace Inkscape { namespace XML { class Document; @@ -95,7 +95,7 @@ struct SvgGlyph { */ class SvgBuilder { public: - SvgBuilder(Document *document, gchar *docname, XRef *xref); + SvgBuilder(SPDocument *document, gchar *docname, XRef *xref); SvgBuilder(SvgBuilder *parent, Inkscape::XML::Node *root); virtual ~SvgBuilder(); @@ -220,7 +220,7 @@ private: std::vector<std::string> _availableFontNames; // Full names, used for matching font names (Bug LP #179589). bool _is_top_level; // Whether this SvgBuilder is the top-level one - Document *_doc; + SPDocument *_doc; gchar *_docname; // Basename of the URI from which this document is created XRef *_xref; // Cross-reference table from the PDF doc we're converting from Inkscape::XML::Document *_xml_doc; diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index d3ed39d1f..f30cbc317 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -417,7 +417,7 @@ bool PovOutput::doCurve(SPItem *item, const String &id) /** * Descend the svg tree recursively, translating data */ -bool PovOutput::doTreeRecursive(Document *doc, SPObject *obj) +bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) { String id; @@ -454,7 +454,7 @@ bool PovOutput::doTreeRecursive(Document *doc, SPObject *obj) /** * Output the curve data to buffer */ -bool PovOutput::doTree(Document *doc) +bool PovOutput::doTree(SPDocument *doc) { double bignum = 1000000.0; minx = bignum; @@ -576,7 +576,7 @@ void PovOutput::reset() /** * Saves the Shapes of an Inkscape SVG file as PovRay spline definitions */ -void PovOutput::saveDocument(Document *doc, gchar const *filename_utf8) +void PovOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8) { reset(); @@ -641,7 +641,7 @@ void PovOutput::saveDocument(Document *doc, gchar const *filename_utf8) */ void PovOutput::save(Inkscape::Extension::Output */*mod*/, - Document *doc, gchar const *filename_utf8) + SPDocument *doc, gchar const *filename_utf8) { /* See comments in JavaFSOutput::save re the name `filename_utf8'. */ saveDocument(doc, filename_utf8); diff --git a/src/extension/internal/pov-out.h b/src/extension/internal/pov-out.h index 02ba6da82..0c3b73a7f 100644 --- a/src/extension/internal/pov-out.h +++ b/src/extension/internal/pov-out.h @@ -57,7 +57,7 @@ public: * API call to perform the output to a file */ void save(Inkscape::Extension::Output *mod, - Document *doc, gchar const *filename); + SPDocument *doc, gchar const *filename); /** * Inkscape runtime startup call. @@ -120,13 +120,13 @@ private: * Output the SVG document's curve data as POV curves */ bool doCurve(SPItem *item, const String &id); - bool doTreeRecursive(Document *doc, SPObject *obj); - bool doTree(Document *doc); + bool doTreeRecursive(SPDocument *doc, SPObject *obj); + bool doTree(SPDocument *doc); /** * Actual method to save document */ - void saveDocument(Document *doc, gchar const *filename); + void saveDocument(SPDocument *doc, gchar const *filename); /** diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp index 317811088..a3589e905 100644 --- a/src/extension/internal/svg.cpp +++ b/src/extension/internal/svg.cpp @@ -138,13 +138,13 @@ _load_uri (const gchar *uri) /** \return A new document just for you! \brief This function takes in a filename of a SVG document and - turns it into a Document. + turns it into a SPDocument. \param mod Module to use \param uri The path to the file (UTF-8) This function is really simple, it just calls sp_document_new... */ -Document * +SPDocument * Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri) { #ifdef WITH_GNOME_VFS @@ -157,7 +157,7 @@ Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri) g_warning("Error: Could not open file '%s' with VFS\n", uri); return NULL; } - Document * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1); + SPDocument * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1); g_free(buffer); return doc; @@ -191,7 +191,7 @@ Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri) all of this code. I just stole it. */ void -Svg::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) +Svg::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) { g_return_if_fail(doc != NULL); g_return_if_fail(filename != NULL); diff --git a/src/extension/internal/svg.h b/src/extension/internal/svg.h index 48b57c8c5..b97735dd8 100644 --- a/src/extension/internal/svg.h +++ b/src/extension/internal/svg.h @@ -25,9 +25,9 @@ class Svg : public Inkscape::Extension::Implementation::Implementation { public: virtual void save( Inkscape::Extension::Output *mod, - Document *doc, + SPDocument *doc, gchar const *filename ); - virtual Document *open( Inkscape::Extension::Input *mod, + virtual SPDocument *open( Inkscape::Extension::Input *mod, const gchar *uri ); static void init( void ); diff --git a/src/extension/internal/win32.cpp b/src/extension/internal/win32.cpp index f272292b5..21f278858 100644 --- a/src/extension/internal/win32.cpp +++ b/src/extension/internal/win32.cpp @@ -215,7 +215,7 @@ PrintWin32::setup (Inkscape::Extension::Print *mod) } unsigned int -PrintWin32::begin (Inkscape::Extension::Print *mod, Document *doc) +PrintWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc) { DOCINFO di = { sizeof (DOCINFO), diff --git a/src/extension/internal/win32.h b/src/extension/internal/win32.h index 7f4b9352d..9462115c6 100644 --- a/src/extension/internal/win32.h +++ b/src/extension/internal/win32.h @@ -65,7 +65,7 @@ public: virtual unsigned int setup (Inkscape::Extension::Print * module); //virtual unsigned int set_preview (Inkscape::Extension::Print * module); - virtual unsigned int begin (Inkscape::Extension::Print * module, Document *doc); + virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc); virtual unsigned int finish (Inkscape::Extension::Print * module); /* Rendering methods */ diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index e7177e5e3..c37d5705b 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -59,7 +59,7 @@ namespace Extension { namespace Internal { -Document * +SPDocument * WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { WPXInputStream* input = new libwpg::WPGFileStream(uri); if (input->isOLEStream()) { @@ -86,7 +86,7 @@ WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) { //printf("I've got a doc: \n%s", painter.document.c_str()); - Document * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE); + SPDocument * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE); delete input; return doc; } diff --git a/src/extension/internal/wpg-input.h b/src/extension/internal/wpg-input.h index e5c2838d5..ca882039b 100644 --- a/src/extension/internal/wpg-input.h +++ b/src/extension/internal/wpg-input.h @@ -24,7 +24,7 @@ namespace Internal { class WpgInput : public Inkscape::Extension::Implementation::Implementation { WpgInput () { }; public: - Document *open( Inkscape::Extension::Input *mod, + SPDocument *open( Inkscape::Extension::Input *mod, const gchar *uri ); static void init( void ); diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 8e2fa5486..742e938de 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(Document *doc, gchar const *filename) +Output::save(SPDocument *doc, gchar const *filename) { try { imp->save(this, doc, filename); diff --git a/src/extension/output.h b/src/extension/output.h index 455b4a8ae..b52a96211 100644 --- a/src/extension/output.h +++ b/src/extension/output.h @@ -15,7 +15,7 @@ #include <gtk/gtkdialog.h> #include "extension.h" -struct Document; +struct SPDocument; namespace Inkscape { namespace Extension { @@ -36,7 +36,7 @@ public: Implementation::Implementation * in_imp); virtual ~Output (void); virtual bool check (void); - void save (Document *doc, + void save (SPDocument *doc, gchar const *uri); bool prefs (void); gchar * get_mimetype(void); diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index 07170587a..1dda3d73f 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -53,7 +53,7 @@ ParamBool::ParamBool (const gchar * name, const gchar * guitext, const gchar * d and \c pref_name() are used. */ bool -ParamBool::set( bool in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ ) +ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) { _value = in; @@ -67,7 +67,7 @@ ParamBool::set( bool in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ ) /** \brief Returns \c _value */ bool -ParamBool::get (const Document * doc, const Inkscape::XML::Node * node) +ParamBool::get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; } @@ -79,7 +79,7 @@ class ParamBoolCheckButton : public Gtk::CheckButton { private: /** \brief Param to change */ ParamBool * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: @@ -89,7 +89,7 @@ public: This function sets the value of the checkbox to be that of the parameter, and then sets up a callback to \c on_toggle. */ - ParamBoolCheckButton (ParamBool * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : + ParamBoolCheckButton (ParamBool * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::CheckButton(), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) { this->set_active(_pref->get(NULL, NULL) /**\todo fix */); this->signal_toggled().connect(sigc::mem_fun(this, &ParamBoolCheckButton::on_toggle)); @@ -132,7 +132,7 @@ ParamBool::string (std::string &string) Builds a hbox with a label and a check button in it. */ Gtk::Widget * -ParamBool::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamBool::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4)); diff --git a/src/extension/param/bool.h b/src/extension/param/bool.h index 23b15596d..a1cd4ce4a 100644 --- a/src/extension/param/bool.h +++ b/src/extension/param/bool.h @@ -22,9 +22,9 @@ private: bool _value; public: ParamBool(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); - bool get (const Document * doc, const Inkscape::XML::Node * node); - bool set (bool in, Document * doc, Inkscape::XML::Node * node); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + bool get (const SPDocument * doc, const Inkscape::XML::Node * node); + bool set (bool in, SPDocument * doc, Inkscape::XML::Node * node); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); }; diff --git a/src/extension/param/color.cpp b/src/extension/param/color.cpp index 080356e71..58db85748 100644 --- a/src/extension/param/color.cpp +++ b/src/extension/param/color.cpp @@ -41,7 +41,7 @@ ParamColor::~ParamColor(void) } guint32 -ParamColor::set( guint32 in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ ) +ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) { _value = in; @@ -87,7 +87,7 @@ ParamColor::string (std::string &string) } Gtk::Widget * -ParamColor::get_widget( Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal ) +ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal ) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/color.h b/src/extension/param/color.h index 89aac7be7..e6b44fbcb 100644 --- a/src/extension/param/color.h +++ b/src/extension/param/color.h @@ -23,9 +23,9 @@ public: ParamColor(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); virtual ~ParamColor(void); /** \brief Returns \c _value, with a \i const to protect it. */ - guint32 get( const Document * /*doc*/, const Inkscape::XML::Node * /*node*/ ) { return _value; } - guint32 set (guint32 in, Document * doc, Inkscape::XML::Node * node); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + guint32 get( const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/ ) { return _value; } + guint32 set (guint32 in, SPDocument * doc, Inkscape::XML::Node * node); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); sigc::signal<void> * _changeSignal; }; /* class ParamColor */ diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index 3641695cc..656e58c49 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -46,7 +46,7 @@ ParamDescription::ParamDescription (const gchar * name, const gchar * guitext, c /** \brief Create a label for the description */ Gtk::Widget * -ParamDescription::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/) +ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/description.h b/src/extension/param/description.h index 42441e5a9..c305ea6df 100644 --- a/src/extension/param/description.h +++ b/src/extension/param/description.h @@ -23,7 +23,7 @@ private: gchar * _value; public: ParamDescription(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); }; } /* namespace Extension */ diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 9de3f60dd..03c1f839b 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -129,7 +129,7 @@ ParamComboBox::~ParamComboBox (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamComboBox::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamComboBox::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ @@ -177,7 +177,7 @@ ParamComboBox::string (std::string &string) class ParamComboBoxEntry : public Gtk::ComboBoxText { private: ParamComboBox * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: @@ -185,7 +185,7 @@ public: \param pref Where to get the string from, and where to put it when it changes. */ - ParamComboBoxEntry (ParamComboBox * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : + ParamComboBoxEntry (ParamComboBox * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::ComboBoxText(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) { this->signal_changed().connect(sigc::mem_fun(this, &ParamComboBoxEntry::changed)); }; @@ -211,7 +211,7 @@ ParamComboBoxEntry::changed (void) \brief Creates a combobox widget for an enumeration parameter */ Gtk::Widget * -ParamComboBox::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamComboBox::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/enum.h b/src/extension/param/enum.h index e1af8fd2b..3f9707c34 100644 --- a/src/extension/param/enum.h +++ b/src/extension/param/enum.h @@ -39,11 +39,11 @@ private: public: ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); virtual ~ParamComboBox(void); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); - const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node); + const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node); void changed (void); }; /* class ParamComboBox */ diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 516249c3c..11e3a8d97 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -75,7 +75,7 @@ ParamFloat::ParamFloat (const gchar * name, const gchar * guitext, const gchar * and \c pref_name() are used. */ float -ParamFloat::set (float in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamFloat::set (float in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { _value = in; if (_value > _max) _value = _max; @@ -103,13 +103,13 @@ ParamFloat::string (std::string &string) class ParamFloatAdjustment : public Gtk::Adjustment { /** The parameter to adjust */ ParamFloat * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: /** \brief Make the adjustment using an extension and the string describing the parameter. */ - ParamFloatAdjustment (ParamFloat * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : + ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::Adjustment(0.0, param->min(), param->max(), 0.1, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) { this->set_value(_pref->get(NULL, NULL) /* \todo fix */); this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed)); @@ -142,7 +142,7 @@ ParamFloatAdjustment::val_changed (void) Builds a hbox with a label and a float adjustment in it. */ Gtk::Widget * -ParamFloat::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamFloat::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/float.h b/src/extension/param/float.h index 32ab7a796..f105d8f0e 100644 --- a/src/extension/param/float.h +++ b/src/extension/param/float.h @@ -26,12 +26,12 @@ private: public: ParamFloat (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); /** \brief Returns \c _value */ - float get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - float set (float in, Document * doc, Inkscape::XML::Node * node); + float get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + float set (float in, SPDocument * doc, Inkscape::XML::Node * node); float max (void) { return _max; } float min (void) { return _min; } float precision (void) { return _precision; } - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); }; diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp index 2818bb57b..301d54ed0 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -70,7 +70,7 @@ ParamInt::ParamInt (const gchar * name, const gchar * guitext, const gchar * des and \c pref_name() are used. */ int -ParamInt::set (int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamInt::set (int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { _value = in; if (_value > _max) _value = _max; @@ -88,13 +88,13 @@ ParamInt::set (int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) class ParamIntAdjustment : public Gtk::Adjustment { /** The parameter to adjust */ ParamInt * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: /** \brief Make the adjustment using an extension and the string describing the parameter. */ - ParamIntAdjustment (ParamInt * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : + ParamIntAdjustment (ParamInt * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::Adjustment(0.0, param->min(), param->max(), 1.0, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) { this->set_value(_pref->get(NULL, NULL) /* \todo fix */); this->signal_value_changed().connect(sigc::mem_fun(this, &ParamIntAdjustment::val_changed)); @@ -127,7 +127,7 @@ ParamIntAdjustment::val_changed (void) Builds a hbox with a label and a int adjustment in it. */ Gtk::Widget * -ParamInt::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/int.h b/src/extension/param/int.h index 6d44a10b3..a4eb54c81 100644 --- a/src/extension/param/int.h +++ b/src/extension/param/int.h @@ -25,11 +25,11 @@ private: public: ParamInt (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); /** \brief Returns \c _value */ - int get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - int set (int in, Document * doc, Inkscape::XML::Node * node); + int get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + int set (int in, SPDocument * doc, Inkscape::XML::Node * node); int max (void) { return _max; } int min (void) { return _min; } - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); }; diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index 6ad338ffa..1c30b7e0e 100644 --- a/src/extension/param/notebook.cpp +++ b/src/extension/param/notebook.cpp @@ -54,7 +54,7 @@ public: ParamNotebookPage(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); ~ParamNotebookPage(void); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void paramString (std::list <std::string> &list); gchar * get_guitext (void) {return _text;}; @@ -196,7 +196,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: Builds a notebook page (a vbox) and puts parameters on it. */ Gtk::Widget * -ParamNotebookPage::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamNotebookPage::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; @@ -295,7 +295,7 @@ ParamNotebook::~ParamNotebook (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamNotebook::set (const int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamNotebook::set (const int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { ParamNotebookPage * page = NULL; int i = 0; @@ -347,14 +347,14 @@ ParamNotebook::string (std::list <std::string> &list) class ParamNotebookWdg : public Gtk::Notebook { private: ParamNotebook * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; public: /** \brief Build a notebookpage preference for the given parameter \param pref Where to get the string (pagename) from, and where to put it when it changes. */ - ParamNotebookWdg (ParamNotebook * pref, Document * doc, Inkscape::XML::Node * node) : + ParamNotebookWdg (ParamNotebook * pref, SPDocument * doc, Inkscape::XML::Node * node) : Gtk::Notebook(), _pref(pref), _doc(doc), _node(node), activated(false) { // don't have to set the correct page: this is done in ParamNotebook::get_widget. // hook function @@ -389,7 +389,7 @@ ParamNotebookWdg::changed_page(GtkNotebookPage */*page*/, Builds a notebook and puts pages in it. */ Gtk::Widget * -ParamNotebook::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamNotebook::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/notebook.h b/src/extension/param/notebook.h index 6efd3c5f1..24d4ebfc1 100644 --- a/src/extension/param/notebook.h +++ b/src/extension/param/notebook.h @@ -40,11 +40,11 @@ private: public: ParamNotebook(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); virtual ~ParamNotebook(void); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::list <std::string> &list); - const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - const gchar * set (const int in, Document * doc, Inkscape::XML::Node * node); + const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + const gchar * set (const int in, SPDocument * doc, Inkscape::XML::Node * node); }; /* class ParamNotebook */ diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index 1094a5d3f..2773af61d 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -156,7 +156,7 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * /** \brief Wrapper to cast to the object and use it's function. */ bool -Parameter::get_bool (const Document * doc, const Inkscape::XML::Node * node) +Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node) { ParamBool * boolpntr = dynamic_cast<ParamBool *>(this); if (boolpntr == NULL) @@ -166,7 +166,7 @@ Parameter::get_bool (const Document * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ int -Parameter::get_int (const Document * doc, const Inkscape::XML::Node * node) +Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node) { ParamInt * intpntr = dynamic_cast<ParamInt *>(this); if (intpntr == NULL) @@ -176,7 +176,7 @@ Parameter::get_int (const Document * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ float -Parameter::get_float (const Document * doc, const Inkscape::XML::Node * node) +Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node) { ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this); if (floatpntr == NULL) @@ -186,7 +186,7 @@ Parameter::get_float (const Document * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ const gchar * -Parameter::get_string (const Document * doc, const Inkscape::XML::Node * node) +Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node) { ParamString * stringpntr = dynamic_cast<ParamString *>(this); if (stringpntr == NULL) @@ -196,7 +196,7 @@ Parameter::get_string (const Document * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ const gchar * -Parameter::get_enum (const Document * doc, const Inkscape::XML::Node * node) +Parameter::get_enum (const SPDocument * doc, const Inkscape::XML::Node * node) { ParamComboBox * param = dynamic_cast<ParamComboBox *>(this); if (param == NULL) @@ -205,7 +205,7 @@ Parameter::get_enum (const Document * doc, const Inkscape::XML::Node * node) } guint32 -Parameter::get_color(const Document* doc, const Inkscape::XML::Node* node) +Parameter::get_color(const SPDocument* doc, const Inkscape::XML::Node* node) { ParamColor* param = dynamic_cast<ParamColor *>(this); if (param == NULL) @@ -215,7 +215,7 @@ Parameter::get_color(const Document* doc, const Inkscape::XML::Node* node) /** \brief Wrapper to cast to the object and use it's function. */ bool -Parameter::set_bool (bool in, Document * doc, Inkscape::XML::Node * node) +Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node) { ParamBool * boolpntr = dynamic_cast<ParamBool *>(this); if (boolpntr == NULL) @@ -225,7 +225,7 @@ Parameter::set_bool (bool in, Document * doc, Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ int -Parameter::set_int (int in, Document * doc, Inkscape::XML::Node * node) +Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node) { ParamInt * intpntr = dynamic_cast<ParamInt *>(this); if (intpntr == NULL) @@ -235,7 +235,7 @@ Parameter::set_int (int in, Document * doc, Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ float -Parameter::set_float (float in, Document * doc, Inkscape::XML::Node * node) +Parameter::set_float (float in, SPDocument * doc, Inkscape::XML::Node * node) { ParamFloat * floatpntr; floatpntr = dynamic_cast<ParamFloat *>(this); @@ -246,7 +246,7 @@ Parameter::set_float (float in, Document * doc, Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ const gchar * -Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node) +Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node) { ParamString * stringpntr = dynamic_cast<ParamString *>(this); if (stringpntr == NULL) @@ -255,7 +255,7 @@ Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * n } /** \brief Wrapper to cast to the object and use it's function. */ guint32 -Parameter::set_color (guint32 in, Document * doc, Inkscape::XML::Node * node) +Parameter::set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node) { ParamColor* param = dynamic_cast<ParamColor *>(this); if (param == NULL) @@ -323,7 +323,7 @@ Parameter::new_child (Inkscape::XML::Node * parent) } Inkscape::XML::Node * -Parameter::document_param_node (Document * doc) +Parameter::document_param_node (SPDocument * doc) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node * defs = SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc)); @@ -353,7 +353,7 @@ Parameter::document_param_node (Document * doc) /** \brief Basically, if there is no widget pass a NULL. */ Gtk::Widget * -Parameter::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/) +Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/) { return NULL; } diff --git a/src/extension/param/parameter.h b/src/extension/param/parameter.h index a79b2fd6b..54249c12e 100644 --- a/src/extension/param/parameter.h +++ b/src/extension/param/parameter.h @@ -68,7 +68,7 @@ protected: /* **** funcs **** */ gchar * pref_name (void); Inkscape::XML::Node * find_child (Inkscape::XML::Node * adult); - Inkscape::XML::Node * document_param_node (Document * doc); + Inkscape::XML::Node * document_param_node (SPDocument * doc); Inkscape::XML::Node * new_child (Inkscape::XML::Node * parent); public: @@ -85,29 +85,29 @@ public: Parameter(name, guitext, NULL, Parameter::SCOPE_USER, false, NULL, ext); }; virtual ~Parameter (void); - bool get_bool (const Document * doc, + bool get_bool (const SPDocument * doc, const Inkscape::XML::Node * node); - int get_int (const Document * doc, + int get_int (const SPDocument * doc, const Inkscape::XML::Node * node); - float get_float (const Document * doc, + float get_float (const SPDocument * doc, const Inkscape::XML::Node * node); - const gchar * get_string (const Document * doc, + const gchar * get_string (const SPDocument * doc, const Inkscape::XML::Node * node); - guint32 get_color (const Document * doc, + guint32 get_color (const SPDocument * doc, const Inkscape::XML::Node * node); - const gchar * get_enum (const Document * doc, + const gchar * get_enum (const SPDocument * doc, const Inkscape::XML::Node * node); - bool set_bool (bool in, Document * doc, Inkscape::XML::Node * node); - int set_int (int in, Document * doc, Inkscape::XML::Node * node); - float set_float (float in, Document * doc, Inkscape::XML::Node * node); - const gchar * set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node); - guint32 set_color (guint32 in, Document * doc, Inkscape::XML::Node * node); + bool set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node); + int set_int (int in, SPDocument * doc, Inkscape::XML::Node * node); + float set_float (float in, SPDocument * doc, Inkscape::XML::Node * node); + const gchar * set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node); + guint32 set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node); const gchar * name (void) {return _name;} static Parameter * make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * in_ext); - virtual Gtk::Widget * get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + virtual Gtk::Widget * get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); gchar const * get_tooltip (void) { return _desc; } diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index 315984e17..c17839001 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -149,7 +149,7 @@ ParamRadioButton::~ParamRadioButton (void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamRadioButton::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamRadioButton::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ @@ -189,7 +189,7 @@ ParamRadioButton::string (std::string &string) class ParamRadioButtonWdg : public Gtk::RadioButton { private: ParamRadioButton * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: @@ -197,12 +197,12 @@ public: \param pref Where to put the radiobutton's string when it is selected. */ ParamRadioButtonWdg ( Gtk::RadioButtonGroup& group, const Glib::ustring& label, - ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) : + ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) : Gtk::RadioButton(group, label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) { add_changesignal(); }; ParamRadioButtonWdg ( const Glib::ustring& label, - ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) : + ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) : Gtk::RadioButton(label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) { add_changesignal(); }; @@ -232,7 +232,7 @@ ParamRadioButtonWdg::changed (void) class ComboWdg : public Gtk::ComboBoxText { public: - ComboWdg(ParamRadioButton* base, Document * doc, Inkscape::XML::Node * node) : + ComboWdg(ParamRadioButton* base, SPDocument * doc, Inkscape::XML::Node * node) : Gtk::ComboBoxText(), base(base), doc(doc), @@ -243,7 +243,7 @@ public: protected: ParamRadioButton* base; - Document* doc; + SPDocument* doc; Inkscape::XML::Node* node; virtual void on_changed() { @@ -257,7 +257,7 @@ protected: \brief Creates a combobox widget for an enumeration parameter */ Gtk::Widget * -ParamRadioButton::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/radiobutton.h b/src/extension/param/radiobutton.h index ec35c2c53..ea8440de2 100644 --- a/src/extension/param/radiobutton.h +++ b/src/extension/param/radiobutton.h @@ -43,11 +43,11 @@ public: Inkscape::XML::Node * xml, AppearanceMode mode); virtual ~ParamRadioButton(void); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); - const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node); + const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node); private: /** \brief Internal value. This should point to a string that has diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp index 6427f6f76..e32224332 100644 --- a/src/extension/param/string.cpp +++ b/src/extension/param/string.cpp @@ -42,7 +42,7 @@ ParamString::~ParamString(void) the passed in value is duplicated using \c g_strdup(). */ const gchar * -ParamString::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamString::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) { if (in == NULL) return NULL; /* Can't have NULL string */ @@ -96,7 +96,7 @@ ParamString::ParamString (const gchar * name, const gchar * guitext, const gchar class ParamStringEntry : public Gtk::Entry { private: ParamString * _pref; - Document * _doc; + SPDocument * _doc; Inkscape::XML::Node * _node; sigc::signal<void> * _changeSignal; public: @@ -104,7 +104,7 @@ public: \param pref Where to get the string from, and where to put it when it changes. */ - ParamStringEntry (ParamString * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : + ParamStringEntry (ParamString * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) : Gtk::Entry(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) { if (_pref->get(NULL, NULL) != NULL) this->set_text(Glib::ustring(_pref->get(NULL, NULL))); @@ -137,7 +137,7 @@ ParamStringEntry::changed_text (void) Builds a hbox with a label and a text box in it. */ Gtk::Widget * -ParamString::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) +ParamString::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/string.h b/src/extension/param/string.h index 0eb116a53..10f45e5ac 100644 --- a/src/extension/param/string.h +++ b/src/extension/param/string.h @@ -28,9 +28,9 @@ public: ParamString(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); virtual ~ParamString(void); /** \brief Returns \c _value, with a \i const to protect it. */ - const gchar * get (const Document * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } - const gchar * set (const gchar * in, Document * doc, Inkscape::XML::Node * node); - Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); + const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; } + const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node); + Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal); void string (std::string &string); void setMaxLength(int maxLenght) { _max_length = maxLenght; } int getMaxLength(void) { return _max_length; } diff --git a/src/extension/patheffect.cpp b/src/extension/patheffect.cpp index f6fa84f5b..8e3fc13f1 100644 --- a/src/extension/patheffect.cpp +++ b/src/extension/patheffect.cpp @@ -28,14 +28,14 @@ PathEffect::~PathEffect (void) } void -PathEffect::processPath (Document * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/) +PathEffect::processPath (SPDocument * /*doc*/, Inkscape::XML::Node * /*path*/, Inkscape::XML::Node * /*def*/) { } void -PathEffect::processPathEffects (Document * doc, Inkscape::XML::Node * path) +PathEffect::processPathEffects (SPDocument * doc, Inkscape::XML::Node * path) { gchar const * patheffectlist = path->attribute("inkscape:path-effects"); if (patheffectlist == NULL) diff --git a/src/extension/patheffect.h b/src/extension/patheffect.h index 7ad875048..0c00ae093 100644 --- a/src/extension/patheffect.h +++ b/src/extension/patheffect.h @@ -22,10 +22,10 @@ public: PathEffect (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp); virtual ~PathEffect (void); - void processPath (Document * doc, + void processPath (SPDocument * doc, Inkscape::XML::Node * path, Inkscape::XML::Node * def); - static void processPathEffects (Document * doc, + static void processPathEffects (SPDocument * doc, Inkscape::XML::Node * path); }; /* PathEffect */ diff --git a/src/extension/print.cpp b/src/extension/print.cpp index f6f6bb1e5..2d4177d60 100644 --- a/src/extension/print.cpp +++ b/src/extension/print.cpp @@ -49,7 +49,7 @@ Print::set_preview (void) } unsigned int -Print::begin (Document *doc) +Print::begin (SPDocument *doc) { return imp->begin(this, doc); } diff --git a/src/extension/print.h b/src/extension/print.h index 3240942d7..8ae71b8e6 100644 --- a/src/extension/print.h +++ b/src/extension/print.h @@ -36,7 +36,7 @@ public: unsigned int setup (void); unsigned int set_preview (void); - unsigned int begin (Document *doc); + unsigned int begin (SPDocument *doc); unsigned int finish (void); /* Rendering methods */ diff --git a/src/extension/system.cpp b/src/extension/system.cpp index ad49c3d2a..d7e0eebf3 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. */ -Document * +SPDocument * 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; - Document *doc = imod->open(filename); + SPDocument *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, Document *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official) +save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official) { Output *omod; if (key == NULL) { diff --git a/src/extension/system.h b/src/extension/system.h index ada5f799c..6c23b2f0d 100644 --- a/src/extension/system.h +++ b/src/extension/system.h @@ -21,8 +21,8 @@ namespace Inkscape { namespace Extension { -Document *open(Extension *key, gchar const *filename); -void save(Extension *key, Document *doc, gchar const *filename, +SPDocument *open(Extension *key, gchar const *filename); +void save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, bool check_overwrite, bool official); Print *get_print(gchar const *key); Extension *build_from_file(gchar const *filename); |
