mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54933 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
24e5680e29
commit
4302f08281
@ -19,7 +19,7 @@ void abstract_xml::serialize(std::wostream & strm)
|
||||
{
|
||||
}
|
||||
|
||||
//void abstract_xml::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
//void abstract_xml::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
//{
|
||||
// CP_CREATE_ELEMENT(xml_content_);
|
||||
//}
|
||||
|
||||
@ -19,7 +19,7 @@ public:
|
||||
abstract_xml() {};
|
||||
|
||||
private:
|
||||
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element);
|
||||
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
@ -13,7 +13,7 @@ const wchar_t * style_header_footer_properties::ns = L"style";
|
||||
const wchar_t * style_header_footer_properties::name = L"header-footer-properties";
|
||||
|
||||
|
||||
void style_header_footer_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_header_footer_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
{
|
||||
@ -25,7 +25,7 @@ void style_header_footer_properties::add_child_element( const ::std::wstring &
|
||||
}
|
||||
}
|
||||
|
||||
void header_footer_content::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void header_footer_content::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
CP_CREATE_ELEMENT_SIMPLE(content_);
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
static const ElementType type = typeStyleHeaderFooterProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -69,7 +69,7 @@ public:
|
||||
class header_footer_content
|
||||
{
|
||||
public:
|
||||
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child);
|
||||
|
||||
office_element_ptr_array content_;
|
||||
|
||||
@ -88,7 +88,7 @@ void odf_conversion_context::add_rel(relationship const & r)
|
||||
|
||||
void odf_conversion_context::process_styles()
|
||||
{
|
||||
create_element(L"office", L"office-styles", styles_, this,true);
|
||||
create_element(L"office", L"styles", styles_, this,true);
|
||||
style_context_.process_office(styles_.back());
|
||||
|
||||
create_element(L"office", L"automatic-styles", styles_, this,true);
|
||||
|
||||
@ -21,7 +21,7 @@ const wchar_t * office_body::name = L"body";
|
||||
office_body::office_body()
|
||||
{}
|
||||
|
||||
void office_body::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void office_body::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public:
|
||||
public:
|
||||
office_body();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element);
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -19,7 +19,7 @@ namespace odf {
|
||||
const wchar_t * office_spreadsheet::ns = L"office";
|
||||
const wchar_t * office_spreadsheet::name = L"spreadsheet";
|
||||
|
||||
void office_spreadsheet::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void office_spreadsheet::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_CREATE_ELEMENT(content_);
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ public:
|
||||
office_element_ptr_array & getContent(){return content_;}
|
||||
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element);
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
|
||||
@ -16,7 +16,7 @@ namespace odf {
|
||||
const wchar_t * style_map::ns = L"style";
|
||||
const wchar_t * style_map::name = L"map";
|
||||
|
||||
void style_map::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_map::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ public:
|
||||
static const ElementType type = typeStyleMap;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
@ -11,7 +11,7 @@ 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)
|
||||
bool table_format_properties::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
{
|
||||
@ -62,9 +62,9 @@ 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)
|
||||
void style_table_properties::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
table_format_properties_.add_child_element(Ns, Name, getContext());
|
||||
table_format_properties_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
|
||||
void style_table_properties::serialize(std::wostream & _Wostream)
|
||||
@ -86,7 +86,7 @@ void style_table_properties::serialize(std::wostream & _Wostream)
|
||||
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)
|
||||
void style_table_column_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -101,7 +101,7 @@ 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)
|
||||
void style_table_cell_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
{
|
||||
@ -122,7 +122,7 @@ 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)
|
||||
void style_table_row_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
{
|
||||
|
||||
@ -28,7 +28,7 @@ namespace odf {
|
||||
class table_format_properties
|
||||
{
|
||||
public:
|
||||
bool add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
bool create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
|
||||
void serialize(std::wostream & strm);
|
||||
private:
|
||||
@ -67,7 +67,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
|
||||
@ -104,7 +104,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -140,7 +140,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
|
||||
@ -250,7 +250,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ void style_content::add_child_element(office_element_ptr & child, odf_conversion
|
||||
}
|
||||
}
|
||||
|
||||
void style_content::add_child_element( const std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void style_content::create_child_element( const std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"style", L"text-properties")
|
||||
{
|
||||
@ -155,9 +155,9 @@ const wchar_t * default_style::ns = L"style";
|
||||
const wchar_t * default_style::name = L"default-style";
|
||||
|
||||
|
||||
void default_style::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void default_style::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
style_content_.add_child_element(Ns, Name, getContext());
|
||||
style_content_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
void default_style::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -169,7 +169,7 @@ const wchar_t * draw_fill_image::ns = L"draw";
|
||||
const wchar_t * draw_fill_image::name = L"fill-image";
|
||||
|
||||
|
||||
void draw_fill_image::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void draw_fill_image::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -177,7 +177,7 @@ void draw_fill_image::add_child_element( const ::std::wstring & Ns, const ::std:
|
||||
const wchar_t * draw_gradient::ns = L"draw";
|
||||
const wchar_t * draw_gradient::name = L"gradient";
|
||||
|
||||
void draw_gradient::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void draw_gradient::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -186,7 +186,7 @@ const wchar_t * draw_hatch::ns = L"draw";
|
||||
const wchar_t * draw_hatch::name = L"hatch";
|
||||
|
||||
|
||||
void draw_hatch::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void draw_hatch::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -194,7 +194,7 @@ void draw_hatch::add_child_element( const ::std::wstring & Ns, const ::std::wst
|
||||
const wchar_t * draw_opacity::ns = L"draw";
|
||||
const wchar_t * draw_opacity::name = L"opacity";
|
||||
|
||||
void draw_opacity::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void draw_opacity::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -203,14 +203,14 @@ void draw_opacity::add_child_element( const ::std::wstring & Ns, const ::std::w
|
||||
const wchar_t * style::ns = L"style";
|
||||
const wchar_t * style::name = L"style";
|
||||
|
||||
void style::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"style", L"map")
|
||||
{
|
||||
CP_CREATE_ELEMENT(style_map_);
|
||||
}
|
||||
else
|
||||
style_content_.add_child_element(Ns, Name, getContext());
|
||||
style_content_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
|
||||
void style::add_child_element(office_element_ptr & child)
|
||||
@ -230,7 +230,7 @@ void style::add_child_element(office_element_ptr & child)
|
||||
// styles & draw_styles
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void styles::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void styles::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"style", L"style")
|
||||
{
|
||||
@ -279,9 +279,23 @@ void styles::add_child_element(office_element_ptr & child, odf_conversion_contex
|
||||
number_styles_.push_back(child);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
void templates::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void styles::serialize(std::wostream & strm)
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr & elm, number_styles_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, style_style_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, text_list_style_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
}
|
||||
void templates::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-template")
|
||||
{
|
||||
@ -299,7 +313,7 @@ void templates::add_child_element(office_element_ptr & child)
|
||||
table_templates_.push_back(child);
|
||||
}
|
||||
}
|
||||
void draw_styles::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void draw_styles::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"draw", L"gradient")
|
||||
{
|
||||
@ -347,6 +361,34 @@ void draw_styles::add_child_element(office_element_ptr & child, odf_conversion_c
|
||||
case typeStyleDrawStrokeDash: draw_stroke_dash_.push_back(child); break;
|
||||
}
|
||||
}
|
||||
|
||||
void draw_styles::serialize(std::wostream & strm)
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_fill_image_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_hatch_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_gradient_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_opacity_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_marker_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
BOOST_FOREACH(office_element_ptr & elm, draw_stroke_dash_)
|
||||
{
|
||||
elm->serialize(strm);
|
||||
}
|
||||
}
|
||||
// office:automatic-styles
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * office_automatic_styles::ns = L"office";
|
||||
@ -354,7 +396,7 @@ const wchar_t * office_automatic_styles::name = L"automatic-styles";
|
||||
|
||||
|
||||
|
||||
void office_automatic_styles::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void office_automatic_styles::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"page-layout" == Name)
|
||||
{
|
||||
@ -362,7 +404,7 @@ void office_automatic_styles::add_child_element( const ::std::wstring & Ns, cons
|
||||
}
|
||||
else
|
||||
{
|
||||
styles_.add_child_element(Ns, Name, getContext());
|
||||
styles_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
}
|
||||
|
||||
@ -382,13 +424,28 @@ void office_automatic_styles::add_child_element(office_element_ptr & child)
|
||||
break;
|
||||
}
|
||||
}
|
||||
void office_automatic_styles::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr elm, style_page_layout_)
|
||||
{
|
||||
elm->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
styles_.serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
// office:master-styles
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
const wchar_t * office_master_styles::ns = L"office";
|
||||
const wchar_t * office_master_styles::name = L"master-styles";
|
||||
|
||||
|
||||
void office_master_styles::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void office_master_styles::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"master-page" == Name)
|
||||
CP_CREATE_ELEMENT(style_master_page_);
|
||||
@ -421,7 +478,22 @@ void office_master_styles::add_child_element(office_element_ptr & child)
|
||||
break;
|
||||
}
|
||||
}
|
||||
void office_master_styles::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
draw_layer_set_->serialize(CP_XML_STREAM());
|
||||
BOOST_FOREACH(office_element_ptr elm, style_master_page_)
|
||||
{
|
||||
elm->serialize(CP_XML_STREAM());
|
||||
}
|
||||
style_handout_master_->serialize(CP_XML_STREAM());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// office:styles
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -429,7 +501,7 @@ const wchar_t * office_styles::ns = L"office";
|
||||
const wchar_t * office_styles::name = L"styles";
|
||||
|
||||
|
||||
void office_styles::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void office_styles::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (CP_CHECK_NAME(L"style", L"style") ||
|
||||
CP_CHECK_NAME(L"text", L"list-style") ||
|
||||
@ -441,7 +513,7 @@ void office_styles::add_child_element( const ::std::wstring & Ns, const ::std::w
|
||||
CP_CHECK_NAME(L"number", L"boolean-style")
|
||||
)
|
||||
{
|
||||
styles_.add_child_element( Ns, Name, getContext());
|
||||
styles_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
else if (L"style" == Ns && L"default-style" == Name)
|
||||
CP_CREATE_ELEMENT(style_default_style_);
|
||||
@ -459,11 +531,11 @@ void office_styles::add_child_element( const ::std::wstring & Ns, const ::std::w
|
||||
CP_CHECK_NAME(L"svg", L"radialGradient")
|
||||
)
|
||||
{
|
||||
draw_styles_.add_child_element( Ns, Name, getContext());
|
||||
draw_styles_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
else if(CP_CHECK_NAME(L"table", L"table-template"))
|
||||
{
|
||||
templates_.add_child_element( Ns, Name, getContext());
|
||||
templates_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
else if (L"text" == Ns && L"outline-style" == Name)
|
||||
CP_CREATE_ELEMENT(text_outline_style_);
|
||||
@ -516,6 +588,25 @@ void office_styles::add_child_element(office_element_ptr & child)
|
||||
//....
|
||||
}
|
||||
}
|
||||
void office_styles::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
BOOST_FOREACH(office_element_ptr & elm, style_default_style_)
|
||||
{
|
||||
elm->serialize(CP_XML_STREAM());
|
||||
}
|
||||
|
||||
draw_styles_.serialize(CP_XML_STREAM());
|
||||
|
||||
templates_.serialize(CP_XML_STREAM());
|
||||
|
||||
styles_.serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// style:header
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -523,9 +614,9 @@ const wchar_t * style_header::ns = L"style";
|
||||
const wchar_t * style_header::name = L"header";
|
||||
|
||||
|
||||
void style_header::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_header::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element( Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
void style_header::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -536,9 +627,9 @@ const wchar_t * style_footer::ns = L"style";
|
||||
const wchar_t * style_footer::name = L"footer";
|
||||
|
||||
|
||||
void style_footer::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_footer::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element(Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
void style_footer::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -548,9 +639,9 @@ void style_footer::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_header_first::ns = L"style";
|
||||
const wchar_t * style_header_first::name = L"header-first";
|
||||
|
||||
void style_header_first::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_header_first::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element(Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
void style_header_first::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -562,9 +653,9 @@ const wchar_t * style_footer_first::ns = L"style";
|
||||
const wchar_t * style_footer_first::name = L"footer-first";
|
||||
|
||||
|
||||
void style_footer_first::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_footer_first::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element( Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
void style_footer_first::add_child_element( office_element_ptr & child)
|
||||
{
|
||||
@ -575,9 +666,9 @@ const wchar_t * style_header_left::ns = L"style";
|
||||
const wchar_t * style_header_left::name = L"header-left";
|
||||
|
||||
|
||||
void style_header_left::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_header_left::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element( Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
void style_header_left::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -587,9 +678,9 @@ void style_header_left::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_footer_left::ns = L"style";
|
||||
const wchar_t * style_footer_left::name = L"footer-left";
|
||||
|
||||
void style_footer_left::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_footer_left::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
content().header_footer_content_.add_child_element( Ns, Name, getContext());
|
||||
content().header_footer_content_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
void style_footer_left::add_child_element(office_element_ptr & child)
|
||||
{
|
||||
@ -601,7 +692,7 @@ void style_footer_left::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_columns::ns = L"style";
|
||||
const wchar_t * style_columns::name = L"columns";
|
||||
|
||||
void style_columns::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_columns::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"column" == Name)
|
||||
CP_CREATE_ELEMENT(style_column_);
|
||||
@ -634,7 +725,7 @@ const wchar_t * style_column::ns = L"style";
|
||||
const wchar_t * style_column::name = L"column";
|
||||
|
||||
|
||||
void style_column::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_column::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -645,7 +736,7 @@ const wchar_t * style_column_sep::ns = L"style";
|
||||
const wchar_t * style_column_sep::name = L"column-sep";
|
||||
|
||||
|
||||
void style_column_sep::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_column_sep::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -655,7 +746,7 @@ void style_column_sep::add_child_element( const ::std::wstring & Ns, const ::std
|
||||
const wchar_t * style_section_properties::ns = L"style";
|
||||
const wchar_t * style_section_properties::name = L"section-properties";
|
||||
|
||||
void style_section_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_section_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
CP_CREATE_ELEMENT(style_background_image_);
|
||||
@ -687,7 +778,7 @@ void style_section_properties::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_header_style::ns = L"style";
|
||||
const wchar_t * style_header_style::name = L"header-style";
|
||||
|
||||
void style_header_style::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_header_style::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"header-footer-properties" == Name)
|
||||
{
|
||||
@ -713,7 +804,7 @@ void style_header_style::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_footer_style::ns = L"style";
|
||||
const wchar_t * style_footer_style::name = L"footer-style";
|
||||
|
||||
void style_footer_style::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_footer_style::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"header-footer-properties" == Name)
|
||||
{
|
||||
@ -739,7 +830,7 @@ void style_footer_style::add_child_element(office_element_ptr & child)
|
||||
const wchar_t * style_page_layout::ns = L"style";
|
||||
const wchar_t * style_page_layout::name = L"page-layout";
|
||||
|
||||
void style_page_layout::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_page_layout::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"header-style" == Name)
|
||||
{
|
||||
@ -782,7 +873,7 @@ void style_page_layout::add_child_element( office_element_ptr & child)
|
||||
const wchar_t * style_footnote_sep::ns = L"style";
|
||||
const wchar_t * style_footnote_sep::name = L"footnote-sep";
|
||||
|
||||
void style_footnote_sep::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_footnote_sep::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -792,9 +883,9 @@ void style_footnote_sep::add_child_element( const ::std::wstring & Ns, const ::s
|
||||
const wchar_t * style_page_layout_properties::ns = L"style";
|
||||
const wchar_t * style_page_layout_properties::name = L"page-layout-properties";
|
||||
|
||||
void style_page_layout_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_page_layout_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
style_page_layout_properties_elements_.add_child_element( Ns, Name, getContext());
|
||||
style_page_layout_properties_elements_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
|
||||
void style_page_layout_properties::add_child_element( office_element_ptr & child)
|
||||
@ -803,7 +894,7 @@ void style_page_layout_properties::add_child_element( office_element_ptr & child
|
||||
}
|
||||
// style-page-layout-properties-elements
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void style_page_layout_properties_elements::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context )
|
||||
void style_page_layout_properties_elements::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context )
|
||||
{
|
||||
if (L"style" == Ns && L"background-image" == Name)
|
||||
{
|
||||
@ -846,7 +937,7 @@ void style_page_layout_properties_elements::add_child_element( office_element_pt
|
||||
const wchar_t * style_master_page::ns = L"style";
|
||||
const wchar_t * style_master_page::name = L"master-page";
|
||||
|
||||
void style_master_page::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_master_page::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"header" == Name)
|
||||
CP_CREATE_ELEMENT(style_header_);
|
||||
@ -948,7 +1039,7 @@ int style_master_page::find_placeHolderIndex(presentation_class::type placeHolde
|
||||
const wchar_t * text_notes_configuration::ns = L"text";
|
||||
const wchar_t * text_notes_configuration::name = L"notes-configuration";
|
||||
|
||||
void text_notes_configuration::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void text_notes_configuration::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"text", L"note-continuation-notice-forward")
|
||||
CP_CREATE_ELEMENT(text_note_continuation_notice_forward_);
|
||||
@ -963,7 +1054,7 @@ void text_notes_configuration::add_child_element(const ::std::wstring & Ns, cons
|
||||
const wchar_t * style_presentation_page_layout::ns = L"style";
|
||||
const wchar_t * style_presentation_page_layout::name = L"presentation-page-layout";
|
||||
|
||||
void style_presentation_page_layout::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_presentation_page_layout::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"presentation" == Ns && L"placeholder" == Name)
|
||||
{
|
||||
|
||||
@ -56,7 +56,7 @@ class style_drawing_page_properties;
|
||||
class style_content : noncopyable
|
||||
{
|
||||
public:
|
||||
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child, odf_conversion_context * Context);
|
||||
|
||||
style_text_properties * get_style_text_properties() const;
|
||||
@ -101,7 +101,7 @@ public:
|
||||
public:
|
||||
default_style() {};
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -145,7 +145,7 @@ public:
|
||||
_CP_OPT(std::wstring) draw_name_;
|
||||
_CP_OPT(std::wstring) draw_display_name_;
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -174,7 +174,7 @@ public:
|
||||
_CP_OPT(std::wstring) draw_name_;
|
||||
_CP_OPT(std::wstring) draw_display_name_;
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -206,7 +206,7 @@ public:
|
||||
_CP_OPT(std::wstring) draw_name_;
|
||||
_CP_OPT(std::wstring) draw_display_name_;
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -230,7 +230,7 @@ public:
|
||||
|
||||
_CP_OPT(std::wstring) draw_name_;
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -258,7 +258,7 @@ public:
|
||||
|
||||
style() : style_auto_update_(false) { }
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -289,9 +289,11 @@ CP_REGISTER_OFFICE_ELEMENT2(style);
|
||||
class styles
|
||||
{
|
||||
public:
|
||||
void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child, odf_conversion_context * Context);
|
||||
|
||||
void serialize(std::wostream & strm);
|
||||
|
||||
office_element_ptr_array style_style_; ///< style-style
|
||||
office_element_ptr_array text_list_style_; ///< text-list-style
|
||||
|
||||
@ -308,27 +310,31 @@ public:
|
||||
class draw_styles
|
||||
{
|
||||
public:
|
||||
void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child, odf_conversion_context * Context);
|
||||
|
||||
void serialize(std::wostream & strm);
|
||||
|
||||
office_element_ptr_array draw_gradient_;
|
||||
office_element_ptr_array draw_fill_image_;
|
||||
office_element_ptr_array draw_opacity_;
|
||||
office_element_ptr_array draw_hatch_;
|
||||
|
||||
office_element_ptr_array draw_marker_; // < TODO
|
||||
office_element_ptr_array draw_stroke_dash_; // < TODO
|
||||
office_element_ptr_array draw_marker_;
|
||||
office_element_ptr_array draw_stroke_dash_;
|
||||
|
||||
office_element_ptr_array svg_linearGradient_; // < TODO
|
||||
office_element_ptr_array svg_radialGradient_; // < TODO
|
||||
office_element_ptr_array svg_linearGradient_;
|
||||
office_element_ptr_array svg_radialGradient_;
|
||||
|
||||
};
|
||||
class templates
|
||||
{
|
||||
public:
|
||||
void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child);
|
||||
|
||||
void serialize(std::wostream & strm){}
|
||||
|
||||
office_element_ptr_array table_templates_;
|
||||
|
||||
};
|
||||
@ -344,10 +350,10 @@ public:
|
||||
static const ElementType type = typeOfficeAutomaticStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
styles styles_; ///< styles
|
||||
office_element_ptr_array style_page_layout_;
|
||||
@ -366,10 +372,10 @@ public:
|
||||
static const ElementType type = typeOfficeMasterStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
office_element_ptr_array style_master_page_; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
office_element_ptr style_handout_master_; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - .. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@ -408,7 +414,7 @@ public:
|
||||
static const ElementType type = typeStyleMasterPage;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -445,10 +451,10 @@ public:
|
||||
static const ElementType type = typeOfficeStyles;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
virtual void serialize(std::wostream & strm);
|
||||
|
||||
styles styles_;
|
||||
draw_styles draw_styles_;
|
||||
@ -497,7 +503,7 @@ public:
|
||||
static const ElementType type = typeStyleHeader;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -523,7 +529,7 @@ public:
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
public:
|
||||
@ -546,7 +552,7 @@ public:
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
//header_footer_content_impl content_;
|
||||
@ -567,7 +573,7 @@ public:
|
||||
static const ElementType type = typeStyleFooterFirst;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -588,7 +594,7 @@ public:
|
||||
static const ElementType type = typeStyleHeaderLeft;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -608,7 +614,7 @@ public:
|
||||
static const ElementType type = typeStyleFooterLeft;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -630,7 +636,7 @@ public:
|
||||
static const ElementType type = typeStyleColumns;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -655,7 +661,7 @@ public:
|
||||
static const ElementType type = typeStyleColumn;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -680,7 +686,7 @@ public:
|
||||
static const ElementType type = typeStyleColumnSep;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -704,7 +710,7 @@ public:
|
||||
static const ElementType type = typeStyleSectionProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -750,8 +756,8 @@ public:
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
|
||||
office_element_ptr style_header_footer_properties_;
|
||||
|
||||
@ -770,7 +776,7 @@ public:
|
||||
static const ElementType type = typeStyleFooterStyle;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -797,7 +803,7 @@ public:
|
||||
office_element_ptr style_header_style_;
|
||||
office_element_ptr style_footer_style_;
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -905,7 +911,7 @@ public:
|
||||
static const ElementType type = typeStyleFootnoteSep;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -920,7 +926,7 @@ CP_REGISTER_OFFICE_ELEMENT2(style_footnote_sep);
|
||||
class style_page_layout_properties_elements
|
||||
{
|
||||
public:
|
||||
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
void add_child_element(office_element_ptr & child);
|
||||
|
||||
office_element_ptr style_background_image_;
|
||||
@ -949,7 +955,7 @@ public:
|
||||
|
||||
style_page_layout_properties() { }
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child);
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -971,7 +977,7 @@ public:
|
||||
static const ElementType type = typeTextNotesConfiguration;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -1009,7 +1015,7 @@ public:
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ const wchar_t * text_list_style::ns = L"text";
|
||||
const wchar_t * text_list_style::name = L"list-style";
|
||||
|
||||
|
||||
void text_list_style::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void text_list_style::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"text" == Ns && L"list-level-style-number" == Name)
|
||||
CP_CREATE_ELEMENT(text_list_style_content_);
|
||||
@ -37,7 +37,7 @@ const wchar_t * text_list_level_style_number::ns = L"text";
|
||||
const wchar_t * text_list_level_style_number::name = L"list-level-style-number";
|
||||
|
||||
|
||||
void text_list_level_style_number::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void text_list_level_style_number::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"list-level-properties" == Name)
|
||||
CP_CREATE_ELEMENT(style_list_level_properties_);
|
||||
@ -55,7 +55,7 @@ const wchar_t * style_list_level_properties::ns = L"style";
|
||||
const wchar_t * style_list_level_properties::name = L"list-level-properties";
|
||||
|
||||
|
||||
void style_list_level_properties::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_list_level_properties::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"style", L"list-level-label-alignment")
|
||||
{
|
||||
@ -74,7 +74,7 @@ const wchar_t * style_list_level_label_alignment::name = L"list-level-label-alig
|
||||
|
||||
|
||||
|
||||
void style_list_level_label_alignment::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void style_list_level_label_alignment::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -85,7 +85,7 @@ const wchar_t * text_list_level_style_bullet::ns = L"text";
|
||||
const wchar_t * text_list_level_style_bullet::name = L"list-level-style-bullet";
|
||||
|
||||
|
||||
void text_list_level_style_bullet::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void text_list_level_style_bullet::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"style" == Ns && L"list-level-properties" == Name)
|
||||
CP_CREATE_ELEMENT(style_list_level_properties_);
|
||||
|
||||
@ -43,7 +43,7 @@ public:
|
||||
const std::wstring & get_style_name() { return text_list_style_attr_.get_style_name(); }
|
||||
office_element_ptr_array & get_content() { return text_list_style_content_; }
|
||||
|
||||
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -97,7 +97,7 @@ public:
|
||||
static const ElementType type = typeStyleListLevelProperties;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -136,7 +136,7 @@ public:
|
||||
static const ElementType type = typeStyleListLevelLabelAlignment;
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -169,7 +169,7 @@ public:
|
||||
|
||||
office_element_ptr style_list_level_properties_;
|
||||
|
||||
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
@ -211,8 +211,9 @@ public:
|
||||
|
||||
office_element_ptr style_list_level_properties_;
|
||||
|
||||
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
|
||||
|
||||
virtual void add_child_element(office_element_ptr & child)
|
||||
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
|
||||
virtual void serialize(std::wostream & strm){}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ using xml::xml_char_wc;
|
||||
const wchar_t * table_table_source::ns = L"table";
|
||||
const wchar_t * table_table_source::name = L"table-source";
|
||||
|
||||
void table_table_source::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_source::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -29,7 +29,7 @@ void table_table_source::add_child_element(const ::std::wstring & Ns, const ::st
|
||||
const wchar_t * table_table::ns = L"table";
|
||||
const wchar_t * table_table::name = L"table";
|
||||
|
||||
void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if (L"table" == Ns && L"table-source" == Name)
|
||||
{
|
||||
@ -41,14 +41,14 @@ void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstr
|
||||
(L"table" == Ns && L"table-header-columns" == Name)
|
||||
)
|
||||
{
|
||||
table_columns_and_groups_.add_child_element(Ns, Name, getContext());
|
||||
table_columns_and_groups_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
else if ((L"table" == Ns && L"table-row-group" == Name) ||
|
||||
(L"table" == Ns && L"table-rows" == Name) ||
|
||||
(L"table" == Ns && L"table-row" == Name) ||
|
||||
(L"table" == Ns && L"table-header-rows" == Name))
|
||||
{
|
||||
table_rows_and_groups_.add_child_element(Ns, Name, getContext());
|
||||
table_rows_and_groups_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
else if CP_CHECK_NAME(L"table", L"shapes")
|
||||
{
|
||||
@ -91,7 +91,7 @@ void table_table::serialize(std::wostream & _Wostream)
|
||||
const wchar_t * table_table_column::ns = L"table";
|
||||
const wchar_t * table_table_column::name = L"table-column";
|
||||
|
||||
void table_table_column::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_table_column::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
CP_NOT_APPLICABLE_ELM();
|
||||
}
|
||||
@ -101,7 +101,7 @@ void table_table_column::add_child_element( const ::std::wstring & Ns, const ::s
|
||||
const wchar_t * table_table_columns::ns = L"table";
|
||||
const wchar_t * table_table_columns::name = L"table-columns";
|
||||
|
||||
void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_columns::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-column")
|
||||
{
|
||||
@ -116,7 +116,7 @@ void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::s
|
||||
const wchar_t * table_table_header_columns::ns = L"table";
|
||||
const wchar_t * table_table_header_columns::name = L"table-header-columns";
|
||||
|
||||
void table_table_header_columns::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_header_columns::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-column")
|
||||
{
|
||||
@ -128,7 +128,7 @@ void table_table_header_columns::add_child_element( const ::std::wstring & Ns, c
|
||||
|
||||
// table-columns
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void table_columns::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_columns::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-columns")
|
||||
{
|
||||
@ -148,14 +148,14 @@ table_columns_no_group::table_columns_no_group() : was_header_(false)
|
||||
{
|
||||
};
|
||||
|
||||
void table_columns_no_group::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_columns_no_group::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if (CP_CHECK_NAME(L"table", L"table-columns") || CP_CHECK_NAME(L"table", L"table-column"))
|
||||
{
|
||||
if (!was_header_)
|
||||
table_columns_1_.add_child_element(Ns, Name, Context);
|
||||
table_columns_1_.create_child_element(Ns, Name, Context);
|
||||
else
|
||||
table_columns_2_.add_child_element( Ns, Name, Context);
|
||||
table_columns_2_.create_child_element( Ns, Name, Context);
|
||||
|
||||
}
|
||||
else if CP_CHECK_NAME(L"table", L"table-header-columns")
|
||||
@ -180,9 +180,9 @@ _CP_PTR(table_columns_no_group) table_columns_no_group::create()
|
||||
const wchar_t * table_table_column_group::ns = L"table";
|
||||
const wchar_t * table_table_column_group::name = L"table-column-group";
|
||||
|
||||
void table_table_column_group::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_column_group::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
table_columns_and_groups_.add_child_element(Ns, Name, getContext());
|
||||
table_columns_and_groups_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
|
||||
// table-columns-and-groups
|
||||
@ -193,7 +193,7 @@ table_columns_and_groups::table_columns_and_groups()
|
||||
}
|
||||
|
||||
|
||||
void table_columns_and_groups::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_columns_and_groups::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if (CP_CHECK_NAME(L"table", L"table-column-group"))
|
||||
{
|
||||
@ -204,7 +204,7 @@ void table_columns_and_groups::add_child_element(const ::std::wstring & Ns, cons
|
||||
CP_CHECK_NAME(L"table", L"table-header-columns"))
|
||||
{
|
||||
_CP_PTR(table_columns_no_group) elm = table_columns_no_group::create();
|
||||
elm->add_child_element(Ns, Name, Context);
|
||||
elm->create_child_element(Ns, Name, Context);
|
||||
content_.push_back(elm);
|
||||
}
|
||||
else
|
||||
@ -215,7 +215,7 @@ void table_columns_and_groups::add_child_element(const ::std::wstring & Ns, cons
|
||||
// table-table-cell-content
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void table_table_cell_content::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_table_cell_content::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
CP_CREATE_ELEMENT_SIMPLE(text_content_);
|
||||
}
|
||||
@ -226,9 +226,9 @@ void table_table_cell_content::add_child_element( const ::std::wstring & Ns, co
|
||||
const wchar_t * table_table_cell::ns = L"table";
|
||||
const wchar_t * table_table_cell::name = L"table-cell";
|
||||
|
||||
void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_cell::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
table_table_cell_content_.add_child_element(Ns, Name, getContext());
|
||||
table_table_cell_content_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
|
||||
|
||||
@ -238,10 +238,10 @@ void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std
|
||||
const wchar_t * table_covered_table_cell::ns = L"table";
|
||||
const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
|
||||
|
||||
void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_covered_table_cell::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
empty_ = false;
|
||||
table_table_cell_content_.add_child_element( Ns, Name, getContext());
|
||||
table_table_cell_content_.create_child_element( Ns, Name, getContext());
|
||||
}
|
||||
|
||||
|
||||
@ -251,7 +251,7 @@ void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, co
|
||||
const wchar_t * table_table_row::ns = L"table";
|
||||
const wchar_t * table_table_row::name = L"table-row";
|
||||
|
||||
void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_row::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if ( CP_CHECK_NAME(L"table", L"table-cell") ||
|
||||
CP_CHECK_NAME(L"table", L"covered-table-cell") )
|
||||
@ -268,7 +268,7 @@ void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std:
|
||||
const wchar_t * table_table_rows::ns = L"table";
|
||||
const wchar_t * table_table_rows::name = L"table-rows";
|
||||
|
||||
void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_rows::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
CP_CREATE_ELEMENT(table_table_row_);
|
||||
}
|
||||
@ -279,7 +279,7 @@ void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::st
|
||||
const wchar_t * table_table_header_rows::ns = L"table";
|
||||
const wchar_t * table_table_header_rows::name = L"table-header-rows";
|
||||
|
||||
void table_table_header_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_header_rows::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-row")
|
||||
{
|
||||
@ -292,7 +292,7 @@ void table_table_header_rows::add_child_element( const ::std::wstring & Ns, cons
|
||||
|
||||
// table-rows
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void table_rows::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_rows::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if CP_CHECK_NAME(L"table", L"table-rows")
|
||||
{
|
||||
@ -322,14 +322,14 @@ table_rows_no_group::table_rows_no_group() : was_header_(false)
|
||||
{
|
||||
};
|
||||
|
||||
void table_rows_no_group::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_rows_no_group::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if (CP_CHECK_NAME(L"table", L"table-rows") || CP_CHECK_NAME(L"table", L"table-row"))
|
||||
{
|
||||
if (!was_header_)
|
||||
table_rows_1_.add_child_element(Ns, Name, Context);
|
||||
table_rows_1_.create_child_element(Ns, Name, Context);
|
||||
else
|
||||
table_rows_2_.add_child_element(Ns, Name, Context);
|
||||
table_rows_2_.create_child_element(Ns, Name, Context);
|
||||
}
|
||||
else if CP_CHECK_NAME(L"table", L"table-header-rows")
|
||||
{
|
||||
@ -347,7 +347,7 @@ table_rows_and_groups::table_rows_and_groups()
|
||||
{
|
||||
}
|
||||
|
||||
void table_rows_and_groups::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
void table_rows_and_groups::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
|
||||
{
|
||||
if (L"table" == Ns && L"table-row-group" == Name)
|
||||
{
|
||||
@ -356,7 +356,7 @@ void table_rows_and_groups::add_child_element( const ::std::wstring & Ns, const
|
||||
else if (L"table" == Ns && (L"table-rows" == Name || L"table-row" == Name || L"table-header-rows" == Name) )
|
||||
{
|
||||
_CP_PTR(table_rows_no_group) elm = table_rows_no_group::create();
|
||||
elm->add_child_element(Ns, Name, Context);
|
||||
elm->create_child_element(Ns, Name, Context);
|
||||
content_.push_back(elm);
|
||||
}
|
||||
else
|
||||
@ -370,9 +370,9 @@ const wchar_t * table_table_row_group::ns = L"table";
|
||||
const wchar_t * table_table_row_group::name = L"table-row-group";
|
||||
|
||||
|
||||
void table_table_row_group::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_table_row_group::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
table_rows_and_groups_.add_child_element(Ns, Name, getContext());
|
||||
table_rows_and_groups_.create_child_element(Ns, Name, getContext());
|
||||
}
|
||||
|
||||
|
||||
@ -385,7 +385,7 @@ void table_table_row_group::add_child_element(const ::std::wstring & Ns, const :
|
||||
const wchar_t * table_shapes::ns = L"table";
|
||||
const wchar_t * table_shapes::name = L"shapes";
|
||||
|
||||
void table_shapes::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
void table_shapes::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
|
||||
{
|
||||
create_element(Ns,Name,content_,getContext());
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ public:
|
||||
table_table_source_attlist table_table_source_attlist_;
|
||||
table_linked_source_attlist table_linked_source_attlist_;
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -125,7 +125,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_source);
|
||||
class table_columns
|
||||
{
|
||||
public:
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -151,7 +151,7 @@ public:
|
||||
public:
|
||||
table_columns_no_group();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -174,7 +174,7 @@ class table_columns_and_groups
|
||||
public:
|
||||
table_columns_and_groups();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -210,7 +210,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -235,7 +235,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -259,7 +259,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -290,7 +290,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -319,7 +319,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -336,7 +336,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_row);
|
||||
class table_table_cell_content
|
||||
{
|
||||
public:
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -362,7 +362,7 @@ public:
|
||||
|
||||
table_table_cell() { }
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -390,7 +390,7 @@ public:
|
||||
|
||||
table_covered_table_cell() {empty_ = true; }
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -416,7 +416,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -444,7 +444,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -460,7 +460,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_rows);
|
||||
class table_rows
|
||||
{
|
||||
public:
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -487,7 +487,7 @@ public:
|
||||
public:
|
||||
table_rows_no_group();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -508,7 +508,7 @@ class table_rows_and_groups
|
||||
public:
|
||||
table_rows_and_groups();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -545,7 +545,7 @@ public:
|
||||
table_table_row_group()
|
||||
{
|
||||
}
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
@ -570,7 +570,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream);
|
||||
@ -601,7 +601,7 @@ public:
|
||||
|
||||
CPDOCCORE_DEFINE_VISITABLE();
|
||||
|
||||
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
|
||||
virtual void add_child_element( office_element_ptr & child_element){}
|
||||
|
||||
virtual void serialize(std::wostream & _Wostream){}
|
||||
|
||||
@ -150,7 +150,7 @@ void XlsxConverter::convert_styles()
|
||||
|
||||
}
|
||||
|
||||
odf::office_element_ptr & XlsxConverter::convert(OOX::Spreadsheet::CFont * font)
|
||||
odf::office_element_ptr XlsxConverter::convert(OOX::Spreadsheet::CFont * font)
|
||||
{
|
||||
odf::office_element_ptr element;
|
||||
return element;
|
||||
|
||||
@ -46,6 +46,6 @@ namespace Oox2Odf
|
||||
|
||||
void convert(OOX::Spreadsheet::CWorksheet *oox_sheet);
|
||||
|
||||
cpdoccore::odf::office_element_ptr & convert(OOX::Spreadsheet::CFont * font);
|
||||
cpdoccore::odf::office_element_ptr convert(OOX::Spreadsheet::CFont * font);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user