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

Презентации - использование темплэйтов таблиц

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53257 954022d7-b5bf-4e40-9824-e11837661b57
parent 568ea824
......@@ -365,6 +365,14 @@
RelativePath=".\src\odf\styles_lite_container.h"
>
</File>
<File
RelativePath=".\src\odf\templates.cpp"
>
</File>
<File
RelativePath=".\src\odf\templates.h"
>
</File>
</Filter>
<Filter
Name="datatypes odf"
......
......@@ -125,21 +125,6 @@ void pptx_conversion_context::start_document()
}
//void pptx_conversion_context::start_hyperlink(const std::wstring & styleName)
//{
// pptx_text_context_.start_hyperlink();
// pptx_text_context_.start_span(styleName);//???
//}
//
//void pptx_conversion_context::end_hyperlink(std::wstring const & href)
//{
// //std::wstring content = pptx_text_context_.end_span2();//????
//
// //hId from href
//
// std::wstring hId = get_slide_context().hyperlinks_.add(href);
// pptx_text_context_.end_hyperlink(get_table_context().end_hyperlink(current_cell_address(), href, L""));
//}
void pptx_conversion_context::end_document()
{
......
......@@ -333,8 +333,8 @@ void pptx_slide_context::process_tables()
////////////////////////////////////////////////////////////////
std::wstring ref;
bool isMediaInternal = true;
drawing.chartId = impl_->get_mediaitems().add_or_find(pic.xlink_href_, mediaitems::typeTable, isMediaInternal, ref);
impl_->add_drawing(drawing, isMediaInternal, drawing.chartId, ref, mediaitems::typeTable);
std::wstring rId = impl_->get_mediaitems().add_or_find(L"", mediaitems::typeTable, isMediaInternal, ref);
impl_->add_drawing(drawing, isMediaInternal, rId, ref, mediaitems::typeTable);
}
}
......@@ -396,6 +396,11 @@ mediaitems & pptx_slide_context::get_mediaitems()
return impl_->get_mediaitems();
}
void pptx_slide_context::add_rels( bool isInternal, std::wstring const & rid, std::wstring const & ref, mediaitems::Type type)
{
impl_->add_drawing(isInternal, rid, ref, type);
}
void pptx_slide_context::serialize_background(std::wostream & strm)
{
CP_XML_WRITER(strm)
......
......@@ -37,7 +37,6 @@ public:
std::wstring add_hyperlink(std::wstring const & ref, bool object);
//...
void start_image(std::wstring const & path);
void end_image();
......@@ -45,7 +44,6 @@ public:
void end_chart();
void start_table();
//void set_table_content(std::wstring & str);
void end_table();
void start_shape(int type);
......@@ -53,7 +51,6 @@ public:
bool empty() const;
//std::wstring dump_path(std::vector<svg_path::_polyline> & path, double w,double h);
void serialize(std::wostream & strm);
void serialize_background(std::wostream & strm);
......@@ -63,6 +60,11 @@ public:
mediaitems & get_mediaitems();
void add_rels( bool isInternal,
std::wstring const & rid,
std::wstring const & ref,
mediaitems::Type type);
private:
void process_common_properties(drawing_object_description& pic,_pptx_drawing & drawing);
void default_set();
......
#include "precompiled_cpodf.h"
#include "pptx_conversion_context.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/odf/odf_document.h>
#include "../odf/odfcontext.h"
#include "../odf/draw_common.h"
#include "../odf/calcs_styles.h"
#include "logging.h"
#include "pptx_conversion_context.h"
namespace cpdoccore {
namespace oox {
......@@ -117,7 +124,12 @@ void pptx_table_state::end_covered_cell()
std::wostream & _Wostream = context_.get_table_context().tableData();
if (close_table_covered_cell_)
{
_Wostream << L"<a:tcPr/>";
const std::wstring cellStyleName = default_row_cell_style_name_.length()>0 ? default_row_cell_style_name_ : default_cell_style_name_;
const odf::style_instance * style_inst = context_.root()->odf_context().styleContainer().style_by_name(cellStyleName, odf::style_family::TableCell,false);
oox::oox_serialize_tcPr(_Wostream, style_inst, context_);
//
_Wostream << L"</a:tc>";
close_table_covered_cell_ = false;
......@@ -170,7 +182,75 @@ unsigned int pptx_table_state::current_rows_spanned(unsigned int Column) const
return rows_spanned_[Column].num();
}
}
void oox_serialize_tcPr(std::wostream & strm, const odf::style_instance* style_inst, oox::pptx_conversion_context & Context)
{
const odf::style_instance * default_style_inst = Context.root()->odf_context().styleContainer().style_default_by_type(odf::style_family::TableCell);
std::vector<const odf::style_instance *> instances;
if (default_style_inst) instances.push_back(default_style_inst);
if (style_inst) instances.push_back(style_inst);
CP_XML_WRITER(strm)
{
CP_XML_NODE(L"a:tcPr")
{
if (style_inst || default_style_inst)
{
odf::style_table_cell_properties_attlist style_cell_attlist = odf::calc_table_cell_properties(instances);
if (style_cell_attlist.style_vertical_align_)
{
std::wstring vAlign;
switch(style_cell_attlist.style_vertical_align_->get_type())
{
case odf::vertical_align::Baseline:
case odf::vertical_align::Top: vAlign = L"t"; break;
case odf::vertical_align::Middle: vAlign = L"ctr"; break;
case odf::vertical_align::Bottom: vAlign = L"b"; break;
case odf::vertical_align::Auto: break;
}
if (!vAlign.empty())
CP_XML_ATTR(L"anchor", vAlign );
}
if (style_cell_attlist.common_padding_attlist_.fo_padding_)
{
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_);
}
else
{
if (style_cell_attlist.common_padding_attlist_.fo_padding_top_)
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_top_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_bottom_)
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_bottom_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_left_)
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_left_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_right_)
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_right_);
}
//vert //
//style_cell_attlist.pptx_serialize(Context, CP_XML_STREAM()); //nodes
oox::_oox_fill fill;
odf::graphic_format_properties style_graphic = odf::calc_graphic_properties_content(instances);
odf::Compute_GraphicFill(style_graphic, Context.root()->odf_context().drawStyles() ,fill);
if (fill.bitmap)
{
bool isMediaInternal = false;
std::wstring ref;
fill.bitmap->rId = Context.get_slide_context().get_mediaitems().add_or_find(fill.bitmap->xlink_href_, oox::mediaitems::typeImage, isMediaInternal, ref);
Context.get_slide_context().add_rels(isMediaInternal,fill.bitmap->rId, ref, oox::mediaitems::typeImage);
}
oox::oox_serialize_fill(CP_XML_STREAM(), fill);
}
}
}
}
}
}
......@@ -5,7 +5,13 @@
#include <vector>
#include "ooxtablerowspanned.h"
namespace cpdoccore {
namespace cpdoccore
{
namespace odf
{
class style_instance;
};
namespace oox {
class pptx_conversion_context;
......@@ -35,18 +41,27 @@ public:
void set_rows_spanned(unsigned int Column, unsigned int Val, unsigned int ColumnsSpanned, const std::wstring & Style);
unsigned int current_rows_spanned(unsigned int Column) const;
std::wstring default_cell_style_name_;
private:
pptx_conversion_context & context_;
std::wstring table_style_;
pptx_conversion_context & context_;
std::wstring table_style_;
std::list<std::wstring> table_row_style_stack_;
std::wstring default_row_cell_style_name_;
std::wstring default_row_cell_style_name_;
int current_table_column_;
unsigned int columns_spanned_num_;
unsigned int columns_spanned_num_;
std::wstring columns_spanned_style_;
std::vector<table_row_spanned> rows_spanned_;
std::vector<table_row_spanned> rows_spanned_;
bool close_table_covered_cell_;
std::vector<unsigned int> columns_;
std::vector<unsigned int> columns_;
std::vector<std::wstring> columnsDefaultCellStyleName_;
};
......@@ -155,12 +170,21 @@ public:
return table_state_stack_.back().get_default_cell_style_row();
}
void set_default_cell_style(std::wstring style_name)
{
table_state_stack_.back().default_cell_style_name_ = style_name;
}
std::wstring get_default_cell_style()
{
return table_state_stack_.back().default_cell_style_name_;
}
private:
std::wstringstream output_stream_;
pptx_conversion_context & context_;
std::list<pptx_table_state> table_state_stack_;
};
void oox_serialize_tcPr(std::wostream & strm, const odf::style_instance* style_inst, oox::pptx_conversion_context & Context);
}
}
......@@ -29,6 +29,8 @@
#include "style_regions.h"
#include "style_presentation.h"
#include "templates.h"
#include "paragraph_elements.h"
#include "text_elements.h"
......@@ -445,6 +447,15 @@ void odf_document::Impl::parse_styles()
continue;
context_->drawStyles().add(L"hatch:" + style->get_style_name(), elm);
}
BOOST_FOREACH(const office_element_ptr & elm, docStyles->templates_.table_templates_)
{
table_table_template * style = dynamic_cast<table_table_template *>(elm.get());
if (!style)
continue;
context_->Templates().add(L"table:" + style->get_text_style_name(), elm);
}
}
while(0); // end parse styles
......
#pragma once
#include "styles.h"
#include "templates.h"
#include <vector>
#include <boost/unordered_map.hpp>
#include "stylefamily.h"
......@@ -334,6 +336,7 @@ public:
styles_lite_container & numberStyles() { return number_style_container_; }
styles_lite_container & drawStyles() { return draw_style_container_; }
styles_lite_container & Templates() { return template_container_; }
private:
styles_container major_style_container_;
......@@ -344,8 +347,10 @@ private:
styles_lite_container number_style_container_;
styles_lite_container draw_style_container_;
styles_lite_container template_container_;
};
}
}
......@@ -114,9 +114,13 @@ enum ElementType
typeStylePageLayout,
typeStyleMap,
typeTableBodyTemplate,
typeTableTemplate,
typeTextNotesConfiguration,
typeStyleFontFace,
typeSvgFontFaceUri,
typeSvgFontFaceFormat,
typeSvgFontFaceName,
......
......@@ -77,36 +77,12 @@ void style_content::xlsx_convert(oox::xlsx_conversion_context & Context)
if (style_table_column_properties_)
style_table_column_properties_->xlsx_convert(Context);
// office_element_ptr style_text_properties_;
//office_element_ptr style_paragraph_properties_;
//office_element_ptr style_section_properties_;
//office_element_ptr style_ruby_properties_;
//office_element_ptr style_table_properties_;
//office_element_ptr style_table_column_properties_;
//office_element_ptr style_table_row_properties_;
//office_element_ptr style_chart_properties_;
//office_element_ptr style_graphic_properties_;
//office_element_ptr style_table_cell_properties_;
if (style_table_cell_properties_)
style_table_cell_properties_->xlsx_convert(Context);
if (style_chart_properties_)
style_chart_properties_->xlsx_convert(Context);
/* if (style_paragraph_properties_)
style_paragraph_properties_->docx_convert(Context);
if (style_table_properties_)
style_table_properties_->docx_convert(Context);
if (style_table_row_properties_)
style_table_row_properties_->docx_convert(Context);
if (style_table_cell_properties_)
style_table_cell_properties_->docx_convert(Context); */
}
void style_content::docx_convert(oox::docx_conversion_context & Context)
......@@ -133,30 +109,6 @@ void style_content::docx_convert(oox::docx_conversion_context & Context)
Context.end_process_style_content();
}
//void style_content::pptx_convert(oox::pptx_conversion_context & Context)
//{
// Context.get_text_context().get_styles_context().start();
//
// if (style_text_properties_)
// style_text_properties_->pptx_convert(Context);
//
// if (style_paragraph_properties_)
// style_paragraph_properties_->pptx_convert(Context);
//
// if (style_table_properties_)
// style_table_properties_->pptx_convert(Context);
//
// if (style_table_column_properties_)
// style_table_column_properties_->pptx_convert(Context);
//
// if (style_table_row_properties_)
// style_table_row_properties_->pptx_convert(Context);
//
// if (style_table_cell_properties_)
// style_table_cell_properties_->pptx_convert(Context);
//
// //Context.get_text_context().get_styles_context().end();
//}
void style_content::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
{
......@@ -379,6 +331,14 @@ void styles::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, co
}
}
void templates::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
{
if CP_CHECK_NAME(L"table", L"table-template")
{
CP_CREATE_ELEMENT_SIMPLE(table_templates_);
}
}
void draw_styles::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context)
{
if CP_CHECK_NAME(L"draw", L"gradient")
......@@ -515,7 +475,11 @@ void office_styles::add_child_element( xml::sax * Reader, const ::std::wstring &
{
draw_styles_.add_child_element(Reader, Ns, Name, getContext());
}
else if (L"text" == Ns && L"outline-style" == Name)
else if(CP_CHECK_NAME(L"table", L"table-template"))
{
templates_.add_child_element(Reader, Ns, Name, getContext());
}
else if (L"text" == Ns && L"outline-style" == Name)
CP_CREATE_ELEMENT(text_outline_style_);
else if (L"text" == Ns && L"notes-configuration" == Name)
CP_CREATE_ELEMENT(text_notes_configuration_);
......
......@@ -337,6 +337,16 @@ private:
friend class odf_document;
};
class templates
{
public:
void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name, document_context * Context);
private:
office_element_ptr_array table_templates_;
friend class odf_document;
};
/// \class office_automatic_styles
/// \brief office:automatic-styles
......@@ -470,6 +480,8 @@ private:
private:
styles styles_;
draw_styles draw_styles_;
templates templates_;
office_element_ptr_array style_default_style_;
office_element_ptr_array style_presentation_page_layout_;
......
......@@ -22,6 +22,8 @@ void table_table_attlist::add_attributes( const xml::attributes_wc_ptr & Attribu
{
CP_APPLY_ATTR(L"table:name", table_name_);
CP_APPLY_ATTR(L"table:style-name", table_style_name_);
CP_APPLY_ATTR(L"table:table-template-name", table_template_name_);
CP_APPLY_ATTR(L"table:protected", table_protected_, false);
CP_APPLY_ATTR(L"table:protection-key", table_protection_key_);
CP_APPLY_ATTR(L"table:print", table_print_, true);
......
......@@ -22,8 +22,10 @@ public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(std::wstring) table_name_;
_CP_OPT(style_ref) table_style_name_;
_CP_OPT(std::wstring) table_name_;
_CP_OPT(style_ref) table_style_name_;
_CP_OPT(std::wstring) table_template_name_;
bool table_protected_; // default false
_CP_OPT(std::wstring) table_protection_key_;
bool table_print_; // default true
......
......@@ -13,11 +13,15 @@
#include "style_table_properties.h"
#include "style_graphic_properties.h"
#include "draw_common.h"
namespace cpdoccore {
namespace odf {
using xml::xml_char_wc;
bool table_table_cell_content::pptx_convert(oox::pptx_conversion_context & Context)
{
bool wasPar = false;
......@@ -128,8 +132,25 @@ void table_table::pptx_convert(oox::pptx_conversion_context & Context)
std::wstring tableStyleName = L"";
if (table_table_attlist_.table_style_name_)
tableStyleName = table_table_attlist_.table_style_name_->style_name() ;
Context.get_table_context().start_table(tableStyleName);
Context.get_table_context().start_table(tableStyleName);
if (table_table_attlist_.table_template_name_)
{
std::wstring name = L"table:" + table_table_attlist_.table_template_name_.get() ;
if (office_element_ptr style = Context.root()->odf_context().Templates().find_by_style_name(name))
{
if (table_table_template* template_ = dynamic_cast<table_table_template *>(style.get()))
{
//first row, columns, last row, columns, odd row, columns
if (template_->table_body_)
{
table_body* body_ = dynamic_cast<table_body* >(template_->table_body_.get());
Context.get_table_context().set_default_cell_style(body_->table_style_name_);
}
}
}
}
std::wostream & _Wostream = Context.get_table_context().tableData();
_Wostream << L"<a:tbl>";
......@@ -156,11 +177,17 @@ void table_table::pptx_convert(oox::pptx_conversion_context & Context)
oox::_oox_fill fill;
Compute_GraphicFill((graphic_format_properties &)style_graphic, Context.root()->odf_context().drawStyles() ,fill);
if (fill.bitmap)
{
bool isMediaInternal = false;
std::wstring ref;
fill.bitmap->rId = Context.get_slide_context().get_mediaitems().add_or_find(fill.bitmap->xlink_href_, oox::mediaitems::typeImage, isMediaInternal, ref);
Context.get_slide_context().add_rels(isMediaInternal, fill.bitmap->rId, ref, oox::mediaitems::typeImage);
}
oox::oox_serialize_fill(_Wostream, fill);
}
}
_Wostream << L"</a:tblPr>";
_Wostream << L"<a:tblGrid>";
table_columns_and_groups_.pptx_convert(Context);
......@@ -267,16 +294,12 @@ void table_table_cell::pptx_convert(oox::pptx_conversion_context & Context)
{
for (unsigned int r = 0; r < table_table_cell_attlist_.table_number_columns_repeated_; ++r)
{
int pushTextPropCount = 0;
Context.get_table_context().start_cell();
CP_XML_NODE(L"a:tc")
{
const std::wstring cellStyleName = table_table_cell_attlist_.table_style_name_ ?
table_table_cell_attlist_.table_style_name_->style_name() : L"";
const std::wstring & defaultColumnStyleName = Context.get_table_context().get_default_cell_style_col(Context.get_table_context().current_column());
const std::wstring & defaultRowStyleName = Context.get_table_context().get_default_cell_style_row();
const std::wstring cellStyleName = table_table_cell_attlist_.table_style_name_ ?
table_table_cell_attlist_.table_style_name_->style_name() :
Context.get_table_context().get_default_cell_style();
if (table_table_cell_attlist_extra_.table_number_rows_spanned_ > 1)
{
......@@ -311,63 +334,12 @@ void table_table_cell::pptx_convert(oox::pptx_conversion_context & Context)
CP_XML_STREAM() << cellContent;
}
}else
CP_XML_STREAM() << emptyParTable;
CP_XML_NODE(L"a:tcPr")
{
const style_instance * inst = Context.root()->odf_context().styleContainer().style_by_name(cellStyleName, style_family::TableCell,false);
if (inst && inst->content())
{
if (inst->content()->get_style_table_cell_properties())
{
style_table_cell_properties_attlist & style_cell_attlist = inst->content()->get_style_table_cell_properties()->style_table_cell_properties_attlist_;
if (style_cell_attlist.style_vertical_align_)
{
std::wstring vAlign;
switch(style_cell_attlist.style_vertical_align_->get_type())
{
case vertical_align::Baseline:
case vertical_align::Top: vAlign = L"t"; break;
case vertical_align::Middle: vAlign = L"ctr"; break;
case vertical_align::Bottom: vAlign = L"b"; break;
case vertical_align::Auto: break;
}
if (!vAlign.empty())
CP_XML_ATTR(L"anchor", vAlign );
}
if (style_cell_attlist.common_padding_attlist_.fo_padding_)
{
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_);
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_);
}
else
{
if (style_cell_attlist.common_padding_attlist_.fo_padding_top_)
CP_XML_ATTR(L"marT", *style_cell_attlist.common_padding_attlist_.fo_padding_top_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_bottom_)
CP_XML_ATTR(L"marB", *style_cell_attlist.common_padding_attlist_.fo_padding_bottom_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_left_)
CP_XML_ATTR(L"marL", *style_cell_attlist.common_padding_attlist_.fo_padding_left_);
if (style_cell_attlist.common_padding_attlist_.fo_padding_right_)
CP_XML_ATTR(L"marR", *style_cell_attlist.common_padding_attlist_.fo_padding_right_);
}
//vert //
//style_cell_attlist.pptx_serialize(Context, CP_XML_STREAM()); //nodes
}
if (inst->content()->get_style_graphic_properties())
{
const graphic_format_properties & style_graphic = inst->content()->get_style_graphic_properties()->content();
oox::_oox_fill fill;
Compute_GraphicFill((graphic_format_properties &)style_graphic, Context.root()->odf_context().drawStyles() ,fill);
oox::oox_serialize_fill(CP_XML_STREAM(), fill);
}
}
}
const style_instance * style_inst = Context.root()->odf_context().styleContainer().style_by_name(cellStyleName, style_family::TableCell,false);
oox_serialize_tcPr(CP_XML_STREAM(), style_inst,Context);
}
Context.get_table_context().end_cell();
......
#include "precompiled_cpodf.h"
#include "office_elements.h"
#include "office_elements_create.h"
#include "templates.h"
namespace cpdoccore {
namespace odf {
const wchar_t * table_body::ns = L"table";
const wchar_t * table_body::name = L"body";
void table_body::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
const std::wstring empty = L"";
CP_APPLY_ATTR(L"table:style-name", table_style_name_, empty);
}
const wchar_t * table_table_template::ns = L"table";
const wchar_t * table_table_template::name = L"table-template";
void table_table_template::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"text:style-name", text_style_name_);
}
void table_table_template::add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name)
{
if CP_CHECK_NAME(L"table", L"body")
{
CP_CREATE_ELEMENT(table_body_);
}
else
{
}
}
}
}
\ No newline at end of file
#pragma once
#include <string>
#include <vector>
#include <iosfwd>
#include <cpdoccore/CPNoncopyable.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPOptional.h>
#include "styles_list.h"
#include "style_map.h"
namespace cpdoccore {
namespace odf {
class table_body: public office_element_impl<table_body>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTableBodyTemplate;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring table_style_name_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name){}
friend class odf_document;
};
CP_REGISTER_OFFICE_ELEMENT2(table_body);
class table_table_template: public office_element_impl<table_table_template>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTableTemplate;
CPDOCCORE_DEFINE_VISITABLE();
std::wstring get_text_style_name(){return text_style_name_.get_value_or(L"");}
office_element_ptr table_body_;
private:
_CP_OPT(std::wstring) text_style_name_;
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
friend class odf_document;
};
CP_REGISTER_OFFICE_ELEMENT2(table_table_template);
}
}
\ No newline at end of file
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