diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-11-03 23:42:23 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-11-03 23:42:23 +0000 |
| commit | 48ac54f0234671b23afeaad33af6168037ef552c (patch) | |
| tree | 3a937530c745c958f8da1e788a8dfe94cff847d4 /src/util | |
| parent | Update to trunk (diff) | |
| parent | Remove antiquated Perl extensions and modules, which were mostly useless. (diff) | |
| download | inkscape-48ac54f0234671b23afeaad33af6168037ef552c.tar.gz inkscape-48ac54f0234671b23afeaad33af6168037ef552c.zip | |
Update to trunk
(bzr r12588.1.25)
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/units.cpp | 11 | ||||
| -rw-r--r-- | src/util/units.h | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp index 1023cfb6e..40cce028d 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -362,16 +362,17 @@ bool UnitTable::load(std::string const &filename) { return true; } +/* bool UnitTable::save(std::string const &filename) { - g_warning("UnitTable::save(): not implemented"); - return true; + return false; } +*/ Inkscape::Util::UnitTable unit_table; -void UnitParser::on_start_element(Ctx &ctx, Glib::ustring const &name, AttrMap const &attrs) +void UnitParser::on_start_element(Ctx &/*ctx*/, Glib::ustring const &name, AttrMap const &attrs) { if (name == "unit") { // reset for next use @@ -413,7 +414,7 @@ void UnitParser::on_text(Ctx &ctx, Glib::ustring const &text) } } -void UnitParser::on_end_element(Ctx &ctx, Glib::ustring const &name) +void UnitParser::on_end_element(Ctx &/*ctx*/, Glib::ustring const &name) { if (name == "unit" && !skip) { tbl->addUnit(unit, primary); @@ -463,7 +464,7 @@ double Quantity::value(char const *u) const } Glib::ustring Quantity::string(Unit const *u) const { - return Glib::ustring::format(std::fixed, std::setprecision(2), value(u)) + " " + unit->abbr; + return Glib::ustring::format(std::fixed, std::setprecision(2), value(u)) + " " + u->abbr; } Glib::ustring Quantity::string(Glib::ustring const &u) const { return string(unit_table.getUnit(u.c_str())); diff --git a/src/util/units.h b/src/util/units.h index e1addaa24..597371369 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -168,8 +168,8 @@ public: */ bool load(std::string const &filename); - /** Saves the current UnitTable to the given file. */ - bool save(std::string const &filename); + /* * Saves the current UnitTable to the given file. */ + //bool save(std::string const &filename); protected: UnitCodeMap _unit_map; |
