Commit ffefc7ba authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

(1.0.0.142): ASCOfficeOdfFile

презентации: стили теста, параграфов,списков

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52956 954022d7-b5bf-4e40-9824-e11837661b57
parent 4e5d17e4
......@@ -309,6 +309,10 @@
RelativePath=".\src\odf\style_paragraph_properties_docx.cpp"
>
</File>
<File
RelativePath=".\src\odf\style_paragraph_properties_pptx.cpp"
>
</File>
<File
RelativePath=".\src\odf\style_presentation.cpp"
>
......
......@@ -515,7 +515,7 @@ void docx_conversion_context::end_process_style_content()
void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & strm, const std::wstring & ParentId)
{
std::wstringstream & paragraph_style = get_styles_context().paragraph_style();
std::wstringstream & paragraph_style = get_styles_context().paragraph_nodes();
if (!paragraph_style.str().empty() || !ParentId.empty())
{
CP_XML_WRITER(strm)
......
#ifndef _CPDOCCORE_DOCX_CONVERSIONCONTEXT_H_
#define _CPDOCCORE_DOCX_CONVERSIONCONTEXT_H_
#pragma once
#include "../odf/stylefamily.h"
#include "../odf/length.h"
#include <boost/unordered_map.hpp>
......@@ -565,5 +565,3 @@ private:
}
}
#endif
......@@ -26,10 +26,13 @@ void styles_context::start()
text_style_.str( std::wstring() );
text_style_.clear();
paragraph_style_.str( std::wstring() );
paragraph_style_.clear();
paragraph_nodes_.str( std::wstring() );
paragraph_nodes_.clear();
table_style_.str( std::wstring() );
paragraph_attr_.str( std::wstring() );
paragraph_attr_.clear();
table_style_.str( std::wstring() );
table_style_.clear();
list_style_.str( std::wstring() );
......@@ -44,9 +47,14 @@ std::wstringstream & styles_context::text_style()
return text_style_;
}
std::wstringstream & styles_context::paragraph_style()
std::wstringstream & styles_context::paragraph_nodes()
{
return paragraph_nodes_;
}
std::wstringstream & styles_context::paragraph_attr()
{
return paragraph_style_;
return paragraph_attr_;
}
std::wstringstream & styles_context::table_style()
......
......@@ -16,7 +16,8 @@ public:
void start();
std::wstringstream & text_style();
std::wstringstream & paragraph_style();
std::wstringstream & paragraph_nodes();
std::wstringstream & paragraph_attr();
std::wstringstream & table_style();
std::wstringstream & list_style();
......@@ -35,7 +36,8 @@ private:
std::wstringstream list_style_;
std::wstringstream text_style_;
std::wstringstream paragraph_style_;
std::wstringstream paragraph_nodes_;
std::wstringstream paragraph_attr_;
std::wstringstream table_style_;
};
......
......@@ -55,14 +55,14 @@ static const std::wstring _ooxDashStyle[]=
L"sysDashDotDot"
};
void oox_serialize_ln(std::wostream & strm, const std::vector<odf::_property> & properties)
void oox_serialize_ln(std::wostream & strm, const std::vector<odf::_property> & prop)
{
_CP_OPT(std::wstring) strVal;
_CP_OPT(int) iVal;
_CP_OPT(double) dVal;
odf::GetProperty(properties,L"stroke-color",strVal);
odf::GetProperty(properties,L"stroke",iVal);
odf::GetProperty(properties,L"stroke-width",dVal);
odf::GetProperty(prop,L"stroke-color",strVal);
odf::GetProperty(prop,L"stroke",iVal);
odf::GetProperty(prop,L"stroke-width",dVal);
if (!strVal && !iVal && !dVal)return;
CP_XML_WRITER(strm)
......@@ -93,7 +93,7 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf::_property> &
CP_XML_NODE(L"a:srgbClr")
{
CP_XML_ATTR(L"val",color);
odf::GetProperty(properties,L"stroke-opacity",strVal);
odf::GetProperty(prop,L"stroke-opacity",strVal);
if (strVal)CP_XML_NODE(L"a:alpha"){CP_XML_ATTR(L"val",strVal.get());}
}
......@@ -103,12 +103,12 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf::_property> &
{
CP_XML_NODE(L"a:prstDash"){CP_XML_ATTR(L"val",dash_style);}
}
odf::GetProperty(properties,L"marker-start",strVal);
odf::GetProperty(prop,L"marker-start",strVal);
if (strVal)
{
CP_XML_NODE(L"a:headEnd"){CP_XML_ATTR(L"type",strVal.get());}
}
odf::GetProperty(properties,L"marker-end",strVal);
odf::GetProperty(prop,L"marker-end",strVal);
if (strVal)
{
CP_XML_NODE(L"a:tailEnd"){CP_XML_ATTR(L"type",strVal.get());}
......@@ -116,10 +116,10 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf::_property> &
}
}
}
void oox_serialize_aLst(std::wostream & strm, const std::vector<odf::_property> & properties)
void oox_serialize_aLst(std::wostream & strm, const std::vector<odf::_property> & prop)
{
_CP_OPT(int) iShapeIndex;
odf::GetProperty(properties,L"draw-type-index",iShapeIndex);
odf::GetProperty(prop,L"draw-type-index",iShapeIndex);
if (!iShapeIndex)return;
......@@ -128,7 +128,7 @@ void oox_serialize_aLst(std::wostream & strm, const std::vector<odf::_property>
CP_XML_NODE(L"a:avLst")
{
_CP_OPT(std::wstring) strVal;
if (odf::GetProperty(properties,L"draw-modifiers",strVal))
if (odf::GetProperty(prop,L"draw-modifiers",strVal))
{
std::vector< std::wstring > values;
boost::algorithm::split(values, strVal.get(), boost::algorithm::is_any_of(L" "), boost::algorithm::token_compress_on);
......@@ -139,8 +139,8 @@ void oox_serialize_aLst(std::wostream & strm, const std::vector<odf::_property>
int i=1;
_CP_OPT(int) iMax,iMin;
odf::GetProperty(properties,L"draw-modifiers-min",iMin);
odf::GetProperty(properties,L"draw-modifiers-max",iMax);
odf::GetProperty(prop,L"draw-modifiers-min",iMin);
odf::GetProperty(prop,L"draw-modifiers-max",iMax);
values.resize(_OO_OOX_custom_shapes[*iShapeIndex].count_values);
BOOST_FOREACH(std::wstring & v, values)
......@@ -174,6 +174,37 @@ void oox_serialize_aLst(std::wostream & strm, const std::vector<odf::_property>
}
}
}
void oox_serialize_bodyPr(std::wostream & strm, const std::vector<odf::_property> & prop)
{
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"a:bodyPr")
{
_CP_OPT(int) iAlign;
odf::GetProperty(prop,L"textalign-horizontal",iAlign);
//if (iAlign) CP_XML_ATTR(L"name", val.name);
odf::GetProperty(prop,L"textalign-vertiacal",iAlign);
if (iAlign)
{
switch (iAlign.get())
{
case 0://Baseline,
CP_XML_ATTR(L"anchor", L"dist");break;
case 1://Top,
case 4://Auto,
CP_XML_ATTR(L"anchor", L"t");break;
case 2://Middle,
CP_XML_ATTR(L"anchor", L"ctr");break;
case 3://Bottom,
CP_XML_ATTR(L"anchor", L"b");break;
case 5://Justify
CP_XML_ATTR(L"anchor", L"just");break;
}
}
}
}
}
void oox_serialize_shape(std::wostream & strm, _oox_drawing const & val)
{
_CP_OPT(std::wstring) strVal;
......
......@@ -65,7 +65,7 @@ struct _oox_drawing
friend void oox_serialize_ln (std::wostream & _Wostream, const std::vector<odf::_property> & val);
friend void oox_serialize_hlink (std::wostream & _Wostream, const std::vector<_hlink_desc> & val);
friend void oox_serialize_clipping(std::wostream & strm, _oox_drawing const & val);
friend void oox_serialize_bodyPr(std::wostream & strm, const std::vector<odf::_property> & val);
};
}
......
......@@ -32,7 +32,7 @@ void pptx_serialize_text(std::wostream & strm, const std::vector<odf::_property>
{
CP_XML_NODE(L"p:txBody")
{
CP_XML_NODE(L"a:bodyPr");
oox_serialize_bodyPr(CP_XML_STREAM(),properties);
if (strTextContent)
{
......
......@@ -46,7 +46,7 @@ public:
void start_hyperlink();
void end_hyperlink(std::wstring hId);
bool is_drawing_context();
bool in_list();
void start_list(const std::wstring & StyleName, bool Continue = false);
void end_list();
......
......@@ -184,13 +184,6 @@ public:
}
}
}
//_Wostream << L"<borders count=\"" << inst_array.size() << "\" >";
//BOOST_FOREACH(const xlsx_border & border, inst_array)
//{
// ::cpdoccore::oox::xlsx_serialize(_Wostream, border);
//}
//_Wostream << L"</borders>";
}
private:
......
......@@ -31,7 +31,7 @@ void xlsx_serialize_text(std::wostream & strm, const std::vector<odf::_property>
{
CP_XML_NODE(L"xdr:txBody")
{
CP_XML_NODE(L"a:bodyPr");
oox_serialize_bodyPr(CP_XML_STREAM(),properties);
CP_XML_NODE(L"a:lstStyle");
CP_XML_NODE(L"a:p")
{
......
......@@ -169,7 +169,8 @@ style_instance * styles_container::style_by_name(const std::wstring & Name, styl
if (res != map_.end())
{
return instances_[res->second].get();
int index = res->second;
return instances_[index].get();
}
else
return NULL;
......
#ifndef _CPDOCCORE_ODF_OFFCIE_ELEMENTS_H_
#define _CPDOCCORE_ODF_OFFCIE_ELEMENTS_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <vector>
......@@ -131,4 +126,3 @@ public:
}
}
#endif // #ifndef _CPDOCCORE_ODF_OFFCIE_ELEMENTS_H_
......@@ -22,6 +22,8 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
CP_APPLY_ATTR(L"draw:marker-end", draw_marker_end_);
CP_APPLY_ATTR(L"draw:opacity", draw_opacity_);
CP_APPLY_ATTR(L"draw:wrap-influence-on-position", draw_wrap_influence_on_position_);
CP_APPLY_ATTR(L"draw:textarea-horizontal-align", draw_textarea_horizontal_align_);
CP_APPLY_ATTR(L"draw:textarea-vertical-align", draw_textarea_vertical_align_);
CP_APPLY_ATTR(L"svg:stroke-color", svg_stroke_color_);
CP_APPLY_ATTR(L"svg:stroke-width", svg_stroke_width_);
......@@ -65,22 +67,20 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
void graphic_format_properties::apply_to(std::vector<_property> & properties)
{
if (draw_fill_color_) properties.push_back(_property(L"fill-color", draw_fill_color_.get().get_hex_value() ));
if (svg_stroke_color_) properties.push_back(_property(L"stroke-color", svg_stroke_color_.get().get_hex_value() ));
if (draw_fill_color_) properties.push_back(_property(L"fill-color", draw_fill_color_->get_hex_value() ));
if (svg_stroke_color_) properties.push_back(_property(L"stroke-color", svg_stroke_color_->get_hex_value() ));
if (draw_fill_) properties.push_back(_property(L"fill", draw_fill_.get()));
if (draw_stroke_) properties.push_back(_property(L"stroke", draw_stroke_.get().get_type() ));
if (draw_stroke_) properties.push_back(_property(L"stroke", draw_stroke_->get_type() ));
if (draw_stroke_dash_) properties.push_back(_property(L"stroke-dash", draw_stroke_dash_.get()));
if (svg_stroke_width_) properties.push_back(_property(L"stroke-width", svg_stroke_width_.get().get_length().get_value_unit(odf::length::pt) ));
if (draw_opacity_) properties.push_back(_property(L"opacity", draw_opacity_.get().get_percent().get_value()));
if (svg_stroke_opacity_)properties.push_back(_property(L"stroke-opacity",svg_stroke_opacity_.get().get_percent().get_value()));
if (draw_marker_start_) properties.push_back(_property(L"marker-start", draw_marker_start_.get().get() ));
if (draw_marker_end_) properties.push_back(_property(L"marker-end", draw_marker_end_.get().get() ));
if (svg_stroke_width_) properties.push_back(_property(L"stroke-width", svg_stroke_width_->get_length().get_value_unit(odf::length::pt) ));
if (draw_opacity_) properties.push_back(_property(L"opacity", draw_opacity_->get_percent().get_value()));
if (svg_stroke_opacity_)properties.push_back(_property(L"stroke-opacity",svg_stroke_opacity_->get_percent().get_value()));
if (draw_marker_start_) properties.push_back(_property(L"marker-start", draw_marker_start_->get() ));
if (draw_marker_end_) properties.push_back(_property(L"marker-end", draw_marker_end_->get() ));
if (draw_textarea_horizontal_align_)properties.push_back(_property(L"textalign-horizontal", draw_textarea_horizontal_align_->get_type() ));
if (draw_textarea_vertical_align_)properties.push_back(_property(L"textalign-vertical", draw_textarea_vertical_align_->get_type() ));
//if (draw_fill_gradient_name_)
//{
// //parsing
//}
}
void graphic_format_properties::apply_from(const graphic_format_properties & Other)
{
......@@ -91,6 +91,8 @@ void graphic_format_properties::apply_from(const graphic_format_properties & Oth
_CP_APPLY_PROP2(draw_marker_start_);
_CP_APPLY_PROP2(draw_marker_end_);
_CP_APPLY_PROP2(draw_opacity_);
_CP_APPLY_PROP2(draw_textarea_horizontal_align_);
_CP_APPLY_PROP2(draw_textarea_vertical_align_);
_CP_APPLY_PROP2(svg_stroke_color_);
_CP_APPLY_PROP2(svg_stroke_width_);
......@@ -148,9 +150,5 @@ void style_graphic_properties::add_child_element( xml::sax * Reader, const ::std
CP_NOT_APPLICABLE_ELM();
}
void style_graphic_properties::docx_convert(oox::docx_conversion_context & Context)
{
}
}
}
......@@ -22,6 +22,8 @@
#include "runthrough.h"
#include "linestyle.h"
#include "markerstyle.h"
#include "verticalalign.h"
namespace cpdoccore {
namespace odf {
......@@ -39,10 +41,8 @@ public:
// 1
common_draw_rel_size_attlist common_draw_rel_size_attlist_;
_CP_OPT(length_or_percent) fo_min_width_;
// 2
_CP_OPT(length_or_percent) fo_min_height_;
// 3
_CP_OPT(length_or_percent) fo_max_width_;
_CP_OPT(length_or_percent) fo_max_height_;
......@@ -60,85 +60,61 @@ public:
_CP_OPT(marker_style) draw_marker_end_;
_CP_OPT(marker_style) draw_marker_start_;
// 4
_CP_OPT(text_align) draw_textarea_horizontal_align_;
_CP_OPT(vertical_align) draw_textarea_vertical_align_;
common_horizontal_margin_attlist common_horizontal_margin_attlist_;
// 5
common_vertical_margin_attlist common_vertical_margin_attlist_;
// 6
common_margin_attlist common_margin_attlist_;
// 7
_CP_OPT(bool) style_print_content_;
// 8
_CP_OPT(std::wstring) style_protect_;
// 9
common_horizontal_pos_attlist common_horizontal_pos_attlist_;
// 10
common_horizontal_rel_attlist common_horizontal_rel_attlist_;
// 11
common_vertical_pos_attlist common_vertical_pos_attlist_;
// 12
common_vertical_rel_attlist common_vertical_rel_attlist_;
// 13
common_text_anchor_attlist common_text_anchor_attlist_;
// 14
common_border_attlist common_border_attlist_;
// 15
common_border_line_width_attlist common_border_line_width_attlist_;
// 16
common_padding_attlist common_padding_attlist_;
// 17
common_shadow_attlist common_shadow_attlist_;
// 18
common_background_color_attlist common_background_color_attlist_;
// 20
_CP_OPT(bool) style_editable_;
// 21
_CP_OPT(style_wrap) style_wrap_;
// 22
_CP_OPT(unsigned int) style_wrap_dynamic_treshold_;
// 23
_CP_OPT(integer_or_nolimit) style_number_wrapped_paragraphs_;
// 24
_CP_OPT(bool) style_wrap_contour_;
// 25
_CP_OPT(wrap_contour_mode) style_wrap_contour_mode_;
// 26
_CP_OPT(run_through) style_run_through_;
// 27
_CP_OPT(bool) style_flow_with_text_;
// 28
_CP_OPT(std::wstring) style_overflow_behavior_;
// 29
_CP_OPT(std::wstring) style_mirror_;
// 30
_CP_OPT(std::wstring) fo_clip_;
// 31
_CP_OPT(std::wstring) draw_wrap_influence_on_position_;
office_element_ptr style_background_image_;
......@@ -156,11 +132,9 @@ public:
static const ElementType type = typeStyleGraphicPropertis;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context) ;
const graphic_format_properties & content() const { return graphic_format_properties_; }
//std::vector<_property> content_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
......
......@@ -2,6 +2,10 @@
#include <iosfwd>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/CPOptional.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "linewidth.h"
#include "length.h"
......@@ -33,11 +37,19 @@
#include "office_binary_data.h"
#include "common_attlists.h"
#include "office_elements.h"
#include "office_elements_create.h"
#include "../docx/docx_conversion_context.h"
//#include "office_elements.h"
//#include "office_elements_create.h"
namespace cpdoccore { namespace odf {
namespace cpdoccore{
namespace oox{
class docx_conversion_context;
class pptx_conversion_context;
};
namespace odf {
/// \class style_tab_stop
class style_tab_stop : public office_element_impl<style_tab_stop>
......@@ -50,10 +62,9 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
......@@ -90,10 +101,9 @@ public:
size_t size() const { return style_tab_stops_.size(); }
public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
private:
......@@ -130,8 +140,6 @@ private:
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_text(const std::wstring & Text);
_CP_OPT(common_draw_data_attlist) common_draw_data_attlist_;
};
......@@ -181,6 +189,7 @@ public:
void apply_from(const paragraph_format_properties & Other);
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
public:
// 15.5.1 fo:line-height
......@@ -362,8 +371,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
const paragraph_format_properties & content() const { return style_paragraph_properties_content_; }
......
This diff is collapsed.
#ifndef _CPDOCCORE_ODF_STYLE_TABLE_PROPERTIES_H_
#define _CPDOCCORE_ODF_STYLE_TABLE_PROPERTIES_H_
#pragma once
#include <iosfwd>
#include <cpdoccore/xml/attributes.h>
......@@ -322,5 +321,3 @@ CP_REGISTER_OFFICE_ELEMENT2(style_table_cell_properties);
}
}
#endif
......@@ -47,6 +47,7 @@ public:
void docx_convert(oox::docx_conversion_context & Context);
void pptx_convert(oox::pptx_conversion_context & Context);
void pptx_convert_as_list(oox::pptx_conversion_context & Context);
void apply_from(const text_format_properties_content & Other);
void apply_to(std::vector<_property> & properties);
......@@ -57,7 +58,6 @@ private:
static double process_font_size_impl(const _CP_OPT(font_size) & FontSize, const style_instance * currnetStyle, bool Complex = false, double Mul = 1.0);
static int process_font_weight(const optional<font_weight>::Type & FontWeight);
static int process_font_style(const optional<font_style>::Type & FontStyle);
public:
_CP_OPT(std::wstring) r_style_;
......
......@@ -90,10 +90,8 @@ void text_list_level_style_number::add_child_element( xml::sax * Reader, const :
{
if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_);
else if (L"style" == Ns && L"style-text-properties" == Name)
CP_CREATE_ELEMENT(style_text_properties_);
else if (L"style" == Ns && L"text-properties" == Name)
CP_CREATE_ELEMENT(text_properties_);
else if (L"style" == Ns && L"text-properties" == Name)
CP_CREATE_ELEMENT(style_text_properties_);
else
{
CP_NOT_APPLICABLE_ELM();
......@@ -388,7 +386,29 @@ void text_list_level_style_number::pptx_convert(oox::pptx_conversion_context & C
if (text_list_level_style_attr_.get_text_level() - 1 >= 9)
return;
std::wostream & strm = Context.get_text_context().get_styles_context().list_style();
style_list_level_properties * listLevelProperties = dynamic_cast<style_list_level_properties *>( style_list_level_properties_.get() );
style_list_level_label_alignment * labelAlignment = listLevelProperties ?
dynamic_cast<style_list_level_label_alignment *>(listLevelProperties->style_list_level_label_alignment_.get()) : NULL;
//int level = text_list_level_style_attr_.get_text_level();
CP_XML_WRITER(strm)
{
if (style_text_properties * textProperties = dynamic_cast<style_text_properties *>(style_text_properties_.get()))///
// !!!
{
textProperties->content().pptx_convert_as_list(Context);
strm << Context.get_text_context().get_styles_context().text_style().str();
}
CP_XML_NODE(L"a:buAutoNum")//ms !! .. , - 2010 !!!
{
CP_XML_ATTR(L"startAt",text_list_level_style_number_attr_.text_start_value_);
CP_XML_ATTR(L"type",L"arabicParenBoth");
}
}
}
namespace
......@@ -508,8 +528,7 @@ void text_list_level_style_bullet::docx_convert(oox::docx_conversion_context & C
Context.get_styles_context().start();
textProperties->content().docx_convert(Context);
Context.get_styles_context().docx_serialize_text_style(CP_XML_STREAM());
}
}
}
}
}
......@@ -522,33 +541,32 @@ void text_list_level_style_bullet::pptx_convert(oox::pptx_conversion_context & C
std::wostream & strm = Context.get_text_context().get_styles_context().list_style();
style_list_level_properties * listLevelProperties = dynamic_cast<style_list_level_properties *>( style_list_level_properties_.get() );
style_list_level_label_alignment * labelAlignment = listLevelProperties ?
dynamic_cast<style_list_level_label_alignment *>(listLevelProperties->style_list_level_label_alignment_.get()) : NULL;
// style_list_level_properties * listLevelProperties = dynamic_cast<style_list_level_properties *>( style_list_level_properties_.get() );
//
//style_list_level_label_alignment * labelAlignment = listLevelProperties ?
// dynamic_cast<style_list_level_label_alignment *>(listLevelProperties->style_list_level_label_alignment_.get()) : NULL;
int level = text_list_level_style_attr_.get_text_level();
//std::wstring nodeLevel = L"a:lvl" + boost::lexical_cast<std::wstring>(level) + L"pPr";
//int level = text_list_level_style_attr_.get_text_level();
CP_XML_WRITER(strm)
{
//CP_XML_NODE(nodeLevel)
{
//CP_XML_ATTR(L"lvl",level - 1);
//attr ident
//attr marL
style_text_properties * textProperties = dynamic_cast<style_text_properties *>(style_text_properties_.get());
wchar_t bullet = text_list_level_style_bullet_attr_.text_bullet_char_.get_value_or(L'\x2022');
if (textProperties)///
// !!!
{
textProperties->content().pptx_convert_as_list(Context);
strm << Context.get_text_context().get_styles_context().text_style().str();
}
const wchar_t bullet = text_list_level_style_bullet_attr_.text_bullet_char_.get_value_or(L'\x2022');
CP_XML_NODE(L"a:buChar")
{
CP_XML_ATTR(L"char",convert_bullet_char(bullet));
}
if (style_text_properties * textProperties = dynamic_cast<style_text_properties *>(style_text_properties_.get()))
{
textProperties->content().pptx_convert(Context);
strm << Context.get_text_context().get_styles_context().text_style().str();
}
CP_XML_NODE(L"a:buChar")
{
//if ((textProperties) && (textProperties->content().style_font_charset_))
//{
// if (textProperties->content().style_font_charset_.get() == L"x-xsymbol")bullet = bullet + 0xf000;
//}
CP_XML_ATTR(L"char",bullet/*convert_bullet_char(bullet)*/);
}
}
}
......
......@@ -180,8 +180,7 @@ private:
text_list_level_style_number_attr text_list_level_style_number_attr_;
office_element_ptr style_list_level_properties_;
office_element_ptr style_text_properties_;
office_element_ptr text_properties_;
office_element_ptr style_text_properties_;
};
......
#ifndef _CPDOCCORE_ODF_TEXTALIGN_H_
#define _CPDOCCORE_ODF_TEXTALIGN_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <iosfwd>
#include <string>
#include "odfattributes.h"
namespace cpdoccore { namespace odf {
namespace cpdoccore {
namespace odf {
// text_align horizontal_align . ..
class text_align
{
public:
......@@ -48,5 +45,3 @@ std::wostream & operator << (std::wostream & _Wostream, const text_align & _Val)
APPLY_PARSE_XML_ATTRIBUTES(odf::text_align);
}
#endif
#ifndef _CPDOCCORE_ODF_VERTICALALIGN_H_
#define _CPDOCCORE_ODF_VERTICALALIGN_H_
#ifdef _MSC_VER
#pragma once
#endif
#include <iosfwd>
#include <string>
......@@ -34,7 +30,6 @@ public:
{
return type_;
};
static vertical_align parse(const std::wstring & Str);
private:
......@@ -50,4 +45,3 @@ APPLY_PARSE_XML_ATTRIBUTES(odf::vertical_align);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment