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

OdfFormatReader - поправлена конвертация разделов и колонок (разрывы и настройки страниц)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68553 954022d7-b5bf-4e40-9824-e11837661b57
parent 5d9e5869
......@@ -32,8 +32,10 @@ docx_conversion_context::docx_conversion_context(package::docx_document * Output
current_run_(false),
page_break_after_(false),
page_break_before_(false),
page_break_(false),
in_automatic_style_(false),
next_dump_page_properties_(false),
next_dump_section_(false),
mediaitems_( OdfDocument->get_folder() ),
in_paragraph_(false),
table_context_(*this),
......@@ -586,14 +588,23 @@ void docx_conversion_context::start_process_style_content()
styles_context_.start();
}
void docx_conversion_context::process_page_properties(std::wostream & strm)
bool docx_conversion_context::process_page_properties(std::wostream & strm)
{
if (is_next_dump_page_properties())
if (is_next_dump_page_properties() || get_section_context().get().is_dump_)
{
const std::wstring pageProperties = get_page_properties();
odf_reader::page_layout_instance * page_layout_instance_ = root()->odf_context().pageLayoutContainer().page_layout_by_name(pageProperties);
if (page_layout_instance_) page_layout_instance_->docx_convert_serialize(strm,*this);
std::wstring pageProperties = get_page_properties();
if (!pageProperties.empty())//??? ???
{
odf_reader::page_layout_instance * page_layout_instance_ = root()->odf_context().pageLayoutContainer().page_layout_by_name(pageProperties);
if (page_layout_instance_)
page_layout_instance_->docx_convert_serialize(strm,*this);
}
next_dump_page_properties(false);
return true;
}
return false;
}
void docx_conversion_context::end_process_style_content(bool in_styles)
......@@ -608,16 +619,29 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
//in_styles = true -> styles.xml
// <pPr><rPr/></pPr><rPr/> " " rPr ms2010 )
{
std::wstringstream & paragraph_style = get_styles_context().paragraph_nodes();
std::wstringstream & run_style = get_styles_context().text_style();
std::wstringstream & paragraph_style = get_styles_context().paragraph_nodes();
std::wstringstream & run_style = get_styles_context().text_style();
if (!paragraph_style.str().empty() || !ParentId.empty())
{
CP_XML_WRITER(strm)
CP_XML_WRITER(strm)
{
if (get_section_context().dump_.empty() == false && !ParentId.empty())
{
CP_XML_NODE(L"w:pPr")
{
process_page_properties(CP_XML_STREAM());//????????
CP_XML_STREAM() << get_section_context().dump_;
get_section_context().dump_.clear();
}
finish_paragraph();
start_paragraph();
}
if (!paragraph_style.str().empty() || !ParentId.empty())
{
CP_XML_NODE(L"w:pPr")
{
CP_XML_STREAM() << get_section_context().dump_;
get_section_context().dump_.clear();
if (!ParentId.empty())
{
CP_XML_NODE(L"w:pStyle")
......@@ -688,7 +712,14 @@ bool docx_conversion_context::get_page_break_after()
{
return page_break_after_ ;
}
void docx_conversion_context::set_page_break(bool val)
{
page_break_ = val;
}
bool docx_conversion_context::get_page_break()
{
return page_break_;
}
void docx_conversion_context::set_page_break_before(bool val)
{
page_break_before_ = val;
......@@ -700,31 +731,49 @@ bool docx_conversion_context::get_page_break_before()
}
void docx_conversion_context::set_page_properties(const std::wstring & StyleName)
void docx_conversion_context::add_page_properties(const std::wstring & StyleName)
{
current_page_properties_ = StyleName;
section_context::_section & s = section_context_.get();
s.page_properties_.push_back( StyleName);
}
const std::wstring & docx_conversion_context::get_page_properties() const
std::wstring docx_conversion_context::get_page_properties()
{
return current_page_properties_;
section_context::_section & s = section_context_.get();
if (s.page_properties_.size() > 1) return s.page_properties_[1];
else if (s.page_properties_.size() == 1) return s.page_properties_[0];
else return L"";
}
void docx_conversion_context::remove_page_properties()
{
section_context::_section & s = section_context_.get();
void docx_conversion_context::next_dump_page_properties()
if (s.page_properties_.size() > 1)
{
// ( ) -
s.page_properties_.erase(s.page_properties_.begin() + 1, s.page_properties_.begin() + 2);
}
else if (s.page_properties_.size() == 1)
{
s.page_properties_.clear();
}
}
void docx_conversion_context::next_dump_page_properties(bool val)
{
if (!process_headers_footers_)
next_dump_page_properties_ = true;
if (process_headers_footers_ && val) return;
next_dump_page_properties_ = val;
}
bool docx_conversion_context::is_next_dump_page_properties()
{
bool t = next_dump_page_properties_;
next_dump_page_properties_ = false;
return t;
return next_dump_page_properties_;
}
void docx_conversion_context::start_text_list_style(const std::wstring & StyleName)
{
text_list_style_name_ = StyleName;
......@@ -848,17 +897,12 @@ void docx_conversion_context::docx_convert_delayed()
delayed_converting_=false;
}
void section_context::start_section(const std::wstring & SectionName, const std::wstring & Style)
void section_context::add_section(const std::wstring & SectionName, const std::wstring & Style, const std::wstring & PageProperties)
{
section newSec = {SectionName, Style};
_section newSec(SectionName, Style, PageProperties );
sections_.push_back(newSec);
}
void section_context::end_section()
{
sections_.pop_back();
set_after_section(true);
}
void docx_conversion_context::section_properties_in_table(odf_reader::office_element * Elm)
{
......@@ -929,7 +973,7 @@ void docx_conversion_context::process_headers_footers()
{
const std::wstring & styleName = page->style_master_page_attlist_.style_name_.get_value_or( odf_types::style_ref(L"") ).style_name();
const std::wstring masterPageNameLayout =context.pageLayoutContainer().page_layout_name_by_style(styleName);
set_page_properties(masterPageNameLayout);
add_page_properties(masterPageNameLayout);
process_one_header_footer(*this, styleName, page->style_header_.get(), headers_footers::header);
process_one_header_footer(*this, styleName, page->style_footer_.get(), headers_footers::footer );
......@@ -945,6 +989,8 @@ void docx_conversion_context::process_headers_footers()
rels rels_;
get_headers_footers().add(styleName, L"", headers_footers::none, rels_);
}
remove_page_properties();
}
process_headers_footers_ = false;
}
......
......@@ -209,21 +209,52 @@ private:
class section_context : boost::noncopyable
{
public:
section_context() : after_section_(false) {}
struct section { std::wstring Name; std::wstring Style; };
void start_section(const std::wstring & SectionName, const std::wstring & Style);
void end_section();
section_context() /*: after_section_(false) */{}
bool empty() const { return sections_.empty(); }
const section & get() const { return sections_.back(); }
struct _section
{
_section() {is_dump_ = false;}
_section(const std::wstring & SectionName, const std::wstring & Style, const std::wstring & PageProperties)
{
is_dump_ = false;
name_ = SectionName;
style_ = Style;
page_properties_.push_back(PageProperties);
}
std::wstring name_;
std::wstring style_;
std::vector<std::wstring> page_properties_;
void set_after_section(bool Val) { after_section_ = Val; }
bool get_after_section() { return after_section_; }
bool is_dump_;
};
void add_section(const std::wstring & SectionName, const std::wstring & Style, const std::wstring & PageProperties);
bool is_empty()
{
return sections_.empty();
}
_section & get()
{
if (sections_.empty())
return main_section_;
else
return sections_[0];
}
void remove_section()
{
if (!sections_.empty())
{
sections_.erase(sections_.begin(), sections_.begin() + 1);
}
}
std::wstring dump_;
private:
std::list<section> sections_;
bool after_section_;
_section main_section_;
std::vector<_section> sections_;
};
class header_footer_context
......@@ -396,6 +427,9 @@ public:
void dump_headers_footers(rels & Rels) const;
void dump_notes(rels & Rels) const;
bool next_dump_page_properties_;
bool next_dump_section_;
odf_reader::odf_document * root()
{
return odf_document_;
......@@ -406,18 +440,19 @@ public:
std::wstring dump_settings_document();
void start_body();
void end_body();
void start_office_text();
void end_office_text();
void start_body ();
void end_body ();
void start_office_text ();
void end_office_text ();
void process_styles();
void process_fonts();
void process_styles ();
void process_fonts ();
void process_list_styles();
void process_page_properties(std::wostream & strm);
void process_list_styles ();
bool process_page_properties(std::wostream & strm);
void process_headers_footers();
void process_comments();
void process_comments ();
void set_settings_property(const odf_reader::_property & prop);
std::vector<odf_reader::_property> & get_settings_properties();
......@@ -429,8 +464,8 @@ public:
void end_automatic_style();
bool in_automatic_style();
styles_context & get_styles_context() { return styles_context_; }
styles_map & get_style_map() { return style_map_; }
styles_context & get_styles_context() { return styles_context_; }
styles_map & get_style_map() { return style_map_; }
void push_text_properties(const odf_reader::style_text_properties * TextProperties);
void pop_text_properties();
......@@ -442,9 +477,14 @@ public:
void set_page_break_before(bool val);
bool get_page_break_before();
void set_page_properties(const std::wstring & StyleName);
const std::wstring & get_page_properties() const;
void next_dump_page_properties();
void set_page_break (bool val);
bool get_page_break ();
void add_page_properties (const std::wstring & StyleName);
std::wstring get_page_properties ();
void remove_page_properties ();
void next_dump_page_properties(bool val);
bool is_next_dump_page_properties();
void set_master_page_name(const std::wstring & MasterPageName);
......@@ -542,11 +582,11 @@ private:
bool page_break_after_;
bool page_break_before_;
bool page_break_;
bool in_automatic_style_;
std::wstring current_page_properties_;
bool next_dump_page_properties_;
std::wstring text_list_style_name_;
std::list<std::wstring> list_style_stack_;
......
......@@ -70,21 +70,22 @@ bool headers_footers::write_sectPr(const std::wstring & StyleName, std::wostream
{
if (!instances_.count(StyleName))return false;
bool first=false, left=false;
bool res=false;
BOOST_FOREACH(const instance_ptr & inst, instances_.at(StyleName))
bool first = false, left = false;
bool res = false;
BOOST_FOREACH(const instance_ptr & inst, instances_.at(StyleName))
{
std::wstring type = L"default";
if ( inst->type_ == headerFirst || inst->type_ == footerFirst )
{
type = L"first";
first=true;
first = true;
}
else if ( inst->type_ == footerLeft || inst->type_ == headerLeft )
{
type = L"even";
left=true;
left = true;
}
std::wstring name;
......@@ -97,10 +98,12 @@ bool headers_footers::write_sectPr(const std::wstring & StyleName, std::wostream
{
_Wostream << L"<" << name << L" r:id=\"" << inst->id_ << L"\" w:type=\"" << type << "\" />";
}
if (first)_Wostream << L"<w:titlePg/>";
res=true;
}
if (first)
{
_Wostream << L"<w:titlePg/>";
}
return res;
}
......
......@@ -117,24 +117,6 @@ private:
rels_files * rels_;
};
//class xl_vml_drawings;
//typedef _CP_PTR(xl_vml_drawings) xl_vml_drawings_ptr;
//
///// \class xl_drawings
//class xl_vml_drawings: public element
//{
//public:
// virtual void write(const std::wstring & RootPath);
// xl_vml_drawings(const std::vector<comment_elm> & elms) : vml_drawings_ ( comment_elm )
// {
// }
//
// static xl_vml_drawings_ptr create(const std::vector<comment_elm> & elms);
//
//private:
// const std::vector<comment_elm> & vml_drawings_;
//
//};
/// \class xl_files
class xl_files : public element
......
......@@ -740,9 +740,10 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, const unio
if (pageLayoutInst) pagePropertiesNode = pageLayoutInst->properties();
/*const */style_page_layout_properties_attlist emptyPageProperties;
const style_page_layout_properties_attlist & pageProperties =
pagePropertiesNode ? pagePropertiesNode->get_style_page_layout_properties_attlist() : emptyPageProperties;
style_page_layout_properties_attlist emptyPageProperties;
const style_page_layout_properties_attlist & pageProperties =
pagePropertiesNode ? pagePropertiesNode->style_page_layout_properties_attlist_ : emptyPageProperties;
/////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -62,7 +62,6 @@ void office_body::xlsx_convert(oox::xlsx_conversion_context & Context)
void office_body::docx_convert(oox::docx_conversion_context & Context)
{
std::vector<style_master_page*> & masterPages = Context.root()->odf_context().pageLayoutContainer().master_pages();
if (!masterPages.empty())
{
......@@ -70,7 +69,17 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
}
const page_layout_instance * layout = Context.root()->odf_context().pageLayoutContainer().page_layout_first();
if (layout) Context.set_page_properties(layout->name());
if (layout) //äâà ðàçà - ÷òîáû äåôîëòîâûå íàñòðîéêè âñåãäà áûëè
{
Context.add_page_properties(layout->name());
Context.add_page_properties(layout->name());
}
else
{
Context.add_page_properties(L""); //
Context.add_page_properties(L"");
}
//backcolor (for all pages)
if (page_layout_instance * firtsPageLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_by_name(Context.get_page_properties()))
{
......@@ -92,6 +101,7 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
if (page_layout_instance * lastPageLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_by_name(Context.get_page_properties()))
{
lastPageLayout->docx_convert_serialize(Context.output_stream(), Context);
//Context.remove_page_properties();
}
Context.end_body();
......
......@@ -191,7 +191,7 @@ void style_table_column_properties::docx_convert(oox::docx_conversion_context &
const page_layout_instance * pp = Context.root()->odf_context().pageLayoutContainer().page_layout_first();//
if (pp)
{
const style_page_layout_properties_attlist & attr_page = pp->properties()->get_style_page_layout_properties_attlist();
style_page_layout_properties_attlist & attr_page = pp->properties()->style_page_layout_properties_attlist_;
if (attr_page.fo_page_width_)
{
int val = 0.5 + 20.0 * attr_page.fo_page_width_->get_value_unit(length::pt);
......
......@@ -1194,15 +1194,15 @@ void style_page_layout_properties::add_child_element( xml::sax * Reader, const :
}
bool style_page_layout_properties::docx_back_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
{
if (!get_style_page_layout_properties_attlist().common_background_color_attlist_.fo_background_color_)return false;
if (!style_page_layout_properties_attlist_.common_background_color_attlist_.fo_background_color_)return false;
if (get_style_page_layout_properties_attlist().common_background_color_attlist_.fo_background_color_->get_type() == background_color::Transparent) return true;
if (style_page_layout_properties_attlist_.common_background_color_attlist_.fo_background_color_->get_type() == background_color::Transparent) return true;
//
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"w:background")
{
std::wstring color = get_style_page_layout_properties_attlist().common_background_color_attlist_.fo_background_color_->get_color().get_hex_value();
std::wstring color = style_page_layout_properties_attlist_.common_background_color_attlist_.fo_background_color_->get_color().get_hex_value();
CP_XML_ATTR(L"w:color",color);
}
}
......@@ -1210,8 +1210,6 @@ bool style_page_layout_properties::docx_back_serialize(std::wostream & strm, oox
}
void style_page_layout_properties::docx_convert_serialize(std::wostream & strm, oox::docx_conversion_context & Context)
{
if (Context.get_drawing_context().get_current_level()>0) return;
if (Context.get_table_context().in_table())
{
// ,
......@@ -1241,50 +1239,47 @@ void style_page_layout_properties::docx_convert_serialize(std::wostream & strm,
{
CP_XML_NODE(L"w:sectPr")
{
if (!Context.get_section_context().empty())
oox::section_context::_section & section = Context.get_section_context().get();
if (const style_instance * secStyle =
Context.root()->odf_context().styleContainer().style_by_name(section.style_, style_family::Section,Context.process_headers_footers_))
{
CP_XML_NODE(L"w:type")
{
CP_XML_ATTR(L"w:val","continuous");
}
const std::wstring & secStyleName = Context.get_section_context().get().Style;
if (const style_instance * secStyle =
Context.root()->odf_context().styleContainer().style_by_name(secStyleName, style_family::Section,Context.process_headers_footers_))
if (const style_content * content = secStyle->content())
{
if (const style_content * content = secStyle->content())
if (style_section_properties * sectPr = content->get_style_section_properties())
{
if (style_section_properties * sectPr = content->get_style_section_properties())
if (style_columns * columns = dynamic_cast<style_columns *>( sectPr->style_columns_.get() ))
{
if (style_columns * columns = dynamic_cast<style_columns *>( sectPr->style_columns_.get() ))
if (columns->fo_column_count_)
{
if (columns->fo_column_count_)
{
count_columns = *columns->fo_column_count_;
}
if (style_column_sep * columns_sep = dynamic_cast<style_column_sep *>( columns->style_column_sep_.get() ))
{
if (columns_sep->style_style_ != _T("none"))
sep_columns = true;
}
count_columns = *columns->fo_column_count_;
}
if (style_column_sep * columns_sep = dynamic_cast<style_column_sep *>( columns->style_column_sep_.get() ))
{
if (columns_sep->style_style_ != _T("none"))
sep_columns = true;
}
sect_margin_left_ = sectPr->common_horizontal_margin_attlist_.fo_margin_left_;
sect_margin_right_ = sectPr->common_horizontal_margin_attlist_.fo_margin_right_;
}
sect_margin_left_ = sectPr->common_horizontal_margin_attlist_.fo_margin_left_;
sect_margin_right_ = sectPr->common_horizontal_margin_attlist_.fo_margin_right_;
}
}
}
else
{
CP_XML_NODE(L"w:type")
{
if (!Context.get_section_context().get_after_section())
CP_XML_ATTR(L"w:val", L"nextPage");
else
CP_XML_ATTR(L"w:val", L"continuous");
if (section.is_dump_)
{
Context.get_section_context().remove_section();
}
}
CP_XML_NODE(L"w:type")
{
if (Context.is_next_dump_page_properties())
{
CP_XML_ATTR(L"w:val", L"nextPage");
}else
{
CP_XML_ATTR(L"w:val", L"continuous");
}
}
if (count_columns > 1)
{
CP_XML_NODE(L"w:cols")
......@@ -1295,19 +1290,20 @@ void style_page_layout_properties::docx_convert_serialize(std::wostream & strm,
CP_XML_ATTR(L"w:space",0);
}
}
std::wstring masterPageName = Context.get_master_page_name();// document.xml!!!
bool res = Context.get_headers_footers().write_sectPr(masterPageName, strm);
if (res == false)
{
std::wstring masterPageName = Context.get_master_page_name();// document.xml!!!
// default???
masterPageName = L"Standard";
const std::wstring masterPageNameLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(masterPageName);
Context.remove_page_properties();
Context.add_page_properties(masterPageNameLayout);
bool res = Context.get_headers_footers().write_sectPr(masterPageName, strm);
if (res == false)
{
// default???
masterPageName = L"Standard";
const std::wstring masterPageNameLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(masterPageName);
Context.set_page_properties(masterPageNameLayout);
bool res = Context.get_headers_footers().write_sectPr(masterPageName, strm);
}
}
style_page_layout_properties_attlist_.docx_convert_serialize(strm, Context, sect_margin_left_, sect_margin_right_);
//todooo - !!
}
......
......@@ -1030,10 +1030,6 @@ public:
bool docx_back_serialize(std::wostream & strm, oox::docx_conversion_context & Context);
const style_page_layout_properties_attlist & get_style_page_layout_properties_attlist() const
{
return style_page_layout_properties_attlist_;
};
public:
style_page_layout_properties() { }
......
......@@ -107,8 +107,8 @@ int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_co
{
if (!Attr.text_style_name_.empty())
{
if (style_instance * styleInst
= Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_.style_name(), style_family::Paragraph,Context.process_headers_footers_)
if (style_instance * styleInst =
Context.root()->odf_context().styleContainer().style_by_name(Attr.text_style_name_.style_name(), style_family::Paragraph,Context.process_headers_footers_)
)
{
process_page_break_after(styleInst, Context);
......@@ -319,30 +319,33 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
if (!masterPageName.empty() && Context.get_master_page_name() != masterPageName)
{
const std::wstring pageLayoutName = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(masterPageName);
Context.next_dump_page_properties();
Context.get_section_context().set_after_section(false);
Context.next_dump_page_properties(true);
is_empty = false;
}
}
if (next_section_ || next_end_section_)
}
if (next_section_ || next_end_section_)
{
Context.next_dump_page_properties();
Context.get_section_context().get().is_dump_ = true;
is_empty = false;
}
const std::wstring & styleName = paragraph_attrs_.text_style_name_.style_name();
const std::wstring masterPageName = Context.root()->odf_context().styleContainer().master_page_name_by_name(styleName);
if (!masterPageName.empty())
const std::wstring & styleName = paragraph_attrs_.text_style_name_.style_name();
const std::wstring masterPageName = Context.root()->odf_context().styleContainer().master_page_name_by_name(styleName);
if (!masterPageName.empty())
{
const std::wstring masterPageNameLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(masterPageName);
Context.set_page_properties(masterPageNameLayout);
Context.set_master_page_name(masterPageName);
Context.set_master_page_name(masterPageName);
const std::wstring masterPageNameLayout = Context.root()->odf_context().pageLayoutContainer().page_layout_name_by_style(masterPageName);
Context.remove_page_properties();
Context.add_page_properties(masterPageNameLayout);
Context.set_page_break(true);
is_empty = false;
}
process_paragraph_drop_cap_attr(paragraph_attrs_, Context);
if (Context.get_drop_cap_context().state() == 2)//active
......@@ -363,20 +366,16 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
BOOST_FOREACH(const office_element_ptr & elm, paragraph_content_)
{
if (Context.get_page_break())
{
_Wostream << L"<w:lastRenderedPageBreak/>";
Context.set_page_break(false);
}
elm->docx_convert(Context);
if (Context.get_drop_cap_context().state() >0)
Context.get_drop_cap_context().state(0);//disable
if (elm->get_type() == typeTextSoftPageBreak && !Context.get_page_break_after() && !Context.get_page_break_before())
{
_Wostream << L"<w:lastRenderedPageBreak/>";
if (next_section_ || next_end_section_)
Context.set_page_break_before(true);
}
}
}
if (textStyle>0)
{
......@@ -407,6 +406,12 @@ void paragraph::docx_convert(oox::docx_conversion_context & Context)
Context.finish_paragraph();
std::wstringstream strm;
if (Context.process_page_properties(strm))
{
Context.get_section_context().dump_ = strm.str();
}
}
void paragraph::xlsx_convert(oox::xlsx_conversion_context & Context)
......@@ -427,6 +432,15 @@ void paragraph::pptx_convert(oox::pptx_conversion_context & Context)
}
Context.get_text_context().end_paragraph();
}
///////////////////////////////////////////
void soft_page_break::docx_convert(oox::docx_conversion_context & Context)
{
if (!Context.get_page_break_after() && !Context.get_page_break_before())
{
Context.output_stream() << L"<w:lastRenderedPageBreak/>";
}
}
//////////////////////////////////////////////
::std::wostream & h::text_to_stream(::std::wostream & _Wostream) const
......@@ -670,17 +684,16 @@ void text_section::add_child_element( xml::sax * Reader, const ::std::wstring &
void text_section::docx_convert(oox::docx_conversion_context & Context)
{
Context.get_section_context().start_section(
Context.get_section_context().add_section(
text_section_attr_.text_name_,
text_section_attr_.text_style_name_.get_value_or(style_ref()).style_name()
text_section_attr_.text_style_name_.get_value_or(style_ref()).style_name(),
Context.get_page_properties()
);
BOOST_FOREACH(const office_element_ptr & elm, text_content_)
{
elm->docx_convert(Context);
}
Context.get_section_context().end_section();
}
// text-section-source-attr
......
......@@ -192,6 +192,7 @@ public:
public:
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
void docx_convert(oox::docx_conversion_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
......
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