diff --git a/src/text/text_properties.cpp b/src/text/text_properties.cpp index f79886d29..e0433347d 100644 --- a/src/text/text_properties.cpp +++ b/src/text/text_properties.cpp @@ -363,32 +363,32 @@ char_properties::char_properties() : } -void char_properties::from_xml(xml_node const& sym, fontset_map const& fontsets) +void char_properties::from_xml(xml_node const& node, fontset_map const& fontsets) { - optional text_size_ = sym.get_opt_attr("size"); + optional text_size_ = node.get_opt_attr("size"); if (text_size_) text_size = *text_size_; - optional character_spacing_ = sym.get_opt_attr("character-spacing"); + optional character_spacing_ = node.get_opt_attr("character-spacing"); if (character_spacing_) character_spacing = *character_spacing_; - optional fill_ = sym.get_opt_attr("fill"); + optional fill_ = node.get_opt_attr("fill"); if (fill_) fill = *fill_; - optional halo_fill_ = sym.get_opt_attr("halo-fill"); + optional halo_fill_ = node.get_opt_attr("halo-fill"); if (halo_fill_) halo_fill = *halo_fill_; - optional halo_radius_ = sym.get_opt_attr("halo-radius"); + optional halo_radius_ = node.get_opt_attr("halo-radius"); if (halo_radius_) halo_radius = *halo_radius_; - optional tconvert_ = sym.get_opt_attr("text-transform"); + optional tconvert_ = node.get_opt_attr("text-transform"); if (tconvert_) text_transform = *tconvert_; - optional line_spacing_ = sym.get_opt_attr("line-spacing"); + optional line_spacing_ = node.get_opt_attr("line-spacing"); if (line_spacing_) line_spacing = *line_spacing_; - optional opacity_ = sym.get_opt_attr("opacity"); + optional opacity_ = node.get_opt_attr("opacity"); if (opacity_) text_opacity = *opacity_; - optional wrap_char_ = sym.get_opt_attr("wrap-character"); + optional wrap_char_ = node.get_opt_attr("wrap-character"); if (wrap_char_ && (*wrap_char_).size() > 0) wrap_char = ((*wrap_char_)[0]); - optional face_name_ = sym.get_opt_attr("face-name"); + optional face_name_ = node.get_opt_attr("face-name"); if (face_name_) { face_name = *face_name_; } - optional fontset_name_ = sym.get_opt_attr("fontset-name"); + optional fontset_name_ = node.get_opt_attr("fontset-name"); if (fontset_name_) { std::map::const_iterator itr = fontsets.find(*fontset_name_); if (itr != fontsets.end()) @@ -397,20 +397,20 @@ void char_properties::from_xml(xml_node const& sym, fontset_map const& fontsets) } else { - throw config_error("Unable to find any fontset named '" + *fontset_name_ + "'", sym); + throw config_error("Unable to find any fontset named '" + *fontset_name_ + "'", node); } } if (!face_name.empty() && fontset) { - throw config_error("Can't have both face-name and fontset-name", sym); + throw config_error("Can't have both face-name and fontset-name", node); } if (face_name.empty() && !fontset) { - throw config_error("Must have face-name or fontset-name", sym); + throw config_error("Must have face-name or fontset-name", node); } } -void char_properties::to_xml(boost::property_tree::ptree &node, bool explicit_defaults, char_properties const &dfl) const +void char_properties::to_xml(boost::property_tree::ptree& node, bool explicit_defaults, char_properties const& dfl) const { if (fontset) {