From b45b3ca12c271745b18a142d10a6ac8efd9f79cc Mon Sep 17 00:00:00 2001 From: johnce Date: Wed, 5 Aug 2009 05:40:36 +0000 Subject: [PATCH] SPDocument->Document --- configure.ac | 16 +-- src/Makefile_insert | 3 + src/bind/javabind.cpp | 4 +- src/box3d-context.cpp | 2 +- src/box3d-side.cpp | 6 +- src/box3d.cpp | 10 +- src/color-profile-fns.h | 4 +- src/color-profile-test.h | 2 +- src/color-profile.cpp | 10 +- src/color-profile.h | 2 +- src/composite-undo-stack-observer.cpp | 2 +- src/composite-undo-stack-observer.h | 4 +- src/conditions.cpp | 2 +- src/conn-avoid-ref.cpp | 2 +- src/connector-context.cpp | 10 +- src/desktop-events.cpp | 2 +- src/desktop-handles.cpp | 2 +- src/desktop-handles.h | 2 +- src/desktop.cpp | 6 +- src/desktop.h | 8 +- src/document-private.h | 18 +-- src/document-subset.h | 2 +- src/document-undo.cpp | 30 ++-- src/document.cpp | 152 ++++++++++---------- src/document.h | 98 ++++++------- src/doxygen-main.cpp | 2 +- src/draw-context.cpp | 4 +- src/event-log.cpp | 2 +- src/event-log.h | 4 +- src/file.cpp | 177 +++++++++++++++++++++--- src/file.h | 37 ++++- src/filter-chemistry.cpp | 10 +- src/filter-chemistry.h | 8 +- src/flood-context.cpp | 4 +- src/forward.h | 4 +- src/gradient-chemistry.cpp | 10 +- src/gradient-chemistry.h | 4 +- src/gradient-context.cpp | 6 +- src/gradient-drag.cpp | 2 +- src/id-clash.cpp | 4 +- src/id-clash.h | 2 +- src/inkscape-private.h | 4 +- src/inkscape.cpp | 28 ++-- src/inkscape.h | 4 +- src/inkview.cpp | 16 +-- src/interface.cpp | 10 +- src/jabber_whiteboard/node-tracker.h | 2 +- src/jabber_whiteboard/session-manager.h | 6 +- src/layer-fns.cpp | 2 +- src/layer-manager.cpp | 8 +- src/layer-manager.h | 6 +- src/livarot/LivarotDefs.h | 4 +- src/live_effects/effect.h | 8 +- src/lpe-tool-context.cpp | 4 +- src/lpe-tool-context.h | 2 +- src/main-cmdlineact.cpp | 2 +- src/main.cpp | 22 +-- src/marker.cpp | 6 +- src/marker.h | 2 +- src/nodepath.cpp | 4 +- src/path-chemistry.cpp | 4 +- src/persp3d.cpp | 10 +- src/persp3d.h | 8 +- src/print.cpp | 6 +- src/print.h | 6 +- src/profile-manager.cpp | 2 +- src/profile-manager.h | 6 +- src/rdf.cpp | 18 +-- src/rdf.h | 10 +- src/selection-chemistry.cpp | 40 +++--- src/selection-chemistry.h | 8 +- src/snap.cpp | 2 +- src/snap.h | 2 +- src/sp-anchor.cpp | 4 +- src/sp-animation.cpp | 12 +- src/sp-clippath.cpp | 6 +- src/sp-clippath.h | 2 +- src/sp-ellipse.cpp | 12 +- src/sp-filter-primitive.cpp | 4 +- src/sp-filter-reference.h | 2 +- src/sp-filter.cpp | 4 +- src/sp-flowdiv.cpp | 12 +- src/sp-flowtext.cpp | 6 +- src/sp-font-face.cpp | 4 +- src/sp-font.cpp | 4 +- src/sp-gaussian-blur.cpp | 4 +- src/sp-glyph-kerning.cpp | 4 +- src/sp-glyph.cpp | 4 +- src/sp-gradient-test.h | 2 +- src/sp-gradient.cpp | 16 +-- src/sp-guide.cpp | 8 +- src/sp-image.cpp | 6 +- src/sp-item-group.cpp | 6 +- src/sp-item.cpp | 4 +- src/sp-line.cpp | 4 +- src/sp-lpe-item.cpp | 4 +- src/sp-mask.cpp | 6 +- src/sp-mask.h | 2 +- src/sp-metadata.cpp | 6 +- src/sp-metadata.h | 2 +- src/sp-missing-glyph.cpp | 4 +- src/sp-namedview.cpp | 14 +- src/sp-namedview.h | 4 +- src/sp-object-repr.cpp | 2 +- src/sp-object-repr.h | 2 +- src/sp-object.cpp | 12 +- src/sp-object.h | 8 +- src/sp-offset.cpp | 6 +- src/sp-paint-server.h | 2 +- src/sp-path.cpp | 4 +- src/sp-pattern.cpp | 8 +- src/sp-pattern.h | 2 +- src/sp-polygon.cpp | 4 +- src/sp-polyline.cpp | 4 +- src/sp-rect.cpp | 4 +- src/sp-root.cpp | 4 +- src/sp-script.cpp | 4 +- src/sp-shape.cpp | 4 +- src/sp-skeleton.cpp | 4 +- src/sp-spiral.cpp | 4 +- src/sp-star.cpp | 4 +- src/sp-string.cpp | 4 +- src/sp-style-elem-test.h | 2 +- src/sp-style-elem.cpp | 4 +- src/sp-symbol.cpp | 4 +- src/sp-text.cpp | 4 +- src/sp-tref.cpp | 6 +- src/sp-tspan.cpp | 8 +- src/sp-use.cpp | 6 +- src/splivarot.cpp | 4 +- src/style-test.h | 2 +- src/style.cpp | 26 ++-- src/style.h | 4 +- src/svg-view-widget.cpp | 2 +- src/svg-view-widget.h | 4 +- src/svg-view.cpp | 2 +- src/svg-view.h | 2 +- src/test-helpers.h | 2 +- src/text-chemistry.cpp | 4 +- src/tweak-context.cpp | 4 +- src/uri-references.cpp | 8 +- src/uri-references.h | 10 +- src/vanishing-point.cpp | 2 +- src/vanishing-point.h | 4 +- src/verbs.cpp | 16 +-- src/verbs.h | 4 +- src/widgets/desktop-widget.cpp | 4 +- src/widgets/fill-style.cpp | 2 +- src/widgets/gradient-selector.cpp | 4 +- src/widgets/gradient-selector.h | 2 +- src/widgets/gradient-toolbar.cpp | 4 +- src/widgets/gradient-vector.cpp | 8 +- src/widgets/gradient-vector.h | 8 +- src/widgets/icon.cpp | 6 +- src/widgets/paint-selector.cpp | 12 +- src/widgets/select-toolbar.cpp | 2 +- src/widgets/stroke-style.cpp | 34 ++--- src/widgets/toolbox.cpp | 8 +- src/xml/rebase-hrefs.h | 4 +- 159 files changed, 801 insertions(+), 630 deletions(-) diff --git a/configure.ac b/configure.ac index b804d0deb..db3204dbb 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ AC_PROG_CXX AM_PROG_CC_STDC AM_PROG_AS AC_PROG_RANLIB -AC_PROG_INTLTOOL(0.22) +#--tullarisc AC_PROG_INTLTOOL(0.22) AC_HEADER_STDC INK_SVN_SNAPSHOT_BUILD @@ -130,7 +130,7 @@ AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used]) dnl Add the languages which your application supports here. ALL_LINGUAS="am ar az be bg bn br ca ca@valencia cs da de dz el en_AU en_CA en_GB en_US@piglatin eo es_MX es et eu fi fr ga gl he hr hu hy id it ja km ko lt mk mn nb ne nl nn pa pl pt_BR pt ro ru rw sk sl sq sr@latin sr sv th tr uk vi zh_CN zh_TW" -AM_GLIB_GNU_GETTEXT +#//--tullariscAM_GLIB_GNU_GETTEXT AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then @@ -155,7 +155,7 @@ fi dnl ****************************** dnl Check for libpng dnl ****************************** -AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no)], png_ok=no, -lz -lm) +AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=yes)], png_ok=yes, -lz -lm) if test "x$png_ok" != "xyes"; then AC_MSG_ERROR([libpng >= 1.2 is needed to compile inkscape]) fi @@ -805,11 +805,11 @@ AC_TYPE_SIGNAL dnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't dnl set correctly because the gettext function isn't noticed. -if test "$ac_cv_header_libintl_h" = "yes" && - test "$ac_cv_func_bind_textdomain_codeset" = "yes" && - test "$gt_cv_func_have_gettext" != "yes"; then - AC_DEFINE(ENABLE_NLS) -fi +#--tullariscif test "$ac_cv_header_libintl_h" = "yes" && +# test "$ac_cv_func_bind_textdomain_codeset" = "yes" && +# test "$gt_cv_func_have_gettext" != "yes"; then +# AC_DEFINE(ENABLE_NLS) +#fi dnl ****************************** dnl Compilation warnings diff --git a/src/Makefile_insert b/src/Makefile_insert index de986ca16..5967c7cfc 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -225,6 +225,9 @@ ink_common_sources += \ star-context.cpp star-context.h \ streq.h \ strneq.h \ + streams-handles.h streams-handles.cpp \ + streams-ftp.h streams-ftp.cpp \ + streams-http.h streams-http.cpp \ style.cpp style.h \ svg-profile.h \ svg-view.cpp svg-view.h \ diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp index f7022584f..aedd72e13 100644 --- a/src/bind/javabind.cpp +++ b/src/bind/javabind.cpp @@ -44,9 +44,9 @@ #include #endif -#if HAVE_SYS_STAT_H +//--tullarisc #if HAVE_SYS_STAT_H #include -#endif +//#endif #include "javabind.h" #include "javabind-private.h" diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index 128b5f2ff..7e6eaaa22 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -185,7 +185,7 @@ static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, g /* create a default perspective in document defs if none is present (can happen after 'vacuum defs' or when a pre-0.46 file is opened) */ -static void sp_box3d_context_check_for_persp_in_defs(SPDocument *document) { +static void sp_box3d_context_check_for_persp_in_defs(Document *document) { SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document); bool has_persp = false; diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp index 241279100..f09a2f9f6 100644 --- a/src/box3d-side.cpp +++ b/src/box3d-side.cpp @@ -28,7 +28,7 @@ static void box3d_side_class_init (Box3DSideClass *klass); static void box3d_side_init (Box3DSide *side); -static void box3d_side_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void box3d_side_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *box3d_side_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void box3d_side_set (SPObject *object, unsigned int key, const gchar *value); static void box3d_side_update (SPObject *object, SPCtx *ctx, guint flags); @@ -94,7 +94,7 @@ box3d_side_init (Box3DSide * side) } static void -box3d_side_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr) +box3d_side_build (SPObject * object, Document * document, Inkscape::XML::Node * repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build (object, document, repr); @@ -307,7 +307,7 @@ box3d_side_perspective(Box3DSide *side) { Inkscape::XML::Node * box3d_side_convert_to_path(Box3DSide *side) { // TODO: Copy over all important attributes (see sp_selected_item_to_curved_repr() for an example) - SPDocument *doc = SP_OBJECT_DOCUMENT(side); + Document *doc = SP_OBJECT_DOCUMENT(side); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); diff --git a/src/box3d.cpp b/src/box3d.cpp index 5cffa66d9..9ec0625aa 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -43,7 +43,7 @@ static void box3d_class_init(SPBox3DClass *klass); static void box3d_init(SPBox3D *box3d); -static void box3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void box3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void box3d_release(SPObject *object); static void box3d_set(SPObject *object, unsigned int key, const gchar *value); static void box3d_update(SPObject *object, SPCtx *ctx, guint flags); @@ -110,7 +110,7 @@ box3d_init(SPBox3D *box) } static void -box3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +box3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); @@ -126,7 +126,7 @@ box3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) // TODO: Create/link to the correct perspective - SPDocument *doc = SP_OBJECT_DOCUMENT(box); + Document *doc = SP_OBJECT_DOCUMENT(box); if (!doc) { g_print ("No document for the box!!!!\n"); return; @@ -272,7 +272,7 @@ static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Documen repr->setAttribute("inkscape:perspectiveID", box->persp_href); } else { /* box is not yet linked to a perspective; use the document's current perspective */ - SPDocument *doc = SP_OBJECT_DOCUMENT(object); + Document *doc = SP_OBJECT_DOCUMENT(object); if (box->persp_ref->getURI()) { gchar *uri_string = box->persp_ref->getURI()->toString(); repr->setAttribute("inkscape:perspectiveID", uri_string); @@ -1378,7 +1378,7 @@ box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp, the original box and deletes the latter */ SPGroup * box3d_convert_to_group(SPBox3D *box) { - SPDocument *doc = SP_OBJECT_DOCUMENT(box); + Document *doc = SP_OBJECT_DOCUMENT(box); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); // remember position of the box diff --git a/src/color-profile-fns.h b/src/color-profile-fns.h index c8c51b551..62e4c865f 100644 --- a/src/color-profile-fns.h +++ b/src/color-profile-fns.h @@ -13,7 +13,7 @@ #include #endif // ENABLE_LCMS -class SPDocument; +class Document; namespace Inkscape { @@ -27,7 +27,7 @@ GType colorprofile_get_type(); #if ENABLE_LCMS -cmsHPROFILE colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name ); +cmsHPROFILE colorprofile_get_handle( Document* document, guint* intent, gchar const* name ); cmsHTRANSFORM colorprofile_get_display_transform(); Glib::ustring colorprofile_get_display_id( int screen, int monitor ); diff --git a/src/color-profile-test.h b/src/color-profile-test.h index cdbf76b44..d7b361c50 100644 --- a/src/color-profile-test.h +++ b/src/color-profile-test.h @@ -14,7 +14,7 @@ class ColorProfileTest : public CxxTest::TestSuite { public: - SPDocument* _doc; + Document* _doc; ColorProfileTest() : _doc(0) diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 5868a9582..b2487a6a9 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -151,7 +151,7 @@ void ColorProfile::init( ColorProfile *cprof ) void ColorProfile::release( SPObject *object ) { // Unregister ourselves - SPDocument* document = SP_OBJECT_DOCUMENT(object); + Document* document = SP_OBJECT_DOCUMENT(object); if ( document ) { sp_document_remove_resource (SP_OBJECT_DOCUMENT (object), "iccprofile", SP_OBJECT (object)); } @@ -205,7 +205,7 @@ void ColorProfile::_clearProfile() /** * Callback: set attributes from associated repr. */ -void ColorProfile::build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr ) +void ColorProfile::build( SPObject *object, Document *document, Inkscape::XML::Node *repr ) { ColorProfile *cprof = COLORPROFILE(object); g_assert(cprof->href == 0); @@ -251,7 +251,7 @@ void ColorProfile::set( SPObject *object, unsigned key, gchar const *value ) //LCMSAPI cmsHPROFILE LCMSEXPORT cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize); // Try to open relative - SPDocument *doc = SP_OBJECT_DOCUMENT(object); + Document *doc = SP_OBJECT_DOCUMENT(object); if (!doc) { doc = SP_ACTIVE_DOCUMENT; g_warning("object has no document. using active"); @@ -436,7 +436,7 @@ static int getLcmsIntent( guint svgIntent ) return intent; } -static SPObject* bruteFind( SPDocument* document, gchar const* name ) +static SPObject* bruteFind( Document* document, gchar const* name ) { SPObject* result = 0; const GSList * current = sp_document_get_resource_list(document, "iccprofile"); @@ -456,7 +456,7 @@ static SPObject* bruteFind( SPDocument* document, gchar const* name ) return result; } -cmsHPROFILE Inkscape::colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name ) +cmsHPROFILE Inkscape::colorprofile_get_handle( Document* document, guint* intent, gchar const* name ) { cmsHPROFILE prof = 0; diff --git a/src/color-profile.h b/src/color-profile.h index 2e57e7ef0..2d8ac5b6d 100644 --- a/src/color-profile.h +++ b/src/color-profile.h @@ -56,7 +56,7 @@ private: static void init( ColorProfile *cprof ); static void release( SPObject *object ); - static void build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr ); + static void build( SPObject *object, Document *document, Inkscape::XML::Node *repr ); static void set( SPObject *object, unsigned key, gchar const *value ); static Inkscape::XML::Node *write( SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags ); #if ENABLE_LCMS diff --git a/src/composite-undo-stack-observer.cpp b/src/composite-undo-stack-observer.cpp index 03e4796bd..89ffdc65e 100644 --- a/src/composite-undo-stack-observer.cpp +++ b/src/composite-undo-stack-observer.cpp @@ -1,5 +1,5 @@ /** - * Aggregates undo stack observers for convenient management and triggering in SPDocument + * Aggregates undo stack observers for convenient management and triggering in Document * * Heavily inspired by Inkscape::XML::CompositeNodeObserver. * diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h index cd00d4211..01c64f4fd 100644 --- a/src/composite-undo-stack-observer.h +++ b/src/composite-undo-stack-observer.h @@ -1,5 +1,5 @@ /** - * Aggregates undo stack observers for management and triggering in SPDocument + * Aggregates undo stack observers for management and triggering in Document * * Heavily inspired by Inkscape::XML::CompositeNodeObserver. * @@ -25,7 +25,7 @@ namespace Inkscape { class Event; /** - * Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo + * Aggregates UndoStackObservers for management and triggering in an Document's undo/redo * system. */ class CompositeUndoStackObserver : public UndoStackObserver { diff --git a/src/conditions.cpp b/src/conditions.cpp index 4a18a6913..c431600f3 100644 --- a/src/conditions.cpp +++ b/src/conditions.cpp @@ -108,7 +108,7 @@ static bool evaluateSystemLanguage(SPItem const *item, gchar const *value) { if (language_codes.empty()) return false; - SPDocument *document = SP_OBJECT_DOCUMENT(item); + Document *document = SP_OBJECT_DOCUMENT(item); Glib::ustring document_language = document->getLanguage(); if (document_language.size() == 0) diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 43c9c0b66..0bc961e5d 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -254,7 +254,7 @@ void init_avoided_shape_geometry(SPDesktop *desktop) { // Don't count this as changes to the document, // it is basically just late initialisation. - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, false); diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 2131bdced..17e5f6f32 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -686,7 +686,7 @@ connector_handle_button_release(SPConnectorContext *const cc, GdkEventButton con if ( revent.button == 1 && !event_context->space_panning ) { SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); SnapManager &m = desktop->namedview->snap_manager; m.setup(desktop); @@ -763,7 +763,7 @@ connector_handle_key_press(SPConnectorContext *const cc, guint const keyval) if (cc->state == SP_CONNECTOR_CONTEXT_REROUTING) { SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); cc_connector_rerouting_finish(cc, NULL); @@ -794,7 +794,7 @@ static void cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p) { SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); // Clear the temporary path: cc->red_curve->reset(); @@ -936,7 +936,7 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc) c->transform(SP_EVENT_CONTEXT_DESKTOP(cc)->dt2doc()); SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); if ( c && !c->is_empty() ) { @@ -1311,7 +1311,7 @@ void cc_selection_set_avoid(bool const set_avoid) return; } - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); Inkscape::Selection *selection = sp_desktop_selection(desktop); diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index cea478f85..41b7ab4da 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -440,7 +440,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data) case GDK_KP_Delete: case GDK_BackSpace: { - 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")); ret = TRUE; diff --git a/src/desktop-handles.cpp b/src/desktop-handles.cpp index 481bf35ea..b0ca4b84a 100644 --- a/src/desktop-handles.cpp +++ b/src/desktop-handles.cpp @@ -31,7 +31,7 @@ sp_desktop_selection (SPDesktop const * desktop) return desktop->selection; } -SPDocument * +Document * sp_desktop_document (SPDesktop const * desktop) { g_return_val_if_fail (desktop != NULL, NULL); diff --git a/src/desktop-handles.h b/src/desktop-handles.h index a8d0a3d1e..8c48d0bbd 100644 --- a/src/desktop-handles.h +++ b/src/desktop-handles.h @@ -30,7 +30,7 @@ namespace Inkscape { SPEventContext * sp_desktop_event_context (SPDesktop const * desktop); Inkscape::Selection * sp_desktop_selection (SPDesktop const * desktop); -SPDocument * sp_desktop_document (SPDesktop const * desktop); +Document * sp_desktop_document (SPDesktop const * desktop); SPCanvas * sp_desktop_canvas (SPDesktop const * desktop); SPCanvasItem * sp_desktop_acetate (SPDesktop const * desktop); SPCanvasGroup * sp_desktop_main (SPDesktop const * desktop); diff --git a/src/desktop.cpp b/src/desktop.cpp index 6b7c20094..4f832682d 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -178,7 +178,7 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas) namedview = nv; canvas = aCanvas; - SPDocument *document = SP_OBJECT_DOCUMENT (namedview); + Document *document = SP_OBJECT_DOCUMENT (namedview); /* Kill flicker */ sp_document_ensure_up_to_date (document); @@ -577,7 +577,7 @@ SPDesktop::activate_guides(bool activate) * Make desktop switch documents. */ void -SPDesktop::change_document (SPDocument *theDocument) +SPDesktop::change_document (Document *theDocument) { g_return_if_fail (theDocument != NULL); @@ -1492,7 +1492,7 @@ SPDesktop::updateCanvasNow() * Associate document with desktop. */ void -SPDesktop::setDocument (SPDocument *doc) +SPDesktop::setDocument (Document *doc) { if (this->doc() && doc) { namedview->hide(this); diff --git a/src/desktop.h b/src/desktop.h index 73b9262dd..f9e7f6a17 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -143,7 +143,7 @@ struct SPDesktop : public Inkscape::UI::View::View sigc::signal _layer_changed_signal; sigc::signal::accumulated _set_style_signal; sigc::signal::accumulated _query_style_signal; - sigc::connection connectDocumentReplaced (const sigc::slot & slot) + sigc::connection connectDocumentReplaced (const sigc::slot & slot) { return _document_replaced_signal.connect (slot); } @@ -219,7 +219,7 @@ struct SPDesktop : public Inkscape::UI::View::View bool itemIsHidden(SPItem const *item) const; void activate_guides (bool activate); - void change_document (SPDocument *document); + void change_document (Document *document); void set_event_context (GtkType type, const gchar *config); void push_event_context (GtkType type, const gchar *config, unsigned int key); @@ -315,7 +315,7 @@ struct SPDesktop : public Inkscape::UI::View::View Geom::Point doc2dt(Geom::Point const &p) const; Geom::Point dt2doc(Geom::Point const &p) const; - virtual void setDocument (SPDocument* doc); + virtual void setDocument (Document* doc); virtual bool shutdown(); virtual void mouseover() {} virtual void mouseout() {} @@ -337,7 +337,7 @@ private: void push_current_zoom (GList**); - sigc::signal _document_replaced_signal; + sigc::signal _document_replaced_signal; sigc::signal _activate_signal; sigc::signal _deactivate_signal; sigc::signal _event_context_changed_signal; diff --git a/src/document-private.h b/src/document-private.h index fa4754248..221cfa17c 100644 --- a/src/document-private.h +++ b/src/document-private.h @@ -36,9 +36,9 @@ class Event; } -struct SPDocumentPrivate { - typedef std::map IDChangedSignalMap; - typedef std::map ResourcesChangedSignalMap; +struct DocumentPrivate { + typedef std::map IDChangedSignalMap; + typedef std::map ResourcesChangedSignalMap; GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */ GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */ @@ -53,12 +53,12 @@ struct SPDocumentPrivate { GHashTable *resources; ResourcesChangedSignalMap resources_changed_signals; - SPDocument::ModifiedSignal modified_signal; - SPDocument::URISetSignal uri_set_signal; - SPDocument::ResizedSignal resized_signal; - SPDocument::ReconstructionStart _reconstruction_start_signal; - SPDocument::ReconstructionFinish _reconstruction_finish_signal; - SPDocument::CommitSignal commit_signal; + Document::ModifiedSignal modified_signal; + Document::URISetSignal uri_set_signal; + Document::ResizedSignal resized_signal; + Document::ReconstructionStart _reconstruction_start_signal; + Document::ReconstructionFinish _reconstruction_finish_signal; + Document::CommitSignal commit_signal; /* Undo/Redo state */ bool sensitive: true; /* If we save actions to undo stack */ diff --git a/src/document-subset.h b/src/document-subset.h index e424a289c..b7b724162 100644 --- a/src/document-subset.h +++ b/src/document-subset.h @@ -17,7 +17,7 @@ #include "gc-anchored.h" class SPObject; -class SPDocument; +class Document; namespace Inkscape { diff --git a/src/document-undo.cpp b/src/document-undo.cpp index ae1c82e71..9dbf5db25 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -23,8 +23,8 @@ * stack. Two methods exist to indicate that the given action is completed: * * \verbatim - void sp_document_done (SPDocument *document); - void sp_document_maybe_done (SPDocument *document, const unsigned char *key) \endverbatim + void sp_document_done (Document *document); + void sp_document_maybe_done (Document *document, const unsigned char *key) \endverbatim * * Both move the recent action list into the undo stack and clear the * list afterwards. While the first method does an unconditional push, @@ -85,7 +85,7 @@ sp_document_set_undo_sensitive(document, saved); \endverbatim */ void -sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive) +sp_document_set_undo_sensitive (Document *doc, bool sensitive) { g_assert (doc != NULL); g_assert (doc->priv != NULL); @@ -112,7 +112,7 @@ sp_document_set_undo_sensitive (SPDocument *doc, bool sensitive) * the saved bools in a stack. Perhaps this is why the above solution is better. */ -bool sp_document_get_undo_sensitive(SPDocument const *document) { +bool sp_document_get_undo_sensitive(Document const *document) { g_assert(document != NULL); g_assert(document->priv != NULL); @@ -120,7 +120,7 @@ bool sp_document_get_undo_sensitive(SPDocument const *document) { } void -sp_document_done (SPDocument *doc, const unsigned int event_type, Glib::ustring event_description) +sp_document_done (Document *doc, const unsigned int event_type, Glib::ustring event_description) { sp_document_maybe_done (doc, NULL, event_type, event_description); } @@ -128,7 +128,7 @@ sp_document_done (SPDocument *doc, const unsigned int event_type, Glib::ustring void sp_document_reset_key (Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkObject *base) { - SPDocument *doc = (SPDocument *) base; + Document *doc = (Document *) base; doc->actionkey = NULL; } @@ -145,7 +145,7 @@ typedef SimpleEvent InteractionEvent; class CommitEvent : public InteractionEvent { public: - CommitEvent(SPDocument *doc, const gchar *key, const unsigned int type) + CommitEvent(Document *doc, const gchar *key, const unsigned int type) : InteractionEvent(share_static_string("commit")) { _addProperty(share_static_string("timestamp"), timestamp()); @@ -165,7 +165,7 @@ public: } void -sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int event_type, +sp_document_maybe_done (Document *doc, const gchar *key, const unsigned int event_type, Glib::ustring event_description) { g_assert (doc != NULL); @@ -209,7 +209,7 @@ sp_document_maybe_done (SPDocument *doc, const gchar *key, const unsigned int ev } void -sp_document_cancel (SPDocument *doc) +sp_document_cancel (Document *doc) { g_assert (doc != NULL); g_assert (doc->priv != NULL); @@ -226,8 +226,8 @@ sp_document_cancel (SPDocument *doc) sp_repr_begin_transaction (doc->rdoc); } -static void finish_incomplete_transaction(SPDocument &doc) { - SPDocumentPrivate &priv=*doc.priv; +static void finish_incomplete_transaction(Document &doc) { + DocumentPrivate &priv=*doc.priv; Inkscape::XML::Event *log=sp_repr_commit_undoable(doc.rdoc); if (log || priv.partial) { g_warning ("Incomplete undo transaction:"); @@ -241,7 +241,7 @@ static void finish_incomplete_transaction(SPDocument &doc) { } gboolean -sp_document_undo (SPDocument *doc) +sp_document_undo (Document *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; @@ -287,7 +287,7 @@ sp_document_undo (SPDocument *doc) } gboolean -sp_document_redo (SPDocument *doc) +sp_document_redo (Document *doc) { using Inkscape::Debug::EventTracker; using Inkscape::Debug::SimpleEvent; @@ -333,7 +333,7 @@ sp_document_redo (SPDocument *doc) } void -sp_document_clear_undo (SPDocument *doc) +sp_document_clear_undo (Document *doc) { if (doc->priv->undo) doc->priv->undoStackObservers.notifyClearUndoEvent(); @@ -351,7 +351,7 @@ sp_document_clear_undo (SPDocument *doc) } void -sp_document_clear_redo (SPDocument *doc) +sp_document_clear_redo (Document *doc) { if (doc->priv->redo) doc->priv->undoStackObservers.notifyClearRedoEvent(); diff --git a/src/document.cpp b/src/document.cpp index 288e52c6d..750b29301 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -1,7 +1,7 @@ -#define __SP_DOCUMENT_C__ +#define __DOCUMENT_C__ /** \file - * SPDocument manipulation + * Document manipulation * * Authors: * Lauris Kaplinski @@ -15,17 +15,17 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -/** \class SPDocument - * SPDocument serves as the container of both model trees (agnostic XML +/** \class Document + * Document serves as the container of both model trees (agnostic XML * and typed object tree), and implements all of the document-level * functionality used by the program. Many document level operations, like - * load, save, print, export and so on, use SPDocument as their basic datatype. + * load, save, print, export and so on, use Document as their basic datatype. * - * SPDocument implements undo and redo stacks and an id-based object + * Document implements undo and redo stacks and an id-based object * dictionary. Thanks to unique id attributes, the latter can be used to * map from the XML tree back to the object tree. * - * SPDocument performs the basic operations needed for asynchronous + * Document performs the basic operations needed for asynchronous * update notification (SPObject ::modified virtual method), and implements * the 'modified' signal, as well. */ @@ -74,7 +74,7 @@ static gint doc_count = 0; static unsigned long next_serial = 0; -SPDocument::SPDocument() : +Document::Document() : keepalive(FALSE), virgin(TRUE), modified_since_save(FALSE), @@ -98,7 +98,7 @@ SPDocument::SPDocument() : // Don't use the Consolidate moves optimisation. router->ConsolidateMoves = false; - SPDocumentPrivate *p = new SPDocumentPrivate(); + DocumentPrivate *p = new DocumentPrivate(); p->serial = next_serial++; @@ -123,7 +123,7 @@ SPDocument::SPDocument() : priv->undoStackObservers.add(p->console_output_undo_observer); } -SPDocument::~SPDocument() { +Document::~Document() { collectOrphans(); // kill/unhook this first @@ -204,7 +204,7 @@ SPDocument::~SPDocument() { } -void SPDocument::add_persp3d (Persp3D * const /*persp*/) +void Document::add_persp3d (Persp3D * const /*persp*/) { SPDefs *defs = SP_ROOT(this->root)->defs; for (SPObject *i = sp_object_first_child(SP_OBJECT(defs)); i != NULL; i = SP_OBJECT_NEXT(i) ) { @@ -217,18 +217,18 @@ void SPDocument::add_persp3d (Persp3D * const /*persp*/) persp3d_create_xml_element (this); } -void SPDocument::remove_persp3d (Persp3D * const /*persp*/) +void Document::remove_persp3d (Persp3D * const /*persp*/) { // TODO: Delete the repr, maybe perform a check if any boxes are still linked to the perspective. // Anything else? g_print ("Please implement deletion of perspectives here.\n"); } -unsigned long SPDocument::serial() const { +unsigned long Document::serial() const { return priv->serial; } -void SPDocument::queueForOrphanCollection(SPObject *object) { +void Document::queueForOrphanCollection(SPObject *object) { g_return_if_fail(object != NULL); g_return_if_fail(SP_OBJECT_DOCUMENT(object) == this); @@ -236,7 +236,7 @@ void SPDocument::queueForOrphanCollection(SPObject *object) { _collection_queue = g_slist_prepend(_collection_queue, object); } -void SPDocument::collectOrphans() { +void Document::collectOrphans() { while (_collection_queue) { GSList *objects=_collection_queue; _collection_queue = NULL; @@ -249,25 +249,25 @@ void SPDocument::collectOrphans() { } } -void SPDocument::reset_key (void */*dummy*/) +void Document::reset_key (void */*dummy*/) { actionkey = NULL; } -SPDocument * +Document * sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive) { - SPDocument *document; + Document *document; Inkscape::XML::Node *rroot; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); rroot = rdoc->root(); - document = new SPDocument(); + document = new Document(); document->keepalive = keepalive; @@ -389,8 +389,8 @@ sp_document_create(Inkscape::XML::Document *rdoc, G_CALLBACK(sp_document_reset_key), document); document->oldSignalsConnected = true; } else { - document->_selection_changed_connection = Inkscape::NSApplication::Editor::connectSelectionChanged (sigc::mem_fun (*document, &SPDocument::reset_key)); - document->_desktop_activated_connection = Inkscape::NSApplication::Editor::connectDesktopActivated (sigc::mem_fun (*document, &SPDocument::reset_key)); + document->_selection_changed_connection = Inkscape::NSApplication::Editor::connectSelectionChanged (sigc::mem_fun (*document, &Document::reset_key)); + document->_desktop_activated_connection = Inkscape::NSApplication::Editor::connectDesktopActivated (sigc::mem_fun (*document, &Document::reset_key)); document->oldSignalsConnected = false; } @@ -401,10 +401,10 @@ sp_document_create(Inkscape::XML::Document *rdoc, * Fetches document from URI, or creates new, if NULL; public document * appears in document list. */ -SPDocument * +Document * sp_document_new(gchar const *uri, unsigned int keepalive, bool make_new) { - SPDocument *doc; + Document *doc; Inkscape::XML::Document *rdoc; gchar *base = NULL; gchar *name = NULL; @@ -452,10 +452,10 @@ sp_document_new(gchar const *uri, unsigned int keepalive, bool make_new) return doc; } -SPDocument * +Document * sp_document_new_from_mem(gchar const *buffer, gint length, unsigned int keepalive) { - SPDocument *doc; + Document *doc; Inkscape::XML::Document *rdoc; Inkscape::XML::Node *rroot; gchar *name; @@ -477,23 +477,23 @@ sp_document_new_from_mem(gchar const *buffer, gint length, unsigned int keepaliv return doc; } -SPDocument * -sp_document_ref(SPDocument *doc) +Document * +sp_document_ref(Document *doc) { g_return_val_if_fail(doc != NULL, NULL); Inkscape::GC::anchor(doc); return doc; } -SPDocument * -sp_document_unref(SPDocument *doc) +Document * +sp_document_unref(Document *doc) { g_return_val_if_fail(doc != NULL, NULL); Inkscape::GC::release(doc); return NULL; } -gdouble sp_document_width(SPDocument *document) +gdouble sp_document_width(Document *document) { g_return_val_if_fail(document != NULL, 0.0); g_return_val_if_fail(document->priv != NULL, 0.0); @@ -507,7 +507,7 @@ gdouble sp_document_width(SPDocument *document) } void -sp_document_set_width (SPDocument *document, gdouble width, const SPUnit *unit) +sp_document_set_width (Document *document, gdouble width, const SPUnit *unit) { SPRoot *root = SP_ROOT(document->root); @@ -533,7 +533,7 @@ sp_document_set_width (SPDocument *document, gdouble width, const SPUnit *unit) SP_OBJECT (root)->updateRepr(); } -void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit *unit) +void sp_document_set_height (Document * document, gdouble height, const SPUnit *unit) { SPRoot *root = SP_ROOT(document->root); @@ -559,7 +559,7 @@ void sp_document_set_height (SPDocument * document, gdouble height, const SPUnit SP_OBJECT (root)->updateRepr(); } -gdouble sp_document_height(SPDocument *document) +gdouble sp_document_height(Document *document) { g_return_val_if_fail(document != NULL, 0.0); g_return_val_if_fail(document->priv != NULL, 0.0); @@ -572,7 +572,7 @@ gdouble sp_document_height(SPDocument *document) return root->height.computed; } -Geom::Point sp_document_dimensions(SPDocument *doc) +Geom::Point sp_document_dimensions(Document *doc) { return Geom::Point(sp_document_width(doc), sp_document_height(doc)); } @@ -582,7 +582,7 @@ Geom::Point sp_document_dimensions(SPDocument *doc) * this function fits the canvas to that rect by resizing the canvas * and translating the document root into position. */ -void SPDocument::fitToRect(Geom::Rect const &rect) +void Document::fitToRect(Geom::Rect const &rect) { double const w = rect.width(); double const h = rect.height(); @@ -606,7 +606,7 @@ void SPDocument::fitToRect(Geom::Rect const &rect) } static void -do_change_uri(SPDocument *const document, gchar const *const filename, bool const rebase) +do_change_uri(Document *const document, gchar const *const filename, bool const rebase) { g_return_if_fail(document != NULL); @@ -662,7 +662,7 @@ do_change_uri(SPDocument *const document, gchar const *const filename, bool cons * * \see sp_document_change_uri_and_hrefs */ -void sp_document_set_uri(SPDocument *document, gchar const *filename) +void sp_document_set_uri(Document *document, gchar const *filename) { g_return_if_fail(document != NULL); @@ -675,7 +675,7 @@ void sp_document_set_uri(SPDocument *document, gchar const *filename) * * \see sp_document_set_uri */ -void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *filename) +void sp_document_change_uri_and_hrefs(Document *document, gchar const *filename) { g_return_if_fail(document != NULL); @@ -683,36 +683,36 @@ void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *filenam } void -sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height) +sp_document_resized_signal_emit(Document *doc, gdouble width, gdouble height) { g_return_if_fail(doc != NULL); doc->priv->resized_signal.emit(width, height); } -sigc::connection SPDocument::connectModified(SPDocument::ModifiedSignal::slot_type slot) +sigc::connection Document::connectModified(Document::ModifiedSignal::slot_type slot) { return priv->modified_signal.connect(slot); } -sigc::connection SPDocument::connectURISet(SPDocument::URISetSignal::slot_type slot) +sigc::connection Document::connectURISet(Document::URISetSignal::slot_type slot) { return priv->uri_set_signal.connect(slot); } -sigc::connection SPDocument::connectResized(SPDocument::ResizedSignal::slot_type slot) +sigc::connection Document::connectResized(Document::ResizedSignal::slot_type slot) { return priv->resized_signal.connect(slot); } sigc::connection -SPDocument::connectReconstructionStart(SPDocument::ReconstructionStart::slot_type slot) +Document::connectReconstructionStart(Document::ReconstructionStart::slot_type slot) { return priv->_reconstruction_start_signal.connect(slot); } void -SPDocument::emitReconstructionStart(void) +Document::emitReconstructionStart(void) { // printf("Starting Reconstruction\n"); priv->_reconstruction_start_signal.emit(); @@ -720,33 +720,33 @@ SPDocument::emitReconstructionStart(void) } sigc::connection -SPDocument::connectReconstructionFinish(SPDocument::ReconstructionFinish::slot_type slot) +Document::connectReconstructionFinish(Document::ReconstructionFinish::slot_type slot) { return priv->_reconstruction_finish_signal.connect(slot); } void -SPDocument::emitReconstructionFinish(void) +Document::emitReconstructionFinish(void) { // printf("Finishing Reconstruction\n"); priv->_reconstruction_finish_signal.emit(); return; } -sigc::connection SPDocument::connectCommit(SPDocument::CommitSignal::slot_type slot) +sigc::connection Document::connectCommit(Document::CommitSignal::slot_type slot) { return priv->commit_signal.connect(slot); } -void SPDocument::_emitModified() { +void Document::_emitModified() { static guint const flags = SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG | SP_OBJECT_PARENT_MODIFIED_FLAG; root->emitModified(0); priv->modified_signal.emit(flags); } -void SPDocument::bindObjectToId(gchar const *id, SPObject *object) { +void Document::bindObjectToId(gchar const *id, SPObject *object) { GQuark idq = g_quark_from_string(id); if (object) { @@ -757,7 +757,7 @@ void SPDocument::bindObjectToId(gchar const *id, SPObject *object) { g_hash_table_remove(priv->iddef, GINT_TO_POINTER(idq)); } - SPDocumentPrivate::IDChangedSignalMap::iterator pos; + DocumentPrivate::IDChangedSignalMap::iterator pos; pos = priv->id_changed_signals.find(idq); if ( pos != priv->id_changed_signals.end() ) { @@ -770,31 +770,31 @@ void SPDocument::bindObjectToId(gchar const *id, SPObject *object) { } void -SPDocument::addUndoObserver(Inkscape::UndoStackObserver& observer) +Document::addUndoObserver(Inkscape::UndoStackObserver& observer) { this->priv->undoStackObservers.add(observer); } void -SPDocument::removeUndoObserver(Inkscape::UndoStackObserver& observer) +Document::removeUndoObserver(Inkscape::UndoStackObserver& observer) { this->priv->undoStackObservers.remove(observer); } -SPObject *SPDocument::getObjectById(gchar const *id) { +SPObject *Document::getObjectById(gchar const *id) { g_return_val_if_fail(id != NULL, NULL); GQuark idq = g_quark_from_string(id); return (SPObject*)g_hash_table_lookup(priv->iddef, GINT_TO_POINTER(idq)); } -sigc::connection SPDocument::connectIdChanged(gchar const *id, - SPDocument::IDChangedSignal::slot_type slot) +sigc::connection Document::connectIdChanged(gchar const *id, + Document::IDChangedSignal::slot_type slot) { return priv->id_changed_signals[g_quark_from_string(id)].connect(slot); } -void SPDocument::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) { +void Document::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) { if (object) { g_assert(g_hash_table_lookup(priv->reprdef, repr) == NULL); g_hash_table_insert(priv->reprdef, repr, object); @@ -804,12 +804,12 @@ void SPDocument::bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object) { } } -SPObject *SPDocument::getObjectByRepr(Inkscape::XML::Node *repr) { +SPObject *Document::getObjectByRepr(Inkscape::XML::Node *repr) { g_return_val_if_fail(repr != NULL, NULL); return (SPObject*)g_hash_table_lookup(priv->reprdef, repr); } -Glib::ustring SPDocument::getLanguage() { +Glib::ustring Document::getLanguage() { gchar const *document_language = rdf_get_work_entity(this, rdf_find_entity("language")); if (document_language) { while (isspace(*document_language)) @@ -841,7 +841,7 @@ Glib::ustring SPDocument::getLanguage() { /* Object modification root handler */ void -sp_document_request_modified(SPDocument *doc) +sp_document_request_modified(Document *doc) { if (!doc->modified_id) { doc->modified_id = gtk_idle_add_priority(SP_DOCUMENT_UPDATE_PRIORITY, sp_document_idle_handler, doc); @@ -849,7 +849,7 @@ sp_document_request_modified(SPDocument *doc) } void -sp_document_setup_viewport (SPDocument *doc, SPItemCtx *ctx) +sp_document_setup_viewport (Document *doc, SPItemCtx *ctx) { ctx->ctx.flags = 0; ctx->i2doc = Geom::identity(); @@ -874,7 +874,7 @@ sp_document_setup_viewport (SPDocument *doc, SPItemCtx *ctx) * been brought fully up to date. */ bool -SPDocument::_updateDocument() +Document::_updateDocument() { /* Process updates */ if (this->root->uflags || this->root->mflags) { @@ -904,7 +904,7 @@ SPDocument::_updateDocument() * since this typically indicates we're stuck in an update loop. */ gint -sp_document_ensure_up_to_date(SPDocument *doc) +sp_document_ensure_up_to_date(Document *doc) { int counter = 32; while (!doc->_updateDocument()) { @@ -930,7 +930,7 @@ sp_document_ensure_up_to_date(SPDocument *doc) static gint sp_document_idle_handler(gpointer data) { - SPDocument *doc = static_cast(data); + Document *doc = static_cast(data); if (doc->_updateDocument()) { doc->modified_id = 0; return false; @@ -1106,7 +1106,7 @@ find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p) * */ -GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box) +GSList *sp_document_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(document->priv != NULL, NULL); @@ -1121,7 +1121,7 @@ GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom:: * */ -GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box) +GSList *sp_document_partial_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(document->priv != NULL, NULL); @@ -1130,7 +1130,7 @@ GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey } GSList * -sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector points) +sp_document_items_at_points(Document *document, unsigned const key, std::vector points) { GSList *items = NULL; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -1155,7 +1155,7 @@ sp_document_items_at_points(SPDocument *document, unsigned const key, std::vecto } SPItem * -sp_document_item_at_point(SPDocument *document, unsigned const key, Geom::Point const p, +sp_document_item_at_point(Document *document, unsigned const key, Geom::Point const p, gboolean const into_groups, SPItem *upto) { g_return_val_if_fail(document != NULL, NULL); @@ -1165,7 +1165,7 @@ sp_document_item_at_point(SPDocument *document, unsigned const key, Geom::Point } SPItem* -sp_document_group_at_point(SPDocument *document, unsigned int key, Geom::Point const p) +sp_document_group_at_point(Document *document, unsigned int key, Geom::Point const p) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(document->priv != NULL, NULL); @@ -1177,7 +1177,7 @@ sp_document_group_at_point(SPDocument *document, unsigned int key, Geom::Point c /* Resource management */ gboolean -sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *object) +sp_document_add_resource(Document *document, gchar const *key, SPObject *object) { GSList *rlist; GQuark q = g_quark_from_string(key); @@ -1202,7 +1202,7 @@ sp_document_add_resource(SPDocument *document, gchar const *key, SPObject *objec } gboolean -sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *object) +sp_document_remove_resource(Document *document, gchar const *key, SPObject *object) { GSList *rlist; GQuark q = g_quark_from_string(key); @@ -1228,7 +1228,7 @@ sp_document_remove_resource(SPDocument *document, gchar const *key, SPObject *ob } GSList const * -sp_document_get_resource_list(SPDocument *document, gchar const *key) +sp_document_get_resource_list(Document *document, gchar const *key) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(key != NULL, NULL); @@ -1237,9 +1237,9 @@ sp_document_get_resource_list(SPDocument *document, gchar const *key) return (GSList*)g_hash_table_lookup(document->priv->resources, key); } -sigc::connection sp_document_resources_changed_connect(SPDocument *document, +sigc::connection sp_document_resources_changed_connect(Document *document, gchar const *key, - SPDocument::ResourcesChangedSignal::slot_type slot) + Document::ResourcesChangedSignal::slot_type slot) { GQuark q = g_quark_from_string(key); return document->priv->resources_changed_signals[q].connect(slot); @@ -1267,7 +1267,7 @@ count_objects_recursive(SPObject *obj, unsigned int count) } unsigned int -objects_in_document(SPDocument *document) +objects_in_document(Document *document) { return count_objects_recursive(SP_DOCUMENT_ROOT(document), 0); } @@ -1288,7 +1288,7 @@ vacuum_document_recursive(SPObject *obj) } unsigned int -vacuum_document(SPDocument *document) +vacuum_document(Document *document) { unsigned int start = objects_in_document(document); unsigned int end; @@ -1310,7 +1310,7 @@ vacuum_document(SPDocument *document) return start - newend; } -bool SPDocument::isSeeking() const { +bool Document::isSeeking() const { return priv->seeking; } diff --git a/src/document.h b/src/document.h index 696e568ad..b849181f9 100644 --- a/src/document.h +++ b/src/document.h @@ -1,8 +1,8 @@ -#ifndef __SP_DOCUMENT_H__ -#define __SP_DOCUMENT_H__ +#ifndef __DOCUMENT_H__ +#define __DOCUMENT_H__ /** \file - * SPDocument: Typed SVG document implementation + * Document: Typed SVG document implementation */ /* Authors: * Lauris Kaplinski @@ -60,10 +60,10 @@ namespace Proj { class TransfMat3x4; } -class SPDocumentPrivate; +class DocumentPrivate; /// Typed SVG document implementation. -struct SPDocument : public Inkscape::GC::Managed<>, +class Document : public Inkscape::GC::Managed<>, public Inkscape::GC::Finalized, public Inkscape::GC::Anchored { @@ -76,8 +76,8 @@ struct SPDocument : public Inkscape::GC::Managed<>, typedef sigc::signal ReconstructionFinish; typedef sigc::signal CommitSignal; - SPDocument(); - virtual ~SPDocument(); + Document(); + virtual ~Document(); unsigned int keepalive : 1; unsigned int virgin : 1; ///< Has the document never been touched? @@ -92,7 +92,7 @@ struct SPDocument : public Inkscape::GC::Managed<>, gchar *base; ///< To be used for resolving relative hrefs. gchar *name; ///< basename(uri) or other human-readable label for the document. - SPDocumentPrivate *priv; + DocumentPrivate *priv; /// Last action key const gchar *actionkey; @@ -148,8 +148,8 @@ sigc::connection connectCommit(CommitSignal::slot_type slot); } private: - SPDocument(SPDocument const &); // no copy - void operator=(SPDocument const &); // no assign + Document(Document const &); // no copy + void operator=(Document const &); // no assign public: sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot); @@ -165,14 +165,14 @@ public: void fitToRect(Geom::Rect const &rect); }; -SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false); -SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive); +Document *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false); +Document *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive); -SPDocument *sp_document_ref(SPDocument *doc); -SPDocument *sp_document_unref(SPDocument *doc); +Document *sp_document_ref(Document *doc); +Document *sp_document_unref(Document *doc); -SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); +Document *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); /* * Access methods @@ -183,14 +183,14 @@ SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, #define sp_document_root(d) (d->root) #define SP_DOCUMENT_ROOT(d) (d->root) -gdouble sp_document_width(SPDocument *document); -gdouble sp_document_height(SPDocument *document); -Geom::Point sp_document_dimensions(SPDocument *document); +gdouble sp_document_width(Document *document); +gdouble sp_document_height(Document *document); +Geom::Point sp_document_dimensions(Document *document); struct SPUnit; -void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit); -void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit); +void sp_document_set_width(Document *document, gdouble width, const SPUnit *unit); +void sp_document_set_height(Document *document, gdouble height, const SPUnit *unit); #define SP_DOCUMENT_URI(d) (d->uri) #define SP_DOCUMENT_NAME(d) (d->name) @@ -204,39 +204,39 @@ void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit * * Undo & redo */ -void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive); -bool sp_document_get_undo_sensitive(SPDocument const *document); +void sp_document_set_undo_sensitive(Document *document, bool sensitive); +bool sp_document_get_undo_sensitive(Document const *document); -void sp_document_clear_undo(SPDocument *document); -void sp_document_clear_redo(SPDocument *document); +void sp_document_clear_undo(Document *document); +void sp_document_clear_redo(Document *document); -void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); -void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); -void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval); -void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent); -void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref); +void sp_document_child_added(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); +void sp_document_child_removed(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); +void sp_document_attr_changed(Document *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval); +void sp_document_content_changed(Document *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent); +void sp_document_order_changed(Document *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref); /* Object modification root handler */ -void sp_document_request_modified(SPDocument *doc); -gint sp_document_ensure_up_to_date(SPDocument *doc); +void sp_document_request_modified(Document *doc); +gint sp_document_ensure_up_to_date(Document *doc); /* Save all previous actions to stack, as one undo step */ -void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description); -void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); +void sp_document_done(Document *document, unsigned int event_type, Glib::ustring event_description); +void sp_document_maybe_done(Document *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base); /* Cancel (and revert) current unsaved actions */ -void sp_document_cancel(SPDocument *document); +void sp_document_cancel(Document *document); /* Undo and redo */ -gboolean sp_document_undo(SPDocument *document); -gboolean sp_document_redo(SPDocument *document); +gboolean sp_document_undo(Document *document); +gboolean sp_document_redo(Document *document); /* Resource management */ -gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object); -gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object); -const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key); -sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot); +gboolean sp_document_add_resource(Document *document, const gchar *key, SPObject *object); +gboolean sp_document_remove_resource(Document *document, const gchar *key, SPObject *object); +const GSList *sp_document_get_resource_list(Document *document, const gchar *key); +sigc::connection sp_document_resources_changed_connect(Document *document, const gchar *key, Document::ResourcesChangedSignal::slot_type slot); /* @@ -257,19 +257,19 @@ sigc::connection sp_document_resources_changed_connect(SPDocument *document, con * Misc */ -GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); -GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); +GSList *sp_document_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box); +GSList *sp_document_partial_items_in_box(Document *document, unsigned int dkey, Geom::Rect const &box); SPItem *sp_document_item_from_list_at_point_bottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const p, bool take_insensitive = false); -SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL); -GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector points); -SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p); +SPItem *sp_document_item_at_point (Document *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL); +GSList *sp_document_items_at_points(Document *document, unsigned const key, std::vector points); +SPItem *sp_document_group_at_point (Document *document, unsigned int key, Geom::Point const p); -void sp_document_set_uri(SPDocument *document, gchar const *uri); -void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri); +void sp_document_set_uri(Document *document, gchar const *uri); +void sp_document_change_uri_and_hrefs(Document *document, gchar const *uri); -void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height); +void sp_document_resized_signal_emit(Document *doc, gdouble width, gdouble height); -unsigned int vacuum_document(SPDocument *document); +unsigned int vacuum_document(Document *document); #endif diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp index fd8f4bb1a..47ef14987 100644 --- a/src/doxygen-main.cpp +++ b/src/doxygen-main.cpp @@ -288,7 +288,7 @@ namespace XML {} * - SPSVGView [\ref svg-view.cpp, \ref svg-view.h] * * SPDesktopWidget [\ref desktop-widget.h] SPSVGSPViewWidget [\ref svg-view.cpp] - * SPDocument [\ref document.cpp, \ref document.h] + * Document [\ref document.cpp, \ref document.h] * * SPDrawAnchor [\ref draw-anchor.cpp, \ref draw-anchor.h] * SPKnot [\ref knot.cpp, \ref knot.h, \ref knot-enums.h] diff --git a/src/draw-context.cpp b/src/draw-context.cpp index d2794f0c2..89c2c454e 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -1,4 +1,4 @@ -#define __SP_DRAW_CONTEXT_C__ +#define __DRAW_CONTEXT_C__ /* * Generic drawing context @@ -664,7 +664,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc) : SP_EVENT_CONTEXT_DESKTOP(dc)->dt2doc() ); SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); if ( c && !c->is_empty() ) { diff --git a/src/event-log.cpp b/src/event-log.cpp index 82de44696..d111c43e1 100644 --- a/src/event-log.cpp +++ b/src/event-log.cpp @@ -19,7 +19,7 @@ namespace Inkscape { -EventLog::EventLog(SPDocument* document) : +EventLog::EventLog(Document* document) : UndoStackObserver(), _connected (false), _document (document), diff --git a/src/event-log.h b/src/event-log.h index 9fcd01e1c..bb17a19a4 100644 --- a/src/event-log.h +++ b/src/event-log.h @@ -44,7 +44,7 @@ public: typedef Gtk::TreeModel::iterator iterator; typedef Gtk::TreeModel::const_iterator const_iterator; - EventLog(SPDocument* document); + EventLog(Document* document); virtual ~EventLog(); /** @@ -115,7 +115,7 @@ public: private: bool _connected; //< connected with dialog - SPDocument *_document; //< document that is logged + Document *_document; //< document that is logged const EventModelColumns _columns; diff --git a/src/file.cpp b/src/file.cpp index 049c1acb4..afca379ca 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1,3 +1,4 @@ + /** @file * @brief File/Print operations */ @@ -65,6 +66,14 @@ #include "uri.h" #include "xml/rebase-hrefs.h" +#include "streams-handles.h" +#include "streams-webdav.h" +#include "streams-ftp.h" +#include "streams-http.h" + +//#include "buffersystem.h" +#include + #ifdef WITH_GNOME_VFS # include #endif @@ -119,7 +128,7 @@ sp_file_new(const Glib::ustring &templ) char *templName = NULL; if (templ.size()>0) templName = (char *)templ.c_str(); - SPDocument *doc = sp_document_new(templName, TRUE, true); + Document *doc = sp_document_new(templName, TRUE, true); g_return_val_if_fail(doc != NULL, NULL); SPDesktop *dt; @@ -201,7 +210,7 @@ sp_file_open(const Glib::ustring &uri, if (desktop) desktop->setWaitingCursor(); - SPDocument *doc = NULL; + Document *doc = NULL; try { doc = Inkscape::Extension::open(key, uri.c_str()); } catch (Inkscape::Extension::Input::no_extension_found &e) { @@ -214,7 +223,7 @@ sp_file_open(const Glib::ustring &uri, desktop->clearWaitingCursor(); if (doc) { - SPDocument *existing = desktop ? sp_desktop_document(desktop) : NULL; + Document *existing = desktop ? sp_desktop_document(desktop) : NULL; if (existing && existing->virgin && replace_empty) { // If the current desktop is empty, open the document there @@ -254,6 +263,137 @@ sp_file_open(const Glib::ustring &uri, } } + + + +//NOTE1 +bool +sp_file_open_uri(const Inkscape::URI &uri, + Inkscape::Extension::Extension *key, + bool add_to_recent, bool replace_empty) +{ + Document *doc = NULL; + try { + doc = Inkscape::Extension::open(key, uri.toNativeFilename()); + } catch (Inkscape::Extension::Input::no_extension_found &e) { + doc = NULL; + } catch (Inkscape::Extension::Input::open_failed &e) { + doc = NULL; + } + + //FIXME1 KLUDGE switch + + //WebDAV + /* + if (std::strstr(uri.toString(), "http") != NULL) + { + if (strcmp(uri.toString(), "/http") >= 5//FIXME3 skip begining '/' + || + strcmp(uri.toString(), "http") >= 4 + ) + { + + std::cout<<"+++ 'http' uri.toString->"< FTP , HTTP etc."<= 4//FIXME3 skip begining '/' + || + strcmp(uri.toString(), "ftp") >= 3 + ) + { + std::cout<<"+++ 'ftp' uri.toString->"<> buf; + std::cout<<"buf->"<= 5//FIXME3 skip begining '/' + || + strcmp(uri.toString(), "http") >= 4 + ) + { + std::cout<<"+++ 'http' uri.toString->"<> buf; + std::cout<<"buf->"<virgin && replace_empty) { + // If the current desktop is empty, open the document there + sp_document_ensure_up_to_date (doc); + desktop->change_document(doc); + sp_document_resized_signal_emit (doc, sp_document_width(doc), sp_document_height(doc)); + } else { + if (!Inkscape::NSApplication::Application::getNewGui()) { + // create a whole new desktop and window + SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); + sp_create_window(dtw, TRUE); + desktop = static_cast(dtw->view); + } else { + desktop = Inkscape::NSApplication::Editor::createDesktop (doc); + } + } + + doc->virgin = FALSE; + // everyone who cares now has a reference, get rid of ours + sp_document_unref(doc); + // resize the window to match the document properties + sp_namedview_window_from_document(desktop); + sp_namedview_update_layers_from_document(desktop); + + if (add_to_recent) { +//--tullarisc prefs_set_recent_file(SP_DOCUMENT_URI(doc), SP_DOCUMENT_NAME(doc)); + } + + return TRUE; + } else { + //FIXME 1 + //gchar *safeUri = Inkscape::IO::sanitizeString(uri.toNativeFilename()); + //gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), safeUri); + //sp_ui_error_dialog(text); + //g_free(text); + //g_free(safeUri); + return FALSE; + } +} + + /** * Handle prompting user for "do you want to revert"? Revert on "OK" */ @@ -263,7 +403,7 @@ sp_file_revert_dialog() SPDesktop *desktop = SP_ACTIVE_DESKTOP; g_assert(desktop != NULL); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); g_assert(doc != NULL); Inkscape::XML::Node *repr = sp_document_repr_root(doc); @@ -397,6 +537,7 @@ void dump_ustr(Glib::ustring const &ustr) /** * Display an file Open selector. Open a document if OK is pressed. * Can select single or multiple files for opening. + * NOTE1 */ void sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*data*/) @@ -521,7 +662,7 @@ sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d open_path.append(G_DIR_SEPARATOR_S); prefs->setString("/dialogs/open/path", open_path); - sp_file_open(fileName, selection); + sp_file_open_uri(Inkscape::URI(fileName.c_str()), selection); } return; @@ -540,7 +681,7 @@ sp_file_open_dialog(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d void sp_file_vacuum() { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; unsigned int diff = vacuum_document (doc); @@ -572,7 +713,7 @@ sp_file_vacuum() * document; is true for normal save, false for temporary saves */ static bool -file_save(Gtk::Window &parentWindow, SPDocument *doc, const Glib::ustring &uri, +file_save(Gtk::Window &parentWindow, Document *doc, const Glib::ustring &uri, Inkscape::Extension::Extension *key, bool saveas, bool official) { if (!doc || uri.size()<1) //Safety check @@ -614,7 +755,7 @@ file_save(Gtk::Window &parentWindow, SPDocument *doc, const Glib::ustring &uri, * Used only for remote saving using VFS and a specific uri. Gets the file at the /tmp. */ bool -file_save_remote(SPDocument */*doc*/, +file_save_remote(Document */*doc*/, #ifdef WITH_GNOME_VFS const Glib::ustring &uri, #else @@ -702,7 +843,7 @@ file_save_remote(SPDocument */*doc*/, * \param ascopy (optional) wether to set the documents->uri to the new filename or not */ bool -sp_file_save_dialog(Gtk::Window &parentWindow, SPDocument *doc, bool is_copy) +sp_file_save_dialog(Gtk::Window &parentWindow, Document *doc, bool is_copy) { Inkscape::XML::Node *repr = sp_document_repr_root(doc); @@ -837,7 +978,7 @@ sp_file_save_dialog(Gtk::Window &parentWindow, SPDocument *doc, bool is_copy) * Save a document, displaying a SaveAs dialog if necessary. */ bool -sp_file_save_document(Gtk::Window &parentWindow, SPDocument *doc) +sp_file_save_document(Gtk::Window &parentWindow, Document *doc) { bool success = true; @@ -913,13 +1054,13 @@ sp_file_save_a_copy(Gtk::Window &parentWindow, gpointer /*object*/, gpointer /*d * Import a resource. Called by sp_file_import() */ void -file_import(SPDocument *in_doc, const Glib::ustring &uri, +file_import(Document *in_doc, const Glib::ustring &uri, Inkscape::Extension::Extension *key) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; //DEBUG_MESSAGE( fileImport, "file_import( in_doc:%p uri:[%s], key:%p", in_doc, uri, key ); - SPDocument *doc; + Document *doc; try { doc = Inkscape::Extension::open(key, uri.c_str()); } catch (Inkscape::Extension::Input::no_extension_found &e) { @@ -1050,7 +1191,7 @@ sp_file_import(Gtk::Window &parentWindow) { static Glib::ustring import_path; - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (!doc) return; @@ -1133,7 +1274,7 @@ bool sp_file_export_dialog(void *widget) { //# temp hack for 'doc' until we can switch to this dialog - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; Glib::ustring export_path; Glib::ustring export_loc; @@ -1269,7 +1410,7 @@ sp_file_export_to_ocal_dialog(Gtk::Window &parentWindow) if (!SP_ACTIVE_DOCUMENT) return false; - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; Glib::ustring export_path; Glib::ustring export_loc; @@ -1427,7 +1568,7 @@ sp_file_import_from_ocal(Gtk::Window &parentWindow) { static Glib::ustring import_path; - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (!doc) return; @@ -1485,7 +1626,7 @@ sp_file_import_from_ocal(Gtk::Window &parentWindow) void sp_file_print(Gtk::Window& parentWindow) { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (doc) sp_print_document(parentWindow, doc); } @@ -1498,7 +1639,7 @@ void sp_file_print_preview(gpointer /*object*/, gpointer /*data*/) { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (doc) sp_print_preview_document(doc); diff --git a/src/file.h b/src/file.h index ce75a61a7..2eaace640 100644 --- a/src/file.h +++ b/src/file.h @@ -21,8 +21,15 @@ #include "extension/extension-forward.h" +#include +#include +#include + +#include "uri.h" +#include "streams-webdav.h" + struct SPDesktop; -struct SPDocument; +struct Document; namespace Inkscape { namespace Extension { @@ -64,6 +71,17 @@ bool sp_file_open( bool replace_empty = true ); +//NOTE1 +/* + * Opens a new file and window from the given URI (class) + */ +bool sp_file_open_uri( + const Inkscape::URI &uri, + Inkscape::Extension::Extension *key, + bool add_to_recent = true, + bool replace_empty = true + ); + /** * Displays a file open dialog. Calls sp_file_open on * an OK. @@ -83,7 +101,7 @@ void sp_file_revert_dialog (); * Added to make only the remote savings. */ -bool file_save_remote(SPDocument *doc, const Glib::ustring &uri, +bool file_save_remote(Document *doc, const Glib::ustring &uri, Inkscape::Extension::Extension *key, bool saveas, bool official); /** @@ -108,10 +126,10 @@ bool sp_file_save_a_copy (Gtk::Window &parentWindow, gpointer object, gpointer d * Saves the given document. Displays a file select dialog * if needed. */ -bool sp_file_save_document (Gtk::Window &parentWindow, SPDocument *document); +bool sp_file_save_document (Gtk::Window &parentWindow, Document *document); /* Do the saveas dialog with a document as the parameter */ -bool sp_file_save_dialog (Gtk::Window &parentWindow, SPDocument *doc, bool bAsCopy = FALSE); +bool sp_file_save_dialog (Gtk::Window &parentWindow, Document *doc, bool bAsCopy = FALSE); /*###################### @@ -127,7 +145,7 @@ void sp_file_import (Gtk::Window &parentWindow); /** * Imports a resource */ -void file_import(SPDocument *in_doc, const Glib::ustring &uri, +void file_import(Document *in_doc, const Glib::ustring &uri, Inkscape::Extension::Extension *key); /*###################### @@ -199,6 +217,15 @@ void sp_file_vacuum (); #endif +//namespace Inkscape { +//namespace Net { + + + +//} +//} +// #endif + /* Local Variables: mode:c++ diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 363663ac3..d40347889 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -88,7 +88,7 @@ static void set_filter_area(Inkscape::XML::Node *repr, gdouble radius, } } -SPFilter *new_filter(SPDocument *document) +SPFilter *new_filter(Document *document) { g_return_val_if_fail(document != NULL, NULL); @@ -184,7 +184,7 @@ filter_add_primitive(SPFilter *filter, const Inkscape::Filters::FilterPrimitiveT * Creates a filter with blur primitive of specified radius for an item with the given matrix expansion, width and height */ SPFilter * -new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion, double expansionX, double expansionY, double width, double height) +new_filter_gaussian_blur (Document *document, gdouble radius, double expansion, double expansionX, double expansionY, double width, double height) { g_return_val_if_fail(document != NULL, NULL); @@ -238,7 +238,7 @@ new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion * an item with the given matrix expansion, width and height */ SPFilter * -new_filter_blend_gaussian_blur (SPDocument *document, const char *blendmode, gdouble radius, double expansion, +new_filter_blend_gaussian_blur (Document *document, const char *blendmode, gdouble radius, double expansion, double expansionX, double expansionY, double width, double height) { g_return_val_if_fail(document != NULL, NULL); @@ -317,7 +317,7 @@ new_filter_blend_gaussian_blur (SPDocument *document, const char *blendmode, gdo * specified mode and radius, respectively */ SPFilter * -new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, gdouble radius) +new_filter_simple_from_item (Document *document, SPItem *item, const char *mode, gdouble radius) { Geom::OptRect const r = sp_item_bbox_desktop(item, SPItem::GEOMETRIC_BBOX); @@ -345,7 +345,7 @@ new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mod */ /* TODO: this should be made more generic, not just for blurs */ SPFilter * -modify_filter_gaussian_blur_from_item(SPDocument *document, SPItem *item, +modify_filter_gaussian_blur_from_item(Document *document, SPItem *item, gdouble radius) { if (!item->style || !item->style->filter.set) { diff --git a/src/filter-chemistry.h b/src/filter-chemistry.h index 1b18ec11a..ee249d6f2 100644 --- a/src/filter-chemistry.h +++ b/src/filter-chemistry.h @@ -18,10 +18,10 @@ #include "sp-filter.h" SPFilterPrimitive *filter_add_primitive(SPFilter *filter, Inkscape::Filters::FilterPrimitiveType); -SPFilter *new_filter (SPDocument *document); -SPFilter *new_filter_gaussian_blur (SPDocument *document, gdouble stdDeviation, double expansion, double expansionX, double expansionY, double width, double height); -SPFilter *new_filter_simple_from_item (SPDocument *document, SPItem *item, const char *mode, gdouble stdDeviation); -SPFilter *modify_filter_gaussian_blur_from_item (SPDocument *document, SPItem *item, gdouble stdDeviation); +SPFilter *new_filter (Document *document); +SPFilter *new_filter_gaussian_blur (Document *document, gdouble stdDeviation, double expansion, double expansionX, double expansionY, double width, double height); +SPFilter *new_filter_simple_from_item (Document *document, SPItem *item, const char *mode, gdouble stdDeviation); +SPFilter *modify_filter_gaussian_blur_from_item (Document *document, SPItem *item, gdouble stdDeviation); void remove_filter (SPObject *item, bool recursive); void remove_filter_gaussian_blur (SPObject *item); bool filter_is_single_gaussian_blur(SPFilter *filter); diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 7b6223384..9855c42f1 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -394,7 +394,7 @@ inline static bool check_if_pixel_is_paintable(guchar *px, unsigned char *trace_ * \param union_with_selection If true, merge the final SVG path with the current selection. */ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *desktop, Geom::Matrix transform, unsigned int min_x, unsigned int max_x, unsigned int min_y, unsigned int max_y, bool union_with_selection) { - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); unsigned char *trace_t; @@ -770,7 +770,7 @@ static bool sort_fill_queue_horizontal(Geom::Point a, Geom::Point b) { */ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *event, bool union_with_selection, bool is_point_fill, bool is_touch_fill) { SPDesktop *desktop = event_context->desktop; - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); /* Create new arena */ NRArena *arena = NRArena::create(); diff --git a/src/forward.h b/src/forward.h index d4a98fbff..852934e96 100644 --- a/src/forward.h +++ b/src/forward.h @@ -43,11 +43,11 @@ GType sp_event_context_get_type (); /* Document tree */ -class SPDocument; +class Document; class SPDocumentClass; #define SP_TYPE_DOCUMENT (sp_document_get_type ()) -#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, SPDocument)) +#define SP_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_DOCUMENT, Document)) #define SP_IS_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_DOCUMENT)) GType sp_document_get_type (); diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 4abd7483f..85e4e2c55 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -92,7 +92,7 @@ sp_gradient_ensure_vector_normalized(SPGradient *gr) */ static SPGradient * -sp_gradient_get_private_normalized(SPDocument *document, SPGradient *vector, SPGradientType type) +sp_gradient_get_private_normalized(Document *document, SPGradient *vector, SPGradientType type) { g_return_val_if_fail(document != NULL, NULL); g_return_val_if_fail(vector != NULL, NULL); @@ -199,7 +199,7 @@ sp_gradient_fork_private_if_necessary(SPGradient *gr, SPGradient *vector, return gr; } - SPDocument *doc = SP_OBJECT_DOCUMENT(gr); + Document *doc = SP_OBJECT_DOCUMENT(gr); SPObject *defs = SP_DOCUMENT_DEFS(doc); if ((gr->has_stops) || @@ -245,7 +245,7 @@ sp_gradient_fork_vector_if_necessary (SPGradient *gr) return gr; if (SP_OBJECT_HREFCOUNT(gr) > 1) { - SPDocument *doc = SP_OBJECT_DOCUMENT(gr); + Document *doc = SP_OBJECT_DOCUMENT(gr); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *repr = SP_OBJECT_REPR (gr)->duplicate(xml_doc); @@ -1210,7 +1210,7 @@ sp_gradient_repr_set_link(Inkscape::XML::Node *repr, SPGradient *link) */ SPGradient * -sp_document_default_gradient_vector(SPDocument *document, guint32 color) +sp_document_default_gradient_vector(Document *document, guint32 color) { SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); @@ -1271,7 +1271,7 @@ Return the preferred vector for \a o, made from (in order of preference) its cur current fill or stroke color, or from desktop style if \a o is NULL or doesn't have style. */ SPGradient * -sp_gradient_vector_for_object(SPDocument *const doc, SPDesktop *const desktop, +sp_gradient_vector_for_object(Document *const doc, SPDesktop *const desktop, SPObject *const o, bool const is_fill) { guint32 rgba = 0; diff --git a/src/gradient-chemistry.h b/src/gradient-chemistry.h index 73b9893bc..94351d483 100644 --- a/src/gradient-chemistry.h +++ b/src/gradient-chemistry.h @@ -41,8 +41,8 @@ SPGradient *sp_item_set_gradient (SPItem *item, SPGradient *gr, SPGradientType t * Get default normalized gradient vector of document, create if there is none */ -SPGradient *sp_document_default_gradient_vector (SPDocument *document, guint32 color = 0); -SPGradient *sp_gradient_vector_for_object (SPDocument *doc, SPDesktop *desktop, SPObject *o, bool is_fill); +SPGradient *sp_document_default_gradient_vector (Document *document, guint32 color = 0); +SPGradient *sp_gradient_vector_for_object (Document *doc, SPDesktop *desktop, SPObject *o, bool is_fill); void sp_object_ensure_fill_gradient_normalized (SPObject *object); void sp_object_ensure_stroke_gradient_normalized (SPObject *object); diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index fc5c1af44..64a836b8f 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -346,7 +346,7 @@ sp_gradient_context_get_stop_intervals (GrDrag *drag, GSList **these_stops, GSLi static void sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc) { - SPDocument *doc = NULL; + Document *doc = NULL; GrDrag *drag = rc->_grdrag; GSList *these_stops = NULL; @@ -403,7 +403,7 @@ double sqr(double x) {return x*x;} static void sp_gradient_simplify(SPGradientContext *rc, double tolerance) { - SPDocument *doc = NULL; + Document *doc = NULL; GrDrag *drag = rc->_grdrag; GSList *these_stops = NULL; @@ -861,7 +861,7 @@ static void sp_gradient_drag(SPGradientContext &rc, Geom::Point const pt, guint { SPDesktop *desktop = SP_EVENT_CONTEXT(&rc)->desktop; Inkscape::Selection *selection = sp_desktop_selection(desktop); - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); SPEventContext *ec = SP_EVENT_CONTEXT(&rc); if (!selection->isEmpty()) { diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index c16ed2456..65f310e6a 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -1914,7 +1914,7 @@ GrDrag::deleteSelected (bool just_one) { if (!selected) return; - SPDocument *document = false; + Document *document = false; struct StructStopInfo { SPStop * spstop; diff --git a/src/id-clash.cpp b/src/id-clash.cpp index b215576a4..e739c4e4c 100644 --- a/src/id-clash.cpp +++ b/src/id-clash.cpp @@ -177,7 +177,7 @@ find_references(SPObject *elem, refmap_type *refmap) * a list of those changes that will require fixing up references. */ static void -change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc, +change_clashing_ids(Document *imported_doc, Document *current_doc, SPObject *elem, const refmap_type *refmap, id_changelist_type *id_changes) { @@ -259,7 +259,7 @@ fix_up_refs(const refmap_type *refmap, const id_changelist_type &id_changes) * those IDs are updated accordingly. */ void -prevent_id_clashes(SPDocument *imported_doc, SPDocument *current_doc) +prevent_id_clashes(Document *imported_doc, Document *current_doc) { refmap_type *refmap = new refmap_type; id_changelist_type id_changes; diff --git a/src/id-clash.h b/src/id-clash.h index 418642738..1abd1dd83 100644 --- a/src/id-clash.h +++ b/src/id-clash.h @@ -3,7 +3,7 @@ #include "document.h" -void prevent_id_clashes(SPDocument *imported_doc, SPDocument *current_doc); +void prevent_id_clashes(Document *imported_doc, Document *current_doc); #endif /* !SEEN_ID_CLASH_H */ diff --git a/src/inkscape-private.h b/src/inkscape-private.h index cb7f98729..001d1201a 100644 --- a/src/inkscape-private.h +++ b/src/inkscape-private.h @@ -47,8 +47,8 @@ void inkscape_add_desktop (SPDesktop * desktop); void inkscape_remove_desktop (SPDesktop * desktop); void inkscape_activate_desktop (SPDesktop * desktop); void inkscape_reactivate_desktop (SPDesktop * desktop); -void inkscape_add_document (SPDocument *document); -bool inkscape_remove_document (SPDocument *document); +void inkscape_add_document (Document *document); +bool inkscape_remove_document (Document *document); void inkscape_set_color (SPColor *color, float opacity); diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 60ab895ed..c2c45d3bb 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -105,7 +105,7 @@ static void inkscape_deactivate_desktop_private (Inkscape::Application *inkscape struct Inkscape::Application { GObject object; Inkscape::XML::Document *menus; - std::map document_set; + std::map document_set; GSList *desktops; gchar *argv0; gboolean dialogs_toggle; @@ -126,7 +126,7 @@ struct Inkscape::ApplicationClass { void (* set_eventcontext) (Inkscape::Application * inkscape, SPEventContext * eventcontext); void (* activate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop); void (* deactivate_desktop) (Inkscape::Application * inkscape, SPDesktop * desktop); - void (* destroy_document) (Inkscape::Application *inkscape, SPDocument *doc); + void (* destroy_document) (Inkscape::Application *inkscape, Document *doc); void (* color_set) (Inkscape::Application *inkscape, SPColor *color, double opacity); void (* shut_down) (Inkscape::Application *inkscape); void (* dialogs_hide) (Inkscape::Application *inkscape); @@ -326,11 +326,11 @@ static gint inkscape_autosave(gpointer) gint docnum = 0; SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Autosaving documents...")); - for (std::map::iterator iter = inkscape->document_set.begin(); + for (std::map::iterator iter = inkscape->document_set.begin(); iter != inkscape->document_set.end(); ++iter) { - SPDocument *doc = iter->first; + Document *doc = iter->first; ++docnum; @@ -463,7 +463,7 @@ inkscape_init (SPObject * object) g_assert_not_reached (); } - new (&inkscape->document_set) std::map(); + new (&inkscape->document_set) std::map(); inkscape->menus = sp_repr_read_mem (_(menus_skeleton), MENUS_SKELETON_SIZE, NULL); inkscape->desktops = NULL; @@ -597,10 +597,10 @@ inkscape_crash_handler (int /*signum*/) gint count = 0; GSList *savednames = NULL; GSList *failednames = NULL; - for (std::map::iterator iter = inkscape->document_set.begin(); + for (std::map::iterator iter = inkscape->document_set.begin(); iter != inkscape->document_set.end(); ++iter) { - SPDocument *doc = iter->first; + Document *doc = iter->first; Inkscape::XML::Node *repr; repr = sp_document_repr_root (doc); if (doc->isModifiedSinceSave()) { @@ -1219,7 +1219,7 @@ inkscape_external_change () * fixme: These need probably signals too */ void -inkscape_add_document (SPDocument *document) +inkscape_add_document (Document *document) { g_return_if_fail (document != NULL); @@ -1228,7 +1228,7 @@ inkscape_add_document (SPDocument *document) // try to insert the pair into the list if (!(inkscape->document_set.insert(std::make_pair(document, 1)).second)) { //insert failed, this key (document) is already in the list - for (std::map::iterator iter = inkscape->document_set.begin(); + for (std::map::iterator iter = inkscape->document_set.begin(); iter != inkscape->document_set.end(); ++iter) { if (iter->first == document) { @@ -1247,13 +1247,13 @@ inkscape_add_document (SPDocument *document) // returns true if this was last reference to this document, so you can delete it bool -inkscape_remove_document (SPDocument *document) +inkscape_remove_document (Document *document) { g_return_val_if_fail (document != NULL, false); if (!Inkscape::NSApplication::Application::getNewGui()) { - for (std::map::iterator iter = inkscape->document_set.begin(); + for (std::map::iterator iter = inkscape->document_set.begin(); iter != inkscape->document_set.end(); ++iter) { if (iter->first == document) { @@ -1290,7 +1290,7 @@ inkscape_active_desktop (void) return (SPDesktop *) inkscape->desktops->data; } -SPDocument * +Document * inkscape_active_document (void) { if (Inkscape::NSApplication::Application::getNewGui()) @@ -1304,13 +1304,13 @@ inkscape_active_document (void) } bool inkscape_is_sole_desktop_for_document(SPDesktop const &desktop) { - SPDocument const* document = desktop.doc(); + Document const* document = desktop.doc(); if (!document) { return false; } for ( GSList *iter = inkscape->desktops ; iter ; iter = iter->next ) { SPDesktop *other_desktop=(SPDesktop *)iter->data; - SPDocument *other_document=other_desktop->doc(); + Document *other_document=other_desktop->doc(); if ( other_document == document && other_desktop != &desktop ) { return false; } diff --git a/src/inkscape.h b/src/inkscape.h index ca2894227..e611af49b 100644 --- a/src/inkscape.h +++ b/src/inkscape.h @@ -16,7 +16,7 @@ #include struct SPDesktop; -struct SPDocument; +struct Document; struct SPEventContext; namespace Inkscape { @@ -46,7 +46,7 @@ Inkscape::Application *inkscape_get_instance(); SPEventContext * inkscape_active_event_context (void); #define SP_ACTIVE_DOCUMENT inkscape_active_document () -SPDocument * inkscape_active_document (void); +Document * inkscape_active_document (void); #define SP_ACTIVE_DESKTOP inkscape_active_desktop () SPDesktop * inkscape_active_desktop (void); diff --git a/src/inkview.cpp b/src/inkview.cpp index 5cfde2c81..0278d3029 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -84,7 +84,7 @@ struct SPSlideShow { int size; int length; int current; - SPDocument *doc; + Document *doc; GtkWidget *view; GtkWidget *window; bool fullscreen; @@ -441,7 +441,7 @@ sp_svgview_normal_cursor(struct SPSlideShow *ss) } static void -sp_svgview_set_document(struct SPSlideShow *ss, SPDocument *doc, int current) +sp_svgview_set_document(struct SPSlideShow *ss, Document *doc, int current) { if (doc && doc != ss->doc) { sp_document_ensure_up_to_date (doc); @@ -459,7 +459,7 @@ sp_svgview_show_next (struct SPSlideShow *ss) { sp_svgview_waiting_cursor(ss); - SPDocument *doc = NULL; + Document *doc = NULL; int current = ss->current; while (!doc && (current < ss->length - 1)) { doc = sp_document_new (ss->slides[++current], TRUE, false); @@ -475,7 +475,7 @@ sp_svgview_show_prev (struct SPSlideShow *ss) { sp_svgview_waiting_cursor(ss); - SPDocument *doc = NULL; + Document *doc = NULL; int current = ss->current; while (!doc && (current > 0)) { doc = sp_document_new (ss->slides[--current], TRUE, false); @@ -491,7 +491,7 @@ sp_svgview_goto_first (struct SPSlideShow *ss) { sp_svgview_waiting_cursor(ss); - SPDocument *doc = NULL; + Document *doc = NULL; int current = 0; while ( !doc && (current < ss->length - 1)) { if (current == ss->current) @@ -509,7 +509,7 @@ sp_svgview_goto_last (struct SPSlideShow *ss) { sp_svgview_waiting_cursor(ss); - SPDocument *doc = NULL; + Document *doc = NULL; int current = ss->length - 1; while (!doc && (current >= 0)) { if (current == ss->current) @@ -555,8 +555,8 @@ static void usage() Inkscape::Application *inkscape_get_instance() { return NULL; } void inkscape_ref (void) {} void inkscape_unref (void) {} -void inkscape_add_document (SPDocument *document) {} -void inkscape_remove_document (SPDocument *document) {} +void inkscape_add_document (Document *document) {} +void inkscape_remove_document (Document *document) {} #endif diff --git a/src/interface.cpp b/src/interface.cpp index cf7072064..475ecdf16 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -271,7 +271,7 @@ sp_create_window(SPViewWidget *vw, gboolean editable) void sp_ui_new_view() { - SPDocument *document; + Document *document; SPViewWidget *dtw; document = SP_ACTIVE_DOCUMENT; @@ -290,7 +290,7 @@ sp_ui_new_view() void sp_ui_new_view_preview() { - SPDocument *document; + Document *document; SPViewWidget *dtw; document = SP_ACTIVE_DOCUMENT; @@ -1125,7 +1125,7 @@ sp_ui_drag_data_received(GtkWidget *widget, guint /*event_time*/, gpointer /*user_data*/) { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; SPDesktop *desktop = SP_ACTIVE_DESKTOP; switch (info) { @@ -1508,7 +1508,7 @@ void sp_ui_drag_motion( GtkWidget */*widget*/, guint /*event_time*/, gpointer /*user_data*/) { -// SPDocument *doc = SP_ACTIVE_DOCUMENT; +// Document *doc = SP_ACTIVE_DOCUMENT; // SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -1546,7 +1546,7 @@ sp_ui_import_one_file_with_check(gpointer filename, gpointer /*unused*/) static void sp_ui_import_one_file(char const *filename) { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (!doc) return; if (filename == NULL) return; diff --git a/src/jabber_whiteboard/node-tracker.h b/src/jabber_whiteboard/node-tracker.h index 66814c5ca..01087d04e 100644 --- a/src/jabber_whiteboard/node-tracker.h +++ b/src/jabber_whiteboard/node-tracker.h @@ -168,7 +168,7 @@ public: const Glib::ustring &name); /** - * Returns whether or not the given node is the root node of the SPDocument associated + * Returns whether or not the given node is the root node of the Document associated * with an XMLNodeTracker's SessionManager. * * \param Reference to an XML::Node to test. diff --git a/src/jabber_whiteboard/session-manager.h b/src/jabber_whiteboard/session-manager.h index 53cc8f5b4..48e912265 100644 --- a/src/jabber_whiteboard/session-manager.h +++ b/src/jabber_whiteboard/session-manager.h @@ -26,7 +26,7 @@ #include "gc-alloc.h" -class SPDocument; +class Document; class SPDesktop; @@ -118,10 +118,10 @@ private: }; -SPDocument* makeInkboardDocument(int code, gchar const* rootname, +Document* makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, Glib::ustring const& to); -SPDesktop* makeInkboardDesktop(SPDocument* doc); +SPDesktop* makeInkboardDesktop(Document* doc); } // namespace Whiteboard diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp index 75bb89bcf..2431b0758 100644 --- a/src/layer-fns.cpp +++ b/src/layer-fns.cpp @@ -165,7 +165,7 @@ SPObject *previous_layer(SPObject *root, SPObject *layer) { * \pre \a root should be either \a layer or an ancestor of it */ SPObject *create_layer(SPObject *root, SPObject *layer, LayerRelativePosition position) { - SPDocument *document=SP_OBJECT_DOCUMENT(root); + Document *document=SP_OBJECT_DOCUMENT(root); static int layer_suffix=1; gchar *id=NULL; diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp index 8c45c7e53..fe0d41904 100644 --- a/src/layer-manager.cpp +++ b/src/layer-manager.cpp @@ -126,12 +126,12 @@ LayerManager::LayerManager(SPDesktop *desktop) { _layer_connection = desktop->connectCurrentLayerChanged( sigc::mem_fun(*this, &LayerManager::_selectedLayerChanged) ); - sigc::bound_mem_functor1 first = sigc::mem_fun(*this, &LayerManager::_setDocument); + sigc::bound_mem_functor1 first = sigc::mem_fun(*this, &LayerManager::_setDocument); // This next line has problems on gcc 4.0.2 - sigc::slot base2 = first; + sigc::slot base2 = first; - sigc::slot slot2 = sigc::hide<0>( base2 ); + sigc::slot slot2 = sigc::hide<0>( base2 ); _document_connection = desktop->connectDocumentReplaced( slot2 ); _setDocument(desktop->doc()); @@ -211,7 +211,7 @@ void LayerManager::renameLayer( SPObject* obj, gchar const *label, bool uniquify -void LayerManager::_setDocument(SPDocument *document) { +void LayerManager::_setDocument(Document *document) { if (_document) { _resource_connection.disconnect(); } diff --git a/src/layer-manager.h b/src/layer-manager.h index 81f75e002..bbd5ccafb 100644 --- a/src/layer-manager.h +++ b/src/layer-manager.h @@ -17,7 +17,7 @@ #include class SPDesktop; -class SPDocument; +class Document; namespace Inkscape { @@ -44,7 +44,7 @@ private: class LayerWatcher; void _objectModified( SPObject* obj, guint flags ); - void _setDocument(SPDocument *document); + void _setDocument(Document *document); void _rebuild(); void _selectedLayerChanged(SPObject *layer); @@ -53,7 +53,7 @@ private: sigc::connection _resource_connection; GC::soft_ptr _desktop; - SPDocument *_document; + Document *_document; std::vector _watchers; diff --git a/src/livarot/LivarotDefs.h b/src/livarot/LivarotDefs.h index 49f954586..c34559a29 100644 --- a/src/livarot/LivarotDefs.h +++ b/src/livarot/LivarotDefs.h @@ -20,9 +20,9 @@ #ifdef HAVE_INTTYPES_H # include #else -# ifdef HAVE_STDINT_H +//--tullarisc # ifdef HAVE_STDINT_H # include -# endif +//# endif #endif // error codes (mostly obsolete) diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index 6f195b176..461073c3f 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -23,7 +23,7 @@ #define LPE_CONVERSION_TOLERANCE 0.01 // FIXME: find good solution for this. -struct SPDocument; +struct Document; struct SPDesktop; struct SPItem; class SPNodeContext; @@ -56,8 +56,8 @@ enum LPEPathFlashType { class Effect { public: static Effect* New(EffectType lpenr, LivePathEffectObject *lpeobj); - static void createAndApply(const char* name, SPDocument *doc, SPItem *item); - static void createAndApply(EffectType type, SPDocument *doc, SPItem *item); + static void createAndApply(const char* name, Document *doc, SPItem *item); + static void createAndApply(EffectType type, Document *doc, SPItem *item); virtual ~Effect(); @@ -111,7 +111,7 @@ public: Glib::ustring getName(); Inkscape::XML::Node * getRepr(); - SPDocument * getSPDoc(); + Document * getSPDoc(); LivePathEffectObject * getLPEObj() {return lpeobj;}; Parameter * getParameter(const char * key); diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index be465e324..5f7cb0277 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -422,7 +422,7 @@ lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::Effe } void -lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B) { +lpetool_get_limiting_bbox_corners(Document *document, Geom::Point &A, Geom::Point &B) { Geom::Coord w = sp_document_width(document); Geom::Coord h = sp_document_height(document); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -452,7 +452,7 @@ lpetool_context_reset_limiting_bbox(SPLPEToolContext *lc) if (!prefs->getBool("/tools/lpetool/show_bbox", true)) return; - SPDocument *document = sp_desktop_document(lc->desktop); + Document *document = sp_desktop_document(lc->desktop); Geom::Point A, B; lpetool_get_limiting_bbox_corners(document, A, B); diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h index 8a52ba97c..f710e9321 100644 --- a/src/lpe-tool-context.h +++ b/src/lpe-tool-context.h @@ -67,7 +67,7 @@ int lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const type); int lpetool_item_has_construction(SPLPEToolContext *lc, SPItem *item); bool lpetool_try_construction(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type); void lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::EffectType const type); -void lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B); +void lpetool_get_limiting_bbox_corners(Document *document, Geom::Point &A, Geom::Point &B); void lpetool_context_reset_limiting_bbox(SPLPEToolContext *lc); void lpetool_create_measuring_items(SPLPEToolContext *lc, Inkscape::Selection *selection = NULL); void lpetool_delete_measuring_items(SPLPEToolContext *lc); diff --git a/src/main-cmdlineact.cpp b/src/main-cmdlineact.cpp index dc59e1a93..6ab192095 100644 --- a/src/main-cmdlineact.cpp +++ b/src/main-cmdlineact.cpp @@ -55,7 +55,7 @@ CmdLineAction::doIt (Inkscape::UI::View::View * view) { SPDesktop * desktop = dynamic_cast(view); if (desktop == NULL) { return; } - SPDocument * doc = view->doc(); + Document * doc = view->doc(); SPObject * obj = doc->getObjectById(_arg); if (obj == NULL) { printf(_("Unable to find node ID: '%s'\n"), _arg); diff --git a/src/main.cpp b/src/main.cpp index 9c33688ed..64fcb664d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -165,13 +165,13 @@ enum { int sp_main_gui(int argc, char const **argv); int sp_main_console(int argc, char const **argv); -static void sp_do_export_png(SPDocument *doc); -static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const *mime); +static void sp_do_export_png(Document *doc); +static void do_export_ps_pdf(Document* doc, gchar const* uri, char const *mime); #ifdef WIN32 -static void do_export_emf(SPDocument* doc, gchar const* uri, char const *mime); +static void do_export_emf(Document* doc, gchar const* uri, char const *mime); #endif //WIN32 -static void do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const axis, const gchar *id); -static void do_query_all (SPDocument *doc); +static void do_query_dimension (Document *doc, bool extent, Geom::Dim2 const axis, const gchar *id); +static void do_query_all (Document *doc); static void do_query_all_recurse (SPObject *o); static gchar *sp_global_printer = NULL; @@ -962,7 +962,7 @@ void sp_process_file_list(GSList *fl) { while (fl) { const gchar *filename = (gchar *)fl->data; - SPDocument *doc = Inkscape::Extension::open(NULL, filename); + Document *doc = Inkscape::Extension::open(NULL, filename); if (doc == NULL) { doc = Inkscape::Extension::open(Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG), filename); } @@ -1127,7 +1127,7 @@ int sp_main_console(int argc, char const **argv) } static void -do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const axis, const gchar *id) +do_query_dimension (Document *doc, bool extent, Geom::Dim2 const axis, const gchar *id) { SPObject *o = NULL; @@ -1167,7 +1167,7 @@ do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const axis, const g } static void -do_query_all (SPDocument *doc) +do_query_all (Document *doc) { SPObject *o = NULL; @@ -1205,7 +1205,7 @@ do_query_all_recurse (SPObject *o) static void -sp_do_export_png(SPDocument *doc) +sp_do_export_png(Document *doc) { const gchar *filename = NULL; gdouble dpi = 0.0; @@ -1417,7 +1417,7 @@ sp_do_export_png(SPDocument *doc) * \param mime MIME type to export as. */ -static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime) +static void do_export_ps_pdf(Document* doc, gchar const* uri, char const* mime) { Inkscape::Extension::DB::OutputList o; Inkscape::Extension::db.get_output_list(o); @@ -1507,7 +1507,7 @@ static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime * \param mime MIME type to export as (should be "image/x-emf") */ -static void do_export_emf(SPDocument* doc, gchar const* uri, char const* mime) +static void do_export_emf(Document* doc, gchar const* uri, char const* mime) { Inkscape::Extension::DB::OutputList o; Inkscape::Extension::db.get_output_list(o); diff --git a/src/marker.cpp b/src/marker.cpp index c66acc192..2efcde1b9 100644 --- a/src/marker.cpp +++ b/src/marker.cpp @@ -43,7 +43,7 @@ struct SPMarkerView { static void sp_marker_class_init (SPMarkerClass *klass); static void sp_marker_init (SPMarker *marker); -static void sp_marker_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_marker_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_marker_release (SPObject *object); static void sp_marker_set (SPObject *object, unsigned int key, const gchar *value); static void sp_marker_update (SPObject *object, SPCtx *ctx, guint flags); @@ -133,7 +133,7 @@ sp_marker_init (SPMarker *marker) * \see sp_object_build() */ static void -sp_marker_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_marker_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPGroup *group; SPMarker *marker; @@ -723,7 +723,7 @@ sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destro } const gchar * -generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix /*transform*/, Geom::Matrix move) +generate_marker (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix /*transform*/, Geom::Matrix move) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); diff --git a/src/marker.h b/src/marker.h index f2d74a3a6..5206a9c89 100644 --- a/src/marker.h +++ b/src/marker.h @@ -89,7 +89,7 @@ NRArenaItem *sp_marker_show_instance (SPMarker *marker, NRArenaItem *parent, unsigned int key, unsigned int pos, Geom::Matrix const &base, float linewidth); void sp_marker_hide (SPMarker *marker, unsigned int key); -const gchar *generate_marker (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move); +const gchar *generate_marker (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move); #endif diff --git a/src/nodepath.cpp b/src/nodepath.cpp index f9a615583..e2c4f3fa3 100644 --- a/src/nodepath.cpp +++ b/src/nodepath.cpp @@ -2582,7 +2582,7 @@ void sp_node_delete_preserve(GList *nodes_to_delete) //FIXME: a closed path CAN legally have one node, it's only an open one which must be //at least 2 sp_nodepath_get_node_count(nodepath) < 2) { - SPDocument *document = sp_desktop_document (nodepath->desktop); + Document *document = sp_desktop_document (nodepath->desktop); //FIXME: The following line will be wrong when we have mltiple nodepaths: we only want to //delete this nodepath's object, not the entire selection! (though at this time, this //does not matter) @@ -2621,7 +2621,7 @@ void sp_node_selected_delete(Inkscape::NodePath::Path *nodepath) // if the entire nodepath is removed, delete the selected object. if (nodepath->subpaths == NULL || sp_nodepath_get_node_count(nodepath) < 2) { - SPDocument *document = sp_desktop_document (nodepath->desktop); + Document *document = sp_desktop_document (nodepath->desktop); sp_selection_delete(nodepath->desktop); sp_document_done (document, SP_VERB_CONTEXT_NODE, _("Delete nodes")); diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 99ee78ade..3b5cd3136 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -43,7 +43,7 @@ void sp_selected_path_combine(SPDesktop *desktop) { Inkscape::Selection *selection = sp_desktop_selection(desktop); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); if (g_slist_length((GSList *) selection->itemList()) < 1) { sp_desktop_message_stack(desktop)->flash(Inkscape::WARNING_MESSAGE, _("Select object(s) to combine.")); @@ -328,7 +328,7 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec items = items->next) { SPItem *item = SP_ITEM(items->data); - SPDocument *document = item->document; + Document *document = item->document; if (SP_IS_PATH(item) && !SP_PATH(item)->original_curve) { continue; // already a path, and no path effect diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 916e9f25f..978a8952c 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -26,7 +26,7 @@ static void persp3d_class_init(Persp3DClass *klass); static void persp3d_init(Persp3D *stop); -static void persp3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void persp3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void persp3d_release(SPObject *object); static void persp3d_set(SPObject *object, unsigned key, gchar const *value); static void persp3d_update(SPObject *object, SPCtx *ctx, guint flags); @@ -103,7 +103,7 @@ persp3d_init(Persp3D *persp) /** * Virtual build: set persp3d attributes from its associated XML node. */ -static void persp3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void persp3d_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) persp3d_parent_class)->build) (* ((SPObjectClass *) persp3d_parent_class)->build)(object, document, repr); @@ -201,7 +201,7 @@ persp3d_update(SPObject *object, SPCtx *ctx, guint flags) } Persp3D * -persp3d_create_xml_element (SPDocument *document, Persp3D *dup) {// if dup is given, copy the attributes over +persp3d_create_xml_element (Document *document, Persp3D *dup) {// if dup is given, copy the attributes over SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::XML::Node *repr; @@ -240,7 +240,7 @@ persp3d_create_xml_element (SPDocument *document, Persp3D *dup) {// if dup is gi } Persp3D * -persp3d_document_first_persp (SPDocument *document) { +persp3d_document_first_persp (Document *document) { SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document); Inkscape::XML::Node *repr; for (SPObject *child = sp_object_first_child(defs); child != NULL; child = SP_OBJECT_NEXT(child) ) { @@ -653,7 +653,7 @@ persp3d_print_debugging_info (Persp3D *persp) { } void -persp3d_print_debugging_info_all(SPDocument *document) { +persp3d_print_debugging_info_all(Document *document) { SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document); Inkscape::XML::Node *repr; for (SPObject *child = sp_object_first_child(defs); child != NULL; child = SP_OBJECT_NEXT(child) ) { diff --git a/src/persp3d.h b/src/persp3d.h index 79bec0232..cbad0b873 100644 --- a/src/persp3d.h +++ b/src/persp3d.h @@ -35,7 +35,7 @@ struct Persp3D : public SPObject { // Also write the list of boxes into the xml repr and vice versa link boxes to their persp3d? std::vector boxes; std::map* boxes_transformed; // TODO: eventually we should merge this with 'boxes' - SPDocument *document; // should this rather be the SPDesktop? + Document *document; // should this rather be the SPDesktop? // for debugging only int my_counter; @@ -89,15 +89,15 @@ std::list persp3d_list_of_boxes(Persp3D *persp); bool persp3d_perspectives_coincide(const Persp3D *lhs, const Persp3D *rhs); void persp3d_absorb(Persp3D *persp1, Persp3D *persp2); -Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3D *dup = NULL); -Persp3D * persp3d_document_first_persp (SPDocument *document); +Persp3D * persp3d_create_xml_element (Document *document, Persp3D *dup = NULL); +Persp3D * persp3d_document_first_persp (Document *document); bool persp3d_has_all_boxes_in_selection (Persp3D *persp); std::map > persp3d_unselected_boxes(Inkscape::Selection *selection); void persp3d_split_perspectives_according_to_selection(Inkscape::Selection *selection); void persp3d_print_debugging_info (Persp3D *persp); -void persp3d_print_debugging_info_all(SPDocument *doc); +void persp3d_print_debugging_info_all(Document *doc); void persp3d_print_all_selected(); #endif /* __PERSP3D_H__ */ diff --git a/src/print.cpp b/src/print.cpp index 044dffe34..7fbaa53e9 100644 --- a/src/print.cpp +++ b/src/print.cpp @@ -85,7 +85,7 @@ unsigned int sp_print_text(SPPrintContext *ctx, char const *text, Geom::Point p, /* UI */ void -sp_print_preview_document(SPDocument *doc) +sp_print_preview_document(Document *doc) { Inkscape::Extension::Print *mod; unsigned int ret; @@ -122,7 +122,7 @@ sp_print_preview_document(SPDocument *doc) } void -sp_print_document(Gtk::Window& parentWindow, SPDocument *doc) +sp_print_document(Gtk::Window& parentWindow, Document *doc) { sp_document_ensure_up_to_date(doc); @@ -143,7 +143,7 @@ sp_print_document(Gtk::Window& parentWindow, SPDocument *doc) } void -sp_print_document_to_file(SPDocument *doc, gchar const *filename) +sp_print_document_to_file(Document *doc, gchar const *filename) { Inkscape::Extension::Print *mod; SPPrintContext context; diff --git a/src/print.h b/src/print.h index 577a169cf..11efced7b 100644 --- a/src/print.h +++ b/src/print.h @@ -41,9 +41,9 @@ void sp_print_get_param(SPPrintContext *ctx, gchar *name, bool *value); /* UI */ -void sp_print_preview_document(SPDocument *doc); -void sp_print_document(Gtk::Window& parentWindow, SPDocument *doc); -void sp_print_document_to_file(SPDocument *doc, gchar const *filename); +void sp_print_preview_document(Document *doc); +void sp_print_document(Gtk::Window& parentWindow, Document *doc); +void sp_print_document_to_file(Document *doc, gchar const *filename); #endif /* !PRINT_H_INKSCAPE */ diff --git a/src/profile-manager.cpp b/src/profile-manager.cpp index 1cd965e39..75fd12e4b 100644 --- a/src/profile-manager.cpp +++ b/src/profile-manager.cpp @@ -14,7 +14,7 @@ namespace Inkscape { -ProfileManager::ProfileManager(SPDocument *document) : +ProfileManager::ProfileManager(Document *document) : _doc(document), _knownProfiles() { diff --git a/src/profile-manager.h b/src/profile-manager.h index 61e22615f..d72ad3dd8 100644 --- a/src/profile-manager.h +++ b/src/profile-manager.h @@ -13,7 +13,7 @@ #include "gc-finalized.h" #include -class SPDocument; +class Document; namespace Inkscape { @@ -23,7 +23,7 @@ class ProfileManager : public DocumentSubset, public GC::Finalized { public: - ProfileManager(SPDocument *document); + ProfileManager(Document *document); ~ProfileManager(); ColorProfile* find(gchar const* name); @@ -34,7 +34,7 @@ private: void _resourcesChanged(); - SPDocument* _doc; + Document* _doc; sigc::connection _resource_connection; std::vector _knownProfiles; }; diff --git a/src/rdf.cpp b/src/rdf.cpp index f0b174922..5559526f1 100644 --- a/src/rdf.cpp +++ b/src/rdf.cpp @@ -531,7 +531,7 @@ rdf_set_repr_text ( Inkscape::XML::Node * repr, // set document's title element to the RDF title if (!strcmp(entity->name, "title")) { - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if(doc && doc->root) doc->root->setTitle(text); } @@ -644,7 +644,7 @@ rdf_set_repr_text ( Inkscape::XML::Node * repr, } Inkscape::XML::Node * -rdf_get_rdf_root_repr ( SPDocument * doc, bool build ) +rdf_get_rdf_root_repr ( Document * doc, bool build ) { g_return_val_if_fail (doc != NULL, NULL); g_return_val_if_fail (doc->rroot != NULL, NULL); @@ -705,7 +705,7 @@ rdf_get_rdf_root_repr ( SPDocument * doc, bool build ) } Inkscape::XML::Node * -rdf_get_xml_repr( SPDocument * doc, gchar const * name, bool build ) +rdf_get_xml_repr( Document * doc, gchar const * name, bool build ) { g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (doc != NULL, NULL); @@ -735,7 +735,7 @@ rdf_get_xml_repr( SPDocument * doc, gchar const * name, bool build ) } Inkscape::XML::Node * -rdf_get_work_repr( SPDocument * doc, gchar const * name, bool build ) +rdf_get_work_repr( Document * doc, gchar const * name, bool build ) { g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (doc != NULL, NULL); @@ -771,7 +771,7 @@ rdf_get_work_repr( SPDocument * doc, gchar const * name, bool build ) * */ const gchar * -rdf_get_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity) +rdf_get_work_entity(Document * doc, struct rdf_work_entity_t * entity) { g_return_val_if_fail (doc != NULL, NULL); if ( entity == NULL ) return NULL; @@ -802,7 +802,7 @@ rdf_get_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity) * */ unsigned int -rdf_set_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity, +rdf_set_work_entity(Document * doc, struct rdf_work_entity_t * entity, const gchar * text) { g_return_val_if_fail ( entity != NULL, 0 ); @@ -918,7 +918,7 @@ rdf_match_license(Inkscape::XML::Node const *repr, struct rdf_license_t const *l * */ struct rdf_license_t * -rdf_get_license(SPDocument * document) +rdf_get_license(Document * document) { Inkscape::XML::Node const *repr = rdf_get_xml_repr ( document, XML_TAG_NAME_LICENSE, FALSE ); if (repr) { @@ -942,7 +942,7 @@ rdf_get_license(SPDocument * document) * */ void -rdf_set_license(SPDocument * doc, struct rdf_license_t const * license) +rdf_set_license(Document * doc, struct rdf_license_t const * license) { // drop old license section Inkscape::XML::Node * repr = rdf_get_xml_repr ( doc, XML_TAG_NAME_LICENSE, FALSE ); @@ -981,7 +981,7 @@ struct rdf_entity_default_t rdf_defaults[] = { }; void -rdf_set_defaults ( SPDocument * doc ) +rdf_set_defaults ( Document * doc ) { g_assert ( doc != NULL ); diff --git a/src/rdf.h b/src/rdf.h index a98f5a1e4..57ae79cb8 100644 --- a/src/rdf.h +++ b/src/rdf.h @@ -94,17 +94,17 @@ struct rdf_t { struct rdf_work_entity_t * rdf_find_entity(gchar const * name); -const gchar * rdf_get_work_entity(SPDocument * doc, +const gchar * rdf_get_work_entity(Document * doc, struct rdf_work_entity_t * entity); -unsigned int rdf_set_work_entity(SPDocument * doc, +unsigned int rdf_set_work_entity(Document * doc, struct rdf_work_entity_t * entity, const gchar * text); -struct rdf_license_t * rdf_get_license(SPDocument * doc); -void rdf_set_license(SPDocument * doc, +struct rdf_license_t * rdf_get_license(Document * doc); +void rdf_set_license(Document * doc, struct rdf_license_t const * license); -void rdf_set_defaults ( SPDocument * doc ); +void rdf_set_defaults ( Document * doc ); #endif // _RDF_H_ diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index e55bba2a5..0e2fe43d1 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -139,7 +139,7 @@ void sp_selection_copy_impl(GSList const *items, GSList **clip, Inkscape::XML::D g_slist_free((GSList *) sorted_items); } -GSList *sp_selection_paste_impl(SPDocument *doc, SPObject *parent, GSList **clip) +GSList *sp_selection_paste_impl(Document *doc, SPObject *parent, GSList **clip) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); @@ -240,7 +240,7 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone) if (desktop == NULL) return; - SPDocument *doc = desktop->doc(); + Document *doc = desktop->doc(); Inkscape::XML::Document* xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -326,7 +326,7 @@ void sp_edit_clear_all(SPDesktop *dt) if (!dt) return; - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); sp_desktop_selection(dt)->clear(); g_return_if_fail(SP_IS_GROUP(dt->currentLayer())); @@ -454,7 +454,7 @@ void sp_selection_group(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -741,7 +741,7 @@ void sp_selection_raise_to_top(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); Inkscape::Selection *selection = sp_desktop_selection(desktop); if (selection->isEmpty()) { @@ -839,7 +839,7 @@ void sp_selection_lower_to_bottom(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); Inkscape::Selection *selection = sp_desktop_selection(desktop); if (selection->isEmpty()) { @@ -882,14 +882,14 @@ void sp_selection_lower_to_bottom(SPDesktop *desktop) } void -sp_undo(SPDesktop *desktop, SPDocument *) +sp_undo(SPDesktop *desktop, Document *) { if (!sp_document_undo(sp_desktop_document(desktop))) desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to undo.")); } void -sp_redo(SPDesktop *desktop, SPDocument *) +sp_redo(SPDesktop *desktop, Document *) { if (!sp_document_redo(sp_desktop_document(desktop))) desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to redo.")); @@ -1672,7 +1672,7 @@ sp_selection_item_next(SPDesktop *desktop) void sp_selection_item_prev(SPDesktop *desktop) { - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); g_return_if_fail(document != NULL); g_return_if_fail(desktop != NULL); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2114,7 +2114,7 @@ void sp_selection_to_marker(SPDesktop *desktop, bool apply) if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2211,7 +2211,7 @@ void sp_selection_to_guides(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::Selection *selection = sp_desktop_selection(desktop); // we need to copy the list because it gets reset when objects are deleted GSList *items = g_slist_copy((GSList *) selection->itemList()); @@ -2238,7 +2238,7 @@ sp_selection_tile(SPDesktop *desktop, bool apply) if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2342,7 +2342,7 @@ sp_selection_untile(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2457,7 +2457,7 @@ sp_selection_get_export_hints(Inkscape::Selection *selection, char const **filen } void -sp_document_get_export_hints(SPDocument *doc, char const **filename, float *xdpi, float *ydpi) +sp_document_get_export_hints(Document *doc, char const **filename, float *xdpi, float *ydpi) { Inkscape::XML::Node * repr = sp_document_repr_root(doc); gchar const *dpi_string; @@ -2483,7 +2483,7 @@ sp_selection_create_bitmap_copy(SPDesktop *desktop) if (desktop == NULL) return; - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2697,7 +2697,7 @@ sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_la if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2824,7 +2824,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) { if (desktop == NULL) return; - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -2915,7 +2915,7 @@ bool fit_canvas_to_selection(SPDesktop *desktop) { g_return_val_if_fail(desktop != NULL, false); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); g_return_val_if_fail(doc != NULL, false); g_return_val_if_fail(desktop->selection != NULL, false); @@ -2946,7 +2946,7 @@ verb_fit_canvas_to_selection(SPDesktop *const desktop) } bool -fit_canvas_to_drawing(SPDocument *doc) +fit_canvas_to_drawing(Document *doc) { g_return_val_if_fail(doc != NULL, false); @@ -2972,7 +2972,7 @@ verb_fit_canvas_to_drawing(SPDesktop *desktop) void fit_canvas_to_selection_or_drawing(SPDesktop *desktop) { g_return_if_fail(desktop != NULL); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); g_return_if_fail(doc != NULL); g_return_if_fail(desktop->selection != NULL); diff --git a/src/selection-chemistry.h b/src/selection-chemistry.h index 67e772a00..4a8c8901e 100644 --- a/src/selection-chemistry.h +++ b/src/selection-chemistry.h @@ -104,11 +104,11 @@ void sp_selection_edit_clip_or_mask(SPDesktop * dt, bool clip); void scroll_to_show_item(SPDesktop *desktop, SPItem *item); -void sp_undo (SPDesktop *desktop, SPDocument *doc); -void sp_redo (SPDesktop *desktop, SPDocument *doc); +void sp_undo (SPDesktop *desktop, Document *doc); +void sp_redo (SPDesktop *desktop, Document *doc); void sp_selection_get_export_hints (Inkscape::Selection *selection, const char **filename, float *xdpi, float *ydpi); -void sp_document_get_export_hints (SPDocument * doc, const char **filename, float *xdpi, float *ydpi); +void sp_document_get_export_hints (Document * doc, const char **filename, float *xdpi, float *ydpi); void sp_selection_create_bitmap_copy (SPDesktop *desktop); @@ -117,7 +117,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path); bool fit_canvas_to_selection(SPDesktop *); void verb_fit_canvas_to_selection(SPDesktop *); -bool fit_canvas_to_drawing(SPDocument *); +bool fit_canvas_to_drawing(Document *); void verb_fit_canvas_to_drawing(SPDesktop *); void fit_canvas_to_selection_or_drawing(SPDesktop *); diff --git a/src/snap.cpp b/src/snap.cpp index f0769e0a1..48f3a8fea 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -1092,7 +1092,7 @@ void SnapManager::setup(SPDesktop const *desktop, _guide_to_ignore = guide_to_ignore; } -SPDocument *SnapManager::getDocument() const +Document *SnapManager::getDocument() const { return _named_view->document; } diff --git a/src/snap.h b/src/snap.h index e621bdb60..18820f78e 100644 --- a/src/snap.h +++ b/src/snap.h @@ -162,7 +162,7 @@ public: SPDesktop const *getDesktop() const {return _desktop;} SPNamedView const *getNamedView() const {return _named_view;} - SPDocument *getDocument() const; + Document *getDocument() const; SPGuide const *getGuideToIgnore() const {return _guide_to_ignore;} bool getSnapIndicator() const {return _snapindicator;} diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp index aabefdfdb..ec1b4e53f 100644 --- a/src/sp-anchor.cpp +++ b/src/sp-anchor.cpp @@ -29,7 +29,7 @@ static void sp_anchor_class_init(SPAnchorClass *ac); static void sp_anchor_init(SPAnchor *anchor); -static void sp_anchor_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_anchor_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_anchor_release(SPObject *object); static void sp_anchor_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_anchor_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -83,7 +83,7 @@ static void sp_anchor_init(SPAnchor *anchor) anchor->href = NULL; } -static void sp_anchor_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_anchor_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-animation.cpp b/src/sp-animation.cpp index 2d9f2e941..b5f0e8605 100644 --- a/src/sp-animation.cpp +++ b/src/sp-animation.cpp @@ -37,7 +37,7 @@ log_set_attr(char const *const classname, unsigned int const key, char const *co static void sp_animation_class_init(SPAnimationClass *klass); static void sp_animation_init(SPAnimation *animation); -static void sp_animation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_animation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_animation_release(SPObject *object); static void sp_animation_set(SPObject *object, unsigned int key, gchar const *value); @@ -84,7 +84,7 @@ sp_animation_init(SPAnimation */*animation*/) static void -sp_animation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_animation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) animation_parent_class)->build) ((SPObjectClass *) animation_parent_class)->build(object, document, repr); @@ -124,7 +124,7 @@ sp_animation_set(SPObject *object, unsigned int key, gchar const *value) static void sp_ianimation_class_init(SPIAnimationClass *klass); static void sp_ianimation_init(SPIAnimation *animation); -static void sp_ianimation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_ianimation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_ianimation_release(SPObject *object); static void sp_ianimation_set(SPObject *object, unsigned int key, gchar const *value); @@ -171,7 +171,7 @@ sp_ianimation_init(SPIAnimation */*animation*/) static void -sp_ianimation_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_ianimation_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) ianimation_parent_class)->build) ((SPObjectClass *) ianimation_parent_class)->build(object, document, repr); @@ -208,7 +208,7 @@ sp_ianimation_set(SPObject *object, unsigned int key, gchar const *value) static void sp_animate_class_init(SPAnimateClass *klass); static void sp_animate_init(SPAnimate *animate); -static void sp_animate_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_animate_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_animate_release(SPObject *object); static void sp_animate_set(SPObject *object, unsigned int key, gchar const *value); @@ -255,7 +255,7 @@ sp_animate_init(SPAnimate */*animate*/) static void -sp_animate_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_animate_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) animate_parent_class)->build) ((SPObjectClass *) animate_parent_class)->build(object, document, repr); diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index 4bbabc965..1dab31e34 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -40,7 +40,7 @@ struct SPClipPathView { static void sp_clippath_class_init(SPClipPathClass *klass); static void sp_clippath_init(SPClipPath *clippath); -static void sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_clippath_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_clippath_release(SPObject * object); static void sp_clippath_set(SPObject *object, unsigned int key, gchar const *value); static void sp_clippath_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -99,7 +99,7 @@ sp_clippath_init(SPClipPath *cp) } static void -sp_clippath_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_clippath_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build(object, document, repr); @@ -381,7 +381,7 @@ sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view) // Create a mask element (using passed elements), add it to const gchar * -sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform) +sp_clippath_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform) { Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); diff --git a/src/sp-clippath.h b/src/sp-clippath.h index 199b29f3b..d6a4e6f0b 100644 --- a/src/sp-clippath.h +++ b/src/sp-clippath.h @@ -59,6 +59,6 @@ void sp_clippath_hide(SPClipPath *cp, unsigned int key); void sp_clippath_set_bbox(SPClipPath *cp, unsigned int key, NRRect *bbox); void sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags); -const gchar *sp_clippath_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform); +const gchar *sp_clippath_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform); #endif diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index ff2e39044..2847d23e9 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -366,7 +366,7 @@ static Inkscape::XML::Node *sp_genericellipse_write(SPObject *object, Inkscape:: static void sp_ellipse_class_init(SPEllipseClass *klass); static void sp_ellipse_init(SPEllipse *ellipse); -static void sp_ellipse_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_ellipse_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *sp_ellipse_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_ellipse_set(SPObject *object, unsigned int key, gchar const *value); static gchar *sp_ellipse_description(SPItem *item); @@ -416,7 +416,7 @@ sp_ellipse_init(SPEllipse */*ellipse*/) } static void -sp_ellipse_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_ellipse_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) ellipse_parent_class)->build) (* ((SPObjectClass *) ellipse_parent_class)->build) (object, document, repr); @@ -513,7 +513,7 @@ sp_ellipse_position_set(SPEllipse *ellipse, gdouble x, gdouble y, gdouble rx, gd static void sp_circle_class_init(SPCircleClass *klass); static void sp_circle_init(SPCircle *circle); -static void sp_circle_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_circle_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *sp_circle_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_circle_set(SPObject *object, unsigned int key, gchar const *value); static gchar *sp_circle_description(SPItem *item); @@ -564,7 +564,7 @@ sp_circle_init(SPCircle */*circle*/) } static void -sp_circle_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_circle_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) circle_parent_class)->build) (* ((SPObjectClass *) circle_parent_class)->build)(object, document, repr); @@ -635,7 +635,7 @@ static gchar *sp_circle_description(SPItem */*item*/) static void sp_arc_class_init(SPArcClass *klass); static void sp_arc_init(SPArc *arc); -static void sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_arc_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *sp_arc_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_arc_set(SPObject *object, unsigned int key, gchar const *value); static void sp_arc_modified(SPObject *object, guint flags); @@ -689,7 +689,7 @@ sp_arc_init(SPArc */*arc*/) } static void -sp_arc_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_arc_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) arc_parent_class)->build) (* ((SPObjectClass *) arc_parent_class)->build) (object, document, repr); diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp index 77325c4b1..e090a27b2 100644 --- a/src/sp-filter-primitive.cpp +++ b/src/sp-filter-primitive.cpp @@ -32,7 +32,7 @@ static void sp_filter_primitive_class_init(SPFilterPrimitiveClass *klass); static void sp_filter_primitive_init(SPFilterPrimitive *filter_primitive); -static void sp_filter_primitive_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_filter_primitive_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_filter_primitive_release(SPObject *object); static void sp_filter_primitive_set(SPObject *object, unsigned int key, gchar const *value); static void sp_filter_primitive_update(SPObject *object, SPCtx *ctx, guint flags); @@ -93,7 +93,7 @@ sp_filter_primitive_init(SPFilterPrimitive *filter_primitive) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_filter_primitive_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_filter_primitive_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) filter_primitive_parent_class)->build) { ((SPObjectClass *) filter_primitive_parent_class)->build(object, document, repr); diff --git a/src/sp-filter-reference.h b/src/sp-filter-reference.h index 216ff1d6f..31ef5ef11 100644 --- a/src/sp-filter-reference.h +++ b/src/sp-filter-reference.h @@ -8,7 +8,7 @@ class SPObject; class SPFilterReference : public Inkscape::URIReference { public: SPFilterReference(SPObject *obj) : URIReference(obj) {} - SPFilterReference(SPDocument *doc) : URIReference(doc) {} + SPFilterReference(Document *doc) : URIReference(doc) {} SPFilter *getObject() const { return (SPFilter *)URIReference::getObject(); diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index 7197c1ec9..7c819af1f 100644 --- a/src/sp-filter.cpp +++ b/src/sp-filter.cpp @@ -43,7 +43,7 @@ using std::pair; static void sp_filter_class_init(SPFilterClass *klass); static void sp_filter_init(SPFilter *filter); -static void sp_filter_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_filter_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_filter_release(SPObject *object); static void sp_filter_set(SPObject *object, unsigned int key, gchar const *value); static void sp_filter_update(SPObject *object, SPCtx *ctx, guint flags); @@ -129,7 +129,7 @@ sp_filter_init(SPFilter *filter) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_filter_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_filter_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) filter_parent_class)->build) { ((SPObjectClass *) filter_parent_class)->build(object, document, repr); diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp index 6d679701f..78aab7cb3 100644 --- a/src/sp-flowdiv.cpp +++ b/src/sp-flowdiv.cpp @@ -23,7 +23,7 @@ static void sp_flowdiv_release (SPObject *object); static Inkscape::XML::Node *sp_flowdiv_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_flowdiv_update (SPObject *object, SPCtx *ctx, unsigned int flags); static void sp_flowdiv_modified (SPObject *object, guint flags); -static void sp_flowdiv_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); +static void sp_flowdiv_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr); static void sp_flowdiv_set (SPObject *object, unsigned int key, const gchar *value); static void sp_flowtspan_class_init (SPFlowtspanClass *klass); @@ -32,7 +32,7 @@ static void sp_flowtspan_release (SPObject *object); static Inkscape::XML::Node *sp_flowtspan_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_flowtspan_update (SPObject *object, SPCtx *ctx, unsigned int flags); static void sp_flowtspan_modified (SPObject *object, guint flags); -static void sp_flowtspan_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); +static void sp_flowtspan_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr); static void sp_flowtspan_set (SPObject *object, unsigned int key, const gchar *value); static void sp_flowpara_class_init (SPFlowparaClass *klass); @@ -41,7 +41,7 @@ static void sp_flowpara_release (SPObject *object); static Inkscape::XML::Node *sp_flowpara_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_flowpara_update (SPObject *object, SPCtx *ctx, unsigned int flags); static void sp_flowpara_modified (SPObject *object, guint flags); -static void sp_flowpara_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); +static void sp_flowpara_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr); static void sp_flowpara_set (SPObject *object, unsigned int key, const gchar *value); static void sp_flowline_class_init (SPFlowlineClass *klass); @@ -177,7 +177,7 @@ sp_flowdiv_modified (SPObject *object, guint flags) } static void -sp_flowdiv_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_flowdiv_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr) { object->_requireSVGVersion(Inkscape::Version(1, 2)); @@ -354,7 +354,7 @@ sp_flowtspan_modified (SPObject *object, guint flags) } } static void -sp_flowtspan_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_flowtspan_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr) { if (((SPObjectClass *) flowtspan_parent_class)->build) ((SPObjectClass *) flowtspan_parent_class)->build (object, doc, repr); @@ -525,7 +525,7 @@ sp_flowpara_modified (SPObject *object, guint flags) } } static void -sp_flowpara_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_flowpara_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr) { if (((SPObjectClass *) flowpara_parent_class)->build) ((SPObjectClass *) flowpara_parent_class)->build (object, doc, repr); diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 6af2f7169..ff4a2fda5 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -43,7 +43,7 @@ static void sp_flowtext_remove_child(SPObject *object, Inkscape::XML::Node *chil static void sp_flowtext_update(SPObject *object, SPCtx *ctx, guint flags); static void sp_flowtext_modified(SPObject *object, guint flags); static Inkscape::XML::Node *sp_flowtext_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); -static void sp_flowtext_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_flowtext_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_flowtext_set(SPObject *object, unsigned key, gchar const *value); static void sp_flowtext_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags); @@ -220,7 +220,7 @@ sp_flowtext_modified(SPObject *object, guint flags) } static void -sp_flowtext_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_flowtext_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { object->_requireSVGVersion(Inkscape::Version(1, 2)); @@ -677,7 +677,7 @@ bool SPFlowtext::has_internal_frame() SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0, Geom::Point p1) { - SPDocument *doc = sp_desktop_document (desktop); + Document *doc = sp_desktop_document (desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *root_repr = xml_doc->createElement("svg:flowRoot"); diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp index 1ec6f4601..166262bc9 100644 --- a/src/sp-font-face.cpp +++ b/src/sp-font-face.cpp @@ -295,7 +295,7 @@ static std::vector sp_read_fontFaceStretchType(gchar const static void sp_fontface_class_init(SPFontFaceClass *fc); static void sp_fontface_init(SPFontFace *font); -static void sp_fontface_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_fontface_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_fontface_release(SPObject *object); static void sp_fontface_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_fontface_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -398,7 +398,7 @@ static void sp_fontface_init(SPFontFace *face) */ } -static void sp_fontface_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_fontface_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-font.cpp b/src/sp-font.cpp index 75fb18638..c960d0fe9 100644 --- a/src/sp-font.cpp +++ b/src/sp-font.cpp @@ -28,7 +28,7 @@ static void sp_font_class_init(SPFontClass *fc); static void sp_font_init(SPFont *font); -static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_font_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_font_release(SPObject *object); static void sp_font_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_font_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -90,7 +90,7 @@ static void sp_font_init(SPFont *font) font->vert_adv_y = 0; } -static void sp_font_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_font_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-gaussian-blur.cpp b/src/sp-gaussian-blur.cpp index e6eab5032..8544e03fe 100644 --- a/src/sp-gaussian-blur.cpp +++ b/src/sp-gaussian-blur.cpp @@ -36,7 +36,7 @@ static void sp_gaussianBlur_class_init(SPGaussianBlurClass *klass); static void sp_gaussianBlur_init(SPGaussianBlur *gaussianBlur); -static void sp_gaussianBlur_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_gaussianBlur_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_gaussianBlur_release(SPObject *object); static void sp_gaussianBlur_set(SPObject *object, unsigned int key, gchar const *value); static void sp_gaussianBlur_update(SPObject *object, SPCtx *ctx, guint flags); @@ -94,7 +94,7 @@ sp_gaussianBlur_init(SPGaussianBlur */*gaussianBlur*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_gaussianBlur_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_gaussianBlur_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) gaussianBlur_parent_class)->build) { ((SPObjectClass *) gaussianBlur_parent_class)->build(object, document, repr); diff --git a/src/sp-glyph-kerning.cpp b/src/sp-glyph-kerning.cpp index 6d08f212c..7b61f1c3d 100644 --- a/src/sp-glyph-kerning.cpp +++ b/src/sp-glyph-kerning.cpp @@ -28,7 +28,7 @@ static void sp_glyph_kerning_class_init(SPGlyphKerningClass *gc); static void sp_glyph_kerning_init(SPGlyphKerning *glyph); -static void sp_glyph_kerning_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_glyph_kerning_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_glyph_kerning_release(SPObject *object); static void sp_glyph_kerning_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_glyph_kerning_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -105,7 +105,7 @@ static void sp_glyph_kerning_init(SPGlyphKerning *glyph) glyph->k = 0; } -static void sp_glyph_kerning_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_glyph_kerning_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp index 8af78a0aa..6102954f2 100644 --- a/src/sp-glyph.cpp +++ b/src/sp-glyph.cpp @@ -25,7 +25,7 @@ static void sp_glyph_class_init(SPGlyphClass *gc); static void sp_glyph_init(SPGlyph *glyph); -static void sp_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_glyph_release(SPObject *object); static void sp_glyph_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_glyph_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -85,7 +85,7 @@ static void sp_glyph_init(SPGlyph *glyph) glyph->vert_adv_y = 0; } -static void sp_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-gradient-test.h b/src/sp-gradient-test.h index bc188401b..1771b7c3e 100644 --- a/src/sp-gradient-test.h +++ b/src/sp-gradient-test.h @@ -14,7 +14,7 @@ class SPGradientTest : public DocumentUsingTest { public: - SPDocument* _doc; + Document* _doc; SPGradientTest() : _doc(0) diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index 84a0a9870..c9ceeabf0 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -56,7 +56,7 @@ static void sp_stop_class_init(SPStopClass *klass); static void sp_stop_init(SPStop *stop); -static void sp_stop_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_stop_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_stop_set(SPObject *object, unsigned key, gchar const *value); static Inkscape::XML::Node *sp_stop_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -114,7 +114,7 @@ sp_stop_init(SPStop *stop) /** * Virtual build: set stop attributes from its associated XML node. */ -static void sp_stop_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_stop_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) stop_parent_class)->build) (* ((SPObjectClass *) stop_parent_class)->build)(object, document, repr); @@ -294,7 +294,7 @@ sp_stop_get_color(SPStop const *const stop) static void sp_gradient_class_init(SPGradientClass *klass); static void sp_gradient_init(SPGradient *gr); -static void sp_gradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_gradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_gradient_release(SPObject *object); static void sp_gradient_set(SPObject *object, unsigned key, gchar const *value); static void sp_gradient_child_added(SPObject *object, @@ -398,7 +398,7 @@ sp_gradient_init(SPGradient *gr) * Virtual build: set gradient attributes from its associated repr. */ static void -sp_gradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_gradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPGradient *gradient = SP_GRADIENT(object); @@ -1402,7 +1402,7 @@ static void sp_lineargradient_class_init(SPLinearGradientClass *klass); static void sp_lineargradient_init(SPLinearGradient *lg); static void sp_lineargradient_build(SPObject *object, - SPDocument *document, + Document *document, Inkscape::XML::Node *repr); static void sp_lineargradient_set(SPObject *object, unsigned key, gchar const *value); static Inkscape::XML::Node *sp_lineargradient_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, @@ -1474,7 +1474,7 @@ static void sp_lineargradient_init(SPLinearGradient *lg) * Callback: set attributes from associated repr. */ static void sp_lineargradient_build(SPObject *object, - SPDocument *document, + Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) lg_parent_class)->build) @@ -1677,7 +1677,7 @@ static void sp_radialgradient_class_init(SPRadialGradientClass *klass); static void sp_radialgradient_init(SPRadialGradient *rg); static void sp_radialgradient_build(SPObject *object, - SPDocument *document, + Document *document, Inkscape::XML::Node *repr); static void sp_radialgradient_set(SPObject *object, unsigned key, gchar const *value); static Inkscape::XML::Node *sp_radialgradient_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, @@ -1751,7 +1751,7 @@ sp_radialgradient_init(SPRadialGradient *rg) * Set radial gradient attributes from associated repr. */ static void -sp_radialgradient_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_radialgradient_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) rg_parent_class)->build) (* ((SPObjectClass *) rg_parent_class)->build)(object, document, repr); diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index f5edf7d97..170dfa375 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -54,7 +54,7 @@ static void sp_guide_init(SPGuide *guide); static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void sp_guide_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_guide_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_guide_release(SPObject *object); static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value); @@ -152,7 +152,7 @@ static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, } } -static void sp_guide_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_guide_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { (* ((SPObjectClass *) (parent_class))->build)(object, document, repr); @@ -243,7 +243,7 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value) SPGuide * sp_guide_create(SPDesktop *desktop, Geom::Point const &pt1, Geom::Point const &pt2) { - SPDocument *doc=sp_desktop_document(desktop); + Document *doc=sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide"); @@ -269,7 +269,7 @@ sp_guide_pt_pairs_to_guides(SPDesktop *dt, std::list > pts; Geom::Point A(0, 0); diff --git a/src/sp-image.cpp b/src/sp-image.cpp index 65aad1e2d..5284bb923 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -69,7 +69,7 @@ static void sp_image_class_init (SPImageClass * klass); static void sp_image_init (SPImage * image); -static void sp_image_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_image_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_image_release (SPObject * object); static void sp_image_set (SPObject *object, unsigned int key, const gchar *value); static void sp_image_update (SPObject *object, SPCtx *ctx, unsigned int flags); @@ -625,7 +625,7 @@ static void sp_image_init( SPImage *image ) } static void -sp_image_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_image_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) { ((SPObjectClass *) parent_class)->build (object, document, repr); @@ -811,7 +811,7 @@ static void sp_image_update (SPObject *object, SPCtx *ctx, unsigned int flags) { SPImage *image = SP_IMAGE(object); - SPDocument *doc = SP_OBJECT_DOCUMENT(object); + Document *doc = SP_OBJECT_DOCUMENT(object); if (((SPObjectClass *) (parent_class))->update) { ((SPObjectClass *) (parent_class))->update (object, ctx, flags); diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 9c19ce75a..f9570a885 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -51,7 +51,7 @@ static void sp_group_class_init (SPGroupClass *klass); static void sp_group_init (SPGroup *group); -static void sp_group_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_group_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_group_release(SPObject *object); static void sp_group_dispose(GObject *object); @@ -144,7 +144,7 @@ sp_group_init (SPGroup *group) new (&group->_display_modes) std::map(); } -static void sp_group_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_group_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { sp_object_read_attr(object, "inkscape:groupmode"); @@ -358,7 +358,7 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done) g_return_if_fail (group != NULL); g_return_if_fail (SP_IS_GROUP (group)); - SPDocument *doc = SP_OBJECT_DOCUMENT (group); + Document *doc = SP_OBJECT_DOCUMENT (group); SPObject *root = SP_DOCUMENT_ROOT (doc); SPObject *defs = SP_OBJECT (SP_ROOT (root)->defs); diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 662dc1cac..16efe677f 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -83,7 +83,7 @@ static void sp_item_class_init(SPItemClass *klass); static void sp_item_init(SPItem *item); -static void sp_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_item_release(SPObject *object); static void sp_item_set(SPObject *object, unsigned key, gchar const *value); static void sp_item_update(SPObject *object, SPCtx *ctx, guint flags); @@ -401,7 +401,7 @@ void SPItem::lowerToBottom() { } static void -sp_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { sp_object_read_attr(object, "style"); sp_object_read_attr(object, "transform"); diff --git a/src/sp-line.cpp b/src/sp-line.cpp index d0ce32397..36ac643ec 100644 --- a/src/sp-line.cpp +++ b/src/sp-line.cpp @@ -28,7 +28,7 @@ static void sp_line_class_init (SPLineClass *klass); static void sp_line_init (SPLine *line); -static void sp_line_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_line_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_line_set (SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_line_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -96,7 +96,7 @@ sp_line_init (SPLine * line) static void -sp_line_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr) +sp_line_build (SPObject * object, Document * document, Inkscape::XML::Node * repr) { if (((SPObjectClass *) parent_class)->build) { ((SPObjectClass *) parent_class)->build (object, document, repr); diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 90e9b2d6d..fdf348b78 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -44,7 +44,7 @@ static void sp_lpe_item_class_init(SPLPEItemClass *klass); static void sp_lpe_item_init(SPLPEItem *lpe_item); static void sp_lpe_item_finalize(GObject *object); -static void sp_lpe_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_lpe_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_lpe_item_release(SPObject *object); static void sp_lpe_item_set(SPObject *object, unsigned int key, gchar const *value); static void sp_lpe_item_update(SPObject *object, SPCtx *ctx, guint flags); @@ -137,7 +137,7 @@ sp_lpe_item_finalize(GObject *object) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_lpe_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_lpe_item_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { sp_object_read_attr(object, "inkscape:path-effect"); diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp index 20cb38297..12876d69a 100644 --- a/src/sp-mask.cpp +++ b/src/sp-mask.cpp @@ -37,7 +37,7 @@ struct SPMaskView { static void sp_mask_class_init (SPMaskClass *klass); static void sp_mask_init (SPMask *mask); -static void sp_mask_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_mask_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_mask_release (SPObject * object); static void sp_mask_set (SPObject *object, unsigned int key, const gchar *value); static void sp_mask_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -98,7 +98,7 @@ sp_mask_init (SPMask *mask) } static void -sp_mask_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_mask_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) { ((SPObjectClass *) parent_class)->build (object, document, repr); @@ -270,7 +270,7 @@ sp_mask_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML // Create a mask element (using passed elements), add it to const gchar * -sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform) +sp_mask_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform) { Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); diff --git a/src/sp-mask.h b/src/sp-mask.h index d5bddd332..293be8cee 100644 --- a/src/sp-mask.h +++ b/src/sp-mask.h @@ -60,6 +60,6 @@ void sp_mask_hide (SPMask *mask, unsigned int key); void sp_mask_set_bbox (SPMask *mask, unsigned int key, NRRect *bbox); -const gchar *sp_mask_create (GSList *reprs, SPDocument *document, Geom::Matrix const* applyTransform); +const gchar *sp_mask_create (GSList *reprs, Document *document, Geom::Matrix const* applyTransform); #endif diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp index 920b7d64d..1b9be0188 100644 --- a/src/sp-metadata.cpp +++ b/src/sp-metadata.cpp @@ -37,7 +37,7 @@ static void sp_metadata_class_init (SPMetadataClass *klass); static void sp_metadata_init (SPMetadata *metadata); -static void sp_metadata_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_metadata_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_metadata_release (SPObject *object); static void sp_metadata_set (SPObject *object, unsigned int key, const gchar *value); static void sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags); @@ -109,7 +109,7 @@ void strip_ids_recursively(Inkscape::XML::Node *node) { * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_metadata_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { using Inkscape::XML::NodeSiblingIterator; @@ -207,7 +207,7 @@ sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML: * \brief Retrieves the metadata object associated with a document */ SPMetadata * -sp_document_metadata (SPDocument *document) +sp_document_metadata (Document *document) { SPObject *nv; diff --git a/src/sp-metadata.h b/src/sp-metadata.h index 82b7c4fc5..1de463479 100644 --- a/src/sp-metadata.h +++ b/src/sp-metadata.h @@ -33,7 +33,7 @@ struct SPMetadataClass { GType sp_metadata_get_type (void); -SPMetadata * sp_document_metadata (SPDocument *document); +SPMetadata * sp_document_metadata (Document *document); #endif // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/sp-missing-glyph.cpp b/src/sp-missing-glyph.cpp index ffc29a71e..4b120717a 100644 --- a/src/sp-missing-glyph.cpp +++ b/src/sp-missing-glyph.cpp @@ -25,7 +25,7 @@ static void sp_missing_glyph_class_init(SPMissingGlyphClass *gc); static void sp_missing_glyph_init(SPMissingGlyph *glyph); -static void sp_missing_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_missing_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_missing_glyph_release(SPObject *object); static void sp_missing_glyph_set(SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_missing_glyph_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -77,7 +77,7 @@ static void sp_missing_glyph_init(SPMissingGlyph *glyph) glyph->vert_adv_y = 0; } -static void sp_missing_glyph_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_missing_glyph_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { ((SPObjectClass *) (parent_class))->build(object, document, repr); diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 47720c5d6..4def33f75 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -46,7 +46,7 @@ static void sp_namedview_class_init(SPNamedViewClass *klass); static void sp_namedview_init(SPNamedView *namedview); -static void sp_namedview_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_namedview_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_namedview_release(SPObject *object); static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *value); static void sp_namedview_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -120,7 +120,7 @@ static void sp_namedview_init(SPNamedView *nv) new (&nv->snap_manager) SnapManager(nv); } -static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, SPDocument *document, Inkscape::XML::Node *repr) { +static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, Document *document, Inkscape::XML::Node *repr) { bool old_grid_settings_present = false; // set old settings @@ -208,7 +208,7 @@ static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, SPDocument *doc } } -static void sp_namedview_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_namedview_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPNamedView *nv = (SPNamedView *) object; SPObjectGroup *og = (SPObjectGroup *) object; @@ -777,7 +777,7 @@ void sp_namedview_window_from_document(SPDesktop *desktop) void sp_namedview_update_layers_from_document (SPDesktop *desktop) { SPObject *layer = NULL; - SPDocument *document = desktop->doc(); + Document *document = desktop->doc(); SPNamedView *nv = desktop->namedview; if ( nv->default_layer_id != 0 ) { layer = document->getObjectById(g_quark_to_string(nv->default_layer_id)); @@ -878,7 +878,7 @@ static void sp_namedview_show_single_guide(SPGuide* guide, bool show) } } -void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr) +void sp_namedview_toggle_guides(Document *doc, Inkscape::XML::Node *repr) { unsigned int v; unsigned int set = sp_repr_get_boolean(repr, "showguides", &v); @@ -900,7 +900,7 @@ void sp_namedview_show_grids(SPNamedView * namedview, bool show, bool dirty_docu { namedview->grids_visible = show; - SPDocument *doc = SP_OBJECT_DOCUMENT (namedview); + Document *doc = SP_OBJECT_DOCUMENT (namedview); Inkscape::XML::Node *repr = SP_OBJECT_REPR(namedview); bool saved = sp_document_get_undo_sensitive(doc); @@ -966,7 +966,7 @@ static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color) return TRUE; } -SPNamedView *sp_document_namedview(SPDocument *document, const gchar *id) +SPNamedView *sp_document_namedview(Document *document, const gchar *id) { g_return_val_if_fail(document != NULL, NULL); diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 048096d8c..450e80d47 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -88,13 +88,13 @@ struct SPNamedViewClass { GType sp_namedview_get_type(); -SPNamedView *sp_document_namedview(SPDocument *document, gchar const *name); +SPNamedView *sp_document_namedview(Document *document, gchar const *name); void sp_namedview_window_from_document(SPDesktop *desktop); void sp_namedview_document_from_window(SPDesktop *desktop); void sp_namedview_update_layers_from_document (SPDesktop *desktop); -void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr); +void sp_namedview_toggle_guides(Document *doc, Inkscape::XML::Node *repr); void sp_namedview_show_grids(SPNamedView *namedview, bool show, bool dirty_document); Inkscape::CanvasGrid * sp_namedview_get_first_enabled_grid(SPNamedView *namedview); diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp index 4c3d5196e..7583049dc 100644 --- a/src/sp-object-repr.cpp +++ b/src/sp-object-repr.cpp @@ -94,7 +94,7 @@ static GType name_to_gtype(NameType name_type, gchar const *name); * Construct an SPRoot and all its descendents from the given repr. */ SPObject * -sp_object_repr_build_tree(SPDocument *document, Inkscape::XML::Node *repr) +sp_object_repr_build_tree(Document *document, Inkscape::XML::Node *repr) { g_assert(document != NULL); g_assert(repr != NULL); diff --git a/src/sp-object-repr.h b/src/sp-object-repr.h index f3a80f83c..0dec20fe0 100644 --- a/src/sp-object-repr.h +++ b/src/sp-object-repr.h @@ -21,7 +21,7 @@ class Node; } -SPObject *sp_object_repr_build_tree (SPDocument *document, Inkscape::XML::Node *repr); +SPObject *sp_object_repr_build_tree (ocument *document, Inkscape::XML::Node *repr); GType sp_repr_type_lookup (Inkscape::XML::Node *repr); diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 85e8a4e9a..fade379bd 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -27,7 +27,7 @@ * propagate to the SPRepr layer. This is important for implementation of * the undo stack, animations and other features. * - * SPObjects are bound to the higher-level container SPDocument, which + * SPObjects are bound to the higher-level container Document, which * provides document level functionality such as the undo stack, * dictionary and so on. Source: doc/architecture.txt */ @@ -84,7 +84,7 @@ static void sp_object_remove_child(SPObject *object, Inkscape::XML::Node *child) static void sp_object_order_changed(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref); static void sp_object_release(SPObject *object); -static void sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_object_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_object_private_set(SPObject *object, unsigned int key, gchar const *value); static Inkscape::XML::Node *sp_object_private_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -783,11 +783,11 @@ static void sp_object_order_changed(SPObject *object, Inkscape::XML::Node *child * the document and repr; implementation then will parse all of the attributes, * generate the children objects and so on. Invoking build on the SPRoot * object results in creation of the whole document tree (this is, what - * SPDocument does after the creation of the XML tree). + * Document does after the creation of the XML tree). * \see sp_object_release() */ static void -sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_object_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { /* Nothing specific here */ debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); @@ -809,7 +809,7 @@ sp_object_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *rep } void -sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned) +sp_object_invoke_build(SPObject *object, Document *document, Inkscape::XML::Node *repr, unsigned int cloned) { debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); @@ -960,7 +960,7 @@ sp_object_private_set(SPObject *object, unsigned int key, gchar const *value) switch (key) { case SP_ATTR_ID: if ( !SP_OBJECT_IS_CLONED(object) && object->repr->type() == Inkscape::XML::ELEMENT_NODE ) { - SPDocument *document=object->document; + Document *document=object->document; SPObject *conflict=NULL; gchar const *new_id = value; diff --git a/src/sp-object.h b/src/sp-object.h index bbb8ecbd0..2932da728 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -149,7 +149,7 @@ struct SPObject : public GObject { SPIXmlSpace xml_space; unsigned int hrefcount; /* number of xlink:href references */ unsigned int _total_hrefcount; /* our hrefcount + total descendants */ - SPDocument *document; /* Document we are part of */ + Document *document; /* Document we are part of */ SPObject *parent; /* Our parent (only one allowed) */ SPObject *children; /* Our children */ SPObject *_last_child; /* Remembered last child */ @@ -429,7 +429,7 @@ struct SPObject : public GObject { /** @brief Updates the object's display immediately * - * This method is called during the idle loop by SPDocument in order to update the object's + * This method is called during the idle loop by Document in order to update the object's * display. * * One additional flag is legal here: @@ -501,7 +501,7 @@ private: struct SPObjectClass { GObjectClass parent_class; - void (* build) (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); + void (* build) (SPObject *object, Document *doc, Inkscape::XML::Node *repr); void (* release) (SPObject *object); /* Virtual handlers of repr signals */ @@ -536,7 +536,7 @@ inline SPObject *sp_object_first_child(SPObject *parent) { } SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr); -void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned); +void sp_object_invoke_build(SPObject *object, Document *document, Inkscape::XML::Node *repr, unsigned int cloned); void sp_object_set(SPObject *object, unsigned int key, gchar const *value); diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp index ae0f7bf19..12e98d5ef 100644 --- a/src/sp-offset.cpp +++ b/src/sp-offset.cpp @@ -42,7 +42,7 @@ #include "xml/repr.h" -class SPDocument; +class Document; #define noOFFSET_VERBOSE @@ -73,7 +73,7 @@ static void sp_offset_class_init (SPOffsetClass * klass); static void sp_offset_init (SPOffset * offset); static void sp_offset_finalize(GObject *obj); -static void sp_offset_build (SPObject * object, SPDocument * document, +static void sp_offset_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static Inkscape::XML::Node *sp_offset_write (SPObject * object, Inkscape::XML::Document *doc, Inkscape::XML::Node * repr, guint flags); @@ -212,7 +212,7 @@ sp_offset_finalize(GObject *obj) * Virtual build: set offset attributes from corresponding repr. */ static void -sp_offset_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_offset_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build (object, document, repr); diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h index 998f1556b..0402ac3ce 100644 --- a/src/sp-paint-server.h +++ b/src/sp-paint-server.h @@ -63,7 +63,7 @@ SPPainter *sp_painter_free (SPPainter *painter); class SPPaintServerReference : public Inkscape::URIReference { public: SPPaintServerReference (SPObject *obj) : URIReference(obj) {} - SPPaintServerReference (SPDocument *doc) : URIReference(doc) {} + SPPaintServerReference (Document *doc) : URIReference(doc) {} SPPaintServer *getObject() const { return (SPPaintServer *)URIReference::getObject(); } diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 04ad386d9..b6637e9d1 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -56,7 +56,7 @@ static void sp_path_init(SPPath *path); static void sp_path_finalize(GObject *obj); static void sp_path_release(SPObject *object); -static void sp_path_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_path_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_path_set(SPObject *object, unsigned key, gchar const *value); static Inkscape::XML::Node *sp_path_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -211,7 +211,7 @@ sp_path_finalize(GObject *obj) * fill & style attributes, markers, and CSS properties. */ static void -sp_path_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_path_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { /* Are these calls actually necessary? */ sp_object_read_attr(object, "marker"); diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index 90af65b97..60d2254f7 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -64,7 +64,7 @@ struct SPPatPainter { static void sp_pattern_class_init (SPPatternClass *klass); static void sp_pattern_init (SPPattern *gr); -static void sp_pattern_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_pattern_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_pattern_release (SPObject *object); static void sp_pattern_set (SPObject *object, unsigned int key, const gchar *value); static void sp_pattern_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -151,7 +151,7 @@ sp_pattern_init (SPPattern *pat) } static void -sp_pattern_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_pattern_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) pattern_parent_class)->build) (* ((SPObjectClass *) pattern_parent_class)->build) (object, document, repr); @@ -443,7 +443,7 @@ pattern_users (SPPattern *pattern) SPPattern * pattern_chain (SPPattern *pattern) { - SPDocument *document = SP_OBJECT_DOCUMENT (pattern); + Document *document = SP_OBJECT_DOCUMENT (pattern); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); @@ -496,7 +496,7 @@ sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool se } const gchar * -pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move) +pattern_tile (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move) { Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document)); diff --git a/src/sp-pattern.h b/src/sp-pattern.h index f15285e27..48c450425 100644 --- a/src/sp-pattern.h +++ b/src/sp-pattern.h @@ -86,7 +86,7 @@ SPPattern *pattern_chain (SPPattern *pattern); SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property); void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set); -const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move); +const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, Document *document, Geom::Matrix transform, Geom::Matrix move); SPPattern *pattern_getroot (SPPattern *pat); diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp index 014c68c9b..0f9003f34 100644 --- a/src/sp-polygon.cpp +++ b/src/sp-polygon.cpp @@ -29,7 +29,7 @@ static void sp_polygon_class_init(SPPolygonClass *pc); static void sp_polygon_init(SPPolygon *polygon); -static void sp_polygon_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_polygon_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *sp_polygon_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static gchar *sp_polygon_description(SPItem *item); @@ -78,7 +78,7 @@ static void sp_polygon_init(SPPolygon */*polygon*/) /* Nothing here */ } -static void sp_polygon_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_polygon_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) { ((SPObjectClass *) parent_class)->build(object, document, repr); diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp index 08f446d61..ff7951992 100644 --- a/src/sp-polyline.cpp +++ b/src/sp-polyline.cpp @@ -23,7 +23,7 @@ static void sp_polyline_class_init (SPPolyLineClass *klass); static void sp_polyline_init (SPPolyLine *polyline); -static void sp_polyline_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_polyline_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_polyline_set (SPObject *object, unsigned int key, const gchar *value); static Inkscape::XML::Node *sp_polyline_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -81,7 +81,7 @@ sp_polyline_init (SPPolyLine * /*polyline*/) } static void -sp_polyline_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr) +sp_polyline_build (SPObject * object, Document * document, Inkscape::XML::Node * repr) { if (((SPObjectClass *) parent_class)->build) diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index aa026abb3..6e4b515c0 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -36,7 +36,7 @@ static void sp_rect_class_init(SPRectClass *klass); static void sp_rect_init(SPRect *rect); -static void sp_rect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_rect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_rect_set(SPObject *object, unsigned key, gchar const *value); static void sp_rect_update(SPObject *object, SPCtx *ctx, guint flags); static Inkscape::XML::Node *sp_rect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -108,7 +108,7 @@ sp_rect_init(SPRect */*rect*/) } static void -sp_rect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_rect_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build(object, document, repr); diff --git a/src/sp-root.cpp b/src/sp-root.cpp index bd935074d..e06405df5 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -41,7 +41,7 @@ class SPDesktop; static void sp_root_class_init(SPRootClass *klass); static void sp_root_init(SPRoot *root); -static void sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_root_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_root_release(SPObject *object); static void sp_root_set(SPObject *object, unsigned int key, gchar const *value); static void sp_root_child_added(SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -141,7 +141,7 @@ sp_root_init(SPRoot *root) * It then calls the object's parent class object's build function. */ static void -sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_root_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPGroup *group = (SPGroup *) object; SPRoot *root = (SPRoot *) object; diff --git a/src/sp-script.cpp b/src/sp-script.cpp index a40132450..d495ac51f 100644 --- a/src/sp-script.cpp +++ b/src/sp-script.cpp @@ -23,7 +23,7 @@ static void sp_script_release(SPObject *object); static void sp_script_update(SPObject *object, SPCtx *ctx, guint flags); static void sp_script_modified(SPObject *object, guint flags); static void sp_script_set(SPObject *object, unsigned int key, gchar const *value); -static void sp_script_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_script_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static Inkscape::XML::Node *sp_script_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static SPObjectClass *parent_class; @@ -76,7 +76,7 @@ static void sp_script_init(SPScript */*script*/) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_script_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_script_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) { ((SPObjectClass *) parent_class)->build(object, document, repr); diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index e7ded6303..638d2b040 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -56,7 +56,7 @@ static void sp_shape_class_init (SPShapeClass *klass); static void sp_shape_init (SPShape *shape); static void sp_shape_finalize (GObject *object); -static void sp_shape_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_shape_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_shape_release (SPObject *object); static void sp_shape_set(SPObject *object, unsigned key, gchar const *value); @@ -169,7 +169,7 @@ sp_shape_finalize (GObject *object) * \see sp_object_build() */ static void -sp_shape_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_shape_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) (parent_class))->build) { (*((SPObjectClass *) (parent_class))->build) (object, document, repr); diff --git a/src/sp-skeleton.cpp b/src/sp-skeleton.cpp index ec6c9b437..b92f738db 100644 --- a/src/sp-skeleton.cpp +++ b/src/sp-skeleton.cpp @@ -44,7 +44,7 @@ static void sp_skeleton_class_init(SPSkeletonClass *klass); static void sp_skeleton_init(SPSkeleton *skeleton); -static void sp_skeleton_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_skeleton_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_skeleton_release(SPObject *object); static void sp_skeleton_set(SPObject *object, unsigned int key, gchar const *value); static void sp_skeleton_update(SPObject *object, SPCtx *ctx, guint flags); @@ -100,7 +100,7 @@ sp_skeleton_init(SPSkeleton *skeleton) * sp-object-repr.cpp's repr_name_entries array. */ static void -sp_skeleton_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_skeleton_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { debug("0x%p",object); if (((SPObjectClass *) skeleton_parent_class)->build) { diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index 71906fcc0..f0f95fb9c 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -30,7 +30,7 @@ static void sp_spiral_class_init (SPSpiralClass *klass); static void sp_spiral_init (SPSpiral *spiral); -static void sp_spiral_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_spiral_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static Inkscape::XML::Node *sp_spiral_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_spiral_set (SPObject *object, unsigned int key, const gchar *value); static void sp_spiral_update (SPObject *object, SPCtx *ctx, guint flags); @@ -123,7 +123,7 @@ sp_spiral_init (SPSpiral * spiral) * Virtual build: set spiral properties from corresponding repr. */ static void -sp_spiral_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr) +sp_spiral_build (SPObject * object, Document * document, Inkscape::XML::Node * repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build (object, document, repr); diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 71c9ad1c7..88b24aa77 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -33,7 +33,7 @@ static void sp_star_class_init (SPStarClass *klass); static void sp_star_init (SPStar *star); -static void sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_star_build (SPObject * object, Document * document, Inkscape::XML::Node * repr); static Inkscape::XML::Node *sp_star_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_star_set (SPObject *object, unsigned int key, const gchar *value); static void sp_star_update (SPObject *object, SPCtx *ctx, guint flags); @@ -111,7 +111,7 @@ sp_star_init (SPStar * star) } static void -sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr) +sp_star_build (SPObject * object, Document * document, Inkscape::XML::Node * repr) { if (((SPObjectClass *) parent_class)->build) ((SPObjectClass *) parent_class)->build (object, document, repr); diff --git a/src/sp-string.cpp b/src/sp-string.cpp index 871338ad5..a1a974310 100644 --- a/src/sp-string.cpp +++ b/src/sp-string.cpp @@ -40,7 +40,7 @@ static void sp_string_class_init(SPStringClass *classname); static void sp_string_init(SPString *string); -static void sp_string_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_string_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_string_release(SPObject *object); static void sp_string_read_content(SPObject *object); static void sp_string_update(SPObject *object, SPCtx *ctx, unsigned flags); @@ -91,7 +91,7 @@ sp_string_init(SPString *string) } static void -sp_string_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_string_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr) { sp_string_read_content(object); diff --git a/src/sp-style-elem-test.h b/src/sp-style-elem-test.h index 6e24ee28c..75e2d450c 100644 --- a/src/sp-style-elem-test.h +++ b/src/sp-style-elem-test.h @@ -12,7 +12,7 @@ class SPStyleElemTest : public CxxTest::TestSuite { public: - SPDocument* _doc; + Document* _doc; SPStyleElemTest() : _doc(0) diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp index 46c311920..1becc4221 100644 --- a/src/sp-style-elem.cpp +++ b/src/sp-style-elem.cpp @@ -9,7 +9,7 @@ using Inkscape::XML::TEXT_NODE; static void sp_style_elem_init(SPStyleElem *style_elem); static void sp_style_elem_class_init(SPStyleElemClass *klass); -static void sp_style_elem_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); +static void sp_style_elem_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr); static void sp_style_elem_set(SPObject *object, unsigned const key, gchar const *const value); static void sp_style_elem_read_content(SPObject *); static Inkscape::XML::Node *sp_style_elem_write(SPObject *, Inkscape::XML::Document *, Inkscape::XML::Node *, guint flags); @@ -385,7 +385,7 @@ rec_add_listener(Inkscape::XML::Node &repr, } static void -sp_style_elem_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_style_elem_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { sp_style_elem_read_content(object); diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp index 41004db6e..8b176fb0a 100644 --- a/src/sp-symbol.cpp +++ b/src/sp-symbol.cpp @@ -31,7 +31,7 @@ static void sp_symbol_class_init (SPSymbolClass *klass); static void sp_symbol_init (SPSymbol *symbol); -static void sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_symbol_release (SPObject *object); static void sp_symbol_set (SPObject *object, unsigned int key, const gchar *value); static void sp_symbol_child_added (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); @@ -102,7 +102,7 @@ sp_symbol_init (SPSymbol *symbol) } static void -sp_symbol_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_symbol_build (SPObject *object, Document *document, Inkscape::XML::Node *repr) { SPGroup *group; SPSymbol *symbol; diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 61947311c..325b3b381 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -62,7 +62,7 @@ static void sp_text_class_init (SPTextClass *classname); static void sp_text_init (SPText *text); static void sp_text_release (SPObject *object); -static void sp_text_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_text_build (SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_text_set (SPObject *object, unsigned key, gchar const *value); static void sp_text_child_added (SPObject *object, Inkscape::XML::Node *rch, Inkscape::XML::Node *ref); static void sp_text_remove_child (SPObject *object, Inkscape::XML::Node *rch); @@ -147,7 +147,7 @@ sp_text_release (SPObject *object) } static void -sp_text_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_text_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr) { sp_object_read_attr(object, "x"); sp_object_read_attr(object, "y"); diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 83f9ecfa6..5323cde84 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -58,7 +58,7 @@ static void sp_tref_class_init(SPTRefClass *tref_class); static void sp_tref_init(SPTRef *tref); static void sp_tref_finalize(GObject *obj); -static void sp_tref_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_tref_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_tref_release(SPObject *object); static void sp_tref_set(SPObject *object, unsigned int key, gchar const *value); static void sp_tref_update(SPObject *object, SPCtx *ctx, guint flags); @@ -148,7 +148,7 @@ sp_tref_finalize(GObject *obj) * Reads the Inkscape::XML::Node, and initializes SPTRef variables. */ static void -sp_tref_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_tref_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) tref_parent_class)->build) { ((SPObjectClass *) tref_parent_class)->build(object, document, repr); @@ -585,7 +585,7 @@ sp_tref_convert_to_tspan(SPObject *obj) Inkscape::XML::Node *tref_repr = SP_OBJECT_REPR(tref); Inkscape::XML::Node *tref_parent = sp_repr_parent(tref_repr); - SPDocument *document = SP_OBJECT(tref)->document; + Document *document = SP_OBJECT(tref)->document; Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); Inkscape::XML::Node *new_tspan_repr = xml_doc->createElement("svg:tspan"); diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index 89a86218e..a35ceae72 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -52,7 +52,7 @@ static void sp_tspan_class_init(SPTSpanClass *classname); static void sp_tspan_init(SPTSpan *tspan); -static void sp_tspan_build(SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_tspan_build(SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_tspan_release(SPObject *object); static void sp_tspan_set(SPObject *object, unsigned key, gchar const *value); static void sp_tspan_update(SPObject *object, SPCtx *ctx, guint flags); @@ -129,7 +129,7 @@ sp_tspan_release(SPObject *object) } static void -sp_tspan_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_tspan_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr) { //SPTSpan *tspan = SP_TSPAN(object); @@ -293,7 +293,7 @@ static void sp_textpath_class_init(SPTextPathClass *classname); static void sp_textpath_init(SPTextPath *textpath); static void sp_textpath_finalize(GObject *obj); -static void sp_textpath_build(SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); +static void sp_textpath_build(SPObject * object, Document * document, Inkscape::XML::Node * repr); static void sp_textpath_release(SPObject *object); static void sp_textpath_set(SPObject *object, unsigned key, gchar const *value); static void sp_textpath_update(SPObject *object, SPCtx *ctx, guint flags); @@ -388,7 +388,7 @@ sp_textpath_release(SPObject *object) } static void -sp_textpath_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +sp_textpath_build(SPObject *object, Document *doc, Inkscape::XML::Node *repr) { //SPTextPath *textpath = SP_TEXTPATH(object); diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 76930086c..5e3c7ee10 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -44,7 +44,7 @@ static void sp_use_class_init(SPUseClass *classname); static void sp_use_init(SPUse *use); static void sp_use_finalize(GObject *obj); -static void sp_use_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr); +static void sp_use_build(SPObject *object, Document *document, Inkscape::XML::Node *repr); static void sp_use_release(SPObject *object); static void sp_use_set(SPObject *object, unsigned key, gchar const *value); static Inkscape::XML::Node *sp_use_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); @@ -154,7 +154,7 @@ sp_use_finalize(GObject *obj) } static void -sp_use_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +sp_use_build(SPObject *object, Document *document, Inkscape::XML::Node *repr) { if (((SPObjectClass *) parent_class)->build) { (* ((SPObjectClass *) parent_class)->build)(object, document, repr); @@ -666,7 +666,7 @@ sp_use_unlink(SPUse *use) if (!repr) return NULL; Inkscape::XML::Node *parent = sp_repr_parent(repr); - SPDocument *document = SP_OBJECT(use)->document; + Document *document = SP_OBJECT(use)->document; Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document); // Track the ultimate source of a chain of uses. diff --git a/src/splivarot.cpp b/src/splivarot.cpp index feba2cab6..87f3dd890 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -602,7 +602,7 @@ sp_selected_path_boolop(SPDesktop *desktop, bool_op bop, const unsigned int verb static void sp_selected_path_outline_add_marker( SPObject *marker_object, Geom::Matrix marker_transform, Geom::Scale stroke_scale, Geom::Matrix transform, - Inkscape::XML::Node *g_repr, Inkscape::XML::Document *xml_doc, SPDocument * doc ) + Inkscape::XML::Node *g_repr, Inkscape::XML::Document *xml_doc, Document * doc ) { SPMarker* marker = SP_MARKER (marker_object); SPItem* marker_item = sp_item_first_item_child (SP_OBJECT (marker_object)); @@ -813,7 +813,7 @@ sp_selected_path_outline(SPDesktop *desktop) if (res->descr_cmd.size() > 1) { // if there's 0 or 1 node left, drop this path altogether - SPDocument * doc = sp_desktop_document(desktop); + Document * doc = sp_desktop_document(desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); diff --git a/src/style-test.h b/src/style-test.h index a2d5fcf24..7ebbf08be 100644 --- a/src/style-test.h +++ b/src/style-test.h @@ -11,7 +11,7 @@ class StyleTest : public CxxTest::TestSuite { public: - SPDocument* _doc; + Document* _doc; StyleTest() : _doc(0) diff --git a/src/style.cpp b/src/style.cpp index dd8169282..e564aa60b 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -84,10 +84,10 @@ static void sp_style_read_istring(SPIString *val, gchar const *str); static void sp_style_read_ilength(SPILength *val, gchar const *str); static void sp_style_read_ilengthornormal(SPILengthOrNormal *val, gchar const *str); static void sp_style_read_itextdecoration(SPITextDecoration *val, gchar const *str); -static void sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document); -static void sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document); +static void sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document); +static void sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document); static void sp_style_read_ifontsize(SPIFontSize *val, gchar const *str); -static void sp_style_read_ifilter(gchar const *str, SPStyle *style, SPDocument *document); +static void sp_style_read_ifilter(gchar const *str, SPStyle *style, Document *document); static void sp_style_read_penum(SPIEnum *val, Inkscape::XML::Node *repr, gchar const *key, SPStyleEnum const *dict, bool can_explicitly_inherit); static void sp_style_read_plength(SPILength *val, Inkscape::XML::Node *repr, gchar const *key); @@ -443,7 +443,7 @@ sp_style_stroke_paint_server_ref_changed(SPObject *old_ref, SPObject *ref, SPSty * Returns a new SPStyle object with settings as per sp_style_clear(). */ SPStyle * -sp_style_new(SPDocument *document) +sp_style_new(Document *document) { SPStyle *const style = g_new0(SPStyle, 1); @@ -1086,7 +1086,7 @@ sp_style_merge_property(SPStyle *style, gint id, gchar const *val) break; } case SP_PROP_MARKER: - /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */ + /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */ /* style->marker[SP_MARKER_LOC] = g_quark_from_string(val); */ if (!style->marker[SP_MARKER_LOC].set) { g_free(style->marker[SP_MARKER_LOC].value); @@ -1097,7 +1097,7 @@ sp_style_merge_property(SPStyle *style, gint id, gchar const *val) break; case SP_PROP_MARKER_START: - /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */ + /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */ if (!style->marker[SP_MARKER_LOC_START].set) { g_free(style->marker[SP_MARKER_LOC_START].value); style->marker[SP_MARKER_LOC_START].value = g_strdup(val); @@ -1106,7 +1106,7 @@ sp_style_merge_property(SPStyle *style, gint id, gchar const *val) } break; case SP_PROP_MARKER_MID: - /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */ + /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */ if (!style->marker[SP_MARKER_LOC_MID].set) { g_free(style->marker[SP_MARKER_LOC_MID].value); style->marker[SP_MARKER_LOC_MID].value = g_strdup(val); @@ -1115,7 +1115,7 @@ sp_style_merge_property(SPStyle *style, gint id, gchar const *val) } break; case SP_PROP_MARKER_END: - /* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */ + /* TODO: Call sp_uri_reference_resolve(Document *document, guchar const *uri) */ if (!style->marker[SP_MARKER_LOC_END].set) { g_free(style->marker[SP_MARKER_LOC_END].value); style->marker[SP_MARKER_LOC_END].value = g_strdup(val); @@ -2111,7 +2111,7 @@ sp_style_merge_from_dying_parent(SPStyle *const style, SPStyle const *const pare static void -sp_style_set_ipaint_to_uri(SPStyle *style, SPIPaint *paint, const Inkscape::URI *uri, SPDocument *document) +sp_style_set_ipaint_to_uri(SPStyle *style, SPIPaint *paint, const Inkscape::URI *uri, Document *document) { // it may be that this style's SPIPaint has not yet created its URIReference; // now that we have a document, we can create it here @@ -2561,7 +2561,7 @@ sp_style_clear(SPStyle *style) /** \todo fixme: Do that text manipulation via parents */ SPObject *object = style->object; - SPDocument *document = style->document; + Document *document = style->document; gint const refcount = style->refcount; SPTextStyle *text = style->text; unsigned const text_private = style->text_private; @@ -3089,7 +3089,7 @@ sp_style_read_itextdecoration(SPITextDecoration *val, gchar const *str) * \param document Ignored */ static void -sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document) +sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document) { (void)style; // TODO (void)document; // TODO @@ -3114,7 +3114,7 @@ sp_style_read_icolor(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocume * \pre paint == \&style.fill || paint == \&style.stroke. */ static void -sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document) +sp_style_read_ipaint(SPIPaint *paint, gchar const *str, SPStyle *style, Document *document) { while (g_ascii_isspace(*str)) { ++str; @@ -3248,7 +3248,7 @@ sp_style_read_ifontsize(SPIFontSize *val, gchar const *str) * Set SPIFilter object from string. */ static void -sp_style_read_ifilter(gchar const *str, SPStyle * style, SPDocument *document) +sp_style_read_ifilter(gchar const *str, SPStyle * style, Document *document) { SPIFilter *f = &(style->filter); /* Try all possible values: inherit, none, uri */ diff --git a/src/style.h b/src/style.h index d5ccc4901..87d427547 100644 --- a/src/style.h +++ b/src/style.h @@ -243,7 +243,7 @@ struct SPStyle { /** Object we are attached to */ SPObject *object; /** Document we are associated with */ - SPDocument *document; + Document *document; /** Our text style component */ SPTextStyle *text; @@ -372,7 +372,7 @@ struct SPStyle { const gchar *getStrokeURI() {if (stroke.value.href) return stroke.value.href->getURI()->toString(); else return NULL;} }; -SPStyle *sp_style_new(SPDocument *document); +SPStyle *sp_style_new(Document *document); SPStyle *sp_style_new_from_object(SPObject *object); diff --git a/src/svg-view-widget.cpp b/src/svg-view-widget.cpp index 10d997656..5c33075c9 100644 --- a/src/svg-view-widget.cpp +++ b/src/svg-view-widget.cpp @@ -205,7 +205,7 @@ sp_svg_view_widget_view_resized (SPViewWidget *vw, Inkscape::UI::View::View */*v * Constructs new SPSVGSPViewWidget object and returns pointer to it. */ GtkWidget * -sp_svg_view_widget_new (SPDocument *doc) +sp_svg_view_widget_new (Document *doc) { GtkWidget *widget; diff --git a/src/svg-view-widget.h b/src/svg-view-widget.h index cd609b07a..9f6410f67 100644 --- a/src/svg-view-widget.h +++ b/src/svg-view-widget.h @@ -16,7 +16,7 @@ #include "display/display-forward.h" #include "ui/view/view-widget.h" -class SPDocument; +class Document; class SPSVGSPViewWidget; class SPSVGSPViewWidgetClass; @@ -28,7 +28,7 @@ class SPSVGSPViewWidgetClass; GtkType sp_svg_view_widget_get_type (void); -GtkWidget *sp_svg_view_widget_new (SPDocument *doc); +GtkWidget *sp_svg_view_widget_new (Document *doc); void sp_svg_view_widget_set_resize (SPSVGSPViewWidget *vw, bool resize, gdouble width, gdouble height); diff --git a/src/svg-view.cpp b/src/svg-view.cpp index bd46dd17a..35a51cfcd 100644 --- a/src/svg-view.cpp +++ b/src/svg-view.cpp @@ -188,7 +188,7 @@ arena_handler (SPCanvasArena */*arena*/, NRArenaItem *ai, GdkEvent *event, SPSVG * Callback connected with set_document signal. */ void -SPSVGView::setDocument (SPDocument *document) +SPSVGView::setDocument (Document *document) { if (doc()) { sp_item_invoke_hide (SP_ITEM (sp_document_root (doc())), _dkey); diff --git a/src/svg-view.h b/src/svg-view.h index 838a95b03..ab59ca417 100644 --- a/src/svg-view.h +++ b/src/svg-view.h @@ -47,7 +47,7 @@ public: void doRescale (bool event); - virtual void setDocument (SPDocument*); + virtual void setDocument (Document*); virtual void mouseover(); virtual void mouseout(); virtual bool shutdown() { return true; } diff --git a/src/test-helpers.h b/src/test-helpers.h index 8dba0c942..3eacb7d13 100644 --- a/src/test-helpers.h +++ b/src/test-helpers.h @@ -32,7 +32,7 @@ T* createSuiteAndDocument( void (*fun)(T*&) ) static_cast(g_object_new(inkscape_get_type(), NULL)); } - SPDocument* tmp = sp_document_new( NULL, TRUE, true ); + Document* tmp = sp_document_new( NULL, TRUE, true ); if ( tmp ) { fun( suite ); if ( suite ) diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index f574b69fb..61960086a 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -301,7 +301,7 @@ text_flow_into_shape() if (!desktop) return; - SPDocument *doc = sp_desktop_document (desktop); + Document *doc = sp_desktop_document (desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); @@ -393,7 +393,7 @@ text_unflow () if (!desktop) return; - SPDocument *doc = sp_desktop_document (desktop); + Document *doc = sp_desktop_document (desktop); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::Selection *selection = sp_desktop_selection(desktop); diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 3f55d040b..692e22112 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -415,7 +415,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P GSList *items = g_slist_prepend (NULL, item); GSList *selected = NULL; GSList *to_select = NULL; - SPDocument *doc = SP_OBJECT_DOCUMENT(item); + Document *doc = SP_OBJECT_DOCUMENT(item); sp_item_list_to_curves (items, &selected, &to_select); g_slist_free (items); SPObject* newObj = doc->getObjectByRepr((Inkscape::XML::Node *) to_select->data); @@ -524,7 +524,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P SP_OBJECT(item)->deleteObject(true, true); sp_object_unref(SP_OBJECT(item), NULL); } else { // duplicate - SPDocument *doc = SP_OBJECT_DOCUMENT(item); + Document *doc = SP_OBJECT_DOCUMENT(item); Inkscape::XML::Document* xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *old_repr = SP_OBJECT_REPR(item); SPObject *old_obj = doc->getObjectByRepr(old_repr); diff --git a/src/uri-references.cpp b/src/uri-references.cpp index d979fe292..33d599180 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -32,7 +32,7 @@ URIReference::URIReference(SPObject *owner) /* FIXME !!! attach to owner's destroy signal to clean up in case */ } -URIReference::URIReference(SPDocument *owner_document) +URIReference::URIReference(Document *owner_document) : _owner(NULL), _owner_document(owner_document), _obj(NULL), _uri(NULL) { g_assert(_owner_document != NULL); @@ -45,7 +45,7 @@ URIReference::~URIReference() void URIReference::attach(const URI &uri) throw(BadURIException) { - SPDocument *document; + Document *document; if (_owner) { document = SP_OBJECT_DOCUMENT(_owner); } else if (_owner_document) { @@ -142,7 +142,7 @@ void URIReference::_release(SPObject *obj) -SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ) +SPObject* sp_css_uri_reference_resolve( Document *document, const gchar *uri ) { SPObject* ref = 0; @@ -158,7 +158,7 @@ SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ) } SPObject * -sp_uri_reference_resolve (SPDocument *document, const gchar *uri) +sp_uri_reference_resolve (Document *document, const gchar *uri) { SPObject* ref = 0; diff --git a/src/uri-references.h b/src/uri-references.h index a98c84153..0f7a724ba 100644 --- a/src/uri-references.h +++ b/src/uri-references.h @@ -41,7 +41,7 @@ public: * is holding a reference to the target object. */ URIReference(SPObject *owner); - URIReference(SPDocument *owner_document); + URIReference(Document *owner_document); /** * Destructor. Calls shutdown() if the reference has not been @@ -114,7 +114,7 @@ public: return (bool)_uri; } - SPDocument *getOwnerDocument() { return _owner_document; } + Document *getOwnerDocument() { return _owner_document; } SPObject *getOwnerObject() { return _owner; } protected: @@ -125,7 +125,7 @@ protected: private: SPObject *_owner; - SPDocument *_owner_document; + Document *_owner_document; sigc::connection _connection; sigc::connection _release_connection; SPObject *_obj; @@ -145,8 +145,8 @@ private: /** * Resolves an item referenced by a URI in CSS form contained in "url(...)" */ -SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ); +SPObject* sp_css_uri_reference_resolve( Document *document, const gchar *uri ); -SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri); +SPObject *sp_uri_reference_resolve (Document *document, const gchar *uri); #endif diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp index ab46b21a6..133311625 100644 --- a/src/vanishing-point.cpp +++ b/src/vanishing-point.cpp @@ -462,7 +462,7 @@ VPDragger::printVPs() { } } -VPDrag::VPDrag (SPDocument *document) +VPDrag::VPDrag (Document *document) { this->document = document; this->selection = sp_desktop_selection(inkscape_active_desktop()); diff --git a/src/vanishing-point.h b/src/vanishing-point.h index 9fcb6bb46..311315404 100644 --- a/src/vanishing-point.h +++ b/src/vanishing-point.h @@ -158,14 +158,14 @@ public: struct VPDrag { public: - VPDrag(SPDocument *document); + VPDrag(Document *document); ~VPDrag(); VPDragger *getDraggerFor (VanishingPoint const &vp); bool dragging; - SPDocument *document; + Document *document; GList *draggers; GSList *lines; diff --git a/src/verbs.cpp b/src/verbs.cpp index 43ddc1459..10f4f3acc 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -607,7 +607,7 @@ Verb::get_action(Inkscape::UI::View::View *view) } void -Verb::sensitive(SPDocument *in_doc, bool in_sensitive) +Verb::sensitive(Document *in_doc, bool in_sensitive) { // printf("Setting sensitivity of \"%s\" to %d\n", _name, in_sensitive); if (_actions != NULL) { @@ -635,7 +635,7 @@ Verb::get_tip (void) } void -Verb::name(SPDocument *in_doc, Glib::ustring in_name) +Verb::name(Document *in_doc, Glib::ustring in_name) { if (_actions != NULL) { for (ActionTable::iterator cur_action = _actions->begin(); @@ -759,7 +759,7 @@ FileVerb::perform(SPAction *action, void *data, void */*pdata*/) /* These aren't used, but are here to remind people not to use the CURRENT_DOCUMENT macros unless they really have to. */ Inkscape::UI::View::View *current_view = sp_action_get_view(action); - SPDocument *current_document = current_view->doc(); + Document *current_document = current_view->doc(); #endif SPDesktop *desktop = dynamic_cast(sp_action_get_view(action)); @@ -1605,7 +1605,7 @@ TextVerb::perform(SPAction *action, void */*data*/, void */*pdata*/) if (!dt) return; - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); (void)doc; Inkscape::XML::Node *repr = SP_OBJECT_REPR(dt->namedview); (void)repr; @@ -1620,7 +1620,7 @@ ZoomVerb::perform(SPAction *action, void *data, void */*pdata*/) return; SPEventContext *ec = dt->event_context; - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); Inkscape::XML::Node *repr = SP_OBJECT_REPR(dt->namedview); @@ -2066,7 +2066,7 @@ EffectLastVerb::perform(SPAction *action, void *data, void */*pdata*/) /* These aren't used, but are here to remind people not to use the CURRENT_DOCUMENT macros unless they really have to. */ Inkscape::UI::View::View *current_view = sp_action_get_view(action); - // SPDocument *current_document = SP_VIEW_DOCUMENT(current_view); + // Document *current_document = SP_VIEW_DOCUMENT(current_view); Inkscape::Extension::Effect *effect = Inkscape::Extension::Effect::get_last_effect(); if (effect == NULL) return; @@ -2134,7 +2134,7 @@ FitCanvasVerb::perform(SPAction *action, void *data, void */*pdata*/) { SPDesktop *dt = static_cast(sp_action_get_view(action)); if (!dt) return; - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); if (!doc) return; switch ((long) data) { @@ -2203,7 +2203,7 @@ LockAndHideVerb::perform(SPAction *action, void *data, void */*pdata*/) { SPDesktop *dt = static_cast(sp_action_get_view(action)); if (!dt) return; - SPDocument *doc = sp_desktop_document(dt); + Document *doc = sp_desktop_document(dt); if (!doc) return; switch ((long) data) { diff --git a/src/verbs.h b/src/verbs.h index c3b88918b..51bf0e34b 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -437,8 +437,8 @@ public: static void delete_all_view (Inkscape::UI::View::View * view); void delete_view (Inkscape::UI::View::View * view); - void sensitive (SPDocument * in_doc = NULL, bool in_sensitive = true); - void name (SPDocument * in_doc = NULL, Glib::ustring in_name = ""); + void sensitive (Document * in_doc = NULL, bool in_sensitive = true); + void name (Document * in_doc = NULL, Glib::ustring in_name = ""); // Yes, multiple public, protected and private sections are bad. We'll clean that up later protected: diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index a2f88c16d..fc2e82722 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -820,7 +820,7 @@ SPDesktopWidget::shutdown() g_assert(desktop != NULL); if (inkscape_is_sole_desktop_for_document(*desktop)) { - SPDocument *doc = desktop->doc(); + Document *doc = desktop->doc(); if (doc->isModifiedSinceSave()) { GtkWidget *dialog; @@ -1721,7 +1721,7 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale) dtw->update = 1; /* The desktop region we always show unconditionally */ - SPDocument *doc = dtw->desktop->doc(); + Document *doc = dtw->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; diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp index 5e9d30bcd..683b041b0 100644 --- a/src/widgets/fill-style.cpp +++ b/src/widgets/fill-style.cpp @@ -355,7 +355,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel, if (!desktop) { return; } - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); Inkscape::Selection *selection = sp_desktop_selection (desktop); GSList const *items = selection->itemList(); diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index f24a6781b..15b65c239 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -248,7 +248,7 @@ sp_gradient_selector_get_spread (SPGradientSelector *sel) } void -sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector) +sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector) { g_return_if_fail (sel != NULL); g_return_if_fail (SP_IS_GRADIENT_SELECTOR (sel)); @@ -307,7 +307,7 @@ sp_gradient_selector_edit_vector_clicked (GtkWidget */*w*/, SPGradientSelector * static void sp_gradient_selector_add_vector_clicked (GtkWidget */*w*/, SPGradientSelector *sel) { - SPDocument *doc = sp_gradient_vector_selector_get_document ( + Document *doc = sp_gradient_vector_selector_get_document ( SP_GRADIENT_VECTOR_SELECTOR (sel->vectors)); if (!doc) diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h index e68dfecfc..63e18554d 100644 --- a/src/widgets/gradient-selector.h +++ b/src/widgets/gradient-selector.h @@ -68,7 +68,7 @@ GtkWidget *sp_gradient_selector_new (void); void sp_gradient_selector_set_mode (SPGradientSelector *sel, guint mode); void sp_gradient_selector_set_units (SPGradientSelector *sel, guint units); void sp_gradient_selector_set_spread (SPGradientSelector *sel, guint spread); -void sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector); +void sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector); void sp_gradient_selector_set_bbox (SPGradientSelector *sel, gdouble x0, gdouble y0, gdouble x1, gdouble y1); SPGradientUnits sp_gradient_selector_get_units (SPGradientSelector *sel); diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index ddd9fd96a..f64dc7bd8 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -167,7 +167,7 @@ gr_prepare_label (SPObject *obj) GtkWidget * gr_vector_list (SPDesktop *desktop, bool selection_empty, SPGradient *gr_selected, bool gr_multi) { - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); GtkWidget *om = gtk_option_menu_new (); GtkWidget *m = gtk_menu_new (); @@ -435,7 +435,7 @@ GtkWidget * gr_change_widget (SPDesktop *desktop) { Inkscape::Selection *selection = sp_desktop_selection (desktop); - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); SPEventContext *ev = sp_desktop_event_context (desktop); SPGradient *gr_selected = NULL; diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 1f0c07754..c6a7b37f4 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -155,7 +155,7 @@ sp_gradient_vector_selector_destroy (GtkObject *object) } GtkWidget * -sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr) +sp_gradient_vector_selector_new (Document *doc, SPGradient *gr) { GtkWidget *gvs; @@ -174,7 +174,7 @@ sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr) } void -sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr) +sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr) { static gboolean suppress = FALSE; @@ -220,7 +220,7 @@ sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocum /* The case of setting NULL -> NULL is not very interesting */ } -SPDocument * +Document * sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs) { g_return_val_if_fail (gvs != NULL, NULL); @@ -1037,7 +1037,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient // Once the user edits a gradient, it stops being auto-collectable if (SP_OBJECT_REPR(gradient)->attribute("inkscape:collect")) { - SPDocument *document = SP_OBJECT_DOCUMENT (gradient); + Document *document = SP_OBJECT_DOCUMENT (gradient); bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive (document, false); SP_OBJECT_REPR(gradient)->setAttribute("inkscape:collect", NULL); diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h index ea1f5159f..aa5444755 100644 --- a/src/widgets/gradient-vector.h +++ b/src/widgets/gradient-vector.h @@ -31,7 +31,7 @@ struct SPGradientVectorSelector { guint idlabel : 1; - SPDocument *doc; + Document *doc; SPGradient *gr; /* Vector menu */ @@ -50,11 +50,11 @@ struct SPGradientVectorSelectorClass { GType sp_gradient_vector_selector_get_type(void); -GtkWidget *sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gradient); +GtkWidget *sp_gradient_vector_selector_new (Document *doc, SPGradient *gradient); -void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr); +void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr); -SPDocument *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs); +Document *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs); SPGradient *sp_gradient_vector_selector_get_gradient (SPGradientVectorSelector *gvs); /* fixme: rethink this (Lauris) */ diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 6be4b49b3..5e47bd8e4 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -908,7 +908,7 @@ GdkPixbuf *sp_icon_image_load_pixmap(gchar const *name, unsigned /*lsize*/, unsi // takes doc, root, icon, and icon name to produce pixels extern "C" guchar * -sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, +sp_icon_doc_icon( Document *doc, NRArenaItem *root, gchar const *name, unsigned psize ) { bool const dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpSvg"); @@ -1038,7 +1038,7 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root, struct svg_doc_cache_t { - SPDocument *doc; + Document *doc; NRArenaItem *root; }; @@ -1081,7 +1081,7 @@ static std::list &icons_svg_paths() static guchar *load_svg_pixels(gchar const *name, unsigned /*lsize*/, unsigned psize) { - SPDocument *doc = NULL; + Document *doc = NULL; NRArenaItem *root = NULL; svg_doc_cache_t *info = NULL; diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index a101b9eeb..d203e094f 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -747,7 +747,7 @@ sp_psel_pattern_change(GtkWidget *widget, SPPaintSelector *psel) * Returns NULL if there are no patterns in the document. */ GSList * -ink_pattern_list_get (SPDocument *source) +ink_pattern_list_get (Document *source) { if (source == NULL) return NULL; @@ -768,7 +768,7 @@ ink_pattern_list_get (SPDocument *source) * Adds menu items for pattern list - derived from marker code, left hb etc in to make addition of previews easier at some point. */ static void -sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source*/) +sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/) { for (; pattern_list != NULL; pattern_list = pattern_list->next) { @@ -813,7 +813,7 @@ sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source* * */ static void -sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *source, SPDocument *pattern_doc) +sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source, Document *pattern_doc) { (void)current_doc; (void)pattern_doc; @@ -838,9 +838,9 @@ sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *sou static void -ink_pattern_menu_populate_menu(GtkWidget *m, SPDocument *doc) +ink_pattern_menu_populate_menu(GtkWidget *m, Document *doc) { - static SPDocument *patterns_doc = NULL; + static Document *patterns_doc = NULL; // find and load patterns.svg if (patterns_doc == NULL) { @@ -878,7 +878,7 @@ ink_pattern_menu(GtkWidget *mnu) /* Create new menu widget */ GtkWidget *m = gtk_menu_new(); gtk_widget_show(m); - SPDocument *doc = SP_ACTIVE_DOCUMENT; + Document *doc = SP_ACTIVE_DOCUMENT; if (!doc) { GtkWidget *i; diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index f168cedeb..6d28f80e5 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -153,7 +153,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) SPDesktop *desktop = SP_ACTIVE_DESKTOP; Inkscape::Selection *selection = sp_desktop_selection(desktop); - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); sp_document_ensure_up_to_date (document); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index f502f87d3..e0002e5c2 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -81,7 +81,7 @@ sigc::connection marker_start_menu_connection; sigc::connection marker_mid_menu_connection; sigc::connection marker_end_menu_connection; -static SPObject *ink_extract_marker_name(gchar const *n, SPDocument *doc); +static SPObject *ink_extract_marker_name(gchar const *n, Document *doc); static void ink_markers_menu_update(Gtk::Container* spw, SPMarkerLoc const which); static Inkscape::UI::Cache::SvgPreview svg_preview_cache; @@ -307,7 +307,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw) g_object_set_data (G_OBJECT (spw), "update", GINT_TO_POINTER (TRUE)); SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); Inkscape::Selection *selection = sp_desktop_selection (desktop); GSList const *items = selection->itemList(); @@ -550,7 +550,7 @@ sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/ */ static Gtk::Image * sp_marker_prev_new(unsigned psize, gchar const *mname, - SPDocument *source, SPDocument *sandbox, + Document *source, Document *sandbox, gchar const *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root) { // Retrieve the marker named 'mname' from the source SVG document @@ -617,7 +617,7 @@ sp_marker_prev_new(unsigned psize, gchar const *mname, * Returns NULL if there are no markers in the document. */ GSList * -ink_marker_list_get (SPDocument *source) +ink_marker_list_get (Document *source) { if (source == NULL) return NULL; @@ -641,7 +641,7 @@ ink_marker_list_get (SPDocument *source) * Adds previews of markers in marker_list to the given menu widget */ static void -sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id) +sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Document *sandbox, gchar const *menu_id) { // Do this here, outside of loop, to speed up preview generation: NRArena const *arena = NRArena::create(); @@ -695,7 +695,7 @@ sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPD * */ static void -sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar const *menu_id) +sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *source, Document */*markers_doc*/, Document *sandbox, gchar const *menu_id) { GSList *ml = ink_marker_list_get(source); GSList *clean_ml = NULL; @@ -716,7 +716,7 @@ sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument * /** * Returns a new document containing default start, mid, and end markers. */ -SPDocument * +Document * ink_markers_preview_doc () { gchar const *buffer = "" @@ -749,9 +749,9 @@ gchar const *buffer = "(spw->get_data("miterlimit")); SPDesktop *desktop = SP_ACTIVE_DESKTOP; - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); Inkscape::Selection *selection = sp_desktop_selection (desktop); GSList const *items = selection->itemList(); @@ -1833,7 +1833,7 @@ sp_stroke_style_update_marker_menus(Gtk::Container *spw, GSList const *objects) * the caller should free the buffer when they no longer need it. */ static SPObject* -ink_extract_marker_name(gchar const *n, SPDocument *doc) +ink_extract_marker_name(gchar const *n, Document *doc) { gchar const *p = n; while (*p != '\0' && *p != '#') { diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 8bb15ae6f..c13ad9ba6 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -1886,7 +1886,7 @@ void toggle_snap_callback (GtkToggleAction *act, gpointer data) { //data points SPDesktop *dt = reinterpret_cast(ptr); SPNamedView *nv = sp_desktop_namedview(dt); - SPDocument *doc = SP_OBJECT_DOCUMENT(nv); + Document *doc = SP_OBJECT_DOCUMENT(nv); if (dt == NULL || nv == NULL) { g_warning("No desktop or namedview specified (in toggle_snap_callback)!"); @@ -3327,7 +3327,7 @@ static void box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis) { SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" ); - SPDocument *document = sp_desktop_document(desktop); + Document *document = sp_desktop_document(desktop); // quit if run by the attr_changed or selection changed listener if (g_object_get_data( dataKludge, "freeze" )) { @@ -3407,7 +3407,7 @@ static void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); EgeAdjustmentAction* eact = 0; - SPDocument *document = sp_desktop_document (desktop); + Document *document = sp_desktop_document (desktop); Persp3D *persp = document->current_persp3d; EgeAdjustmentAction* box3d_angle_x = 0; @@ -6845,7 +6845,7 @@ static void sp_connector_path_set_ignore(void) static void connector_spacing_changed(GtkAdjustment *adj, GObject* tbl) { SPDesktop *desktop = (SPDesktop *) g_object_get_data( tbl, "desktop" ); - SPDocument *doc = sp_desktop_document(desktop); + Document *doc = sp_desktop_document(desktop); if (!sp_document_get_undo_sensitive(doc)) { diff --git a/src/xml/rebase-hrefs.h b/src/xml/rebase-hrefs.h index b4f288c4d..2f82a5587 100644 --- a/src/xml/rebase-hrefs.h +++ b/src/xml/rebase-hrefs.h @@ -4,14 +4,14 @@ #include #include "util/list.h" #include "xml/attribute-record.h" -struct SPDocument; +struct Document; namespace Inkscape { namespace XML { gchar *calc_abs_doc_base(gchar const *doc_base); -void rebase_hrefs(SPDocument *doc, gchar const *new_base, bool spns); +void rebase_hrefs(Document *doc, gchar const *new_base, bool spns); Inkscape::Util::List rebase_href_attrs( gchar const *old_abs_base, -- 2.30.2