summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-07-31 22:33:03 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-07-31 22:33:03 +0000
commitf1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b (patch)
treece3ca9ef9daa04c0474e859c939dfabd1ebab557 /src/document.cpp
parentAdded percent support back to select toolbar. (diff)
downloadinkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.tar.gz
inkscape-f1cdb3b3f47c7187d9325e8ddd8e630268dc8e8b.zip
Eliminate "unit-constants.h".
(bzr r12380.1.54)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/document.cpp b/src/document.cpp
index a024cc790..afd0a6ddc 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -62,7 +62,7 @@
#include "sp-object-repr.h"
#include "sp-symbol.h"
#include "transf_mat_3x4.h"
-#include "unit-constants.h"
+#include "util/units.h"
#include "xml/repr.h"
#include "xml/rebase-hrefs.h"
#include "libcroco/cr-cascade.h"
@@ -966,7 +966,7 @@ void SPDocument::setupViewport(SPItemCtx *ctx)
if (root->viewBox_set) { // if set, take from viewBox
ctx->viewport = root->viewBox;
} else { // as a last resort, set size to A4
- ctx->viewport = Geom::Rect::from_xywh(0, 0, 210 * PX_PER_MM, 297 * PX_PER_MM);
+ ctx->viewport = Geom::Rect::from_xywh(0, 0, 210 * Inkscape::Util::Quantity::convert(1, "mm", "px"), 297 * Inkscape::Util::Quantity::convert(1, "mm", "px"));
}
ctx->i2vp = Geom::identity();
}