summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fb99fe)
raw | patch | inline | side by side (parent: 1fb99fe)
author | joncruz <joncruz@users.sourceforge.net> | |
Thu, 12 Jun 2008 09:49:31 +0000 (09:49 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Thu, 12 Jun 2008 09:49:31 +0000 (09:49 +0000) |
src/document.cpp | patch | blob | history | |
src/document.h | patch | blob | history |
diff --git a/src/document.cpp b/src/document.cpp
index 333ce8d5a6b4b3b8d8a66f1e2608360c826a7157..af65d2d30075abec28f1ad3e358ba880d16837ab 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
static unsigned long next_serial = 0;
-SPDocument::SPDocument() {
- SPDocumentPrivate *p;
-
- keepalive = FALSE;
- virgin = TRUE;
-
- modified_id = 0;
-
- rdoc = NULL;
- rroot = NULL;
- root = NULL;
- style_cascade = cr_cascade_new(NULL, NULL, NULL);
-
- uri = NULL;
- base = NULL;
- name = NULL;
-
- _collection_queue = NULL;
-
- // Initialise instance of connector router.
- router = new Avoid::Router();
+SPDocument::SPDocument() :
+ keepalive(FALSE),
+ virgin(TRUE),
+ modified_since_save(FALSE),
+ rdoc(0),
+ rroot(0),
+ root(0),
+ style_cascade(cr_cascade_new(NULL, NULL, NULL)),
+ uri(0),
+ base(0),
+ name(0),
+ priv(0), // reset in ctor
+ actionkey(0),
+ modified_id(0),
+ profileManager(0), // deferred until after other initialization
+ router(new Avoid::Router()),
+ perspectives(0),
+ current_persp3d(0),
+ _collection_queue(0)
+{
// Don't use the Consolidate moves optimisation.
router->ConsolidateMoves = false;
- perspectives = NULL;
-
- p = new SPDocumentPrivate();
+ SPDocumentPrivate *p = new SPDocumentPrivate();
p->serial = next_serial++;
diff --git a/src/document.h b/src/document.h
index b0d6afecb1be9b8dafce41b7afe1c778ac4af2be..a5cc3b855bf794efe47e31fb4d4a248417ea0b52 100644 (file)
--- a/src/document.h
+++ b/src/document.h
Persp3D *current_persp3d; // "currently active" perspective (e.g., newly created boxes are attached to this one)
+ GSList *_collection_queue;
+
void add_persp3d (Persp3D * const persp);
void remove_persp3d (Persp3D * const persp);
void _emitModified();
- GSList *_collection_queue;
-
void addUndoObserver(Inkscape::UndoStackObserver& observer);
void removeUndoObserver(Inkscape::UndoStackObserver& observer);
bool isSeeking() const;
bool isModifiedSinceSave() const { return modified_since_save; }
- void setModifiedSinceSave(bool modified=true) {
+ void setModifiedSinceSave(bool modified = true) {
modified_since_save = modified;
}