diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-10-24 15:03:01 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-10-24 15:03:01 +0000 |
| commit | 651b367a2e01f918435d829394baff45537f6b91 (patch) | |
| tree | a99fb20cf0acd5fb91cd11833258a9aa222d4d3a /src/extension/internal/wmf-inout.cpp | |
| parent | fix crash bug 1237676 (diff) | |
| download | inkscape-651b367a2e01f918435d829394baff45537f6b91.tar.gz inkscape-651b367a2e01f918435d829394baff45537f6b91.zip | |
fix bug "some of the locale-based templates cause objects to be resized when default units are changed" #1236257
Fixed bugs:
- https://launchpad.net/bugs/1236257
(bzr r12717)
Diffstat (limited to 'src/extension/internal/wmf-inout.cpp')
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index d69d46f20..208077cd1 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -3185,11 +3185,12 @@ Wmf::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri ) // Set document unit Inkscape::XML::Node *repr = sp_document_namedview(doc, 0)->getRepr(); Inkscape::SVGOStringStream os; - os << doc->getWidth().unit->abbr; + Inkscape::Util::Unit const* doc_unit = doc->getWidth().unit; + os << doc_unit->abbr; repr->setAttribute("inkscape:document-units", os.str().c_str()); // Set viewBox - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().quantity, doc->getHeight().quantity)); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc_unit), doc->getHeight().value(doc_unit))); // Scale and translate objects double scale = Inkscape::Util::Quantity::convert(1, "px", doc->getWidth().unit); |
