Code

Extensions. Shebangs branch merge.
[inkscape.git] / src / document.cpp
index 101c54e30b687d38160ac0d9e2c55d4d0227e93a..3c9f7e5edc2a06272324aa8b422cae78914bbad3 100644 (file)
@@ -92,7 +92,7 @@ SPDocument::SPDocument() :
     base(0),
     name(0),
     priv(0), // reset in ctor
-    actionkey(0),
+    actionkey(),
     modified_id(0),
     rerouting_handler_id(0),
     profileManager(0), // deferred until after other initialization
@@ -211,7 +211,6 @@ SPDocument::~SPDocument() {
         inkscape_unref();
         keepalive = FALSE;
     }
-
     //delete this->_whiteboard_session_manager;
 }
 
@@ -288,7 +287,7 @@ void SPDocument::collectOrphans() {
 
 void SPDocument::reset_key (void */*dummy*/)
 {
-    actionkey = NULL;
+    actionkey.clear();
 }
 
 SPDocument *
@@ -682,7 +681,7 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins)
                 margin_units = sp_unit_get_by_abbreviation(units_abbr);
             }
             if (margin_units == NULL) {
-                margin_units = &sp_unit_get_by_id(SP_UNIT_PX);
+                margin_units = &px;
             }
             margin_top = getMarginLength(nv_repr, "fit-margin-top",
                                          margin_units, &px, w, h, false);