int const TextContentProperty::OUTLINE_WIDTH = 514;
int const TextContentProperty::TYPE = 515;
-TextContent::TextContent (Content* parent, TextType original_type)
+TextContent::TextContent (Content* parent, TextType type, TextType original_type)
: ContentPart (parent)
, _use (false)
, _burn (false)
, _y_scale (1)
, _line_spacing (1)
, _outline_width (2)
- , _type (original_type)
+ , _type (type)
, _original_type (original_type)
{
}
-/** @return TextContents from node or <Caption> nodes under node (according to version).
+/** @return TextContents from node or <Text> nodes under node (according to version).
* The list could be empty if no TextContents are found.
*/
list<shared_ptr<TextContent> >
return c;
}
- if (!node->optional_node_child("Caption")) {
+ if (!node->optional_node_child("Text")) {
return list<shared_ptr<TextContent> >();
}
list<shared_ptr<TextContent> > c;
- BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Caption")) {
+ BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
}
return c;
connect_to_fonts ();
- _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
- _original_type = string_to_text_type (node->optional_string_child("OriginalType").get_value_or("open"));
+ if (version >= 37) {
+ _type = string_to_text_type (node->optional_string_child("Type").get_value_or("open"));
+ if (node->optional_string_child("OriginalType")) {
+ _original_type = string_to_text_type (node->optional_string_child("OriginalType").get());
+ }
+ }
}
TextContent::TextContent (Content* parent, vector<shared_ptr<Content> > c)
void
TextContent::font_changed ()
{
- _parent->signal_changed (TextContentProperty::FONTS);
+ /* XXX: too late */
+ ChangeSignaller<Content> cc (_parent, TextContentProperty::FONTS);
}
void