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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54725 954022d7-b5bf-4e40-9824-e11837661b57
parent e5c9394c
......@@ -896,7 +896,7 @@
</File>
</Filter>
<Filter
Name="_spreadsheet"
Name="odf spreadsheet"
>
<File
RelativePath=".\OdfFormat\ods_conversion_context.cpp"
......@@ -939,6 +939,26 @@
>
</File>
</Filter>
<Filter
Name="styles"
>
<File
RelativePath=".\OdfFormat\style_table_properties.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\style_table_properties.h"
>
</File>
</Filter>
<Filter
Name="odf text"
>
</Filter>
<Filter
Name="odf presentation"
>
</Filter>
<File
RelativePath=".\OdfFormat\abstract_xml.cpp"
>
......@@ -975,10 +995,6 @@
RelativePath=".\ReadMe.txt"
>
</File>
<File
RelativePath=".\OdfFormat\serialize_common_attlists.h"
>
</File>
</Files>
<Globals>
</Globals>
......
......@@ -15,10 +15,6 @@ namespace odf {
const wchar_t * abstract_xml::ns = L"";
const wchar_t * abstract_xml::name = L"abstract-xml";
void abstract_xml::add_attributes( const xml::attributes_wc_ptr & )
{
}
void abstract_xml::serialize(std::wostream & strm)
{
}
......
......@@ -19,12 +19,10 @@ public:
abstract_xml() {};
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( office_element_ptr & child_element);
virtual void abstract_xml::serialize(std::wostream & strm);
virtual void serialize(std::wostream & strm);
private:
//office_element_ptr_array xml_content_;
......
......@@ -4,7 +4,6 @@
#include "odf_rels.h"
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/simple_xml_writer.h>
......
......@@ -4,7 +4,6 @@
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/simple_xml_writer.h>
......@@ -22,14 +21,9 @@ const wchar_t * office_body::name = L"body";
office_body::office_body()
{}
void office_body::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void office_body::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
create_element(Ns,Name,content_,getContext());
CP_CREATE_ELEMENT(content_);
}
......@@ -43,9 +37,9 @@ void office_body::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE(L"office::body")
CP_XML_NODE_SIMPLE()
{
content_->serialize(CP_XML_STREAM());
if (content_)content_->serialize(CP_XML_STREAM());
}
}
}
......
......@@ -31,8 +31,6 @@ public:
public:
office_body();
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( office_element_ptr & child_element);
......
......@@ -35,16 +35,10 @@ public:
virtual ElementType get_type() const = 0;
virtual ~office_element() = 0;
//office_element_ptr & get_parent(){ return parent_;}
// void set_parent(office_element_ptr & parent){ parent_ = parent;}
void setContext(odf_conversion_context * Context) { context_ = Context; }
virtual void serialize(std::wostream & _Wostream) = 0 ;
void setContext(odf_conversion_context * Context) { context_ = Context; }
odf_conversion_context * getContext() { return context_; }
const odf_conversion_context * getContext() const { return context_; }
void set_root(bool root){is_root_ = root;}
......@@ -62,10 +56,11 @@ public:
}
private:
bool is_root_;
//office_element_ptr parent_;
odf_conversion_context * context_;
};
#define CPDOCCORE_OFFICE_DOCUMENT_IMPL_NAME_FUNCS_ public:\
virtual const wchar_t * get_ns() const { return ns; }\
virtual const wchar_t * get_name() const { return name; }\
......
......@@ -100,7 +100,7 @@ bool create_element(const ::std::wstring & Ns,
bool isRoot = false);
#define CP_CREATE_ELEMENT_SIMPLE(ELEMENT) create_element(Ns, Name, (ELEMENT), Context)
#define CP_CREATE_ELEMENT (ELEMENT) create_element(Ns, Name, (ELEMENT), getContext())
#define CP_CREATE_ELEMENT(ELEMENT) create_element(Ns, Name, (ELEMENT), getContext())
#define _CPDOCCORE_CREATE_ELEMENT_ROOT(ELEMENT) create_element(Ns, Name, (ELEMENT), getContext(), true)
......
......@@ -4,7 +4,6 @@
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
#include "office_elements.h"
......@@ -20,14 +19,9 @@ namespace odf {
const wchar_t * office_spreadsheet::ns = L"office";
const wchar_t * office_spreadsheet::name = L"spreadsheet";
void office_spreadsheet::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void office_spreadsheet::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{
create_element(Ns,Name,content_,getContext());
CP_CREATE_ELEMENT(content_);
}
void office_spreadsheet::add_child_element(office_element_ptr & child_element)
......@@ -38,7 +32,7 @@ void office_spreadsheet::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE(L"office:spreadsheet")
CP_XML_NODE_SIMPLE()
{
BOOST_FOREACH(office_element_ptr & elm, content_)
{
......
......@@ -26,7 +26,6 @@ public:
office_element_ptr_array & getContent(){return content_;}
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element( office_element_ptr & child_element);
......
#include "precompiled_cpodf.h"
#include <iostream>
#include "style_table_properties.h"
#include "borderstyle.h"
#include <cpdoccore/xml/simple_xml_writer.h>
namespace cpdoccore {
namespace odf {
using xml::xml_char_wc;
bool table_format_properties::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
{
if (L"style" == Ns && L"background-image" == Name)
{
CP_CREATE_ELEMENT_SIMPLE(style_background_image_);
return true;
}
else
{
not_applicable_element(L"style-table-properties", Ns, Name);
return false;
}
}
void table_format_properties::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
// content_->serialize(CP_XML_STREAM());
if (style_background_image_) style_background_image_->serialize(_Wostream);
}
}
/*
[ ] w:tblStyle Referenced Table Style
[ ] w:tblpPr Floating Table Positioning
[ ] w:tblOverlap Floating Table Allows Other Tables to Overlap
[ ] w:bidiVisual Visually Right to Left Table
[ ] w:tblStyleRowBandSize Number of Rows in Row Band
[ ] w:tblStyleColBandSize Number of Columns in Column Band
[x] w:tblW Preferred Table Width
[x] w:jc Table Alignment
[ ] w:tblCellSpacing Table Cell Spacing Default
[ ] w:tblInd Table Indent from Leading Margin
[ ] w:tblBorders Table Borders
[ ] w:shd Table Shading
[ ] w:tblLayout Table Layout
[ ] w:tblCellMar Table Cell Margin Defaults
[ ] w:tblLook Table Style Conditional Formatting Settings
[ ] w:tblPrChange Revision Information for Table Properties
*/
// style:table-properties
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_table_properties::ns = L"style";
const wchar_t * style_table_properties::name = L"table-properties";
void style_table_properties::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{
table_format_properties_.add_child_element(Ns, Name, getContext());
}
void style_table_properties::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE_SIMPLE()
{
table_format_properties_.serialize(_Wostream);
}
}
}
// style-table-column-properties-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
// style:table-column-properties
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_table_column_properties::ns = L"style";
const wchar_t * style_table_column_properties::name = L"table-column-properties";
void style_table_column_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM();
}
//////////////////////////////////////////////////////////////////////////////////////////////////
/// style:table-cell-properties
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_table_cell_properties::ns = L"style";
const wchar_t * style_table_cell_properties::name = L"table-cell-properties";
void style_table_cell_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
CP_CREATE_ELEMENT(style_background_image_);
}
else
{
CP_NOT_APPLICABLE_ELM();
}
}
// style-table-row-properties-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
// style:table-row-properties
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * style_table_row_properties::ns = L"style";
const wchar_t * style_table_row_properties::name = L"table-row-properties";
void style_table_row_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
if (L"style" == Ns && L"background-image" == Name)
{
CP_CREATE_ELEMENT(style_background_image_);
}
else
{
CP_NOT_APPLICABLE_ELM();
}
}
/////
void style_table_cell_properties_attlist::apply_from(const style_table_cell_properties_attlist & Other)
{
_CP_APPLY_PROP(style_vertical_align_, Other.style_vertical_align_);
_CP_APPLY_PROP(style_text_align_source_, Other.style_text_align_source_);
_CP_APPLY_PROP(style_direction_, Other.style_direction_);
_CP_APPLY_PROP(style_glyph_orientation_vertical_, Other.style_glyph_orientation_vertical_);
common_shadow_attlist_.apply_from(Other.common_shadow_attlist_);
common_background_color_attlist_.apply_from(Other.common_background_color_attlist_);
common_border_attlist_.apply_from(Other.common_border_attlist_);
_CP_APPLY_PROP(style_diagonal_tl_br_, Other.style_diagonal_tl_br_);
_CP_APPLY_PROP(style_diagonal_tl_br_widths_, Other.style_diagonal_tl_br_widths_);
_CP_APPLY_PROP(style_diagonal_bl_tr_, Other.style_diagonal_bl_tr_);
_CP_APPLY_PROP(style_diagonal_bl_tr_widths_, Other.style_diagonal_bl_tr_widths_);
common_border_line_width_attlist_.apply_from(Other.common_border_line_width_attlist_);
common_padding_attlist_.apply_from(Other.common_padding_attlist_);
_CP_APPLY_PROP(fo_wrap_option_, Other.fo_wrap_option_);
common_rotation_angle_attlist_.apply_from(Other.common_rotation_angle_attlist_);
_CP_APPLY_PROP(style_rotation_align_, Other.style_rotation_align_);
_CP_APPLY_PROP(style_cell_protect_, Other.style_cell_protect_);
_CP_APPLY_PROP(style_print_content_, Other.style_print_content_);
_CP_APPLY_PROP(style_decimal_places_, Other.style_decimal_places_);
_CP_APPLY_PROP(style_repeat_content_, Other.style_repeat_content_);
_CP_APPLY_PROP(style_shrink_to_fit_, Other.style_shrink_to_fit_);
}
}
}
#pragma once
#include <iosfwd>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "length.h"
#include "percent.h"
#include "lengthorpercent.h"
#include "fobreak.h"
#include "tablealign.h"
#include "common_attlists.h"
#include "bordermodel.h"
#include "verticalalign.h"
#include "borderwidths.h"
#include "textalignsource.h"
#include "direction.h"
#include "wrapoption.h"
#include "rotationalign.h"
namespace cpdoccore {
namespace odf {
class table_format_properties
{
public:
bool add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
void serialize(std::wostream & strm);
private:
optional<length>::Type style_width_;
optional<percent>::Type style_rel_width_;
optional<table_align>::Type table_align_;
common_horizontal_margin_attlist common_horizontal_margin_attlist_;
common_vertical_margin_attlist common_vertical_margin_attlist_;
common_margin_attlist common_margin_attlist_;
common_page_number_attlist common_page_number_attlist_;
common_break_attlist common_break_attlist_;
common_background_color_attlist common_background_color_attlist_;
common_shadow_attlist common_shadow_attlist_;
common_keep_with_next_attlist common_keep_with_next_attlist_;
office_element_ptr style_background_image_;
optional<bool>::Type style_may_break_between_rows_;
optional<border_model>::Type table_border_model_;
common_writing_mode_attlist common_writing_mode_attlist_;
optional<bool>::Type table_display_;
};
/// style:table-properties
class style_table_properties : public office_element_impl<style_table_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleTableProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
table_format_properties table_format_properties_;
virtual void serialize(std::wostream & strm);
};
CP_REGISTER_OFFICE_ELEMENT2(style_table_properties);
// style-table-column-properties-attlist
class style_table_column_properties_attlist
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
_CP_OPT(length) style_column_width_;
_CP_OPT(length) style_rel_column_width_;
_CP_OPT(bool) style_use_optimal_column_width_;
common_break_attlist common_break_attlist_;
};
/// \class style_table_column_properties
/// style-table-column-properties
/// style:table-column-properties
class style_table_column_properties : public office_element_impl<style_table_column_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleTableColumnProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void serialize(std::wostream & strm){}
style_table_column_properties_attlist style_table_column_properties_attlist_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_table_column_properties);
// style-table-row-properties-attlist
class style_table_row_properties_attlist
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
_CP_OPT(length) style_row_height_;
_CP_OPT(length) style_min_row_height_;
_CP_OPT(bool) style_use_optimal_row_height_;
common_background_color_attlist common_background_color_attlist_;
common_break_attlist common_break_attlist_;
_CP_OPT(keep_together) fo_keep_together_;
};
/// style:table-row-properties
class style_table_row_properties : public office_element_impl<style_table_row_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleTableRowProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void serialize(std::wostream & strm){}
public:
style_table_row_properties_attlist style_table_row_properties_attlist_;
office_element_ptr style_background_image_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_table_row_properties);
// style-table-cell-properties-attlist
class style_table_cell_properties_attlist
{
public:
void apply_from(const style_table_cell_properties_attlist & Other);
public:
// 15.11.1
_CP_OPT(vertical_align) style_vertical_align_;
// 15.11.2 style:text-align-source
_CP_OPT(text_align_source) style_text_align_source_;
// 15.11.3 style:direction
_CP_OPT(direction) style_direction_;
// 15.11.4 style:glyph-orientation-vertical
_CP_OPT(std::wstring) style_glyph_orientation_vertical_;
// 15.11.5
common_shadow_attlist common_shadow_attlist_;
// 15.11.6
common_background_color_attlist common_background_color_attlist_;
// 15.11.7
common_border_attlist common_border_attlist_;
// 15.11.8
_CP_OPT(std::wstring) style_diagonal_tl_br_;
_CP_OPT(border_widths) style_diagonal_tl_br_widths_;
_CP_OPT(std::wstring) style_diagonal_bl_tr_;
_CP_OPT(border_widths) style_diagonal_bl_tr_widths_;
// 15.11.9
// common-border-line-width-attlist
common_border_line_width_attlist common_border_line_width_attlist_;
// 15.11.10
common_padding_attlist common_padding_attlist_;
// 15.11.11
// fo:wrap-option
_CP_OPT(wrap_option) fo_wrap_option_;
// 15.11.12
common_rotation_angle_attlist common_rotation_angle_attlist_;
// 15.11.13
// style:rotation-align
_CP_OPT(rotation_align) style_rotation_align_;
// 15.11.14
// style:cell-protect
_CP_OPT(std::wstring) style_cell_protect_;
// 15.11.15
// style:print-content
_CP_OPT(bool) style_print_content_;
// 15.11.16
// style:decimal-places
_CP_OPT(unsigned int) style_decimal_places_;
// 15.11.17
// style:repeat-content
_CP_OPT(bool) style_repeat_content_;
// 15.11.18
_CP_OPT(bool) style_shrink_to_fit_;
};
// style-table-cell-properties-elements
class style_table_cell_properties_elements
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
// 15.11.6
office_element_ptr style_background_image_;
};
/// \class style_table_cell_properties
/// style-table-cell-properties
/// style:table-cell-properties
class style_table_cell_properties : public office_element_impl<style_table_cell_properties>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeStyleTableCellProperties;
CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void serialize(std::wostream & strm){}
style_table_cell_properties_attlist style_table_cell_properties_attlist_;
office_element_ptr style_background_image_;
};
CP_REGISTER_OFFICE_ELEMENT2(style_table_cell_properties);
}
}
......@@ -3,14 +3,13 @@
#include <boost/make_shared.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/serialize.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/odf/odf_document.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include "serialize_common_attlists.h"
#include "common_attlists.h"
namespace cpdoccore {
namespace odf {
......@@ -122,7 +121,7 @@ void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstr
{
if (L"table" == Ns && L"table-source" == Name)
{
create_element(Ns,Name,table_table_source_,getContext());
CP_CREATE_ELEMENT(table_table_source_);
}
else if ( (L"table" == Ns && L"table-column-group" == Name) ||
(L"table" == Ns && L"table-columns" == Name) ||
......@@ -141,7 +140,7 @@ void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstr
}
else if CP_CHECK_NAME(L"table", L"shapes")
{
create_element(Ns,Name,table_shapes_,getContext());
CP_CREATE_ELEMENT(table_shapes_);
}
else
CP_NOT_APPLICABLE_ELM();
......@@ -150,10 +149,9 @@ void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstr
void table_table::serialize(std::wostream & _Wostream)
{
std::wstring ns_name_ =std::wstring(ns) + std::wstring(L":") + std::wstring(name);
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE(ns_name_)
CP_XML_NODE_SIMPLE()
{
CP_XML_ATTR_OPT( L"table:name", table_table_attlist_.table_name_);
CP_XML_ATTR_OPT( L"table:style-name", table_table_attlist_.table_style_name_);
......@@ -212,7 +210,7 @@ void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::s
{
if CP_CHECK_NAME(L"table", L"table-column")
{
create_element(Ns,Name,table_table_column_,getContext());
CP_CREATE_ELEMENT(table_table_column_);
}
else
CP_NOT_APPLICABLE_ELM();
......@@ -231,7 +229,7 @@ void table_table_header_columns::add_child_element( const ::std::wstring & Ns, c
{
if CP_CHECK_NAME(L"table", L"table-column")
{
create_element(Ns,Name,table_table_column_,getContext());
CP_CREATE_ELEMENT(table_table_column_);
}
else
CP_NOT_APPLICABLE_ELM();
......@@ -243,7 +241,7 @@ void table_columns::add_child_element( const ::std::wstring & Ns, const ::std::w
{
if CP_CHECK_NAME(L"table", L"table-columns")
{
create_element(Ns,Name,table_table_columns_, Context);
CP_CREATE_ELEMENT_SIMPLE(table_table_columns_);
}
else if CP_CHECK_NAME(L"table", L"table-column")
{
......@@ -272,7 +270,7 @@ void table_columns_no_group::add_child_element( const ::std::wstring & Ns, cons
else if CP_CHECK_NAME(L"table", L"table-header-columns")
{
was_header_ = true;
create_element(Ns,Name,table_table_header_columns_,getContext());
CP_CREATE_ELEMENT(table_table_header_columns_);
}
else
not_applicable_element(L"table-columns-no-group", Ns, Name);
......@@ -318,7 +316,7 @@ void table_columns_and_groups::add_child_element(const ::std::wstring & Ns, cons
{
if (CP_CHECK_NAME(L"table", L"table-column-group"))
{
create_element(Ns,Name,content_, Context);
CP_CREATE_ELEMENT_SIMPLE(content_);
}
else if (CP_CHECK_NAME(L"table", L"table-columns") ||
CP_CHECK_NAME(L"table", L"table-column") ||
......@@ -338,7 +336,7 @@ void table_columns_and_groups::add_child_element(const ::std::wstring & Ns, cons
void table_table_cell_content::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
{
create_element(Ns,Name,text_content_, Context);
CP_CREATE_ELEMENT_SIMPLE(text_content_);
}
// table:table-cell
......@@ -393,7 +391,7 @@ void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std:
if ( CP_CHECK_NAME(L"table", L"table-cell") ||
CP_CHECK_NAME(L"table", L"covered-table-cell") )
{
create_element(Ns,Name,content_,getContext());
CP_CREATE_ELEMENT(content_);
}
else
CP_NOT_APPLICABLE_ELM();
......@@ -412,7 +410,7 @@ void table_table_rows::add_attributes( const xml::attributes_wc_ptr & Attributes
void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{
create_element(Ns,Name,table_table_row_,getContext());
CP_CREATE_ELEMENT(table_table_row_);
}
// table:table-header-rows
......@@ -429,7 +427,7 @@ void table_table_header_rows::add_child_element( const ::std::wstring & Ns, cons
{
if CP_CHECK_NAME(L"table", L"table-row")
{
create_element(Ns,Name,table_table_row_,getContext());
CP_CREATE_ELEMENT(table_table_row_);
}
else
CP_NOT_APPLICABLE_ELM();
......@@ -442,11 +440,11 @@ void table_rows::add_child_element(const ::std::wstring & Ns, const ::std::wstri
{
if CP_CHECK_NAME(L"table", L"table-rows")
{
create_element(Ns,Name,table_table_rows_, Context);
CP_CREATE_ELEMENT_SIMPLE(table_table_rows_);
}
else if CP_CHECK_NAME(L"table", L"table-row")
{
create_element(Ns,Name,table_table_row_, Context);
CP_CREATE_ELEMENT_SIMPLE(table_table_row_);
}
else
{
......@@ -480,7 +478,7 @@ void table_rows_no_group::add_child_element( const ::std::wstring & Ns, const ::
else if CP_CHECK_NAME(L"table", L"table-header-rows")
{
was_header_ = true;
create_element(Ns,Name,table_table_header_rows_,getContext());
CP_CREATE_ELEMENT(table_table_header_rows_);
}
else
not_applicable_element(L"table-rows-no-group",Ns, Name);
......@@ -497,7 +495,7 @@ void table_rows_and_groups::add_child_element( const ::std::wstring & Ns, const
{
if (L"table" == Ns && L"table-row-group" == Name)
{
create_element(Ns,Name,content_,Context);
CP_CREATE_ELEMENT_SIMPLE(content_);
}
else if (L"table" == Ns && (L"table-rows" == Name || L"table-row" == Name || L"table-header-rows" == Name) )
{
......
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