From: johnce Date: Wed, 5 Aug 2009 06:38:07 +0000 (+0000) Subject: SPDocument->Document X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a02211fee45e7402a822d3f81bc0ed49233718e5;p=inkscape.git SPDocument->Document --- diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp index 6090b72d0..e3421b26d 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 */ -SPDocument * +Document * 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*/, SPDocument */*doc*/, gchar const */*filename*/) { +Implementation::save(Inkscape::Extension::Output */*module*/, Document */*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 * changeSignal, ImplementationDocumentCache * docCache) { if (module->param_visible_count() == 0) return NULL; - SPDocument * current_document = view->doc(); + Document * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator selected = @@ -134,7 +134,7 @@ Implementation::set_preview(Inkscape::Extension::Print */*module*/) unsigned int -Implementation::begin(Inkscape::Extension::Print */*module*/, SPDocument */*doc*/) +Implementation::begin(Inkscape::Extension::Print */*module*/, Document */*doc*/) { return 0; } diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index e6ce40bc0..d207c1a19 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. */ -SPDocument * +Document * 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); - SPDocument * mydoc = NULL; + Document * 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, - SPDocument *doc, + Document *doc, const gchar *filenameArg) { std::list params; @@ -757,7 +757,7 @@ Script::effect(Inkscape::Extension::Effect *module, pump_events(); - SPDocument * mydoc = NULL; + Document * 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/xslt.cpp b/src/extension/implementation/xslt.cpp index f34fea64a..9eea2dbeb 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -136,7 +136,7 @@ XSLT::unload(Inkscape::Extension::Extension *module) return; } -SPDocument * +Document * 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); - SPDocument * doc = sp_document_create(rdoc, filename, base, name, true); + Document * 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*/, SPDocument *doc, gchar const *filename) +XSLT::save(Inkscape::Extension::Output */*module*/, Document *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/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp index e907612fd..75d53927d 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 * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - SPDocument * current_document = view->doc(); + Document * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator 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 c81fdd029..d849755b7 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(SPDocument *doc, gchar const *filename) +png_render_document_to_file(Document *doc, gchar const *filename) { CairoRenderer *renderer; CairoRenderContext *ctx; @@ -92,7 +92,7 @@ png_render_document_to_file(SPDocument *doc, gchar const *filename) \param uri Filename to save to (probably will end in .png) */ void -CairoRendererOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +CairoRendererOutput::save(Inkscape::Extension::Output *mod, Document *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-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp index dff89c1ed..d9cac666c 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(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) +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) { sp_document_ensure_up_to_date(doc); @@ -124,7 +124,7 @@ ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int l \param filename Filename to save to (probably will end in .ps) */ void -CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; @@ -188,7 +188,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con \param filename Filename to save to (probably will end in .ps) */ void -CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +CairoEpsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index d1462e52e..28cf406f2 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 SPDocument + // TODO: bgcolor should be derived from Document 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 b44e83449..1e5404c50 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(SPDocument *doc, gchar const *filename, unsigned int level, +pdf_render_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) { @@ -118,7 +118,7 @@ pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int tell the printing system to save to file. */ void -CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; unsigned int ret; diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp index da88a5eae..3414993e5 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 - SPDocument *document = SP_OBJECT(item)->document; + Document *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, SPDocument *doc, bool pageBoundingBox, SPItem *base) +CairoRenderer::setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base) { g_assert( ctx != NULL ); diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index f400a3649..ffba5af81 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(SPDocument *doc, gchar const *filename) +emf_print_document_to_file(Document *doc, gchar const *filename) { Inkscape::Extension::Print *mod; SPPrintContext context; @@ -147,7 +147,7 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename) void -EmfWin32::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename) +EmfWin32::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) { Inkscape::Extension::Extension * ext; @@ -2162,7 +2162,7 @@ typedef struct #pragma pack( pop ) -SPDocument * +Document * 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; - SPDocument *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE); + Document *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-print.cpp b/src/extension/internal/emf-win32-print.cpp index d098f6466..822a0577b 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, SPDocument *doc) +PrintEmfWin32::begin (Inkscape::Extension::Print *mod, Document *doc) { gchar const *utf8_fn = mod->get_param_string("destination"); diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 64a099c8a..2f52561d1 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 { -SPDocument * +Document * GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri) { - SPDocument *doc = NULL; + PDocument *doc = NULL; GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL ); if (pb) { /* We are readable */ diff --git a/src/extension/internal/gimpgrad.cpp b/src/extension/internal/gimpgrad.cpp index 5b3e0c16e..9510b5ebd 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 SPDocument + \brief Actually open the gradient and turn it into an Document \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. */ -SPDocument * +Document * GimpGrad::open (Inkscape::Extension::Input */*module*/, gchar const *filename) { Inkscape::IO::dump_fopen_call(filename, "I"); diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index d4b35b261..5a0523ba8 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 */ - SPDocument * doc = document->doc(); + Document * 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 * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - SPDocument * current_document = view->doc(); + Document * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; GSListConstIterator selected = sp_desktop_selection((SPDesktop *)view)->itemList(); diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp index 417755e19..c1f057071 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(SPDocument *doc, SPObject *obj) +bool JavaFXOutput::doTreeRecursive(Document *doc, SPObject *obj) { /** * Check the type of node and process @@ -749,7 +749,7 @@ bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) /** * Output the curve data to buffer */ -bool JavaFXOutput::doTree(SPDocument *doc) +bool JavaFXOutput::doTree(Document *doc) { double bignum = 1000000.0; @@ -767,7 +767,7 @@ bool JavaFXOutput::doTree(SPDocument *doc) } -bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj) +bool JavaFXOutput::doBody(Document *doc, SPObject *obj) { /** * Check the type of node and process @@ -842,7 +842,7 @@ void JavaFXOutput::reset() /** * Saves the of an Inkscape SVG file as JavaFX spline definitions */ -bool JavaFXOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8) +bool JavaFXOutput::saveDocument(Document *doc, gchar const *filename_utf8) { reset(); @@ -918,7 +918,7 @@ bool JavaFXOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8) */ void JavaFXOutput::save(Inkscape::Extension::Output */*mod*/, - SPDocument *doc, gchar const *filename_utf8) + Document *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/latex-pstricks-out.cpp b/src/extension/internal/latex-pstricks-out.cpp index 4a469a750..924f9697e 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, SPDocument *doc, gchar const *filename) +LatexOutput::save(Inkscape::Extension::Output *mod2, Document *doc, gchar const *filename) { Inkscape::Extension::Print *mod; SPPrintContext context; diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index 789e5ea34..afc985e14 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, SPDocument *doc) +PrintLatex::begin (Inkscape::Extension::Print *mod, Document *doc) { Inkscape::SVGOStringStream os; int res; diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index cc8489302..e7e22414a 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*/, SPDocument *doc, gchar const *filename) +OdfOutput::save(Inkscape::Extension::Output */*mod*/, Document *doc, gchar const *filename) { reset(); diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp index 937fefb11..76759259d 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); -SPDocument * +Document * 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); - SPDocument * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE); + Document * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE); delete output; g_object_unref(page); diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index c2d417f2c..476f0daf6 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. */ -SPDocument * +Document * 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); - SPDocument *doc = sp_document_new(NULL, TRUE, TRUE); + Document *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/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 00bd8fa4d..686e44bb1 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(SPDocument *document, gchar *docname, XRef *xref) { +SvgBuilder::SvgBuilder(Document *document, gchar *docname, XRef *xref) { _is_top_level = true; _doc = document; _docname = docname; diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index f30cbc317..d3ed39d1f 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(SPDocument *doc, SPObject *obj) +bool PovOutput::doTreeRecursive(Document *doc, SPObject *obj) { String id; @@ -454,7 +454,7 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj) /** * Output the curve data to buffer */ -bool PovOutput::doTree(SPDocument *doc) +bool PovOutput::doTree(Document *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(SPDocument *doc, gchar const *filename_utf8) +void PovOutput::saveDocument(Document *doc, gchar const *filename_utf8) { reset(); @@ -641,7 +641,7 @@ void PovOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8) */ void PovOutput::save(Inkscape::Extension::Output */*mod*/, - SPDocument *doc, gchar const *filename_utf8) + Document *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/svg.cpp b/src/extension/internal/svg.cpp index a3589e905..317811088 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 SPDocument. + turns it into a Document. \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... */ -SPDocument * +Document * 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; } - SPDocument * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1); + Document * 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, SPDocument *doc, gchar const *filename) +Svg::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename) { g_return_if_fail(doc != NULL); g_return_if_fail(filename != NULL); diff --git a/src/extension/internal/win32.cpp b/src/extension/internal/win32.cpp index 21f278858..f272292b5 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, SPDocument *doc) +PrintWin32::begin (Inkscape::Extension::Print *mod, Document *doc) { DOCINFO di = { sizeof (DOCINFO), diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index c37d5705b..e7177e5e3 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -59,7 +59,7 @@ namespace Extension { namespace Internal { -SPDocument * +Document * 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()); - SPDocument * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE); + Document * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE); delete input; return doc; } diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index 1dda3d73f..07170587a 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) +ParamBool::set( bool in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ ) { _value = in; @@ -67,7 +67,7 @@ ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) /** \brief Returns \c _value */ bool -ParamBool::get (const SPDocument * doc, const Inkscape::XML::Node * node) +ParamBool::get (const Document * doc, const Inkscape::XML::Node * node) { return _value; } @@ -79,7 +79,7 @@ class ParamBoolCheckButton : public Gtk::CheckButton { private: /** \brief Param to change */ ParamBool * _pref; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _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, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) : + ParamBoolCheckButton (ParamBool * param, Document * doc, Inkscape::XML::Node * node, sigc::signal * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamBool::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4)); diff --git a/src/extension/param/color.cpp b/src/extension/param/color.cpp index 58db85748..080356e71 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) +ParamColor::set( guint32 in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ ) { _value = in; @@ -87,7 +87,7 @@ ParamColor::string (std::string &string) } Gtk::Widget * -ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * changeSignal ) +ParamColor::get_widget( Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * changeSignal ) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index 656e58c49..3641695cc 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 (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) +ParamDescription::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index 03c1f839b..9de3f60dd 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamComboBox::set (const gchar * in, Document * /*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; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _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, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) : + ParamComboBoxEntry (ParamComboBox * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamComboBox::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 11e3a8d97..516249c3c 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamFloat::set (float in, Document * /*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; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _changeSignal; public: /** \brief Make the adjustment using an extension and the string describing the parameter. */ - ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) : + ParamFloatAdjustment (ParamFloat * param, Document * doc, Inkscape::XML::Node * node, sigc::signal * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamFloat::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp index 301d54ed0..2818bb57b 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamInt::set (int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) { _value = in; if (_value > _max) _value = _max; @@ -88,13 +88,13 @@ ParamInt::set (int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) class ParamIntAdjustment : public Gtk::Adjustment { /** The parameter to adjust */ ParamInt * _pref; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _changeSignal; public: /** \brief Make the adjustment using an extension and the string describing the parameter. */ - ParamIntAdjustment (ParamInt * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) : + ParamIntAdjustment (ParamInt * param, Document * doc, Inkscape::XML::Node * node, sigc::signal * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamInt::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index 1c30b7e0e..6ad338ffa 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(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal); + Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal); void paramString (std::list &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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamNotebookPage::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamNotebook::set (const int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/) { ParamNotebookPage * page = NULL; int i = 0; @@ -347,14 +347,14 @@ ParamNotebook::string (std::list &list) class ParamNotebookWdg : public Gtk::Notebook { private: ParamNotebook * _pref; - SPDocument * _doc; + Document * _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, SPDocument * doc, Inkscape::XML::Node * node) : + ParamNotebookWdg (ParamNotebook * pref, Document * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamNotebook::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index 2773af61d..1094a5d3f 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 SPDocument * doc, const Inkscape::XML::Node * node) +Parameter::get_bool (const Document * doc, const Inkscape::XML::Node * node) { ParamBool * boolpntr = dynamic_cast(this); if (boolpntr == NULL) @@ -166,7 +166,7 @@ Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ int -Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node) +Parameter::get_int (const Document * doc, const Inkscape::XML::Node * node) { ParamInt * intpntr = dynamic_cast(this); if (intpntr == NULL) @@ -176,7 +176,7 @@ Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ float -Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node) +Parameter::get_float (const Document * doc, const Inkscape::XML::Node * node) { ParamFloat * floatpntr = dynamic_cast(this); if (floatpntr == NULL) @@ -186,7 +186,7 @@ Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ const gchar * -Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node) +Parameter::get_string (const Document * doc, const Inkscape::XML::Node * node) { ParamString * stringpntr = dynamic_cast(this); if (stringpntr == NULL) @@ -196,7 +196,7 @@ Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ const gchar * -Parameter::get_enum (const SPDocument * doc, const Inkscape::XML::Node * node) +Parameter::get_enum (const Document * doc, const Inkscape::XML::Node * node) { ParamComboBox * param = dynamic_cast(this); if (param == NULL) @@ -205,7 +205,7 @@ Parameter::get_enum (const SPDocument * doc, const Inkscape::XML::Node * node) } guint32 -Parameter::get_color(const SPDocument* doc, const Inkscape::XML::Node* node) +Parameter::get_color(const Document* doc, const Inkscape::XML::Node* node) { ParamColor* param = dynamic_cast(this); if (param == NULL) @@ -215,7 +215,7 @@ Parameter::get_color(const SPDocument* doc, const Inkscape::XML::Node* node) /** \brief Wrapper to cast to the object and use it's function. */ bool -Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node) +Parameter::set_bool (bool in, Document * doc, Inkscape::XML::Node * node) { ParamBool * boolpntr = dynamic_cast(this); if (boolpntr == NULL) @@ -225,7 +225,7 @@ Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ int -Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node) +Parameter::set_int (int in, Document * doc, Inkscape::XML::Node * node) { ParamInt * intpntr = dynamic_cast(this); if (intpntr == NULL) @@ -235,7 +235,7 @@ Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node) /** \brief Wrapper to cast to the object and use it's function. */ float -Parameter::set_float (float in, SPDocument * doc, Inkscape::XML::Node * node) +Parameter::set_float (float in, Document * doc, Inkscape::XML::Node * node) { ParamFloat * floatpntr; floatpntr = dynamic_cast(this); @@ -246,7 +246,7 @@ Parameter::set_float (float in, SPDocument * 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, SPDocument * doc, Inkscape::XML::Node * node) +Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node) { ParamString * stringpntr = dynamic_cast(this); if (stringpntr == NULL) @@ -255,7 +255,7 @@ Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * } /** \brief Wrapper to cast to the object and use it's function. */ guint32 -Parameter::set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node) +Parameter::set_color (guint32 in, Document * doc, Inkscape::XML::Node * node) { ParamColor* param = dynamic_cast(this); if (param == NULL) @@ -323,7 +323,7 @@ Parameter::new_child (Inkscape::XML::Node * parent) } Inkscape::XML::Node * -Parameter::document_param_node (SPDocument * doc) +Parameter::document_param_node (Document * 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 (SPDocument * doc) /** \brief Basically, if there is no widget pass a NULL. */ Gtk::Widget * -Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) +Parameter::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal * /*changeSignal*/) { return NULL; } diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index c17839001..315984e17 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamRadioButton::set (const gchar * in, Document * /*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; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _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, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal ) : + ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal ) : Gtk::RadioButton(group, label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) { add_changesignal(); }; ParamRadioButtonWdg ( const Glib::ustring& label, - ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node , sigc::signal * changeSignal) : + ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node , sigc::signal * 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, SPDocument * doc, Inkscape::XML::Node * node) : + ComboWdg(ParamRadioButton* base, Document * doc, Inkscape::XML::Node * node) : Gtk::ComboBoxText(), base(base), doc(doc), @@ -243,7 +243,7 @@ public: protected: ParamRadioButton* base; - SPDocument* doc; + Document* 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamRadioButton::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp index e32224332..6427f6f76 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, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/) +ParamString::set (const gchar * in, Document * /*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; - SPDocument * _doc; + Document * _doc; Inkscape::XML::Node * _node; sigc::signal * _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, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) : + ParamStringEntry (ParamString * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal * 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 (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) +ParamString::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (_gui_hidden) return NULL; diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 025bec37a..af6a0c516 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -147,7 +147,7 @@ Gtk::Widget *build_splash_widget() { // should be in UTF-*8.. char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL); - SPDocument *doc=sp_document_new (about, TRUE); + Document *doc=sp_document_new (about, TRUE); g_free(about); g_return_val_if_fail(doc != NULL, NULL); diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp index 96cad1fbe..f69d80fe5 100644 --- a/src/ui/dialog/document-metadata.cpp +++ b/src/ui/dialog/document-metadata.cpp @@ -207,7 +207,7 @@ DocumentMetadata::update() } void -DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *) +DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *) { Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop)); repr->addListener (&_repr_events, this); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 423778276..0e928a9eb 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -851,7 +851,7 @@ DocumentProperties::on_response (int id) } void -DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *document) +DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *document) { Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop)); repr->addListener(&_repr_events, this); @@ -915,7 +915,7 @@ DocumentProperties::onNewGrid() { SPDesktop *dt = getDesktop(); Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(dt)); - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); Glib::ustring typestring = _grids_combo_gridtype.get_active_text(); CanvasGrid::writeNewGridToRepr(repr, doc, CanvasGrid::getGridTypeFromName(typestring.c_str())); diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 70f2f2ae5..30a7e7c2a 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -120,7 +120,7 @@ findExpanderWidgets(Gtk::Container *parent, ### SVG Preview Widget #########################################################################*/ -bool SVGPreview::setDocument(SPDocument *doc) +bool SVGPreview::setDocument(Document *doc) { if (document) sp_document_unref(document); @@ -151,7 +151,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName) * I don't know why passing false to keepalive is bad. But it * prevents the display of an svg with a non-ascii filename */ - SPDocument *doc = sp_document_new (fileName.c_str(), true); + Document *doc = sp_document_new (fileName.c_str(), true); if (!doc) { g_warning("SVGView: error loading document '%s'\n", fileName.c_str()); return false; @@ -172,7 +172,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer) return false; gint len = (gint)strlen(xmlBuffer); - SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0); + Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0); if (!doc) { g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer); return false; diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp index 0d8f0de5f..4a2cc879d 100644 --- a/src/ui/dialog/filedialogimpl-win32.cpp +++ b/src/ui/dialog/filedialogimpl-win32.cpp @@ -887,7 +887,7 @@ bool FileOpenDialogImplWin32::set_svg_preview() gchar *utf8string = g_utf16_to_utf8((const gunichar2*)_path_string, _MAX_PATH, NULL, NULL, NULL); - SPDocument *svgDoc = sp_document_new (utf8string, true); + Document *svgDoc = sp_document_new (utf8string, true); g_free(utf8string); // Check the document loaded properly diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index baf46970a..026af2c9f 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -1222,7 +1222,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri if(iter) { SPDesktop *desktop = _dialog.getDesktop(); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); SPFilter* filter = (*iter)[_columns.filter]; Inkscape::Selection *sel = sp_desktop_selection(desktop); @@ -1255,7 +1255,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri void FilterEffectsDialog::FilterModifier::update_filters() { SPDesktop* desktop = _dialog.getDesktop(); - SPDocument* document = sp_desktop_document(desktop); + Document* document = sp_desktop_document(desktop); const GSList* filters = sp_document_get_resource_list(document, "filter"); _model->clear(); @@ -1310,7 +1310,7 @@ void FilterEffectsDialog::FilterModifier::filter_list_button_release(GdkEventBut void FilterEffectsDialog::FilterModifier::add_filter() { - SPDocument* doc = sp_desktop_document(_dialog.getDesktop()); + Document* doc = sp_desktop_document(_dialog.getDesktop()); SPFilter* filter = new_filter(doc); const int count = _model->children().size(); @@ -1330,7 +1330,7 @@ void FilterEffectsDialog::FilterModifier::remove_filter() SPFilter *filter = get_selected_filter(); if(filter) { - SPDocument* doc = filter->document; + Document* doc = filter->document; sp_repr_unparent(filter->repr); sp_document_done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter")); diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 3a7964ba2..2d7f7cb5b 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -119,7 +119,7 @@ void GuidelinePropertiesDialog::_onOK() void GuidelinePropertiesDialog::_onDelete() { - SPDocument *doc = SP_OBJECT_DOCUMENT(_guide); + Document *doc = SP_OBJECT_DOCUMENT(_guide); sp_guide_remove(_guide); sp_document_done(doc, SP_VERB_NONE, _("Delete guide")); diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp index 336afc3c5..1490e5b73 100644 --- a/src/ui/dialog/icon-preview.cpp +++ b/src/ui/dialog/icon-preview.cpp @@ -36,7 +36,7 @@ extern "C" { // takes doc, root, icon, and icon name to produce pixels guchar * -sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, +sp_icon_doc_icon( Document *doc, NRArenaItem *root, const gchar *name, unsigned int psize ); } @@ -247,7 +247,7 @@ void IconPreviewPanel::modeToggled() void IconPreviewPanel::renderPreview( SPObject* obj ) { - SPDocument * doc = SP_OBJECT_DOCUMENT(obj); + Document * doc = SP_OBJECT_DOCUMENT(obj); gchar * id = SP_OBJECT_ID(obj); // g_message(" setting up to render '%s' as the icon", id ); diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index fa47ad88d..0298042ef 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -349,7 +349,7 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt void LayersPanel::_layersChanged() { // g_message("_layersChanged()"); - SPDocument* document = _desktop->doc(); + Document* document = _desktop->doc(); SPObject* root = document->root; if ( root ) { _selectedConnection.block(); @@ -366,7 +366,7 @@ void LayersPanel::_layersChanged() } } -void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level ) +void LayersPanel::_addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level ) { if ( layer && (level < _maxNestDepth) ) { unsigned int counter = _mgr->childCount(layer); diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index dd2dc8250..bea8a096e 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -357,7 +357,7 @@ LivePathEffectEditor::onApply() if ( sel && !sel->isEmpty() ) { SPItem *item = sel->singleItem(); if ( item && SP_IS_LPE_ITEM(item) ) { - SPDocument *doc = current_desktop->doc(); + Document *doc = current_desktop->doc(); const Util::EnumData* data = combo_effecttype.get_active_data(); if (!data) return; diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index d15773ecb..198495f74 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -148,7 +148,7 @@ namespace Inkscape { namespace UI { namespace Dialog { -Print::Print(SPDocument *doc, SPItem *base) : +Print::Print(Document *doc, SPItem *base) : _doc (doc), _base (base) { diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 5f86196b1..64ea07877 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -161,7 +161,7 @@ void GlyphComboBox::update(SPFont* spfont){ void SvgFontsDialog::on_kerning_value_changed(){ if (!this->kerning_pair) return; - SPDocument* document = sp_desktop_document(this->getDesktop()); + Document* document = sp_desktop_document(this->getDesktop()); //TODO: I am unsure whether this is the correct way of calling sp_document_maybe_done Glib::ustring undokey = "svgfonts:hkern:k:"; @@ -242,7 +242,7 @@ void SvgFontsDialog::update_sensitiveness(){ void SvgFontsDialog::update_fonts() { SPDesktop* desktop = this->getDesktop(); - SPDocument* document = sp_desktop_document(desktop); + Document* document = sp_desktop_document(desktop); const GSList* fonts = sp_document_get_resource_list(document, "font"); _model->clear(); @@ -420,7 +420,7 @@ SvgFontsDialog::populate_kerning_pairs_box() } } -SPGlyph *new_glyph(SPDocument* document, SPFont *font, const int count) +SPGlyph *new_glyph(Document* document, SPFont *font, const int count) { g_return_val_if_fail(font != NULL, NULL); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); @@ -459,7 +459,7 @@ void SvgFontsDialog::update_glyphs(){ void SvgFontsDialog::add_glyph(){ const int count = _GlyphsListStore->children().size(); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); /* SPGlyph* glyph =*/ new_glyph(doc, get_selected_spfont(), count+1); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Add glyph")); @@ -475,7 +475,7 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){ } Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop); - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); Inkscape::Selection* sel = sp_desktop_selection(desktop); if (sel->isEmpty()){ char *msg = _("Select a path to define the curves of a glyph"); @@ -519,7 +519,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){ } Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop); - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); Inkscape::Selection* sel = sp_desktop_selection(desktop); if (sel->isEmpty()){ char *msg = _("Select a path to define the curves of a glyph"); @@ -562,7 +562,7 @@ void SvgFontsDialog::reset_missing_glyph_description(){ return; } - SPDocument* doc = sp_desktop_document(desktop); + Document* doc = sp_desktop_document(desktop); SPObject* obj; for (obj = get_selected_spfont()->children; obj; obj=obj->next){ if (SP_IS_MISSING_GLYPH(obj)){ @@ -581,7 +581,7 @@ void SvgFontsDialog::glyph_name_edit(const Glib::ustring&, const Glib::ustring& SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; glyph->repr->setAttribute("glyph-name", str.c_str()); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name")); update_glyphs(); @@ -594,7 +594,7 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; glyph->repr->setAttribute("unicode", str.c_str()); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode")); update_glyphs(); @@ -604,7 +604,7 @@ void SvgFontsDialog::remove_selected_font(){ SPFont* font = get_selected_spfont(); sp_repr_unparent(font->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font")); update_fonts(); @@ -619,7 +619,7 @@ void SvgFontsDialog::remove_selected_glyph(){ SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node]; sp_repr_unparent(glyph->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph")); update_glyphs(); @@ -634,7 +634,7 @@ void SvgFontsDialog::remove_selected_kerning_pair(){ SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode]; sp_repr_unparent(pair->repr); - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair")); update_glyphs(); @@ -705,7 +705,7 @@ void SvgFontsDialog::add_kerning_pair(){ if (this->kerning_pair) return; //We already have this kerning pair - SPDocument* document = sp_desktop_document(this->getDesktop()); + Document* document = sp_desktop_document(this->getDesktop()); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); // create a new hkern node @@ -767,7 +767,7 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){ return &kerning_vbox; } -SPFont *new_font(SPDocument *document) +SPFont *new_font(Document *document) { g_return_val_if_fail(document != NULL, NULL); @@ -820,7 +820,7 @@ void set_font_family(SPFont* font, char* str){ } void SvgFontsDialog::add_font(){ - SPDocument* doc = sp_desktop_document(this->getDesktop()); + Document* doc = sp_desktop_document(this->getDesktop()); SPFont* font = new_font(doc); const int count = _model->children().size(); diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp index e273a827c..cdd479e9d 100644 --- a/src/ui/dialog/swatches.cpp +++ b/src/ui/dialog/swatches.cpp @@ -377,7 +377,7 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) if ( bounceTarget ) { SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast(bounceTarget->ptr) : 0; SPDesktop* desktop = swp ? swp->getDesktop() : 0; - SPDocument *doc = desktop ? desktop->doc() : 0; + Document *doc = desktop ? desktop->doc() : 0; if (doc) { std::string targetName(bounceTarget->def.descr); const GSList *gradients = sp_document_get_resource_list(doc, "gradient"); @@ -397,7 +397,7 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ ) if ( bounceTarget ) { SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast(bounceTarget->ptr) : 0; SPDesktop* desktop = swp ? swp->getDesktop() : 0; - SPDocument *doc = desktop ? desktop->doc() : 0; + Document *doc = desktop ? desktop->doc() : 0; if (doc) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); @@ -524,7 +524,7 @@ void ColorItem::_dropDataIn( GtkWidget */*widget*/, { } -static bool bruteForce( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b ) +static bool bruteForce( Document* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b ) { bool changed = false; @@ -612,7 +612,7 @@ void ColorItem::_colorDefChanged(void* data) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; if ( desktop ) { - SPDocument* document = sp_desktop_document( desktop ); + Document* document = sp_desktop_document( desktop ); Inkscape::XML::Node *rroot = sp_document_repr_root( document ); if ( rroot ) { @@ -1362,9 +1362,9 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop ) _currentDesktop->connectToolSubselectionChanged( sigc::hide(sigc::mem_fun(*this, &SwatchesPanel::_updateFromSelection))); - sigc::bound_mem_functor1 first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument); - sigc::slot base2 = first; - sigc::slot slot2 = sigc::hide<0>( base2 ); + sigc::bound_mem_functor1 first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument); + sigc::slot base2 = first; + sigc::slot slot2 = sigc::hide<0>( base2 ); _documentConnection = desktop->connectDocumentReplaced( slot2 ); _setDocument( desktop->doc() ); @@ -1374,7 +1374,7 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop ) } } -void SwatchesPanel::_setDocument( SPDocument *document ) +void SwatchesPanel::_setDocument( Document *document ) { if ( document != _currentDocument ) { if ( _currentDocument ) { diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 756f4df73..9619380bb 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -71,7 +71,7 @@ namespace Inkscape { namespace UI { namespace View { -EditWidget::EditWidget (SPDocument *doc) +EditWidget::EditWidget (Document *doc) : _main_window_table(4), _viewport_table(3,3), _act_grp(Gtk::ActionGroup::create()), @@ -1191,7 +1191,7 @@ EditWidget::shutdown() if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop)) return false; - SPDocument *doc = _desktop->doc(); + Document *doc = _desktop->doc(); if (doc->isModifiedSinceSave()) { gchar *markup; /// \todo FIXME !!! obviously this will have problems if the document @@ -1389,7 +1389,7 @@ EditWidget::updateScrollbars (double scale) _update_s_f = true; /* The desktop region we always show unconditionally */ - SPDocument *doc = _desktop->doc(); + Document *doc = _desktop->doc(); Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)), Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) ); SPObject* root = doc->root; @@ -1548,7 +1548,7 @@ void EditWidget::_namedview_modified (SPObject *obj, guint flags) { } void -EditWidget::initEdit (SPDocument *doc) +EditWidget::initEdit (Document *doc) { _desktop = new SPDesktop(); _desktop->registerEditWidget (this); diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp index 1b498a846..07bb6d2c1 100644 --- a/src/ui/view/view.cpp +++ b/src/ui/view/view.cpp @@ -137,7 +137,7 @@ void View::requestRedraw() * * \param doc The new document to connect the view to. */ -void View::setDocument(SPDocument *doc) { +void View::setDocument(Document *doc) { g_return_if_fail(doc != NULL); if (_doc) { diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp index e9f09f574..f42b29760 100644 --- a/src/ui/widget/entity-entry.cpp +++ b/src/ui/widget/entity-entry.cpp @@ -81,7 +81,7 @@ EntityLineEntry::~EntityLineEntry() } void -EntityLineEntry::update (SPDocument *doc) +EntityLineEntry::update (Document *doc) { const char *text = rdf_get_work_entity (doc, _entity); static_cast(_packable)->set_text (text ? text : ""); @@ -93,7 +93,7 @@ EntityLineEntry::on_changed() if (_wr->isUpdating()) return; _wr->setUpdating (true); - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; Glib::ustring text = static_cast(_packable)->get_text(); if (rdf_set_work_entity (doc, _entity, text.c_str())) sp_document_done (doc, SP_VERB_NONE, @@ -122,7 +122,7 @@ EntityMultiLineEntry::~EntityMultiLineEntry() } void -EntityMultiLineEntry::update (SPDocument *doc) +EntityMultiLineEntry::update (Document *doc) { const char *text = rdf_get_work_entity (doc, _entity); Gtk::ScrolledWindow *s = static_cast(_packable); @@ -136,7 +136,7 @@ EntityMultiLineEntry::on_changed() if (_wr->isUpdating()) return; _wr->setUpdating (true); - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; Gtk::ScrolledWindow *s = static_cast(_packable); Gtk::TextView *tv = static_cast(s->get_child()); Glib::ustring text = tv->get_buffer()->get_text(); diff --git a/src/ui/widget/imageicon.cpp b/src/ui/widget/imageicon.cpp index 6a817e30d..ead32b4b7 100644 --- a/src/ui/widget/imageicon.cpp +++ b/src/ui/widget/imageicon.cpp @@ -94,13 +94,13 @@ void ImageIcon::init() } -bool ImageIcon::showSvgDocument(const SPDocument *docArg) +bool ImageIcon::showSvgDocument(const Document *docArg) { if (document) sp_document_unref(document); - SPDocument *doc = (SPDocument *)docArg; + Document *doc = (Document *)docArg; sp_document_ref(doc); document = doc; @@ -127,7 +127,7 @@ bool ImageIcon::showSvgFile(const Glib::ustring &theFileName) fileName = Glib::filename_to_utf8(fileName); - SPDocument *doc = sp_document_new (fileName.c_str(), 0); + Document *doc = sp_document_new (fileName.c_str(), 0); if (!doc) { g_warning("SVGView: error loading document '%s'\n", fileName.c_str()); return false; @@ -148,7 +148,7 @@ bool ImageIcon::showSvgFromMemory(const char *xmlBuffer) return false; gint len = (gint)strlen(xmlBuffer); - SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0); + Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0); if (!doc) { g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer); return false; diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index a5f1d89be..778fbc6cc 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -119,7 +119,7 @@ Licensor::init (Gtk::Tooltips& tt, Registry& wr) } void -Licensor::update (SPDocument *doc) +Licensor::update (Document *doc) { /* identify the license info */ struct rdf_license_t * license = rdf_get_license (doc); diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index bfc291bc0..1b4251143 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -117,7 +117,7 @@ ObjectCompositeSettings::_blendBlurValueChanged() if (!desktop) { return; } - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); if (_blocked) return; diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 02688a55e..429442779 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -346,7 +346,7 @@ PageSizer::setDim (double w, double h, bool changeList) _changedh_connection.block(); if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) { - SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP); + Document *doc = sp_desktop_document(SP_ACTIVE_DESKTOP); double const old_height = sp_document_height(doc); sp_document_set_width (doc, w, &_px_unit); sp_document_set_height (doc, h, &_px_unit); diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 93a950d1a..c2fafa001 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -566,7 +566,7 @@ Panel::setResponseSensitive(int response_id, bool setting) _response_map[response_id]->set_sensitive(setting); } -sigc::signal & +sigc::signal & Panel::signalDocumentReplaced() { return _signal_document_replaced; diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index 95ddec286..5780f74ed 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -50,7 +50,7 @@ RegisteredCheckButton::~RegisteredCheckButton() _toggled_connection.disconnect(); } -RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in) +RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, Document *doc_in) : RegisteredWidget() { init_parent(key, wr, repr_in, doc_in); @@ -108,7 +108,7 @@ RegisteredUnitMenu::~RegisteredUnitMenu() _changed_connection.disconnect(); } -RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in) +RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in) : RegisteredWidget (label, "" /*tooltip*/, new UnitMenu()) { init_parent(key, wr, repr_in, doc_in); @@ -149,7 +149,7 @@ RegisteredScalarUnit::~RegisteredScalarUnit() _value_changed_connection.disconnect(); } -RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in) +RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in) : RegisteredWidget(label, tip, UNIT_TYPE_LINEAR, "", "", rum.getUnitMenu()), _um(0) { @@ -200,7 +200,7 @@ RegisteredScalar::~RegisteredScalar() RegisteredScalar::RegisteredScalar ( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument * doc_in ) + Document * doc_in ) : RegisteredWidget(label, tip) { init_parent(key, wr, repr_in, doc_in); @@ -248,7 +248,7 @@ RegisteredText::~RegisteredText() RegisteredText::RegisteredText ( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument * doc_in ) + Document * doc_in ) : RegisteredWidget(label, tip) { init_parent(key, wr, repr_in, doc_in); @@ -296,7 +296,7 @@ RegisteredColorPicker::RegisteredColorPicker(const Glib::ustring& label, const Glib::ustring& akey, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument *doc_in) + Document *doc_in) : RegisteredWidget (title, tip, 0, true) { init_parent("", wr, repr_in, doc_in); @@ -337,7 +337,7 @@ RegisteredColorPicker::on_changed (guint32 rgba) // Use local repr here. When repr is specified, use that one, but // if repr==NULL, get the repr of namedview of active desktop. Inkscape::XML::Node *local_repr = repr; - SPDocument *local_doc = doc; + Document *local_doc = doc; if (!local_repr) { // no repr specified, use active desktop's namedview's repr SPDesktop *dt = SP_ACTIVE_DESKTOP; @@ -372,7 +372,7 @@ RegisteredSuffixedInteger::~RegisteredSuffixedInteger() _changed_connection.disconnect(); } -RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in) +RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in) : RegisteredWidget(label, tip, 0, suffix), setProgrammatically(false) { @@ -419,7 +419,7 @@ RegisteredRadioButtonPair::~RegisteredRadioButtonPair() RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label, const Glib::ustring& label1, const Glib::ustring& label2, const Glib::ustring& tip1, const Glib::ustring& tip2, - const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in) + const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in) : RegisteredWidget(), _rb1(NULL), _rb2(NULL) @@ -486,7 +486,7 @@ RegisteredPoint::~RegisteredPoint() RegisteredPoint::RegisteredPoint ( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument* doc_in ) + Document* doc_in ) : RegisteredWidget (label, tip) { init_parent(key, wr, repr_in, doc_in); @@ -531,7 +531,7 @@ RegisteredTransformedPoint::~RegisteredTransformedPoint() RegisteredTransformedPoint::RegisteredTransformedPoint ( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument* doc_in ) + Document* doc_in ) : RegisteredWidget (label, tip), to_svg(Geom::identity()) { @@ -598,7 +598,7 @@ RegisteredRandom::~RegisteredRandom() RegisteredRandom::RegisteredRandom ( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, - SPDocument * doc_in ) + Document * doc_in ) : RegisteredWidget (label, tip) { init_parent(key, wr, repr_in, doc_in); diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index 3a36127f4..bc5b45979 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -185,7 +185,7 @@ ToleranceSlider::update (double val) _wr->setUpdating (true); - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); bool saved = sp_document_get_undo_sensitive (doc); sp_document_set_undo_sensitive (doc, false); Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));