summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorMarcin Floryan <mfloryan@mm.waw.pl>2008-04-03 15:47:17 +0000
committermfloryan <mfloryan@users.sourceforge.net>2008-04-03 15:47:17 +0000
commitd1d54506853b2e5abe1b6a85af3d46c9cb1bac3f (patch)
treecf19e31711815a89b9d4bd82a6e56a3867e613b5 /src/document.cpp
parentUse MAX_PATH instead of arbitrary string length. Improve comments. (diff)
downloadinkscape-d1d54506853b2e5abe1b6a85af3d46c9cb1bac3f.tar.gz
inkscape-d1d54506853b2e5abe1b6a85af3d46c9cb1bac3f.zip
applied patch by sas to fix default default height and width attributes on svg element following the SVG spec. Closes Bug #211282.
(bzr r5320)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/document.cpp b/src/document.cpp
index e537e43de..92aad942d 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -64,9 +64,6 @@
#include "transf_mat_3x4.h"
-#define A4_WIDTH_STR "210mm"
-#define A4_HEIGHT_STR "297mm"
-
#define SP_DOCUMENT_UPDATE_PRIORITY (G_PRIORITY_HIGH_IDLE - 1)
@@ -300,8 +297,8 @@ sp_document_create(Inkscape::XML::Document *rdoc,
/* fixme: Again, I moved these here to allow version determining in ::build (Lauris) */
/* Quick hack 2 - get default image size into document */
- if (!rroot->attribute("width")) rroot->setAttribute("width", A4_WIDTH_STR);
- if (!rroot->attribute("height")) rroot->setAttribute("height", A4_HEIGHT_STR);
+ if (!rroot->attribute("width")) rroot->setAttribute("width", "100%");
+ if (!rroot->attribute("height")) rroot->setAttribute("height", "100%");
/* End of quick hack 2 */
/* Quick hack 3 - Set uri attributes */