summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-04 22:01:18 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-04 22:01:18 +0000
commit6ae6c0bea96eef09907091279e0678aa5f83102d (patch)
tree825708d13704e27c33cb90a5269b25ae390cf4d2 /src/sp-namedview.cpp
parentFix handling of SVG lengths with spaces [Bug #1208002]. (diff)
downloadinkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.tar.gz
inkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.zip
Switched to global UnitTable.
(bzr r12380.1.62)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index dde205eed..48f8eba2a 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -40,6 +40,7 @@
#include <gtkmm/window.h>
using Inkscape::DocumentUndo;
+using Inkscape::Util::unit_table;
#define DEFAULTGRIDCOLOR 0x3f3fff25
#define DEFAULTGRIDEMPCOLOR 0x3f3fff60
@@ -287,8 +288,6 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va
{
SPNamedView *nv = SP_NAMEDVIEW(object);
- static Inkscape::Util::UnitTable unit_table;
-
switch (key) {
case SP_ATTR_VIEWONLY:
nv->editable = (!value);
@@ -1111,7 +1110,6 @@ double SPNamedView::getMarginLength(gchar const * const key,
bool const use_width)
{
double value;
- static Inkscape::Util::UnitTable unit_table;
Inkscape::Util::Unit percent = unit_table.getUnit("%");
if(!this->storeAsDouble(key,&value)) {
return 0.0;
@@ -1133,7 +1131,6 @@ Inkscape::Util::Unit const SPNamedView::getDefaultUnit() const
if (doc_units) {
return *doc_units;
} else {
- Inkscape::Util::UnitTable unit_table;
return *(new Inkscape::Util::Unit(unit_table.getUnit("pt")));
}
}