summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40021bb)
raw | patch | inline | side by side (parent: 40021bb)
author | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 05:40:36 +0000 (05:40 +0000) | ||
committer | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 05:40:36 +0000 (05:40 +0000) |
159 files changed:
diff --git a/configure.ac b/configure.ac
index b804d0debdf762147ddc2890f8c957d842f153b2..db3204dbbc3ab07eee05c103c4a0c8264e912f3e 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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
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
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
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 de986ca16e3a19fec2f3f1943ede0926a82c766e..5967c7cfca0bd8134ea87f8754a18ceec41be12b 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
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 f7022584f73624bfa6a28a9603369856afd9632d..aedd72e13d269bcd40b0646b24b31731eed19a12 100644 (file)
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
#include <errno.h>
#endif
-#if HAVE_SYS_STAT_H
+//--tullarisc #if HAVE_SYS_STAT_H
#include <sys/stat.h>
-#endif
+//#endif
#include "javabind.h"
#include "javabind-private.h"
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 128b5f2ff187bd27f882963d59180c587e857e87..7e6eaaa22e80adef8ceb0c22d3682cb97f1e5d35 100644 (file)
--- 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 241279100a8bee0e7b6bfc8033d5275cd3c1b904..f09a2f9f6eb369620da9a63a354d6e0e401efe86 100644 (file)
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
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);
}
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);
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 5cffa66d954bcfdcd4ef7e8a110c338c5a31f5b1..9ec0625aaf1323d477e4a92f3ad58237164feb41 100644 (file)
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
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);
}
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);
// 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
index c8c51b5510f4ae5c69e90bcb7f62f2478f1da6c7..62e4c865f03ee3089a896c3f2559e37001d32713 100644 (file)
--- a/src/color-profile-fns.h
+++ b/src/color-profile-fns.h
#include <lcms.h>
#endif // ENABLE_LCMS
-class SPDocument;
+class Document;
namespace Inkscape {
#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 );
index cdbf76b446721bcd2f4799ed08442ab8eeb6a8fc..d7b361c5087c90e73772784ebeb29c84d5bed1dc 100644 (file)
--- a/src/color-profile-test.h
+++ b/src/color-profile-test.h
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 5868a958294f23234d2c1b9ecfedd066fd93a5f8..b2487a6a9ec28eb787b07dd6370b9738189fb13e 100644 (file)
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
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));
}
/**
* 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);
//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");
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");
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 2e57e7ef0221b3b813b00dca270d4df2dbabf84a..2d8ac5b6d0214cf729ca976401b2b118e582379e 100644 (file)
--- a/src/color-profile.h
+++ b/src/color-profile.h
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
index 03e4796bd4526be23a3448d42f471d3dd8de3a88..89ffdc65e52cc0d3761aa7aec00b663bb52b2a82 100644 (file)
/**
- * 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.
*
index cd00d421115f8274b2861699d2957e281dfc3b8f..01c64f4fdc101da3cd14310dcbe0d76b0ad8da3b 100644 (file)
/**
- * 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.
*
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 4a18a6913be5ddebf2bae19315a599260f279f39..c431600f361d095cf8294c5fe6c2102feff6d143 100644 (file)
--- a/src/conditions.cpp
+++ b/src/conditions.cpp
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 43c9c0b66cb652c5fa906f50d7d1f5e1c5ca20b2..0bc961e5d3360199e0604c9b089067c80451da3d 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
{
// 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);
index 2131bdced797be78964e0e798c769ba9535f06d7..17e5f6f32a462d6ed4943558eca8f4c425cade58 100644 (file)
@@ -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);
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);
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();
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() ) {
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 cea478f85847c35d149ef913d8e6d63b32b26856..41b7ab4da1fba639b4dffc5fe4a66e5473ed233e 100644 (file)
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
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;
index 481bf35ea56ab3cabfbd8b0f30b6b35c6fb9b2be..b0ca4b84a620b3110adb3005635f792db337df04 100644 (file)
--- a/src/desktop-handles.cpp
+++ b/src/desktop-handles.cpp
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 a8d0a3d1e9bae4672434edb7c895c4e658692f40..8c48d0bbd7a0a46b891c66c6e7538160e76807a3 100644 (file)
--- a/src/desktop-handles.h
+++ b/src/desktop-handles.h
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 6b7c20094766f35cf582a995900ac2f1a9aaa3e5..4f832682d9586cc5ea8e59acf35549b8f87fa30e 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
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);
* Make desktop switch documents.
*/
void
-SPDesktop::change_document (SPDocument *theDocument)
+SPDesktop::change_document (Document *theDocument)
{
g_return_if_fail (theDocument != NULL);
* 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 73b9262ddd01d6dfcd93aadc7c8c06d3030e11ab..f9e7f6a17eeb1347e5e3cc50ccc18d38b476cb83 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
sigc::signal<void, SPObject *> _layer_changed_signal;
sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal;
sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal;
- sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot)
+ sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,Document*> & slot)
{
return _document_replaced_signal.connect (slot);
}
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);
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() {}
void push_current_zoom (GList**);
- sigc::signal<void,SPDesktop*,SPDocument*> _document_replaced_signal;
+ sigc::signal<void,SPDesktop*,Document*> _document_replaced_signal;
sigc::signal<void> _activate_signal;
sigc::signal<void> _deactivate_signal;
sigc::signal<void,SPDesktop*,SPEventContext*> _event_context_changed_signal;
diff --git a/src/document-private.h b/src/document-private.h
index fa4754248f082b84ff2eea883dd0bec593da7977..221cfa17c963f668c2be88af3c23336f413ae1ed 100644 (file)
--- a/src/document-private.h
+++ b/src/document-private.h
}
-struct SPDocumentPrivate {
- typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap;
- typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap;
+struct DocumentPrivate {
+ typedef std::map<GQuark, Document::IDChangedSignal> IDChangedSignalMap;
+ typedef std::map<GQuark, Document::ResourcesChangedSignal> ResourcesChangedSignalMap;
GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */
GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */
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 e424a289c5ce048829b7b80a36d7c01f1d1611ff..b7b724162b8ef9ddf77c57cf55b046074b395a7f 100644 (file)
--- a/src/document-subset.h
+++ b/src/document-subset.h
#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 ae1c82e71f4e4d2e02b4ab2e6e480599ac26096f..9dbf5db25b915b127987f2c640ef3e81ab74106f 100644 (file)
--- a/src/document-undo.cpp
+++ b/src/document-undo.cpp
* 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,
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);
* 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);
}
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);
}
void
sp_document_reset_key (Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkObject *base)
{
- SPDocument *doc = (SPDocument *) base;
+ Document *doc = (Document *) base;
doc->actionkey = NULL;
}
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());
}
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);
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:");
}
gboolean
-sp_document_undo (SPDocument *doc)
+sp_document_undo (Document *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
}
gboolean
-sp_document_redo (SPDocument *doc)
+sp_document_redo (Document *doc)
{
using Inkscape::Debug::EventTracker;
using Inkscape::Debug::SimpleEvent;
}
void
-sp_document_clear_undo (SPDocument *doc)
+sp_document_clear_undo (Document *doc)
{
if (doc->priv->undo)
doc->priv->undoStackObservers.notifyClearUndoEvent();
}
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 288e52c6d88844244245381ac56986638d40d7e9..750b2930120649f74f0506a3ee3f81b0220103b3 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
-#define __SP_DOCUMENT_C__
+#define __DOCUMENT_C__
/** \file
- * SPDocument manipulation
+ * Document manipulation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* 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.
*/
static unsigned long next_serial = 0;
-SPDocument::SPDocument() :
+Document::Document() :
keepalive(FALSE),
virgin(TRUE),
modified_since_save(FALSE),
// Don't use the Consolidate moves optimisation.
router->ConsolidateMoves = false;
- SPDocumentPrivate *p = new SPDocumentPrivate();
+ DocumentPrivate *p = new DocumentPrivate();
p->serial = next_serial++;
priv->undoStackObservers.add(p->console_output_undo_observer);
}
-SPDocument::~SPDocument() {
+Document::~Document() {
collectOrphans();
// kill/unhook this first
}
-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) ) {
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);
_collection_queue = g_slist_prepend(_collection_queue, object);
}
-void SPDocument::collectOrphans() {
+void Document::collectOrphans() {
while (_collection_queue) {
GSList *objects=_collection_queue;
_collection_queue = NULL;
}
}
-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;
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;
}
* 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;
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);
}
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);
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);
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));
}
* 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();
}
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);
*
* \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();
}
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) {
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() ) {
}
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))
/* 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);
}
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();
* been brought fully up to date.
*/
bool
-SPDocument::_updateDocument()
+Document::_updateDocument()
{
/* Process updates */
if (this->root->uflags || this->root->mflags) {
* 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()) {
static gint
sp_document_idle_handler(gpointer data)
{
- SPDocument *doc = static_cast<SPDocument *>(data);
+ Document *doc = static_cast<Document *>(data);
if (doc->_updateDocument()) {
doc->modified_id = 0;
return false;
*
*/
-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<Geom::Point> points)
+sp_document_items_at_points(Document *document, unsigned const key, std::vector<Geom::Point> 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);
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);
}
unsigned int
-objects_in_document(SPDocument *document)
+objects_in_document(Document *document)
{
return count_objects_recursive(SP_DOCUMENT_ROOT(document), 0);
}
}
unsigned int
-vacuum_document(SPDocument *document)
+vacuum_document(Document *document)
{
unsigned int start = objects_in_document(document);
unsigned int end;
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 696e568ad419e01465564e308928197278068ecf..b849181f98b21fc2d91838e0937bd147fe54c77f 100644 (file)
--- a/src/document.h
+++ b/src/document.h
-#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 <lauris@kaplinski.com>
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
{
typedef sigc::signal<void> ReconstructionFinish;
typedef sigc::signal<void> CommitSignal;
- SPDocument();
- virtual ~SPDocument();
+ Document();
+ virtual ~Document();
unsigned int keepalive : 1;
unsigned int virgin : 1; ///< Has the document never been touched?
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;
}
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);
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<Geom::Point> 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<Geom::Point> 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 fd8f4bb1a2e5c1abccb75c56bd1856a1d45ecd41..47ef14987d6f8f4d7ab27b29ec08ce04ab6683c1 100644 (file)
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
* - 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 d2794f0c2b6f1eed9e7444f01df145d15eb004a7..89c2c454e7b7e44f4e273f0e575133365ede4925 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
-#define __SP_DRAW_CONTEXT_C__
+#define __DRAW_CONTEXT_C__
/*
* Generic drawing context
: 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 82de44696b7b8b29356fac0fce0d0b22d8a6a219..d111c43e16725aa557a878f432a37fc527d3c339 100644 (file)
--- a/src/event-log.cpp
+++ b/src/event-log.cpp
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 9fcd01e1c7a2b9c45e4d688a3dcd99e9bd237e70..bb17a19a45bd6105626ef96575456544b8693891 100644 (file)
--- a/src/event-log.h
+++ b/src/event-log.h
typedef Gtk::TreeModel::iterator iterator;
typedef Gtk::TreeModel::const_iterator const_iterator;
- EventLog(SPDocument* document);
+ EventLog(Document* document);
virtual ~EventLog();
/**
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 049c1acb405313bce8ad55075074075720e742cc..afca379ca58e0b024e6fa5cee6d34591a9398c77 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
+
/** @file
* @brief File/Print operations
*/
#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 <cstring>
+
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs.h>
#endif
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;
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) {
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
}
}
+
+
+
+//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->"<<uri.toString()<<std::endl;
+
+ Inkscape::WebDAVBuffer wbuf;
+ Inkscape::iwebdavstream *iws = new Inkscape::iwebdavstream(wbuf);
+ Inkscape::BufferSystem bs(iws);
+ bs.onInputStream();
+ }
+
+ } else*/
+ std::cout<<"--> FTP , HTTP etc."<<std::endl;
+
+ //FTP
+ if (std::strstr(uri.toString(), "ftp") != NULL)
+ {
+ if (strcmp(uri.toString(), "/ftp") >= 4//FIXME3 skip begining '/'
+ ||
+ strcmp(uri.toString(), "ftp") >= 3
+ )
+ {
+ std::cout<<"+++ 'ftp' uri.toString->"<<uri.toString()<<std::endl;
+
+ Inkscape::FTPBuffer wbuf;
+ Inkscape::iftpstream *iws = new Inkscape::iftpstream(wbuf);
+ char *buf = new char[8192];
+ *iws >> buf;
+ std::cout<<"buf->"<<buf<<std::endl;
+
+ //Inkscape::BufferSystem bs(iws);
+ //bs.onInputStream();
+ }
+ //HTTP
+ } else 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->"<<uri.toString()<<std::endl;
+
+/* Inkscape::HTTPBuffer wbuf;
+ Inkscape::ihttpstream *iws = new Inkscape::ihttpstream(wbuf);
+ char *buf = new char[8192];
+ *iws >> buf;
+ std::cout<<"buf->"<<buf<<std::endl;
+*/
+ //Inkscape::BufferSystem bs(iws);
+ //bs.onInputStream();
+ }
+
+ } /*else if ()
+ {
+
+ } */
+
+
+
+ if (doc) {
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ Document *existing = desktop ? sp_desktop_document(desktop) : NULL;
+
+ if (existing && existing->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<SPDesktop*>(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"
*/
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);
/**
* 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);
* 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
* 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
* \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);
* 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) {
{
static Glib::ustring import_path;
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
if (!doc)
return;
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;
if (!SP_ACTIVE_DOCUMENT)
return false;
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring export_path;
Glib::ustring export_loc;
{
static Glib::ustring import_path;
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
if (!doc)
return;
void
sp_file_print(Gtk::Window& parentWindow)
{
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
if (doc)
sp_print_document(parentWindow, doc);
}
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 ce75a61a7cfff5f0a689bd0574a343a1b1837d2d..2eaace640deb60abb24451bb418865c6f71f6d7d 100644 (file)
--- a/src/file.h
+++ b/src/file.h
#include "extension/extension-forward.h"
+#include <iostream>
+#include <fstream>
+#include <glibmm/i18n.h>
+
+#include "uri.h"
+#include "streams-webdav.h"
+
struct SPDesktop;
-struct SPDocument;
+struct Document;
namespace Inkscape {
namespace Extension {
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.
* 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);
/*######################
/**
* 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);
/*######################
#endif
+//namespace Inkscape {
+//namespace Net {
+
+
+
+//}
+//}
+// #endif
+
/*
Local Variables:
mode:c++
index 363663ac3c8c34c946916077a4f73f8bd8cfc9f2..d40347889d1df3647312c099f52777a7b0efe8a7 100644 (file)
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
}
}
-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 1b18ec11ab706ead1f166202438eae5cc4771483..ee249d6f2a0db88f126ff318b0309d23f64ce919 100644 (file)
--- a/src/filter-chemistry.h
+++ b/src/filter-chemistry.h
#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 7b622338480a85124c78052ed2f9f4c0c68029b3..9855c42f10ba779ef9301956b988f573290dedce 100644 (file)
--- 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;
*/
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 d4a98fbff915016f7c4b14e848307406fecccffe..852934e96dddd4b920819e71b22b1f0b4cf330bb 100644 (file)
--- a/src/forward.h
+++ b/src/forward.h
/* 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 ();
index 4abd7483f42207c2c968d39e51e4ea5c8da17992..85e4e2c557e93df497f66938abe6c14ee04c2fa6 100644 (file)
*/
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);
return gr;
}
- SPDocument *doc = SP_OBJECT_DOCUMENT(gr);
+ Document *doc = SP_OBJECT_DOCUMENT(gr);
SPObject *defs = SP_DOCUMENT_DEFS(doc);
if ((gr->has_stops) ||
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);
*/
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;
index 73b9893bc69e833ee86069ee6355ceddb3826a3d..94351d4835030022efa201f072a2ebcc85cb9c5d 100644 (file)
--- a/src/gradient-chemistry.h
+++ b/src/gradient-chemistry.h
* 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);
index fc5c1af446593c0db42626003aab45e8d9ec11bc..64a836b8f9abe0277ed7deb595a9e321b94dfc71 100644 (file)
--- 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;
static void
sp_gradient_simplify(SPGradientContext *rc, double tolerance)
{
- SPDocument *doc = NULL;
+ Document *doc = NULL;
GrDrag *drag = rc->_grdrag;
GSList *these_stops = NULL;
{
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 c16ed2456548e33f7adcc5a72d874835ca79b1d1..65f310e6a576bb32dd6bc7b5e6a6f2628378459e 100644 (file)
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
{
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 b215576a4d506f8ca39fc9a875313dfe31edf0e4..e739c4e4c9ad907dcc45eff9ef2865d52146b032 100644 (file)
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
* 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)
{
* 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 41864273815cf22df93cfa911dae11a03fbbafb8..1abd1dd8332dd3dd993dfedf259b5367bdf82538 100644 (file)
--- a/src/id-clash.h
+++ b/src/id-clash.h
#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 cb7f98729aa5ef23fdc57414f5035524b6a8a175..001d1201a556a8699f8c35393bdab57df1b8b43a 100644 (file)
--- a/src/inkscape-private.h
+++ b/src/inkscape-private.h
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 60ab895ede7789bf05f082b957aaf1f017375f40..c2c45d3bbc0bb60a5cb86f8b705a1e590bcf6c57 100644 (file)
--- 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<SPDocument *, int> document_set;
+ std::map<Document *, int> document_set;
GSList *desktops;
gchar *argv0;
gboolean dialogs_toggle;
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);
gint docnum = 0;
SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Autosaving documents..."));
- for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
- SPDocument *doc = iter->first;
+ Document *doc = iter->first;
++docnum;
g_assert_not_reached ();
}
- new (&inkscape->document_set) std::map<SPDocument *, int>();
+ new (&inkscape->document_set) std::map<Document *, int>();
inkscape->menus = sp_repr_read_mem (_(menus_skeleton), MENUS_SKELETON_SIZE, NULL);
inkscape->desktops = NULL;
gint count = 0;
GSList *savednames = NULL;
GSList *failednames = NULL;
- for (std::map<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<Document*,int>::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()) {
* fixme: These need probably signals too
*/
void
-inkscape_add_document (SPDocument *document)
+inkscape_add_document (Document *document)
{
g_return_if_fail (document != NULL);
// 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<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
if (iter->first == 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<SPDocument*,int>::iterator iter = inkscape->document_set.begin();
+ for (std::map<Document*,int>::iterator iter = inkscape->document_set.begin();
iter != inkscape->document_set.end();
++iter) {
if (iter->first == document) {
return (SPDesktop *) inkscape->desktops->data;
}
-SPDocument *
+Document *
inkscape_active_document (void)
{
if (Inkscape::NSApplication::Application::getNewGui())
}
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 ca2894227c1d8589c30cf54497058fa9a80dda63..e611af49b88fdeacf1506f9f92853d1f757c92a2 100644 (file)
--- a/src/inkscape.h
+++ b/src/inkscape.h
#include <glib/gtypes.h>
struct SPDesktop;
-struct SPDocument;
+struct Document;
struct SPEventContext;
namespace Inkscape {
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 5cfde2c814a793d1365d32549300ff58394f4902..0278d3029faaf0e860bd1d791279d9197b7c1f67 100644 (file)
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
int size;
int length;
int current;
- SPDocument *doc;
+ Document *doc;
GtkWidget *view;
GtkWidget *window;
bool fullscreen;
}
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);
{
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);
{
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);
{
sp_svgview_waiting_cursor(ss);
- SPDocument *doc = NULL;
+ Document *doc = NULL;
int current = 0;
while ( !doc && (current < ss->length - 1)) {
if (current == ss->current)
{
sp_svgview_waiting_cursor(ss);
- SPDocument *doc = NULL;
+ Document *doc = NULL;
int current = ss->length - 1;
while (!doc && (current >= 0)) {
if (current == ss->current)
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 cf70720649c1ff5b8bdc8e983b56f722e0cc2927..475ecdf16c3c04d713a4198a07edeb946ea59bac 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
void
sp_ui_new_view()
{
- SPDocument *document;
+ Document *document;
SPViewWidget *dtw;
document = SP_ACTIVE_DOCUMENT;
void
sp_ui_new_view_preview()
{
- SPDocument *document;
+ Document *document;
SPViewWidget *dtw;
document = SP_ACTIVE_DOCUMENT;
guint /*event_time*/,
gpointer /*user_data*/)
{
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
switch (info) {
guint /*event_time*/,
gpointer /*user_data*/)
{
-// SPDocument *doc = SP_ACTIVE_DOCUMENT;
+// Document *doc = SP_ACTIVE_DOCUMENT;
// SPDesktop *desktop = SP_ACTIVE_DESKTOP;
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;
index 66814c5cac767882a8b9ad97f1f1ab7033da30e1..01087d04e8d6bebaec49b12d4cdc49e722e62ab9 100644 (file)
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.
index 53cc8f5b4e53f71539800558a2064f45eb677853..48e912265faa7d46705e922ee75c594e2667b964 100644 (file)
#include "gc-alloc.h"
-class SPDocument;
+class Document;
class SPDesktop;
};
-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 75bb89bcf65f49f1d07d542a94839adc7f98f178..2431b07582500bf73eaa0c9a96180390d9fd70eb 100644 (file)
--- a/src/layer-fns.cpp
+++ b/src/layer-fns.cpp
* \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 8c45c7e53642fdebabb75b930ce24efb09909ab2..fe0d4190484ee637ff9927f93250dd5344aa8ff7 100644 (file)
--- a/src/layer-manager.cpp
+++ b/src/layer-manager.cpp
{
_layer_connection = desktop->connectCurrentLayerChanged( sigc::mem_fun(*this, &LayerManager::_selectedLayerChanged) );
- sigc::bound_mem_functor1<void, Inkscape::LayerManager, SPDocument*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
+ sigc::bound_mem_functor1<void, Inkscape::LayerManager, Document*> first = sigc::mem_fun(*this, &LayerManager::_setDocument);
// This next line has problems on gcc 4.0.2
- sigc::slot<void, SPDocument*> base2 = first;
+ sigc::slot<void, Document*> base2 = first;
- sigc::slot<void,SPDesktop*,SPDocument*> slot2 = sigc::hide<0>( base2 );
+ sigc::slot<void,SPDesktop*,Document*> 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 81f75e002aef5144ef16cbc8937a5a3d27b7ccb2..bbd5ccafbf40dfd63fc41182d0205ba0a0fa01ce 100644 (file)
--- a/src/layer-manager.h
+++ b/src/layer-manager.h
#include <map>
class SPDesktop;
-class SPDocument;
+class Document;
namespace Inkscape {
class LayerWatcher;
void _objectModified( SPObject* obj, guint flags );
- void _setDocument(SPDocument *document);
+ void _setDocument(Document *document);
void _rebuild();
void _selectedLayerChanged(SPObject *layer);
sigc::connection _resource_connection;
GC::soft_ptr<SPDesktop> _desktop;
- SPDocument *_document;
+ Document *_document;
std::vector<LayerWatcher*> _watchers;
index 49f954586058474feb1b9ec3f3f29ddaba37bf72..c34559a29f2a6728e6f7880c202cb4603ea981c6 100644 (file)
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#else
-# ifdef HAVE_STDINT_H
+//--tullarisc # ifdef HAVE_STDINT_H
# include <stdint.h>
-# endif
+//# endif
#endif
// error codes (mostly obsolete)
index 6f195b176f3c2aa9d07fda335519789b081c12c9..461073c3fbfa7f6a66f2f712fa0a80c6f7d81e3e 100644 (file)
#define LPE_CONVERSION_TOLERANCE 0.01 // FIXME: find good solution for this.
-struct SPDocument;
+struct Document;
struct SPDesktop;
struct SPItem;
class SPNodeContext;
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();
Glib::ustring getName();
Inkscape::XML::Node * getRepr();
- SPDocument * getSPDoc();
+ Document * getSPDoc();
LivePathEffectObject * getLPEObj() {return lpeobj;};
Parameter * getParameter(const char * key);
index be465e32469b1eaf08d7b63163844306dfe1848e..5f7cb02774e1219dd70019570abc3ea5a2df77df 100644 (file)
--- 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();
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 8a52ba97c70308ce7ef4a910bab4cf5e0eababc0..f710e9321570b25f90d772a3407315b4bf4cb377 100644 (file)
--- a/src/lpe-tool-context.h
+++ b/src/lpe-tool-context.h
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);
index dc59e1a9302af212f39b5c648dd9476dbee69023..6ab1920956da4249b6008949733c2fd6dd74b9bc 100644 (file)
--- a/src/main-cmdlineact.cpp
+++ b/src/main-cmdlineact.cpp
SPDesktop * desktop = dynamic_cast<SPDesktop *>(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 9c33688ed88ec1751a4e3b3a1d572c05699eaa1a..64fcb664dd431985aa5c35cbab3da214454d1dda 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
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;
{
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);
}
}
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;
static void
-sp_do_export_png(SPDocument *doc)
+sp_do_export_png(Document *doc)
{
const gchar *filename = NULL;
gdouble dpi = 0.0;
* \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 c66acc1924f3869b67faad8373c2d36167292941..2efcde1b99e6b03b5c22192cfcfbc09c29939b73 100644 (file)
--- a/src/marker.cpp
+++ b/src/marker.cpp
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);
* \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 f2d74a3a699c230cb73bd8dab5e9bd0ee1cd76a8..5206a9c89c91f16e48ffd2aa4b96fa2bfa5c65d7 100644 (file)
--- a/src/marker.h
+++ b/src/marker.h
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 f9a615583fa438c8689eaec09dfeabe9a88dc656..e2c4f3fa3925d9f011f5d31b5fea80bcce56cb5f 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
//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)
// 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 99ee78ade932963fbb01cabfca7e7f0411965935..3b5cd31364718eee2e84d029a2c2aee866a4045d 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
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 <b>object(s)</b> 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 916e9f25f421fe071452b070e4088abfb2cf9bdf..978a8952cd80066b6f2271466d396c796c4c2b85 100644 (file)
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
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);
/**
* 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);
}
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) ) {
}
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 79bec0232c5372465266a04e90924ade2e8e1481..cbad0b87372b01e62b1caa383b9755cfdd5428c2 100644 (file)
--- a/src/persp3d.h
+++ b/src/persp3d.h
// Also write the list of boxes into the xml repr and vice versa link boxes to their persp3d?
std::vector<SPBox3D *> boxes;
std::map<SPBox3D *, bool>* 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;
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 *, std::list<SPBox3D *> > 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 044dffe345102d60d107d37b61756d11cf7827de..7fbaa53e998e619f7d38190841df958032cba5d5 100644 (file)
--- a/src/print.cpp
+++ b/src/print.cpp
/* UI */
void
-sp_print_preview_document(SPDocument *doc)
+sp_print_preview_document(Document *doc)
{
Inkscape::Extension::Print *mod;
unsigned int ret;
}
void
-sp_print_document(Gtk::Window& parentWindow, SPDocument *doc)
+sp_print_document(Gtk::Window& parentWindow, Document *doc)
{
sp_document_ensure_up_to_date(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 577a169cf819ebdbebce3f13226559ab30399fe3..11efced7bc38c6ce01d459ae72da5ed7bae32703 100644 (file)
--- a/src/print.h
+++ b/src/print.h
/* 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 */
index 1cd965e390b526d89318918dd7569dfdaec4a049..75fd12e4b559685c3b12b7b5aa03cf032e00a290 100644 (file)
--- a/src/profile-manager.cpp
+++ b/src/profile-manager.cpp
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 61e22615fd080d270876b40df97d024aa78e8296..d72ad3dd8cf768a21e2f36de9afb7c9082b8a6b3 100644 (file)
--- a/src/profile-manager.h
+++ b/src/profile-manager.h
#include "gc-finalized.h"
#include <vector>
-class SPDocument;
+class Document;
namespace Inkscape {
public GC::Finalized
{
public:
- ProfileManager(SPDocument *document);
+ ProfileManager(Document *document);
~ProfileManager();
ColorProfile* find(gchar const* name);
void _resourcesChanged();
- SPDocument* _doc;
+ Document* _doc;
sigc::connection _resource_connection;
std::vector<SPObject*> _knownProfiles;
};
diff --git a/src/rdf.cpp b/src/rdf.cpp
index f0b1749229ae515454eb9b06f4b2482f426cb656..5559526f16dc68290a4a0f15cd4469c340e06c92 100644 (file)
--- a/src/rdf.cpp
+++ b/src/rdf.cpp
// 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);
}
}
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);
}
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);
}
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);
*
*/
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;
*
*/
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) {
*
*/
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 );
};
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 a98f5a1e474b43354585e2824fd81cae46df07fd..57ae79cb887fcf789bbac935c8d77a34b9a0aaec 100644 (file)
--- a/src/rdf.h
+++ b/src/rdf.h
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_
index e55bba2a5926079ef2e3a2fd99f300d7b8e791c2..0e2fe43d1accc85a66b777de1e268f9b7efce278 100644 (file)
@@ -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);
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);
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()));
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);
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()) {
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()) {
}
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."));
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);
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);
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());
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);
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;
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);
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);
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);
}
bool
-fit_canvas_to_drawing(SPDocument *doc)
+fit_canvas_to_drawing(Document *doc)
{
g_return_val_if_fail(doc != NULL, false);
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);
index 67e772a00999a39043b891b53e538e28d6caead4..4a8c8901e8c2f2c3cc014dd402d5b270bfea7f88 100644 (file)
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);
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 f0769e0a1ad1903326446d38f50986fa7d4bc5f1..48f3a8fea26a10b2217d3f6aa39b283e21e6aedb 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
_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 e621bdb605334cb1b1e0fa4619368d2c09ca69f4..18820f78e852e66b2d60d1f1a86d1f65ebcc22a0 100644 (file)
--- a/src/snap.h
+++ b/src/snap.h
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 aabefdfdb4cfe14d87607bd310b746fcad061e11..ec1b4e53f38b96113c24654ca681fd8d851f7913 100644 (file)
--- a/src/sp-anchor.cpp
+++ b/src/sp-anchor.cpp
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);
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 2d9f2e94191478e4377bc9267025da0b1b63739e..b5f0e8605f37ea417dda596a76ee695a7acc4f8a 100644 (file)
--- a/src/sp-animation.cpp
+++ b/src/sp-animation.cpp
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);
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);
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);
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);
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);
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 4bbabc965fbaf3360018461fe9bec96615e81192..1dab31e3442c663a2ec5e3d9617ab9ce09741326 100644 (file)
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
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);
}
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);
// Create a mask element (using passed elements), add it to <defs>
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 199b29f3b3f279e72cb5cbdc9dd90321e73f6693..d6a4e6f0b8b39f1bc13b04047fe9358260b36078 100644 (file)
--- a/src/sp-clippath.h
+++ b/src/sp-clippath.h
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 ff2e3904437961c62e8f6481a4cb7e12ad9c323e..2847d23e9d342a8ca8f14230d2d82873856810e0 100644 (file)
--- 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);
}
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);
}
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);
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);
}
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);
index 77325c4b11fa9041d2b79ccd8857e167aaff569d..e090a27b2ad30a3f1881924f1d28180d855ea1d2 100644 (file)
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);
* 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);
index 216ff1d6f7a8bc10c57be0ac948a262209222edc..31ef5ef11a60432b2abfde506ae919fe6923adab 100644 (file)
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 7197c1ec93539c53810f0d0db80ac58703a24882..7c819af1fed3609a6f168c01a2152efc45abdbe5 100644 (file)
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
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);
* 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 6d679701fdc098836244aa32d3a4be38644d7c79..78aab7cb347a9733f009011341dd6e530a9f2cb0 100644 (file)
--- a/src/sp-flowdiv.cpp
+++ b/src/sp-flowdiv.cpp
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);
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);
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);
}
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));
}
}
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);
}
}
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 6af2f7169eaf3c9eb34ed451470c0d9ee4fa0aa1..ff4a2fda54cedeae9a19d952a1db59a13674d1ab 100644 (file)
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
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);
}
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));
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 1ec6f4601b90e3a389e7c09c215af002eea7aa6d..166262bc92a70a994e811b35092ec5a34318ccd6 100644 (file)
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
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);
*/
}
-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 75fb186383a56bb64449f01852d9e6c409329762..c960d0fe9c8bd760c4792676fa93cf1bde2ae7e0 100644 (file)
--- a/src/sp-font.cpp
+++ b/src/sp-font.cpp
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);
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);
index e6eab5032264c454b762b7029d827e2c2bf4b719..8544e03fee126c19f42ca967b45af55c0ec04d4f 100644 (file)
--- a/src/sp-gaussian-blur.cpp
+++ b/src/sp-gaussian-blur.cpp
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);
* 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);
index 6d08f212cea1318cb9ad2a6037dc06aadca59072..7b61f1c3da5ce884a6c35506a14915f84e0659e9 100644 (file)
--- a/src/sp-glyph-kerning.cpp
+++ b/src/sp-glyph-kerning.cpp
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);
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 8af78a0aaf55111113cd1f056e2a98ac5036b454..6102954f23fe6965a5371dcf16ec4ba15e08a5e8 100644 (file)
--- a/src/sp-glyph.cpp
+++ b/src/sp-glyph.cpp
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);
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 bc188401bec90b927341ce6dd155c1ed8632a1ff..1771b7c3e6628da94202adaa74b10bc3c6792b21 100644 (file)
--- a/src/sp-gradient-test.h
+++ b/src/sp-gradient-test.h
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 84a0a98704315228b655e8b80268a47726069a72..c9ceeabf003c649399cea08da2b0933dd2462cb3 100644 (file)
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
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);
/**
* 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);
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,
* 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);
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,
* 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)
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,
* 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 f5edf7d97cf3a63baf9820d97bf57822ae640f1b..170dfa37593669c80ecd652a5d789f160bbcda44 100644 (file)
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
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<std::pair<Geom::Point, Geom
void
sp_guide_create_guides_around_page(SPDesktop *dt) {
- SPDocument *doc=sp_desktop_document(dt);
+ Document *doc=sp_desktop_document(dt);
std::list<std::pair<Geom::Point, Geom::Point> > pts;
Geom::Point A(0, 0);
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index 65aad1e2d097a30f0e20df76275becc1ce5386c0..5284bb92324685456797efa3d93775b9885d56ef 100644 (file)
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
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);
}
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);
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 9c19ce75a1a9839509f4ad38c9cea83f39eabda4..f9570a885dbe7cdaa26eb31adf06cc12db020065 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
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);
new (&group->_display_modes) std::map<unsigned int, SPGroup::LayerMode>();
}
-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");
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 662dc1cac7370d3007ac135aace282407e0905d5..16efe677f39d1731ead7dd30c86fa4d38a8a4919 100644 (file)
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
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);
}
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 d0ce32397d7ffe801b0447c7c5c8b39a902a42c7..36ac643ec6c31c234c449348817affcb0118f898 100644 (file)
--- a/src/sp-line.cpp
+++ b/src/sp-line.cpp
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);
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 90e9b2d6d62e18057b40c46c71177d811b5362ef..fdf348b78a7a022f075c5104a079b2d184f73578 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
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);
* 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 20cb38297c126fd07e93a27c1e6687accfc21575..12876d69af352f7352a3af1aebbdb0b4b12ac6ee 100644 (file)
--- a/src/sp-mask.cpp
+++ b/src/sp-mask.cpp
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);
}
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 <defs>
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 d5bddd332861f2f18efdbe0e3b4d8013ce1013ea..293be8cee6df1e15bc412b0c34926e8e8b3e956e 100644 (file)
--- a/src/sp-mask.h
+++ b/src/sp-mask.h
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 920b7d64dbb5458a1ef4d8f731c6748d3175bd07..1b9be018898f5d5b7107d20b2880394a0f8161d6 100644 (file)
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
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);
* 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 82b7c4fc5dff2eeb35d89269d65409347d2a13af..1de4634796545f8a5b673330aa4caa0f2639d0ee 100644 (file)
--- a/src/sp-metadata.h
+++ b/src/sp-metadata.h
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 :
index ffc29a71ed45ff9c622f15d02c069d57d5343b71..4b120717a4ea1468ef2fcb5f28d5a577e860bb6a 100644 (file)
--- a/src/sp-missing-glyph.cpp
+++ b/src/sp-missing-glyph.cpp
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);
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 47720c5d64f12fb9409e1f74aa7a537b457d0fe8..4def33f759ebd856537461b708fcc19e357ed427 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
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);
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;
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));
}
}
-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);
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 048096d8c0096e569761f332afb9f0d51be03425..450e80d47c5528d3b1ce291219c1337943b7521b 100644 (file)
--- a/src/sp-namedview.h
+++ b/src/sp-namedview.h
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 4c3d5196ee2c4de5bb3753ca8ce46d17f94e4e79..7583049dcceca82578afcf6aa7ab2d2edc65f23c 100644 (file)
--- a/src/sp-object-repr.cpp
+++ b/src/sp-object-repr.cpp
* 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 f3a80f83c77a1259279d1f3b99dfd85b08a3828c..0dec20fe08fc6cd19966f7a3a6a71fd51e5b521d 100644 (file)
--- a/src/sp-object-repr.h
+++ b/src/sp-object-repr.h
}
-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 85e8a4e9ab4ad8898967f1de925bd74da2dbcb97..fade379bd1a6470fb026ca3bacd24e2babafd0a0 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
* 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
*/
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));
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 bbb8ecbd0a2d096e14baa0ccffaad3c75dec5f6c..2932da728583d4e491d63edeb14ebdab34931856 100644 (file)
--- a/src/sp-object.h
+++ b/src/sp-object.h
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 */
/** @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:
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 */
}
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 ae0f7bf19ea48bebe09cc7ccf91f12f6958aff74..12e98d5efe564dc73ca17529189c2da514d135b8 100644 (file)
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
#include "xml/repr.h"
-class SPDocument;
+class Document;
#define noOFFSET_VERBOSE
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);
* 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 998f1556bf9d29f17df364850a2970121d061def..0402ac3ce47359f2410092720eec410b30dc93f7 100644 (file)
--- a/src/sp-paint-server.h
+++ b/src/sp-paint-server.h
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 04ad386d9a0fb18cf63726c96d3d9b8397452abe..b6637e9d1633c2413ec88ead13b7b2069448eb12 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
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);
* 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 90af65b97cb8f3c072509d3268c272497a71d72d..60d2254f77756ab61dd3d258244105c0a37fa184 100644 (file)
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
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);
}
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);
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 f15285e277cd545791cde08ec1c3327263539ee0..48c4504256374edb9940526c6ad49ed126ca9753 100644 (file)
--- a/src/sp-pattern.h
+++ b/src/sp-pattern.h
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 014c68c9b75652ba8af992a904325b2c0daca8db..0f9003f341112a782e5f48afc8dc49e69ffea517 100644 (file)
--- a/src/sp-polygon.cpp
+++ b/src/sp-polygon.cpp
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);
/* 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 08f446d6124a5685c228de1c09e218ba46f2e33b..ff7951992ce6db1242f0ec6470372618d16cad7d 100644 (file)
--- a/src/sp-polyline.cpp
+++ b/src/sp-polyline.cpp
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);
}
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 aa026abb3eab890ab17824a6b3a06fd275de0661..6e4b515c04181b22edada78fe067bcb4425d3db4 100644 (file)
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
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);
}
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 bd935074dec47dfba5663dbf6a68aebcdf5348c5..e06405df53791cf28227672a6ecc0f419356292a 100644 (file)
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
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);
* 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 a4013245003c339ea3b91e47e177921cdfae84e7..d495ac51fdb7ee0b814d66e9d4f0b57837923773 100644 (file)
--- a/src/sp-script.cpp
+++ b/src/sp-script.cpp
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;
* 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 e7ded6303def093aa92ef19fde99c71245600482..638d2b0404b37b698a5b4b29db4b5a7f29396621 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
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);
* \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 ec6c9b437534b6b30bdb96f57200f613eb270b36..b92f738dbd3c5fbe939eb985e58098751cf510ea 100644 (file)
--- a/src/sp-skeleton.cpp
+++ b/src/sp-skeleton.cpp
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);
* 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 71906fcc0c3b65d394e6333dd163c7640a7ddaed..f0f95fb9c6852044d6b87693901236d735529451 100644 (file)
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
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);
* 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 71c9ad1c72d47bc17513335be25baf65d8c064c7..88b24aa77aa842a137f40bffe5507536ceaade73 100644 (file)
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
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);
}
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 871338ad599ef44c0990f42b462182863cad18c3..a1a974310afccd7768847d952380ad2c4b6f1150 100644 (file)
--- a/src/sp-string.cpp
+++ b/src/sp-string.cpp
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);
}
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);
index 6e24ee28c4b0abff1c0b4a7d6c0acfc94e16a881..75e2d450c1848af766534b408e1ecdb395dac2df 100644 (file)
--- a/src/sp-style-elem-test.h
+++ b/src/sp-style-elem-test.h
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 46c311920708dd6cebf0c3cbd87854efc3675c3b..1becc422162a694d3bce51a84b906978d78f849a 100644 (file)
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
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);
}
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 41004db6e37154db0e98ae5ae6f687d2dc2af5ae..8b176fb0a5bc5ba799e75f318f560cc5f8695824 100644 (file)
--- a/src/sp-symbol.cpp
+++ b/src/sp-symbol.cpp
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);
}
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 61947311c4995155f4de67629d5afa665bfac99a..325b3b381e3132659c61bdd5ebe9d5705c0062d3 100644 (file)
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
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);
}
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 83f9ecfa6e3cf2f8a1b9d98a432789fa7449c3a2..5323cde846df9189fd8c9c5327d9ab2a0b4f1224 100644 (file)
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
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);
* 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);
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 89a86218efb37d0318ce3a0d35505ad8a4ab9ab4..a35ceae72e5140b7d0c48d1962b9b27631d62297 100644 (file)
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
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);
}
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);
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);
}
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 76930086cc64dae64d4ccb1a492a43a9a368ec44..5e3c7ee10e7f148d1cd1610434418ce67f1d1825 100644 (file)
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
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);
}
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);
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 feba2cab6b0ee522b2cd5f02f8f4e5699520c082..87f3dd890c372a84dcda793b3d1e5a9b5d4cf299 100644 (file)
--- 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));
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 a2d5fcf24459bdcf7aa4d2b56495811cf654300d..7ebbf08be9ea0f9166b3622af7e4e34199aacdb5 100644 (file)
--- a/src/style-test.h
+++ b/src/style-test.h
class StyleTest : public CxxTest::TestSuite
{
public:
- SPDocument* _doc;
+ Document* _doc;
StyleTest() :
_doc(0)
diff --git a/src/style.cpp b/src/style.cpp
index dd81692823123f0b45c055ebe1da5f0cb3af22ca..e564aa60b3b3adeea9d3abeb9eb5b3410be7dd0a 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
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);
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);
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);
}
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);
}
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
/** \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;
* \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;
* 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 d5ccc4901ac5553d0fe6c29db161d30894a43d77..87d427547c193d2cac51622e93149857914e286b 100644 (file)
--- a/src/style.h
+++ b/src/style.h
/** Object we are attached to */
SPObject *object;
/** Document we are associated with */
- SPDocument *document;
+ Document *document;
/** Our text style component */
SPTextStyle *text;
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);
index 10d9976566f04a3fed2b3b6f720a35e7e8504939..5c33075c9b24fc0502857676b0a1b5dd65f2ce65 100644 (file)
--- 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 cd609b07ac2432a44a509fba01d23d986594d37f..9f6410f67c294f1a76595b9490d6973390c2af78 100644 (file)
--- a/src/svg-view-widget.h
+++ b/src/svg-view-widget.h
#include "display/display-forward.h"
#include "ui/view/view-widget.h"
-class SPDocument;
+class Document;
class SPSVGSPViewWidget;
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 bd46dd17a6c86645eec790878106b47d4ce9ca28..35a51cfcd2d0cd56df1563fc451f32f535b1c539 100644 (file)
--- 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 838a95b03eb6c7677db2199a3786089af4c8e2a3..ab59ca417fedbae0244cd2acf496973d263e3d87 100644 (file)
--- a/src/svg-view.h
+++ b/src/svg-view.h
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 8dba0c942e23a81d16dfe7350733bbc2bd420602..3eacb7d13bf7e2edea2583a0a65a5139b0af4056 100644 (file)
--- a/src/test-helpers.h
+++ b/src/test-helpers.h
static_cast<void>(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 f574b69fb14a6628f693373dac3927d2c9fc27e1..61960086a8d00d1ea59dd8fbb42601e039b6e241 100644 (file)
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
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);
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 3f55d040bc426a0f806c2d0f37617da34c167395..692e22112d7f413af8a75974317a2f3ac23f1b58 100644 (file)
--- 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 d979fe29230da90439f3955e835504b8c8f7f067..33d5991802190cc1c8299c769db8bc3a55e42e09 100644 (file)
--- a/src/uri-references.cpp
+++ b/src/uri-references.cpp
/* 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);
void URIReference::attach(const URI &uri) throw(BadURIException)
{
- SPDocument *document;
+ Document *document;
if (_owner) {
document = SP_OBJECT_DOCUMENT(_owner);
} else if (_owner_document) {
-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 a98c84153bf382603295d212b2f69444a4a2690d..0f7a724ba3020c7e30bed0e3785eca7b88362fcd 100644 (file)
--- a/src/uri-references.h
+++ b/src/uri-references.h
* 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
return (bool)_uri;
}
- SPDocument *getOwnerDocument() { return _owner_document; }
+ Document *getOwnerDocument() { return _owner_document; }
SPObject *getOwnerObject() { return _owner; }
protected:
private:
SPObject *_owner;
- SPDocument *_owner_document;
+ Document *_owner_document;
sigc::connection _connection;
sigc::connection _release_connection;
SPObject *_obj;
/**
* 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
index ab46b21a6c955ee8c69fead5af637fa15cad043d..133311625e970f1dc707cdffce428d8f85dafd19 100644 (file)
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
}
}
-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 9fcb6bb46d6440a0e35bf8b67311add2df68d78f..31131540480bf0f9722b6128d260ceb09cac7826 100644 (file)
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
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 43ddc1459ad016eb98ddac80dceb8d7b33575d2c..10f4f3accf370965e18c16790e81bb495396da16 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
}
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) {
}
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();
/* 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<SPDesktop*>(sp_action_get_view(action));
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;
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);
/* 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;
{
SPDesktop *dt = static_cast<SPDesktop*>(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) {
{
SPDesktop *dt = static_cast<SPDesktop*>(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 c3b88918b7bac4311e2639d6523f00d557b4edc9..51bf0e34b4b5a02ff4d7c7c1f4c982ec963ad1d3 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
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:
index a2f88c16d184ae07597f58a706d2744199e1d980..fc2e8272200eaed0201c42d95aaa73d643fcf34c 100644 (file)
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;
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;
index 5e9d30bcdbe6cd651eb6f3aecde17cac628f1c2c..683b041b0e872f01a671a69061d82c7da33b5a81 100644 (file)
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();
index f24a6781b134509b05ebf494edff50d73ebee6a2..15b65c239c2297ac9d13b4fa118a56d9ceb446fa 100644 (file)
}
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)
index e68dfecfcbbe406ff6ecd9f943645c83e2e7950d..63e18554dbc9b4019318a0d185293dd50f59d8e1 100644 (file)
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);
index ddd9fd96a04ebe3befd53a8302fd7a8252c8db23..f64dc7bd8df304ed92fbf8f48d547081bbb79776 100644 (file)
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 ();
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;
index 1f0c077546bc6aa409e3e8a1a140cfddaa68fbb2..c6a7b37f460e43a09c8c6d9150f764c3be634a34 100644 (file)
}
GtkWidget *
-sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr)
+sp_gradient_vector_selector_new (Document *doc, SPGradient *gr)
{
GtkWidget *gvs;
}
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);
index ea1f5159fee1390b4c224c87bafe2e24218a1d9d..aa544475579d68b355e3837f20a8c103a357a1f0 100644 (file)
guint idlabel : 1;
- SPDocument *doc;
+ Document *doc;
SPGradient *gr;
/* Vector menu */
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 6be4b49b36d305ec196d1e1c13ab0d922f9e8614..5e47bd8e4620e2a26d34734dde38eef23650211d 100644 (file)
--- 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");
struct svg_doc_cache_t
{
- SPDocument *doc;
+ Document *doc;
NRArenaItem *root;
};
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;
index a101b9eeb32bb159671d8d8fa03d1ec04719975e..d203e094f33131a76400dc59df724c1f0bb4b579 100644 (file)
* 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;
* 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) {
/* 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;
index f168cedeb3d779b8e6659dabacea369e7fd1e499..6d28f80e52aae7e0eb99af087e84b105a5027737 100644 (file)
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();
index f502f87d30056c941514065ccc6eb21c6d700124..e0002e5c2b09dfe9e1a056e0d04a94a1770bd842 100644 (file)
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;
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
* 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;
* 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 = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
@@ -749,9 +749,9 @@ gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=
}
static void
-ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
+ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, Document *sandbox)
{
- static SPDocument *markers_doc = NULL;
+ static Document *markers_doc = NULL;
// add "None"
Gtk::MenuItem *i = new Gtk::MenuItem();
@@ -804,10 +804,10 @@ ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc,
* Creates a menu widget to display markers from markers.svg
*/
static Gtk::OptionMenu *
-ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, SPDocument *sandbox)
+ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, Document *sandbox)
{
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *doc = sp_desktop_document(desktop);
+ Document *doc = sp_desktop_document(desktop);
Gtk::OptionMenu *mnu = new Gtk::OptionMenu();
/* Create new menu widget */
@@ -850,7 +850,7 @@ sp_marker_select(Gtk::OptionMenu *mnu, Gtk::Container *spw, SPMarkerLoc const wh
}
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *document = sp_desktop_document(desktop);
+ Document *document = sp_desktop_document(desktop);
if (!document) {
return;
}
static void
ink_markers_menu_update(Gtk::Container* /*spw*/, SPMarkerLoc const which) {
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *document = sp_desktop_document(desktop);
- SPDocument *sandbox = ink_markers_preview_doc ();
+ Document *document = sp_desktop_document(desktop);
+ Document *sandbox = ink_markers_preview_doc ();
Gtk::Menu *m;
int pos;
// TODO: this code can be shortened by iterating over the possible menus!
// doing this here once, instead of for each preview, to speed things up
- SPDocument *sandbox = ink_markers_preview_doc ();
+ Document *sandbox = ink_markers_preview_doc ();
// TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
// (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
Gtk::Adjustment *ml = static_cast<Gtk::Adjustment *>(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 != '#') {
index 8bb15ae6fb826f4b16ff5f43f43a7b094e38ac22..c13ad9ba65e95bfbde504e33917480cf3ea50565 100644 (file)
--- 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<SPDesktop*>(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)!");
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;
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 b4f288c4dfcc47830fa415b5a20e15eb1fab0d20..2f82a55879a0e8d153ea2d08dab52628d0d474fe 100644 (file)
--- a/src/xml/rebase-hrefs.h
+++ b/src/xml/rebase-hrefs.h
#include <glib/gtypes.h>
#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<AttributeRecord const> rebase_href_attrs(
gchar const *old_abs_base,