summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/document.cpp8
-rw-r--r--src/document.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 441a5876f..4d1d8780a 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -314,12 +314,15 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc,
if (document->uri){
g_free(document->uri);
+ document->uri = 0;
}
if (document->base){
g_free(document->base);
+ document->base = 0;
}
if (document->name){
g_free(document->name);
+ document->name = 0;
}
#ifndef WIN32
document->uri = prepend_current_dir_if_relative(uri);
@@ -852,6 +855,11 @@ SPDocument::removeUndoObserver(Inkscape::UndoStackObserver& observer)
this->priv->undoStackObservers.remove(observer);
}
+SPObject *SPDocument::getObjectById(Glib::ustring const &id) const
+{
+ return getObjectById( id.c_str() );
+}
+
SPObject *SPDocument::getObjectById(gchar const *id) const
{
g_return_val_if_fail(id != NULL, NULL);
diff --git a/src/document.h b/src/document.h
index 82a9a5158..c94b66c4d 100644
--- a/src/document.h
+++ b/src/document.h
@@ -174,6 +174,7 @@ public:
sigc::connection connectCommit(CommitSignal::slot_type slot);
void bindObjectToId(gchar const *id, SPObject *object);
+ SPObject *getObjectById(Glib::ustring const &id) const;
SPObject *getObjectById(gchar const *id) const;
sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot);