Exemplo n.º 1
0
text_format_properties_content calc_text_properties_content(const std::vector<const style_instance *> & styleInstances)
{
    text_format_properties_content result;
 	for (size_t i = 0; i < styleInstances.size(); i++)
    {
        result.apply_from(calc_text_properties_content(styleInstances[i]));
    }
    return result;
}
Exemplo n.º 2
0
void process_build_chart::ApplyTextProperties(std::wstring style, std::vector<_property> & propertiesOut)
{
	style_instance* styleInst = styles_.style_by_name(style, odf_types::style_family::Chart, false/*Context.process_headers_footers_*/);
    if(styleInst)
	{
		text_format_properties_content properties = calc_text_properties_content(styleInst);
		properties.apply_to(propertiesOut);
    }
}
Exemplo n.º 3
0
text_format_properties_content calc_text_properties_content(const style_instance * styleInstance)
{
    std::vector<const style_text_properties*> textProps;

    while (styleInstance)
    {
        if (const style_content * content = styleInstance->content())
            if (const style_text_properties * textProp = content->get_style_text_properties())
			{
                textProps.insert(textProps.begin(), textProp);
			}
		
        styleInstance = styleInstance->parent();
    }
    return calc_text_properties_content(textProps);
}