summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-12-12 08:49:35 +0000
committertavmjong-free <tavmjong@free.fr>2016-12-12 08:49:35 +0000
commit5f912d8b81bc34d07b7e74930c2f60a71b791ed0 (patch)
tree7cc7745d81b4fa13cf21e44e15e4c3e89df819ed /src/file.cpp
parentAdd option to unset 'line-height' (as well as determine where it is set). (diff)
downloadinkscape-5f912d8b81bc34d07b7e74930c2f60a71b791ed0.tar.gz
inkscape-5f912d8b81bc34d07b7e74930c2f60a71b791ed0.zip
Add missing 'pt' unit to test of legacy files.
(bzr r15322)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 55089209a..2c0d927f5 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -358,6 +358,7 @@ bool sp_file_open(const Glib::ustring &uri,
// Check if potentially need viewbox or unit fix
switch (root->width.unit) {
case SP_CSS_UNIT_PC:
+ case SP_CSS_UNIT_PT:
case SP_CSS_UNIT_MM:
case SP_CSS_UNIT_CM:
case SP_CSS_UNIT_IN:
@@ -366,13 +367,19 @@ bool sp_file_open(const Glib::ustring &uri,
case SP_CSS_UNIT_NONE:
case SP_CSS_UNIT_PX:
need_fix_units = true;
- default:
break;
+ case SP_CSS_UNIT_EM:
+ case SP_CSS_UNIT_EX:
+ case SP_CSS_UNIT_PERCENT:
// OK
+ break;
+ default:
+ std::cerr << "sp_file_open: Unhandled width unit!" << std::endl;
}
switch (root->height.unit) {
case SP_CSS_UNIT_PC:
+ case SP_CSS_UNIT_PT:
case SP_CSS_UNIT_MM:
case SP_CSS_UNIT_CM:
case SP_CSS_UNIT_IN:
@@ -381,9 +388,14 @@ bool sp_file_open(const Glib::ustring &uri,
case SP_CSS_UNIT_NONE:
case SP_CSS_UNIT_PX:
need_fix_units = true;
- default:
break;
+ case SP_CSS_UNIT_EM:
+ case SP_CSS_UNIT_EX:
+ case SP_CSS_UNIT_PERCENT:
// OK
+ break;
+ default:
+ std::cerr << "sp_file_open: Unhandled height unit!" << std::endl;
}
// std::cout << "Absolute SVG units in root? " << (need_fix_viewbox?"true":"false") << std::endl;