diff options
Diffstat (limited to 'src/document.cpp')
| -rw-r--r-- | src/document.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/document.cpp b/src/document.cpp index a61dffc0b..6ab08ffb6 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -70,6 +70,8 @@ gboolean sp_document_resource_list_free(gpointer key, gpointer value, gpointer d static gint doc_count = 0; +static unsigned long next_serial = 0; + SPDocument::SPDocument() { SPDocumentPrivate *p; @@ -96,6 +98,8 @@ SPDocument::SPDocument() { p = new SPDocumentPrivate(); + p->serial = next_serial++; + p->iddef = g_hash_table_new(g_direct_hash, g_direct_equal); p->reprdef = g_hash_table_new(g_direct_hash, g_direct_equal); @@ -182,6 +186,10 @@ SPDocument::~SPDocument() { //delete this->_whiteboard_session_manager; } +unsigned long SPDocument::serial() const { + return priv->serial; +} + void SPDocument::queueForOrphanCollection(SPObject *object) { g_return_if_fail(object != NULL); g_return_if_fail(SP_OBJECT_DOCUMENT(object) == this); |
