Commit 51c2905f authored by maxalbert's avatar maxalbert Committed by cilix42

Revert recent refactoring changes by johnce because they break the build,...

Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily.

(bzr r8422)
parent b6dc7a41
......@@ -225,9 +225,6 @@ ink_common_sources += \
star-context.cpp star-context.h \
streq.h \
strneq.h \
streams-handles.h streams-handles.cpp \
streams-ftp.h streams-ftp.cpp \
streams-http.h streams-http.cpp \
style.cpp style.h \
svg-profile.h \
svg-view.cpp svg-view.h \
......
......@@ -18,7 +18,7 @@
#endif
/*
TODO: Replace Document with the new Inkscape::Document
TODO: Replace SPDocument with the new Inkscape::Document
TODO: Change 'desktop's to 'view*'s
TODO: Add derivation from Inkscape::Application::RunMode
*/
......@@ -76,7 +76,7 @@ Editor::init()
//
gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
Document *doc = sp_document_new (have_default? tmpl:0, true, true);
SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
g_return_val_if_fail (doc != 0, false);
Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
sp_document_unref (doc);
......@@ -96,7 +96,7 @@ Editor::getWindow()
}
/// Returns the active document
Document*
SPDocument*
Editor::getActiveDocument()
{
if (getActiveDesktop()) {
......@@ -107,7 +107,7 @@ Editor::getActiveDocument()
}
void
Editor::addDocument (Document *doc)
Editor::addDocument (SPDocument *doc)
{
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
_instance->_documents = g_slist_append (_instance->_documents, doc);
......@@ -116,7 +116,7 @@ Editor::addDocument (Document *doc)
}
void
Editor::removeDocument (Document *doc)
Editor::removeDocument (SPDocument *doc)
{
_instance->_document_set.erase(doc);
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
......@@ -125,7 +125,7 @@ Editor::removeDocument (Document *doc)
}
SPDesktop*
Editor::createDesktop (Document* doc)
Editor::createDesktop (SPDocument* doc)
{
g_assert (doc != 0);
(new Inkscape::UI::View::EditWidget (doc))->present();
......@@ -227,13 +227,13 @@ Editor::reactivateDesktop (SPDesktop* dt)
bool
Editor::isDuplicatedView (SPDesktop* dt)
{
Document const* document = dt->doc();
SPDocument const* document = dt->doc();
if (!document) {
return false;
}
for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) {
SPDesktop *other_desktop=(SPDesktop *)iter->data;
Document *other_document=other_desktop->doc();
SPDocument *other_document=other_desktop->doc();
if ( other_document == document && other_desktop != dt ) {
return true;
}
......
......@@ -22,7 +22,7 @@
#include "app-prototype.h"
class SPDesktop;
class Document;
class SPDocument;
class SPEventContext;
namespace Inkscape {
......@@ -52,7 +52,7 @@ public:
void refreshDisplay();
void exit();
bool lastViewOfDocument(Document* doc, SPDesktop* view) const;
bool lastViewOfDocument(SPDocument* doc, SPDesktop* view) const;
bool addView(SPDesktop* view);
bool deleteView(SPDesktop* view);
......@@ -60,16 +60,16 @@ public:
static Inkscape::XML::Document *getPreferences();
static SPDesktop* getActiveDesktop();
static bool isDesktopActive (SPDesktop* dt) { return getActiveDesktop()==dt; }
static SPDesktop* createDesktop (Document* doc);
static SPDesktop* createDesktop (SPDocument* doc);
static void addDesktop (SPDesktop* dt);
static void removeDesktop (SPDesktop* dt);
static void activateDesktop (SPDesktop* dt);
static void reactivateDesktop (SPDesktop* dt);
static bool isDuplicatedView (SPDesktop* dt);
static Document* getActiveDocument();
static void addDocument (Document* doc);
static void removeDocument (Document* doc);
static SPDocument* getActiveDocument();
static void addDocument (SPDocument* doc);
static void removeDocument (SPDocument* doc);
static void selectionModified (Inkscape::Selection*, guint);
static void selectionChanged (Inkscape::Selection*);
......@@ -96,7 +96,7 @@ protected:
Editor(Editor const &);
Editor& operator=(Editor const &);
std::multiset<Document *> _document_set;
std::multiset<SPDocument *> _document_set;
GSList *_documents;
GSList *_desktops;
gchar *_argv0;
......
......@@ -25,7 +25,6 @@
#include "display/sp-canvas.h"
#include "sp-ellipse.h"
#include "document.h"
#include "xml/document.h"
#include "sp-namedview.h"
#include "selection.h"
#include "desktop-handles.h"
......@@ -404,7 +403,7 @@ static void sp_arc_drag(SPArcContext *ac, Geom::Point pt, guint state)
}
/* Create object */
Inkscape::XML::DocumentTree *xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
repr->setAttribute("sodipodi:type", "arc");
......
......@@ -44,9 +44,9 @@
#include <errno.h>
#endif
//--tullarisc #if HAVE_SYS_STAT_H
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
//#endif
#endif
#include "javabind.h"
#include "javabind-private.h"
......@@ -742,7 +742,7 @@ jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, js
/*
JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr;
String s = getString(env, jstr);
Document *doc = sp_document_new_from_mem(s.c_str(), s.size(), true);
SPDocument *doc = sp_document_new_from_mem(s.c_str(), s.size(), true);
*/
return JNI_TRUE;
}
......
......@@ -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(Document *document) {
static void sp_box3d_context_check_for_persp_in_defs(SPDocument *document) {
SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
bool has_persp = false;
......@@ -561,7 +561,7 @@ static void sp_box3d_drag(Box3DContext &bc, guint /*state*/)
}
/* Create object */
Inkscape::XML::DocumentTree *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
repr->setAttribute("sodipodi:type", "inkscape:box3d");
......
......@@ -28,7 +28,7 @@
static void box3d_side_class_init (Box3DSideClass *klass);
static void box3d_side_init (Box3DSide *side);
static void box3d_side_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
static void box3d_side_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
static Inkscape::XML::Node *box3d_side_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static void box3d_side_set (SPObject *object, unsigned int key, const gchar *value);
static void box3d_side_update (SPObject *object, SPCtx *ctx, guint flags);
......@@ -94,7 +94,7 @@ box3d_side_init (Box3DSide * side)
}
static void
box3d_side_build (SPObject * object, Document * document, Inkscape::XML::Node * repr)
box3d_side_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr)
{
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
......@@ -307,7 +307,7 @@ box3d_side_perspective(Box3DSide *side) {
Inkscape::XML::Node *
box3d_side_convert_to_path(Box3DSide *side) {
// TODO: Copy over all important attributes (see sp_selected_item_to_curved_repr() for an example)
Document *doc = SP_OBJECT_DOCUMENT(side);
SPDocument *doc = SP_OBJECT_DOCUMENT(side);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
......
......@@ -43,11 +43,11 @@
static void box3d_class_init(SPBox3DClass *klass);
static void box3d_init(SPBox3D *box3d);
static void box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::Node *repr);
static void box3d_build(SPObject *object, SPDocument *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 Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::DocumentTree *doc, Inkscape::XML::Node *repr, guint flags);
static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static gchar *box3d_description(SPItem *item);
static Geom::Matrix box3d_set_transform(SPItem *item, Geom::Matrix const &xform);
......@@ -110,7 +110,7 @@ box3d_init(SPBox3D *box)
}
static void
box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::Node *repr)
box3d_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
if (((SPObjectClass *) (parent_class))->build) {
((SPObjectClass *) (parent_class))->build(object, document, repr);
......@@ -126,7 +126,7 @@ box3d_build(SPObject *object, Inkscape::XML::Document *document, Inkscape::XML::
// TODO: Create/link to the correct perspective
Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
SPDocument *doc = SP_OBJECT_DOCUMENT(box);
if (!doc) {
g_print ("No document for the box!!!!\n");
return;
......@@ -256,7 +256,7 @@ box3d_update(SPObject *object, SPCtx *ctx, guint flags)
}
static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::DocumentTree *xml_doc, Inkscape::XML::Node *repr, guint flags)
static Inkscape::XML::Node *box3d_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
{
SPBox3D *box = SP_BOX3D(object);
......@@ -272,13 +272,13 @@ 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 */
Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(object);
SPDocument *doc = SP_OBJECT_DOCUMENT(object);
if (box->persp_ref->getURI()) {
gchar *uri_string = box->persp_ref->getURI()->toString();
repr->setAttribute("inkscape:perspectiveID", uri_string);
g_free(uri_string);
} else {
Inkscape::XML::Node *persp_repr = SP_OBJECT_REPR(doc->current_persp3d);//NOTE1
Inkscape::XML::Node *persp_repr = SP_OBJECT_REPR(doc->current_persp3d);
const gchar *persp_id = persp_repr->attribute("id");
gchar *href = g_strdup_printf("#%s", persp_id);
repr->setAttribute("inkscape:perspectiveID", href);
......@@ -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) {
Inkscape::XML::Document *doc = SP_OBJECT_DOCUMENT(box);
SPDocument *doc = SP_OBJECT_DOCUMENT(box);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
// remember position of the box
......
......@@ -13,7 +13,7 @@
#include <lcms.h>
#endif // ENABLE_LCMS
class Document;
class SPDocument;
namespace Inkscape {
......@@ -27,7 +27,7 @@ GType colorprofile_get_type();
#if ENABLE_LCMS
cmsHPROFILE colorprofile_get_handle( Document* document, guint* intent, gchar const* name );
cmsHPROFILE colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name );
cmsHTRANSFORM colorprofile_get_display_transform();
Glib::ustring colorprofile_get_display_id( int screen, int monitor );
......
......@@ -14,7 +14,7 @@
class ColorProfileTest : public CxxTest::TestSuite
{
public:
Document* _doc;
SPDocument* _doc;
ColorProfileTest() :
_doc(0)
......
......@@ -151,7 +151,7 @@ void ColorProfile::init( ColorProfile *cprof )
void ColorProfile::release( SPObject *object )
{
// Unregister ourselves
Document* document = SP_OBJECT_DOCUMENT(object);
SPDocument* document = SP_OBJECT_DOCUMENT(object);
if ( document ) {
sp_document_remove_resource (SP_OBJECT_DOCUMENT (object), "iccprofile", SP_OBJECT (object));
}
......@@ -205,7 +205,7 @@ void ColorProfile::_clearProfile()
/**
* Callback: set attributes from associated repr.
*/
void ColorProfile::build( SPObject *object, Document *document, Inkscape::XML::Node *repr )
void ColorProfile::build( SPObject *object, SPDocument *document, Inkscape::XML::Node *repr )
{
ColorProfile *cprof = COLORPROFILE(object);
g_assert(cprof->href == 0);
......@@ -251,7 +251,7 @@ void ColorProfile::set( SPObject *object, unsigned key, gchar const *value )
//LCMSAPI cmsHPROFILE LCMSEXPORT cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize);
// Try to open relative
Document *doc = SP_OBJECT_DOCUMENT(object);
SPDocument *doc = SP_OBJECT_DOCUMENT(object);
if (!doc) {
doc = SP_ACTIVE_DOCUMENT;
g_warning("object has no document. using active");
......@@ -436,7 +436,7 @@ static int getLcmsIntent( guint svgIntent )
return intent;
}
static SPObject* bruteFind( Document* document, gchar const* name )
static SPObject* bruteFind( SPDocument* document, gchar const* name )
{
SPObject* result = 0;
const GSList * current = sp_document_get_resource_list(document, "iccprofile");
......@@ -456,7 +456,7 @@ static SPObject* bruteFind( Document* document, gchar const* name )
return result;
}
cmsHPROFILE Inkscape::colorprofile_get_handle( Document* document, guint* intent, gchar const* name )
cmsHPROFILE Inkscape::colorprofile_get_handle( SPDocument* document, guint* intent, gchar const* name )
{
cmsHPROFILE prof = 0;
......
......@@ -56,7 +56,7 @@ private:
static void init( ColorProfile *cprof );
static void release( SPObject *object );
static void build( SPObject *object, Document *document, Inkscape::XML::Node *repr );
static void build( SPObject *object, SPDocument *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
......
/**
* Aggregates undo stack observers for convenient management and triggering in Document
* Aggregates undo stack observers for convenient management and triggering in SPDocument
*
* Heavily inspired by Inkscape::XML::CompositeNodeObserver.
*
......
/**
* Aggregates undo stack observers for management and triggering in Document
* Aggregates undo stack observers for management and triggering in SPDocument
*
* Heavily inspired by Inkscape::XML::CompositeNodeObserver.
*
......@@ -25,7 +25,7 @@ namespace Inkscape {
class Event;
/**
* Aggregates UndoStackObservers for management and triggering in an Document's undo/redo
* Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo
* system.
*/
class CompositeUndoStackObserver : public UndoStackObserver {
......
......@@ -108,7 +108,7 @@ static bool evaluateSystemLanguage(SPItem const *item, gchar const *value) {
if (language_codes.empty())
return false;
Document *document = SP_OBJECT_DOCUMENT(item);
SPDocument *document = SP_OBJECT_DOCUMENT(item);
Glib::ustring document_language = document->getLanguage();
if (document_language.size() == 0)
......
......@@ -254,7 +254,7 @@ void init_avoided_shape_geometry(SPDesktop *desktop)
{
// Don't count this as changes to the document,
// it is basically just late initialisation.
Document *document = sp_desktop_document(desktop);
SPDocument *document = sp_desktop_document(desktop);
bool saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive(document, false);
......
......@@ -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);
Document *doc = sp_desktop_document(desktop);
SPDocument *doc = sp_desktop_document(desktop);
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop);
......@@ -763,7 +763,7 @@ connector_handle_key_press(SPConnectorContext *const cc, guint const keyval)
if (cc->state == SP_CONNECTOR_CONTEXT_REROUTING) {
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
Document *doc = sp_desktop_document(desktop);
SPDocument *doc = sp_desktop_document(desktop);
cc_connector_rerouting_finish(cc, NULL);
......@@ -794,7 +794,7 @@ static void
cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p)
{
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
Document *doc = sp_desktop_document(desktop);
SPDocument *doc = sp_desktop_document(desktop);
// Clear the temporary path:
cc->red_curve->reset();
......@@ -936,7 +936,7 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc)
c->transform(SP_EVENT_CONTEXT_DESKTOP(cc)->dt2doc());
SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(cc);
Document *doc = sp_desktop_document(desktop);
SPDocument *doc = sp_desktop_document(desktop);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
if ( c && !c->is_empty() ) {
......@@ -1311,7 +1311,7 @@ void cc_selection_set_avoid(bool const set_avoid)
return;
}
Document *document = sp_desktop_document(desktop);
SPDocument *document = sp_desktop_document(desktop);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
......
......@@ -440,7 +440,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
case GDK_KP_Delete:
case GDK_BackSpace:
{
Document *doc = SP_OBJECT_DOCUMENT(guide);
SPDocument *doc = SP_OBJECT_DOCUMENT(guide);
sp_guide_remove(guide);
sp_document_done(doc, SP_VERB_NONE, _("Delete guide"));
ret = TRUE;
......
......@@ -31,7 +31,7 @@ sp_desktop_selection (SPDesktop const * desktop)
return desktop->selection;
}
Document *
SPDocument *
sp_desktop_document (SPDesktop const * desktop)
{
g_return_val_if_fail (desktop != NULL, NULL);
......
......@@ -30,7 +30,7 @@ namespace Inkscape {
SPEventContext * sp_desktop_event_context (SPDesktop const * desktop);
Inkscape::Selection * sp_desktop_selection (SPDesktop const * desktop);
Document * sp_desktop_document (SPDesktop const * desktop);
SPDocument * 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);
......
......@@ -178,7 +178,7 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
namedview = nv;
canvas = aCanvas;
Document *document = SP_OBJECT_DOCUMENT (namedview);
SPDocument *document = SP_OBJECT_DOCUMENT (namedview);
/* Kill flicker */
sp_document_ensure_up_to_date (document);
......@@ -577,7 +577,7 @@ SPDesktop::activate_guides(bool activate)
* Make desktop switch documents.
*/
void
SPDesktop::change_document (Document *theDocument)
SPDesktop::change_document (SPDocument *theDocument)
{
g_return_if_fail (theDocument != NULL);
......@@ -1492,7 +1492,7 @@ SPDesktop::updateCanvasNow()
* Associate document with desktop.
*/
void
SPDesktop::setDocument (Document *doc)
SPDesktop::setDocument (SPDocument *doc)
{
if (this->doc() && doc) {
namedview->hide(this);
......
......@@ -143,7 +143,7 @@ struct SPDesktop : public Inkscape::UI::View::View
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*,Document*> & slot)
sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot)
{
return _document_replaced_signal.connect (slot);
}
......@@ -219,7 +219,7 @@ struct SPDesktop : public Inkscape::UI::View::View
bool itemIsHidden(SPItem const *item) const;
void activate_guides (bool activate);
void change_document (Document *document);
void change_document (SPDocument *document);
void set_event_context (GtkType type, const gchar *config);
void push_event_context (GtkType type, const gchar *config, unsigned int key);
......@@ -315,7 +315,7 @@ struct SPDesktop : public Inkscape::UI::View::View
Geom::Point doc2dt(Geom::Point const &p) const;
Geom::Point dt2doc(Geom::Point const &p) const;
virtual void setDocument (Document* doc);
virtual void setDocument (SPDocument* doc);
virtual bool shutdown();
virtual void mouseover() {}
virtual void mouseout() {}
......@@ -337,7 +337,7 @@ private:
void push_current_zoom (GList**);
sigc::signal<void,SPDesktop*,Document*> _document_replaced_signal;
sigc::signal<void,SPDesktop*,SPDocument*> _document_replaced_signal;
sigc::signal<void> _activate_signal;
sigc::signal<void> _deactivate_signal;
sigc::signal<void,SPDesktop*,SPEventContext*> _event_context_changed_signal;
......
......@@ -841,7 +841,7 @@ static NRArena const *trace_arena = NULL;
static unsigned trace_visionkey;
static NRArenaItem *trace_root;
static gdouble trace_zoom;
static Document *trace_doc;
static SPDocument *trace_doc;
static void
clonetiler_trace_hide_tiled_clones_recursively (SPObject *from)
......@@ -857,7 +857,7 @@ clonetiler_trace_hide_tiled_clones_recursively (SPObject *from)
}
static void
clonetiler_trace_setup (Document *doc, gdouble zoom, SPItem *original)
clonetiler_trace_setup (SPDocument *doc, gdouble zoom, SPItem *original)
{
trace_arena = NRArena::create();
/* Create ArenaItem and set transform */
......
......@@ -538,7 +538,7 @@ sp_export_dialog (void)
if (SP_ACTIVE_DOCUMENT && SP_DOCUMENT_URI (SP_ACTIVE_DOCUMENT))
{
gchar *name;
Document * doc = SP_ACTIVE_DOCUMENT;
SPDocument * doc = SP_ACTIVE_DOCUMENT;
const gchar *uri = SP_DOCUMENT_URI (doc);
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
const gchar * text_extension = repr->attribute("inkscape:output_extension");
......@@ -779,7 +779,7 @@ sp_export_selection_modified ( Inkscape::Application */*inkscape*/,
switch (current_key) {
case SELECTION_DRAWING:
if ( SP_ACTIVE_DESKTOP ) {
Document *doc;
SPDocument *doc;
doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc)));
if (bbox) {
......@@ -839,7 +839,7 @@ sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base)
if ( SP_ACTIVE_DESKTOP )
{
Document *doc;
SPDocument *doc;
Geom::OptRect bbox;
doc = sp_desktop_document (SP_ACTIVE_DESKTOP);
......@@ -906,7 +906,7 @@ sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base)
switch (key) {