Commit 621acc78 authored by ElenaSubbotina's avatar ElenaSubbotina

OdfFormatWriter - add review contents

parent a69dc9e5
...@@ -30,18 +30,14 @@ ...@@ -30,18 +30,14 @@
* *
*/ */
#include "abstract_xml.h" #include "abstract_xml.h"
//#include "paragraph_elements.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
namespace cpdoccore { namespace cpdoccore {
namespace odf_writer { namespace odf_writer {
// abstract-xml
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * abstract_xml::ns = L""; const wchar_t * abstract_xml::ns = L"";
const wchar_t * abstract_xml::name = L"abstract-xml"; const wchar_t * abstract_xml::name = L"abstract-xml";
...@@ -50,16 +46,6 @@ void abstract_xml::serialize(std::wostream & strm) ...@@ -50,16 +46,6 @@ void abstract_xml::serialize(std::wostream & strm)
{ {
} }
//void abstract_xml::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
//{
// CP_CREATE_ELEMENT(xml_content_);
//}
//
//void abstract_xml::add_child_element( const office_element_ptr & child_element)
//{
// xml_content_.push_back(child_element);
//}
} }
} }
...@@ -72,7 +72,7 @@ void calcext_date_is_attr::serialize(CP_ATTR_NODE) ...@@ -72,7 +72,7 @@ void calcext_date_is_attr::serialize(CP_ATTR_NODE)
const wchar_t * calcext_conditional_formats::ns = L"calcext"; const wchar_t * calcext_conditional_formats::ns = L"calcext";
const wchar_t * calcext_conditional_formats::name = L"conditional-formats"; const wchar_t * calcext_conditional_formats::name = L"conditional-formats";
void calcext_conditional_formats::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void calcext_conditional_formats::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -99,7 +99,7 @@ void calcext_conditional_formats::serialize(std::wostream & _Wostream) ...@@ -99,7 +99,7 @@ void calcext_conditional_formats::serialize(std::wostream & _Wostream)
const wchar_t * calcext_conditional_format::ns = L"calcext"; const wchar_t * calcext_conditional_format::ns = L"calcext";
const wchar_t * calcext_conditional_format::name = L"conditional-format"; const wchar_t * calcext_conditional_format::name = L"conditional-format";
void calcext_conditional_format::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void calcext_conditional_format::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -128,7 +128,7 @@ void calcext_conditional_format::serialize(std::wostream & _Wostream) ...@@ -128,7 +128,7 @@ void calcext_conditional_format::serialize(std::wostream & _Wostream)
const wchar_t * calcext_data_bar::ns = L"calcext"; const wchar_t * calcext_data_bar::ns = L"calcext";
const wchar_t * calcext_data_bar::name = L"data-bar"; const wchar_t * calcext_data_bar::name = L"data-bar";
void calcext_data_bar::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void calcext_data_bar::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -156,7 +156,7 @@ void calcext_data_bar::serialize(std::wostream & _Wostream) ...@@ -156,7 +156,7 @@ void calcext_data_bar::serialize(std::wostream & _Wostream)
const wchar_t * calcext_color_scale::ns = L"calcext"; const wchar_t * calcext_color_scale::ns = L"calcext";
const wchar_t * calcext_color_scale::name = L"color-scale"; const wchar_t * calcext_color_scale::name = L"color-scale";
void calcext_color_scale::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void calcext_color_scale::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -182,7 +182,7 @@ void calcext_color_scale::serialize(std::wostream & _Wostream) ...@@ -182,7 +182,7 @@ void calcext_color_scale::serialize(std::wostream & _Wostream)
const wchar_t * calcext_icon_set::ns = L"calcext"; const wchar_t * calcext_icon_set::ns = L"calcext";
const wchar_t * calcext_icon_set::name = L"icon-set"; const wchar_t * calcext_icon_set::name = L"icon-set";
void calcext_icon_set::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void calcext_icon_set::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
......
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
static const ElementType type = typeCalcextColorScaleEntry; static const ElementType type = typeCalcextColorScaleEntry;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
static const ElementType type = typeCalcextFormattingEntry; static const ElementType type = typeCalcextFormattingEntry;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -142,7 +142,7 @@ public: ...@@ -142,7 +142,7 @@ public:
static const ElementType type = typeCalcextIconSet; static const ElementType type = typeCalcextIconSet;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
static const ElementType type = typeCalcextDataBar; static const ElementType type = typeCalcextDataBar;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -187,7 +187,7 @@ public: ...@@ -187,7 +187,7 @@ public:
static const ElementType type = typeCalcextColorScale; static const ElementType type = typeCalcextColorScale;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -207,7 +207,7 @@ public: ...@@ -207,7 +207,7 @@ public:
static const ElementType type = typeCalcextDateIs; static const ElementType type = typeCalcextDateIs;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -226,7 +226,7 @@ public: ...@@ -226,7 +226,7 @@ public:
static const ElementType type = typeCalcextCondition; static const ElementType type = typeCalcextCondition;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -245,7 +245,7 @@ public: ...@@ -245,7 +245,7 @@ public:
static const ElementType type = typeCalcextConditionalFormat; static const ElementType type = typeCalcextConditionalFormat;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -268,7 +268,7 @@ public: ...@@ -268,7 +268,7 @@ public:
static const ElementType type = typeCalcextConditionalFormats; static const ElementType type = typeCalcextConditionalFormats;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -59,7 +59,7 @@ const wchar_t * draw_base::ns = L"draw"; ...@@ -59,7 +59,7 @@ const wchar_t * draw_base::ns = L"draw";
const wchar_t * draw_base::name = L"base"; const wchar_t * draw_base::name = L"base";
///////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////
void draw_base::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_base::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -97,7 +97,7 @@ void draw_image::serialize(std::wostream & _Wostream) ...@@ -97,7 +97,7 @@ void draw_image::serialize(std::wostream & _Wostream)
} }
} }
void draw_image::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void draw_image::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"office", L"binary-data") if CP_CHECK_NAME(L"office", L"binary-data")
{ {
...@@ -144,7 +144,7 @@ void draw_chart::serialize(std::wostream & _Wostream) ...@@ -144,7 +144,7 @@ void draw_chart::serialize(std::wostream & _Wostream)
} }
void draw_chart::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_chart::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -174,7 +174,7 @@ void draw_g::serialize(std::wostream & _Wostream) ...@@ -174,7 +174,7 @@ void draw_g::serialize(std::wostream & _Wostream)
} }
} }
} }
void draw_g::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_g::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -204,7 +204,7 @@ void draw_frame::serialize(std::wostream & _Wostream) ...@@ -204,7 +204,7 @@ void draw_frame::serialize(std::wostream & _Wostream)
} }
} }
void draw_frame::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_frame::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (CP_CHECK_NAME(L"draw", L"text-box") || if (CP_CHECK_NAME(L"draw", L"text-box") ||
CP_CHECK_NAME(L"draw", L"image") ||//копия чарта в виде картинки ну.. или просто картинка CP_CHECK_NAME(L"draw", L"image") ||//копия чарта в виде картинки ну.. или просто картинка
...@@ -293,7 +293,7 @@ void draw_text_box::serialize(std::wostream & _Wostream) ...@@ -293,7 +293,7 @@ void draw_text_box::serialize(std::wostream & _Wostream)
} }
} }
void draw_text_box::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_text_box::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -318,7 +318,7 @@ void draw_object::serialize(std::wostream & _Wostream) ...@@ -318,7 +318,7 @@ void draw_object::serialize(std::wostream & _Wostream)
} }
} }
void draw_object::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_object::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_NOT_APPLICABLE_ELM(); // TODO CP_NOT_APPLICABLE_ELM(); // TODO
} }
...@@ -343,7 +343,7 @@ void draw_object_ole::serialize(std::wostream & _Wostream) ...@@ -343,7 +343,7 @@ void draw_object_ole::serialize(std::wostream & _Wostream)
} }
} }
void draw_object_ole::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_object_ole::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
} }
......
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
static const ElementType type = typeDrawImage; static const ElementType type = typeDrawImage;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
static const ElementType type = typeDrawChart; static const ElementType type = typeDrawChart;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -122,7 +122,7 @@ public: ...@@ -122,7 +122,7 @@ public:
static const ElementType type = typeDrawFrame; static const ElementType type = typeDrawFrame;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -152,7 +152,7 @@ public: ...@@ -152,7 +152,7 @@ public:
static const ElementType type = typeDrawG; static const ElementType type = typeDrawG;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -187,7 +187,7 @@ public: ...@@ -187,7 +187,7 @@ public:
static const ElementType type = typeDrawTextBox; static const ElementType type = typeDrawTextBox;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -208,7 +208,7 @@ public: ...@@ -208,7 +208,7 @@ public:
static const ElementType type = typeDrawObject; static const ElementType type = typeDrawObject;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -229,7 +229,7 @@ public: ...@@ -229,7 +229,7 @@ public:
static const ElementType type = typeDrawObjectOle; static const ElementType type = typeDrawObjectOle;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -444,7 +444,7 @@ void draw_enhanced_geometry::serialize(std::wostream & _Wostream) ...@@ -444,7 +444,7 @@ void draw_enhanced_geometry::serialize(std::wostream & _Wostream)
typedef shared_ptr<draw_handle> draw_handle_ptr; typedef shared_ptr<draw_handle> draw_handle_ptr;
void draw_enhanced_geometry::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void draw_enhanced_geometry::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"draw", L"handle") if CP_CHECK_NAME(L"draw", L"handle")
{ {
......
...@@ -256,7 +256,7 @@ public: ...@@ -256,7 +256,7 @@ public:
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -302,7 +302,7 @@ public: ...@@ -302,7 +302,7 @@ public:
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -343,7 +343,7 @@ public: ...@@ -343,7 +343,7 @@ public:
static const ElementType type = typeDrawEnhancedGeometry; static const ElementType type = typeDrawEnhancedGeometry;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -43,8 +43,8 @@ namespace odf_writer { ...@@ -43,8 +43,8 @@ namespace odf_writer {
void style_header_footer_properties_attlist::serialize(CP_ATTR_NODE) void style_header_footer_properties_attlist::serialize(CP_ATTR_NODE)
{ {
CP_XML_ATTR_OPT(L"svg:height", svg_height_); CP_XML_ATTR_OPT(L"svg:height", svg_height_);
CP_XML_ATTR_OPT(L"fo:min-height", fo_min_height_); CP_XML_ATTR_OPT(L"fo:min-height", fo_min_height_);
common_horizontal_margin_attlist_.serialize(CP_GET_XML_NODE()); common_horizontal_margin_attlist_.serialize(CP_GET_XML_NODE());
common_vertical_margin_attlist_.serialize(CP_GET_XML_NODE()); common_vertical_margin_attlist_.serialize(CP_GET_XML_NODE());
...@@ -58,10 +58,10 @@ void style_header_footer_properties_attlist::serialize(CP_ATTR_NODE) ...@@ -58,10 +58,10 @@ void style_header_footer_properties_attlist::serialize(CP_ATTR_NODE)
} }
/// style-header-footer-properties /// style-header-footer-properties
const wchar_t * style_header_footer_properties::ns = L"style"; const wchar_t * style_header_footer_properties::ns = L"style";
const wchar_t * style_header_footer_properties::name = L"header-footer-properties"; const wchar_t * style_header_footer_properties::name = L"header-footer-properties";
void style_header_footer_properties::create_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) if (L"style" == Ns && L"background-image" == Name)
{ {
...@@ -84,19 +84,44 @@ void style_header_footer_properties::serialize(std::wostream & strm) ...@@ -84,19 +84,44 @@ void style_header_footer_properties::serialize(std::wostream & strm)
} }
} }
////////////////////////////////////////// //////////////////////////////////////////
void header_footer_content::create_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_); if CP_CHECK_NAME(L"text", L"tracked-changes")
{
CP_CREATE_ELEMENT_SIMPLE(tracked_changes_);
}
else
CP_CREATE_ELEMENT_SIMPLE(content_);
} }
void header_footer_content::add_child_element( const office_element_ptr & child) void header_footer_content::add_child_element( const office_element_ptr & child_element, odf_conversion_context * Context)
{ {
content_.push_back(child); if (!child_element) return;
switch(child_element->get_type())
{
case typeTextTrackedChanges:
{
tracked_changes_ = child_element;
}break;
case typeTextChangedRegion:
{
if (!tracked_changes_)
create_child_element(L"text", L"tracked-changes", Context);
tracked_changes_->add_child_element(child_element);
}break;
default:
content_.push_back(child_element);
}
} }
void header_footer_content::serialize(std::wostream & strm) void header_footer_content::serialize(std::wostream & strm)
{ {
BOOST_FOREACH(const office_element_ptr & elm, content_) if (tracked_changes_)
tracked_changes_->serialize(strm);
for (int i = 0; i < content_.size(); i++)
{ {
elm->serialize(strm); content_[i]->serialize(strm);
} }
} }
} }
......
...@@ -75,7 +75,7 @@ public: ...@@ -75,7 +75,7 @@ public:
static const ElementType type = typeStyleHeaderFooterProperties; static const ElementType type = typeStyleHeaderFooterProperties;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child) virtual void add_child_element( const office_element_ptr & child)
{ {
_CP_LOG << L"Non add child in " << ns << L":" << name << std::endl; _CP_LOG << L"Non add child in " << ns << L":" << name << std::endl;
...@@ -102,12 +102,13 @@ public: ...@@ -102,12 +102,13 @@ public:
class header_footer_content class header_footer_content
{ {
public: public:
void create_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( const office_element_ptr & child); void add_child_element ( const office_element_ptr & child, odf_conversion_context * Context);
void serialize(std::wostream & strm); void serialize(std::wostream & strm);
private:
office_element_ptr_array content_; office_element_ptr tracked_changes_;
office_element_ptr_array content_;
}; };
......
...@@ -52,14 +52,14 @@ public: ...@@ -52,14 +52,14 @@ public:
public: public:
text_number() {} text_number() {}
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
virtual void add_text(const std::wstring & Text); virtual void add_text(const std::wstring & Text);
::std::wstring string_; std::wstring string_;
}; };
...@@ -71,7 +71,7 @@ CP_REGISTER_OFFICE_ELEMENT2(text_number); ...@@ -71,7 +71,7 @@ CP_REGISTER_OFFICE_ELEMENT2(text_number);
class text_list_item; class text_list_item;
typedef shared_ptr<text_list_item>::Type text_list_item_ptr; typedef shared_ptr<text_list_item>::Type text_list_item_ptr;
typedef ::std::vector<text_list_item_ptr> text_list_item_ptr_array; typedef std::vector<text_list_item_ptr> text_list_item_ptr_array;
class text_list_item : public office_element_impl<text_list_item> class text_list_item : public office_element_impl<text_list_item>
{ {
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
static const ElementType type = typeTextListItem; static const ElementType type = typeTextListItem;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
static const ElementType type = typeTextListHeader; static const ElementType type = typeTextListHeader;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -109,7 +109,7 @@ void number_time_style::serialize(std::wostream & strm) ...@@ -109,7 +109,7 @@ void number_time_style::serialize(std::wostream & strm)
} }
} }
} }
void number_style_base::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void number_style_base::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"style", L"text-properties") if CP_CHECK_NAME(L"style", L"text-properties")
{ {
...@@ -238,7 +238,7 @@ void number_number::serialize(std::wostream & strm) ...@@ -238,7 +238,7 @@ void number_number::serialize(std::wostream & strm)
} }
} }
void number_number::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void number_number::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"number", L"embedded-text") if CP_CHECK_NAME(L"number", L"embedded-text")
{ {
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -184,7 +184,7 @@ public: ...@@ -184,7 +184,7 @@ public:
static const ElementType type = typeNumberText; static const ElementType type = typeNumberText;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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 serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -206,7 +206,7 @@ public: ...@@ -206,7 +206,7 @@ public:
static const ElementType type = typeNumberNumber; static const ElementType type = typeNumberNumber;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -238,7 +238,7 @@ public: ...@@ -238,7 +238,7 @@ public:
static const ElementType type = typeNumberEmbeddedText; static const ElementType type = typeNumberEmbeddedText;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
virtual void add_text(const std::wstring & Text); virtual void add_text(const std::wstring & Text);
...@@ -260,7 +260,7 @@ public: ...@@ -260,7 +260,7 @@ public:
static const ElementType type = typeNumberScientificNumber; static const ElementType type = typeNumberScientificNumber;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
// number-scientific-number-attlist // number-scientific-number-attlist
...@@ -287,7 +287,7 @@ public: ...@@ -287,7 +287,7 @@ public:
static const ElementType type = typeNumberCurrencySymbol; static const ElementType type = typeNumberCurrencySymbol;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
virtual void add_text(const std::wstring & Text); virtual void add_text(const std::wstring & Text);
...@@ -311,7 +311,7 @@ public: ...@@ -311,7 +311,7 @@ public:
static const ElementType type = typeNumberTextContent; static const ElementType type = typeNumberTextContent;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -335,7 +335,7 @@ public: ...@@ -335,7 +335,7 @@ public:
static const ElementType type = typeNumberDayOfWeek; static const ElementType type = typeNumberDayOfWeek;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -356,7 +356,7 @@ public: ...@@ -356,7 +356,7 @@ public:
static const ElementType type = typeNumberQuarter; static const ElementType type = typeNumberQuarter;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -377,7 +377,7 @@ public: ...@@ -377,7 +377,7 @@ public:
static const ElementType type = typeNumberDay; static const ElementType type = typeNumberDay;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -397,7 +397,7 @@ public: ...@@ -397,7 +397,7 @@ public:
static const ElementType type = typeNumberMonth; static const ElementType type = typeNumberMonth;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(odf_types::Bool) number_textual_; _CP_OPT(odf_types::Bool) number_textual_;
...@@ -420,7 +420,7 @@ public: ...@@ -420,7 +420,7 @@ public:
static const ElementType type = typeNumberYear; static const ElementType type = typeNumberYear;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -440,7 +440,7 @@ public: ...@@ -440,7 +440,7 @@ public:
static const ElementType type = typeNumberHours; static const ElementType type = typeNumberHours;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -460,7 +460,7 @@ public: ...@@ -460,7 +460,7 @@ public:
static const ElementType type = typeNumberMinutes; static const ElementType type = typeNumberMinutes;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -480,7 +480,7 @@ public: ...@@ -480,7 +480,7 @@ public:
static const ElementType type = typeNumberSeconds; static const ElementType type = typeNumberSeconds;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(std::wstring) number_style_; _CP_OPT(std::wstring) number_style_;
...@@ -501,7 +501,7 @@ public: ...@@ -501,7 +501,7 @@ public:
static const ElementType type = typeNumberAmPm; static const ElementType type = typeNumberAmPm;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -519,7 +519,7 @@ public: ...@@ -519,7 +519,7 @@ public:
static const ElementType type = typeNumberFraction; static const ElementType type = typeNumberFraction;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name){CP_NOT_APPLICABLE_ELM();} virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name){CP_NOT_APPLICABLE_ELM();}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
_CP_OPT(int) number_min_integer_digits_; _CP_OPT(int) number_min_integer_digits_;
......
...@@ -169,7 +169,7 @@ void odf_comment_context::set_author(std::wstring author) ...@@ -169,7 +169,7 @@ void odf_comment_context::set_author(std::wstring author)
if ((impl_->comments_.size()<1) || !is_started()) return; if ((impl_->comments_.size()<1) || !is_started()) return;
office_element_ptr elm; office_element_ptr elm;
create_element(L"dc", L"creator",elm,impl_->odf_context_); create_element(L"dc", L"creator", elm, impl_->odf_context_);
dc_creator* creator = dynamic_cast<dc_creator*>(elm.get()); dc_creator* creator = dynamic_cast<dc_creator*>(elm.get());
if (!creator)return; if (!creator)return;
...@@ -183,8 +183,9 @@ void odf_comment_context::set_author(std::wstring author) ...@@ -183,8 +183,9 @@ void odf_comment_context::set_author(std::wstring author)
void odf_comment_context::set_date(std::wstring _date) void odf_comment_context::set_date(std::wstring _date)
{ {
if ((impl_->comments_.size()<1) || !is_started()) return; if ((impl_->comments_.size()<1) || !is_started()) return;
office_element_ptr elm; office_element_ptr elm;
create_element(L"dc", L"date",elm,impl_->odf_context_); create_element(L"dc", L"date", elm, impl_->odf_context_);
dc_date* date = dynamic_cast<dc_date*>(elm.get()); dc_date* date = dynamic_cast<dc_date*>(elm.get());
if (!date)return; if (!date)return;
......
...@@ -58,10 +58,10 @@ namespace odf_writer { ...@@ -58,10 +58,10 @@ namespace odf_writer {
odf_conversion_context::odf_conversion_context(_office_type_document type_, package::odf_document * outputDocument) odf_conversion_context::odf_conversion_context(_office_type_document type_, package::odf_document * outputDocument)
: type (type_), chart_context_ (this), page_layout_context_(this) : type (type_), chart_context_ (this), page_layout_context_(this)
{ {
output_document_ = outputDocument; output_document_ = outputDocument;
current_object_ =0; current_object_ = 0;
applicationFonts_ = new CApplicationFonts(); applicationFonts_ = new CApplicationFonts();
} }
odf_conversion_context::~odf_conversion_context() odf_conversion_context::~odf_conversion_context()
...@@ -174,7 +174,7 @@ void odf_conversion_context::end_document() ...@@ -174,7 +174,7 @@ void odf_conversion_context::end_document()
void odf_conversion_context::start_chart() void odf_conversion_context::start_chart()
{ {
create_object(); create_object();
create_element(L"office", L"chart", objects_.back().content, this,true); create_element(L"office", L"chart", objects_.back().content, this, true);
chart_context_.set_styles_context(styles_context()); chart_context_.set_styles_context(styles_context());
chart_context_.start_chart(get_current_object_element()); chart_context_.start_chart(get_current_object_element());
...@@ -182,12 +182,12 @@ void odf_conversion_context::start_chart() ...@@ -182,12 +182,12 @@ void odf_conversion_context::start_chart()
void odf_conversion_context::start_spreadsheet() void odf_conversion_context::start_spreadsheet()
{ {
create_object(); create_object();
create_element(L"office", L"spreadsheet", objects_.back().content, this,true); create_element(L"office", L"spreadsheet", objects_.back().content, this, true);
} }
void odf_conversion_context::start_text() void odf_conversion_context::start_text()
{ {
create_object(); create_object();
create_element(L"office", L"text", objects_.back().content, this,true); create_element(L"office", L"text", objects_.back().content, this, true);
} }
void odf_conversion_context::create_object() void odf_conversion_context::create_object()
{ {
...@@ -203,7 +203,7 @@ void odf_conversion_context::create_object() ...@@ -203,7 +203,7 @@ void odf_conversion_context::create_object()
objects_.push_back(obj); objects_.push_back(obj);
current_object_ = objects_.size()-1; current_object_ = objects_.size() - 1;
} }
void odf_conversion_context::end_chart() void odf_conversion_context::end_chart()
{ {
...@@ -222,7 +222,7 @@ void odf_conversion_context::end_spreadsheet() ...@@ -222,7 +222,7 @@ void odf_conversion_context::end_spreadsheet()
} }
void odf_conversion_context::end_object() void odf_conversion_context::end_object()
{ {
current_object_ = 0; current_object_ = 0;//main
} }
office_element_ptr & odf_conversion_context::get_current_object_element() office_element_ptr & odf_conversion_context::get_current_object_element()
...@@ -243,7 +243,6 @@ void odf_conversion_context::process_settings(_object & object, bool isRoot) ...@@ -243,7 +243,6 @@ void odf_conversion_context::process_settings(_object & object, bool isRoot)
if (isRoot) if (isRoot)
{ {
} }
} }
void odf_conversion_context::process_styles(_object & object, bool isRoot) void odf_conversion_context::process_styles(_object & object, bool isRoot)
......
...@@ -139,6 +139,7 @@ void odf_notes_context::end_note_content() ...@@ -139,6 +139,7 @@ void odf_notes_context::end_note_content()
{ {
impl_->notes_.back().is_started = false; impl_->notes_.back().is_started = false;
} }
int odf_notes_context::find_by_id(int oox_id, int type) int odf_notes_context::find_by_id(int oox_id, int type)
{ {
for (int i=0; i < impl_->notes_.size(); i++) for (int i=0; i < impl_->notes_.size(); i++)
......
...@@ -255,23 +255,23 @@ void odf_page_layout_context::set_background(_CP_OPT(color) & color, int type) ...@@ -255,23 +255,23 @@ void odf_page_layout_context::set_background(_CP_OPT(color) & color, int type)
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
bool odf_page_layout_context::add_footer(int type) bool odf_page_layout_context::add_footer(int type)
{ {
office_element_ptr elm; root_header_footer_ = office_element_ptr();
if (type == 1) if (type == 1)
{ {
if (even_and_left_headers_) if (even_and_left_headers_)
create_element(L"style", L"footer-left", elm, odf_context_); create_element(L"style", L"footer-left", root_header_footer_, odf_context_);
} }
else if (type == 2) else if (type == 2)
create_element(L"style", L"footer-first", elm, odf_context_); create_element(L"style", L"footer-first", root_header_footer_, odf_context_);
else else
create_element(L"style", L"footer", elm, odf_context_); create_element(L"style", L"footer", root_header_footer_, odf_context_);
if (!elm) return false; if (!root_header_footer_) return false;
if (master_state_list_.empty()) if (master_state_list_.empty())
add_master_page(L""); add_master_page(L"");
master_state_list_.back().add_footer(elm); master_state_list_.back().add_footer(root_header_footer_);
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
//настраить нужно 1 раз //настраить нужно 1 раз
...@@ -313,30 +313,31 @@ bool odf_page_layout_context::add_footer(int type) ...@@ -313,30 +313,31 @@ bool odf_page_layout_context::add_footer(int type)
} }
bool odf_page_layout_context::add_header(int type) bool odf_page_layout_context::add_header(int type)
{ {
office_element_ptr elm; root_header_footer_ = office_element_ptr();
if (type == 1) if (type == 1)
{ {
if (even_and_left_headers_) if (even_and_left_headers_)
create_element(L"style", L"header-left", elm, odf_context_); create_element(L"style", L"header-left", root_header_footer_, odf_context_);
} }
else if (type == 2) else if (type == 2)
create_element(L"style", L"header-first", elm, odf_context_); create_element(L"style", L"header-first", root_header_footer_, odf_context_);
else else
create_element(L"style", L"header", elm, odf_context_); create_element(L"style", L"header", root_header_footer_, odf_context_);
if (!elm) return false; if (!root_header_footer_) return false;
if (master_state_list_.empty()) if (master_state_list_.empty())
add_master_page(L""); add_master_page(L"");
master_state_list_.back().add_header(elm); master_state_list_.back().add_header(root_header_footer_);
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//настроить нужно один раз //настроить нужно один раз
if (!layout_state_list_.back().header_size_) return true; if (!layout_state_list_.back().header_size_) return true;
style_header_footer_properties * header_props = get_header_properties(); style_header_footer_properties * header_props = get_header_properties();
if (!header_props)return true; if (!header_props)return true;
style_page_layout_properties * props = get_properties(); style_page_layout_properties * props = get_properties();
if (!props)return true; if (!props)return true;
......
...@@ -101,8 +101,10 @@ public: ...@@ -101,8 +101,10 @@ public:
void set_page_number_format (_CP_OPT(int) & type, _CP_OPT(int) & start); void set_page_number_format (_CP_OPT(int) & type, _CP_OPT(int) & start);
double current_page_width_; office_element_ptr root_header_footer_; //для топовых элементов в style:footer
bool even_and_left_headers_;
double current_page_width_;
bool even_and_left_headers_;
private: private:
......
...@@ -110,7 +110,7 @@ void odf_master_state::add_footer(office_element_ptr & elm) ...@@ -110,7 +110,7 @@ void odf_master_state::add_footer(office_element_ptr & elm)
style_->add_child_element(elm); style_->add_child_element(elm);
odf_element_state state = {elm,L"",office_element_ptr(), 1}; odf_element_state state = {elm, L"", office_element_ptr(), 1};
elements_.push_back(state); elements_.push_back(state);
} }
...@@ -121,7 +121,7 @@ void odf_master_state::add_header(office_element_ptr & elm) ...@@ -121,7 +121,7 @@ void odf_master_state::add_header(office_element_ptr & elm)
style_->add_child_element(elm); style_->add_child_element(elm);
odf_element_state state = {elm,L"",office_element_ptr(), 1}; odf_element_state state = {elm, L"", office_element_ptr(), 1};
elements_.push_back(state); elements_.push_back(state);
} }
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
relationship(const std::wstring & Type,const std::wstring & Target) : type_(Type), target_(Target) relationship(const std::wstring & Type,const std::wstring & Target) : type_(Type), target_(Target)
{} {}
void serialize(::std::wostream & _Wostream); void serialize(std::wostream & _Wostream);
const std::wstring & type() const { return type_; } const std::wstring & type() const { return type_; }
const std::wstring & target() const { return target_; } const std::wstring & target() const { return target_; }
......
...@@ -281,14 +281,15 @@ void odf_text_context::start_element(office_element_ptr & elm, office_element_pt ...@@ -281,14 +281,15 @@ void odf_text_context::start_element(office_element_ptr & elm, office_element_pt
odf_element_state state={elm, style_name, style_elm, level}; odf_element_state state={elm, style_name, style_elm, level};
text_elements_list_.push_back(state); text_elements_list_.push_back(state);
if (current_level_.size()>0)
if (!current_level_.empty())
current_level_.back().elm->add_child_element(elm); current_level_.back().elm->add_child_element(elm);
current_level_.push_back(state); current_level_.push_back(state);
} }
void odf_text_context::end_element() void odf_text_context::end_element()
{ {
if (single_paragraph_ == false && current_level_.size() > 0) if (single_paragraph_ == false && !current_level_.empty())
{ {
current_level_.pop_back(); current_level_.pop_back();
} }
...@@ -533,7 +534,7 @@ void odf_text_context::save_property_break() ...@@ -533,7 +534,7 @@ void odf_text_context::save_property_break()
if (paragraph_properties_ == NULL) if (paragraph_properties_ == NULL)
{ {
for (unsigned int i = current_level_.size()-1; i>=0; i--) for (int i = current_level_.size() - 1; i >= 0; i--)
{ {
office_element_ptr & elm = current_level_[i].elm; office_element_ptr & elm = current_level_[i].elm;
...@@ -543,7 +544,7 @@ void odf_text_context::save_property_break() ...@@ -543,7 +544,7 @@ void odf_text_context::save_property_break()
if ((p || h) && !current_level_[i].style_elm) if ((p || h) && !current_level_[i].style_elm)
{ {
styles_context_->create_style(L"",odf_types::style_family::Paragraph, true, false, -1); styles_context_->create_style(L"", odf_types::style_family::Paragraph, true, false, -1);
odf_style_state_ptr style_ = styles_context_->last_state(); odf_style_state_ptr style_ = styles_context_->last_state();
if (style_) if (style_)
{ {
...@@ -563,23 +564,29 @@ void odf_text_context::save_property_break() ...@@ -563,23 +564,29 @@ void odf_text_context::save_property_break()
need_break_ = boost::none; need_break_ = boost::none;
} }
void odf_text_context::set_type_break(int type, int clear) bool odf_text_context::set_type_break(int type, int clear)//todooo clear ???
{ {
//brclearAll = 0, bool need_restart = false;
//brclearLeft = 1,
//brclearNone = 2,
//brclearRight = 3
if (type == -1) if (type == -1)
{ {
need_break_= boost::none; need_break_ = boost::none;
} }
else if (type == 0)//brtypeColumn else if (type == 0)//brtypeColumn
{ {
need_break_= fo_break(fo_break::Column); need_break_ = fo_break(fo_break::Column);
need_restart = true;
} }
else if (type == 1)//brtypePage else if (type == 1)//brtypePage
{ {
need_break_ = fo_break(fo_break::Page); office_element_ptr elm;
create_element(L"text", L"soft-page-break", elm, odf_context_);
start_element(elm);
end_element();
need_break_ = fo_break(fo_break::Page);
need_restart = true;
} }
else //brtypeTextWrapping else //brtypeTextWrapping
{ {
...@@ -589,7 +596,7 @@ void odf_text_context::set_type_break(int type, int clear) ...@@ -589,7 +596,7 @@ void odf_text_context::set_type_break(int type, int clear)
if (current_level_.size()>0) if (current_level_.size()>0)
current_level_.back().elm->add_child_element(elm); current_level_.back().elm->add_child_element(elm);
} }
return need_restart;
} }
bool odf_text_context::set_master_page_name (std::wstring & master_page_name) bool odf_text_context::set_master_page_name (std::wstring & master_page_name)
......
...@@ -53,8 +53,8 @@ class style_text_properties; ...@@ -53,8 +53,8 @@ class style_text_properties;
class odf_text_context: boost::noncopyable class odf_text_context: boost::noncopyable
{ {
public: public:
odf_text_context(odf_conversion_context *odf_context); odf_text_context (odf_conversion_context *odf_context);
~odf_text_context(); ~odf_text_context ();
public: public:
odf_style_context* get_styles_context();//для embedded odf_style_context* get_styles_context();//для embedded
void set_styles_context(odf_style_context* styles_context);//для embedded void set_styles_context(odf_style_context* styles_context);//для embedded
...@@ -75,7 +75,6 @@ public: ...@@ -75,7 +75,6 @@ public:
void start_paragraph (office_element_ptr & elm, bool styled = false); void start_paragraph (office_element_ptr & elm, bool styled = false);
void end_paragraph (); void end_paragraph ();
void start_element (office_element_ptr & elm, office_element_ptr style_elm = office_element_ptr(),std::wstring style_name = L""); void start_element (office_element_ptr & elm, office_element_ptr style_elm = office_element_ptr(),std::wstring style_name = L"");
void end_element (); void end_element ();
...@@ -92,25 +91,24 @@ public: ...@@ -92,25 +91,24 @@ public:
void end_list (); void end_list ();
bool is_need_break (){return bool(need_break_);} bool is_need_break (){return bool(need_break_);}
void set_type_break (int type, int clear); bool set_type_break (int type, int clear);
void save_property_break(); void save_property_break();
void add_tab(_CP_OPT(int) ref); void add_tab (_CP_OPT(int) ref = boost::none);
void set_outline_level (int level);
bool get_list_item_state() {return list_state_.levels.size() > 0 ? list_state_.levels.back() : false;}
void set_parent_paragraph_style (std::wstring & style_name); void set_parent_paragraph_style (std::wstring & style_name);
void set_parent_span_style (std::wstring & style_name); void set_parent_span_style (std::wstring & style_name);
bool set_master_page_name (std::wstring & master_page_name); bool set_master_page_name (std::wstring & master_page_name);
bool get_KeepNextParagraph () {return keep_next_paragraph_;}
void set_KeepNextParagraph (bool val) {keep_next_paragraph_ = val;}
style_text_properties *get_text_properties () {return text_properties_;} style_text_properties *get_text_properties () {return text_properties_;}
style_paragraph_properties *get_paragraph_properties () {return paragraph_properties_;} style_paragraph_properties *get_paragraph_properties () {return paragraph_properties_;}
void set_outline_level (int level);
bool get_KeepNextParagraph () {return keep_next_paragraph_;}
void set_KeepNextParagraph (bool val) {keep_next_paragraph_ = val;}
bool get_list_item_state () {return list_state_.levels.size() > 0 ? list_state_.levels.back() : false;}
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
int current_outline_; int current_outline_;
bool in_field_; bool in_field_;
......
...@@ -79,39 +79,39 @@ public: ...@@ -79,39 +79,39 @@ public:
odf_comment_context * comment_context(); odf_comment_context * comment_context();
odf_table_context * table_context(); odf_table_context * table_context();
void start_drawings(); void start_drawings ();
void end_drawings(); void end_drawings ();
virtual void start_image(const std::wstring & image_file_name); virtual void start_image(const std::wstring & image_file_name);
void add_text_content (const std::wstring & text); void add_text_content (const std::wstring & text);
void start_paragraph(bool styled = false); void start_paragraph (bool styled = false);
void end_paragraph(); void end_paragraph ();
void add_page_break(); void add_paragraph_break(int type);
void start_hyperlink(std::wstring ref); void start_hyperlink (std::wstring ref);
void end_hyperlink(); void end_hyperlink ();
void start_field(bool in_span); void start_field (bool in_span);
void end_field(); void end_field ();
void set_field_instr(std::wstring instr); void set_field_instr (std::wstring instr);
void start_run(bool styled = false); void start_run (bool styled = false);
void end_run(); void end_run ();
void add_section(bool continuous); void add_section (bool continuous);
void add_section_columns(int count, double space_pt, bool separator ); void add_section_columns (int count, double space_pt, bool separator );
void add_section_column(std::vector<std::pair<double,double>> width_space); void add_section_column (std::vector<std::pair<double,double>> width_space);
int get_current_section_columns(); int get_current_section_columns ();
void flush_section(); void flush_section ();
void set_master_page_name(std::wstring master_name); void set_master_page_name(std::wstring master_name);
void start_drop_cap(style_paragraph_properties * paragraph_properties); void start_drop_cap (style_paragraph_properties * paragraph_properties);
void set_drop_cap_lines(int lines); void set_drop_cap_lines (int lines);
void set_drop_cap_margin(bool val); void set_drop_cap_margin(bool val);
void end_drop_cap(); void end_drop_cap ();
bool start_comment (int oox_comment_id); bool start_comment (int oox_comment_id);
void end_comment (int oox_comment_id); void end_comment (int oox_comment_id);
...@@ -123,34 +123,37 @@ public: ...@@ -123,34 +123,37 @@ public:
void end_note_content (); void end_note_content ();
void end_note (); void end_note ();
void start_table(bool styled = false); void start_change (int id, int type, std::wstring &author, std::wstring &userId, std::wstring &date);
void start_table_columns(); void end_change (int id, int type);
void add_table_column(double width = -1);
void end_table_columns(); void start_table (bool styled = false);
void start_table_columns ();
void add_table_column (double width = -1);
void end_table_columns ();
void start_table_header_rows(); void start_table_header_rows();
void end_table_header_rows(); void end_table_header_rows ();
void start_table_row(bool styled = false); void start_table_row (bool styled = false);
void add_default_cell(); void add_default_cell ();
void start_table_cell(int col, bool covered, bool styled = false); void start_table_cell (int col, bool covered, bool styled = false);
void end_table_cell(); void end_table_cell ();
void end_table_row(); void end_table_row ();
void end_table(); void end_table ();
void start_list_item(int level, std::wstring style_name); void start_list_item (int level, std::wstring style_name);
void end_list_item(); void end_list_item ();
void set_no_list(); void set_no_list();
bool is_empty_section(){return current_root_elements_.size() > 0 ? false : true; } bool is_empty_section (){return current_root_elements_.size() > 0 ? false : true; }
bool start_header(int type); bool start_header (int type);
bool start_footer(int type); bool start_footer (int type);
void end_header_footer(); void end_header_footer ();
void add_empty_header(int type); void add_empty_header (int type);
void add_empty_footer(int type); void add_empty_footer (int type);
void set_background(_CP_OPT(color) & color, int type); void set_background (_CP_OPT(color) & color, int type);
bool is_paragraph_in_current_section_; bool is_paragraph_in_current_section_;
...@@ -168,7 +171,7 @@ private: ...@@ -168,7 +171,7 @@ private:
bool is_footer_; bool is_footer_;
std::vector<odf_drawing_context_ptr> drawing_context_; std::vector<odf_drawing_context_ptr> drawing_context_;
std::vector<odf_text_context_ptr> text_context_;//for embedded std::vector<odf_text_context_ptr> text_context_; //for embedded
std::vector<odf_element_state> current_root_elements_; // for section, if needed std::vector<odf_element_state> current_root_elements_; // for section, if needed
std::vector<odt_section_state> sections_; std::vector<odt_section_state> sections_;
...@@ -177,13 +180,19 @@ private: ...@@ -177,13 +180,19 @@ private:
struct _field_state struct _field_state
{ {
bool enabled; bool enabled;
int type; int type;
std::wstring value; std::wstring value;
std::wstring format; std::wstring format;
bool started; bool started;
bool in_span; bool in_span;
}current_field_; }current_field_;
struct _text_changes_state
{
odf_text_context *main_text_context;
int level;
}text_changes_state_;
bool is_hyperlink_; bool is_hyperlink_;
...@@ -194,13 +203,11 @@ private: ...@@ -194,13 +203,11 @@ private:
bool enabled; bool enabled;
style_paragraph_properties *paragraph_properties; style_paragraph_properties *paragraph_properties;
int characters; int characters;
bool inline_style; bool inline_style;
double characters_size_pt; double characters_size_pt;
}drop_cap_state_; }drop_cap_state_;
}; };
......
...@@ -46,7 +46,7 @@ namespace cpdoccore { ...@@ -46,7 +46,7 @@ namespace cpdoccore {
namespace odf_writer { namespace odf_writer {
// dc:date // dc:date
///////////////////////////////////////////// //-------------------------------------------------------------------------------------------------------------------
const wchar_t * dc_date::ns = L"dc"; const wchar_t * dc_date::ns = L"dc";
const wchar_t * dc_date::name = L"date"; const wchar_t * dc_date::name = L"date";
...@@ -65,7 +65,7 @@ void dc_date::serialize(std::wostream & _Wostream) ...@@ -65,7 +65,7 @@ void dc_date::serialize(std::wostream & _Wostream)
} }
} }
// dc:creator // dc:creator
/////////////////////////////////////////// //-------------------------------------------------------------------------------------------------------------------
const wchar_t * dc_creator::ns = L"dc"; const wchar_t * dc_creator::ns = L"dc";
const wchar_t * dc_creator::name = L"creator"; const wchar_t * dc_creator::name = L"creator";
...@@ -83,7 +83,7 @@ void dc_creator::serialize(std::wostream & _Wostream) ...@@ -83,7 +83,7 @@ void dc_creator::serialize(std::wostream & _Wostream)
} }
} }
} }
////////////////////////////////////////////////////////////////////////////////////////////////// //-------------------------------------------------------------------------------------------------------------------
void office_annotation_attr::serialize(CP_ATTR_NODE) void office_annotation_attr::serialize(CP_ATTR_NODE)
{ {
...@@ -103,11 +103,11 @@ void office_annotation_attr::serialize(CP_ATTR_NODE) ...@@ -103,11 +103,11 @@ void office_annotation_attr::serialize(CP_ATTR_NODE)
} }
// office:annotation // office:annotation
////////////////////////////////////////////////////////////////////////////////////////////////// //-------------------------------------------------------------------------------------------------------------------
const wchar_t * office_annotation::ns = L"office"; const wchar_t * office_annotation::ns = L"office";
const wchar_t * office_annotation::name = L"annotation"; const wchar_t * office_annotation::name = L"annotation";
void office_annotation::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void office_annotation::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if (Ns==L"dc" && Name == L"date") if (Ns==L"dc" && Name == L"date")
{ {
...@@ -165,11 +165,11 @@ void office_annotation::serialize(std::wostream & _Wostream) ...@@ -165,11 +165,11 @@ void office_annotation::serialize(std::wostream & _Wostream)
} }
} }
// officeooo:annotation // officeooo:annotation
////////////////////////////////////////////////////////////////////////////////////////////////// //-------------------------------------------------------------------------------------------------------------------
const wchar_t * officeooo_annotation::ns = L"officeooo"; const wchar_t * officeooo_annotation::ns = L"officeooo";
const wchar_t * officeooo_annotation::name = L"annotation"; const wchar_t * officeooo_annotation::name = L"annotation";
void officeooo_annotation::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void officeooo_annotation::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (Ns==L"dc" && Name == L"date") if (Ns==L"dc" && Name == L"date")
{ {
......
...@@ -53,34 +53,32 @@ public: ...@@ -53,34 +53,32 @@ public:
void serialize(CP_ATTR_NODE); void serialize(CP_ATTR_NODE);
public: public:
_CP_OPT(odf_types::length) svg_y_; _CP_OPT(odf_types::length) svg_y_;
_CP_OPT(odf_types::length) svg_x_; _CP_OPT(odf_types::length) svg_x_;
_CP_OPT(odf_types::length) svg_width_; _CP_OPT(odf_types::length) svg_width_;
_CP_OPT(odf_types::length) svg_height_; _CP_OPT(odf_types::length) svg_height_;
_CP_OPT(odf_types::length) caption_point_y_; _CP_OPT(odf_types::length) caption_point_y_;
_CP_OPT(odf_types::length) caption_point_x_; _CP_OPT(odf_types::length) caption_point_x_;
_CP_OPT(odf_types::Bool) display_; _CP_OPT(std::wstring) name_;
_CP_OPT(odf_types::Bool) display_;
_CP_OPT(odf_types::style_ref) draw_text_style_name_; _CP_OPT(odf_types::style_ref) draw_text_style_name_;
_CP_OPT(odf_types::style_ref) draw_style_name_; _CP_OPT(odf_types::style_ref) draw_style_name_;
_CP_OPT(std::wstring) name_;
}; };
/// \brief dc:date
class dc_date : public office_element_impl<dc_date> class dc_date : public office_element_impl<dc_date>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDcDate; static const ElementType type = typeDcDate;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element ( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -91,17 +89,16 @@ public: ...@@ -91,17 +89,16 @@ public:
}; };
CP_REGISTER_OFFICE_ELEMENT2(dc_date); CP_REGISTER_OFFICE_ELEMENT2(dc_date);
/// \brief dc:creator
class dc_creator : public office_element_impl<dc_creator> class dc_creator : public office_element_impl<dc_creator>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeDcCreator; static const ElementType type = typeDcCreator;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -113,17 +110,16 @@ public: ...@@ -113,17 +110,16 @@ public:
}; };
CP_REGISTER_OFFICE_ELEMENT2(dc_creator); CP_REGISTER_OFFICE_ELEMENT2(dc_creator);
/// \brief office:annotation
class office_annotation : public office_element_impl<office_annotation> class office_annotation : public office_element_impl<office_annotation>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotation; static const ElementType type = typeOfficeAnnotation;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -140,17 +136,16 @@ private: ...@@ -140,17 +136,16 @@ private:
}; };
CP_REGISTER_OFFICE_ELEMENT2(office_annotation); CP_REGISTER_OFFICE_ELEMENT2(office_annotation);
/// \brief office:annotation-end
class office_annotation_end : public office_element_impl<office_annotation_end> class office_annotation_end : public office_element_impl<office_annotation_end>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotationEnd; static const ElementType type = typeOfficeAnnotationEnd;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -166,29 +161,28 @@ public: ...@@ -166,29 +161,28 @@ public:
}; };
CP_REGISTER_OFFICE_ELEMENT2(office_annotation_end); CP_REGISTER_OFFICE_ELEMENT2(office_annotation_end);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//officeooo:annotation //----------------------------------------------------------------------------------------------------------
class officeooo_annotation : public office_element_impl<officeooo_annotation> class officeooo_annotation : public office_element_impl<officeooo_annotation>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeAnnotation; static const ElementType type = typeOfficeAnnotation;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
private: private:
office_element_ptr_array content_; office_annotation_attr office_annotation_attr_;
office_annotation_attr office_annotation_attr_; office_element_ptr_array content_;
office_element_ptr dc_date_; office_element_ptr dc_date_;
office_element_ptr dc_creator_; office_element_ptr dc_creator_;
}; };
......
...@@ -52,7 +52,7 @@ const wchar_t * office_body::name = L"body"; ...@@ -52,7 +52,7 @@ const wchar_t * office_body::name = L"body";
office_body::office_body() office_body::office_body()
{} {}
void office_body::create_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_); CP_CREATE_ELEMENT(content_);
} }
......
...@@ -44,14 +44,13 @@ namespace odf_writer { ...@@ -44,14 +44,13 @@ namespace odf_writer {
class office_body; class office_body;
typedef shared_ptr<office_body>::Type office_body_ptr; typedef shared_ptr<office_body>::Type office_body_ptr;
/// \brief office:body
class office_body : public office_element_impl<office_body> class office_body : public office_element_impl<office_body>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeBody; static const ElementType type = typeOfficeBody;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
...@@ -60,7 +59,7 @@ public: ...@@ -60,7 +59,7 @@ public:
public: public:
office_body(); office_body();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -69,7 +68,6 @@ private: ...@@ -69,7 +68,6 @@ private:
office_element_ptr content_; office_element_ptr content_;
}; };
CP_REGISTER_OFFICE_ELEMENT2(office_body); CP_REGISTER_OFFICE_ELEMENT2(office_body);
} }
......
...@@ -50,7 +50,7 @@ namespace odf_writer { ...@@ -50,7 +50,7 @@ namespace odf_writer {
const wchar_t * office_chart::ns = L"office"; const wchar_t * office_chart::ns = L"office";
const wchar_t * office_chart::name = L"chart"; const wchar_t * office_chart::name = L"chart";
void office_chart::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void office_chart::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -89,7 +89,7 @@ const wchar_t * chart_chart::ns = L"chart"; ...@@ -89,7 +89,7 @@ const wchar_t * chart_chart::ns = L"chart";
const wchar_t * chart_chart::name = L"chart"; const wchar_t * chart_chart::name = L"chart";
void chart_chart::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_chart::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -127,7 +127,7 @@ const wchar_t * chart_title::ns = L"chart"; ...@@ -127,7 +127,7 @@ const wchar_t * chart_title::ns = L"chart";
const wchar_t * chart_title::name = L"title"; const wchar_t * chart_title::name = L"title";
void chart_title::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_title::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"text", L"p") if CP_CHECK_NAME(L"text", L"p")
{ {
...@@ -157,7 +157,7 @@ void chart_title::add_child_element( const office_element_ptr & child_element) ...@@ -157,7 +157,7 @@ void chart_title::add_child_element( const office_element_ptr & child_element)
const wchar_t * chart_subtitle::ns = L"chart"; const wchar_t * chart_subtitle::ns = L"chart";
const wchar_t * chart_subtitle::name = L"subtitle"; const wchar_t * chart_subtitle::name = L"subtitle";
void chart_subtitle::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_subtitle::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"text", L"p") if CP_CHECK_NAME(L"text", L"p")
{ {
...@@ -186,7 +186,7 @@ void chart_subtitle::add_child_element( const office_element_ptr & child_element ...@@ -186,7 +186,7 @@ void chart_subtitle::add_child_element( const office_element_ptr & child_element
const wchar_t * chart_footer::ns = L"chart"; const wchar_t * chart_footer::ns = L"chart";
const wchar_t * chart_footer::name = L"footer"; const wchar_t * chart_footer::name = L"footer";
void chart_footer::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_footer::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"text", L"p") if CP_CHECK_NAME(L"text", L"p")
{ {
...@@ -259,7 +259,7 @@ void chart_plot_area_attlist::serialize(CP_ATTR_NODE) ...@@ -259,7 +259,7 @@ void chart_plot_area_attlist::serialize(CP_ATTR_NODE)
const wchar_t * chart_plot_area::ns = L"chart"; const wchar_t * chart_plot_area::ns = L"chart";
const wchar_t * chart_plot_area::name = L"plot-area"; const wchar_t * chart_plot_area::name = L"plot-area";
void chart_plot_area::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_plot_area::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -336,7 +336,7 @@ void chart_axis_attlist::serialize(CP_ATTR_NODE) ...@@ -336,7 +336,7 @@ void chart_axis_attlist::serialize(CP_ATTR_NODE)
const wchar_t * chart_axis::ns = L"chart"; const wchar_t * chart_axis::ns = L"chart";
const wchar_t * chart_axis::name = L"axis"; const wchar_t * chart_axis::name = L"axis";
void chart_axis::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_axis::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -415,7 +415,7 @@ void chart_series_attlist::serialize(CP_ATTR_NODE) ...@@ -415,7 +415,7 @@ void chart_series_attlist::serialize(CP_ATTR_NODE)
const wchar_t * chart_series::ns = L"chart"; const wchar_t * chart_series::ns = L"chart";
const wchar_t * chart_series::name = L"series"; const wchar_t * chart_series::name = L"series";
void chart_series::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_series::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -512,7 +512,7 @@ void chart_error_indicator::serialize(std::wostream & _Wostream) ...@@ -512,7 +512,7 @@ void chart_error_indicator::serialize(std::wostream & _Wostream)
const wchar_t * chart_regression_curve::ns = L"chart"; const wchar_t * chart_regression_curve::ns = L"chart";
const wchar_t * chart_regression_curve::name = L"regression-curve"; const wchar_t * chart_regression_curve::name = L"regression-curve";
void chart_regression_curve::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void chart_regression_curve::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"chart", L"equation") if CP_CHECK_NAME(L"chart", L"equation")
{ {
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
static const ElementType type = typeOfficeChart; static const ElementType type = typeOfficeChart;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
static const ElementType type = typeChartChart; static const ElementType type = typeChartChart;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
static const ElementType type = typeChartTitle; static const ElementType type = typeChartTitle;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -149,7 +149,7 @@ public: ...@@ -149,7 +149,7 @@ public:
static const ElementType type = typeChartSubtitle; static const ElementType type = typeChartSubtitle;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -171,7 +171,7 @@ public: ...@@ -171,7 +171,7 @@ public:
static const ElementType type = typeChartFooter; static const ElementType type = typeChartFooter;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -210,7 +210,7 @@ public: ...@@ -210,7 +210,7 @@ public:
static const ElementType type = typeChartLegend; static const ElementType type = typeChartLegend;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -249,7 +249,7 @@ public: ...@@ -249,7 +249,7 @@ public:
static const ElementType type = typeChartPlotArea; static const ElementType type = typeChartPlotArea;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -280,7 +280,7 @@ public: ...@@ -280,7 +280,7 @@ public:
static const ElementType type = typeChartWall; static const ElementType type = typeChartWall;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -301,7 +301,7 @@ public: ...@@ -301,7 +301,7 @@ public:
static const ElementType type = typeChartFloor; static const ElementType type = typeChartFloor;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -332,7 +332,7 @@ public: ...@@ -332,7 +332,7 @@ public:
static const ElementType type = typeChartAxis; static const ElementType type = typeChartAxis;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -364,7 +364,7 @@ public: ...@@ -364,7 +364,7 @@ public:
static const ElementType type = typeChartGrid; static const ElementType type = typeChartGrid;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -385,7 +385,7 @@ public: ...@@ -385,7 +385,7 @@ public:
static const ElementType type = typeChartCategories; static const ElementType type = typeChartCategories;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -419,7 +419,7 @@ public: ...@@ -419,7 +419,7 @@ public:
static const ElementType type = typeChartSeries; static const ElementType type = typeChartSeries;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -441,7 +441,7 @@ public: ...@@ -441,7 +441,7 @@ public:
static const ElementType type = typeChartDomain; static const ElementType type = typeChartDomain;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -471,7 +471,7 @@ public: ...@@ -471,7 +471,7 @@ public:
static const ElementType type = typeChartDataPoint; static const ElementType type = typeChartDataPoint;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -492,7 +492,7 @@ public: ...@@ -492,7 +492,7 @@ public:
static const ElementType type = typeChartMeanValue; static const ElementType type = typeChartMeanValue;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -513,7 +513,7 @@ public: ...@@ -513,7 +513,7 @@ public:
static const ElementType type = typeChartErrorIndicator; static const ElementType type = typeChartErrorIndicator;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -533,7 +533,7 @@ public: ...@@ -533,7 +533,7 @@ public:
static const ElementType type = typeChartEquation; static const ElementType type = typeChartEquation;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){}//??? virtual void add_child_element( const office_element_ptr & child_element){}//???
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -555,7 +555,7 @@ public: ...@@ -555,7 +555,7 @@ public:
static const ElementType type = typeChartRegressionCurve; static const ElementType type = typeChartRegressionCurve;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -576,7 +576,7 @@ public: ...@@ -576,7 +576,7 @@ public:
static const ElementType type = typeChartStockGainMarker; static const ElementType type = typeChartStockGainMarker;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -597,7 +597,7 @@ public: ...@@ -597,7 +597,7 @@ public:
static const ElementType type = typeChartStockLossMarker; static const ElementType type = typeChartStockLossMarker;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -618,7 +618,7 @@ public: ...@@ -618,7 +618,7 @@ public:
static const ElementType type = typeChartStockRangeLine; static const ElementType type = typeChartStockRangeLine;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -75,13 +75,13 @@ public: ...@@ -75,13 +75,13 @@ public:
void set_root(bool root){is_root_ = root;} void set_root(bool root){is_root_ = root;}
//////////////////////// ////////////////////////
virtual ::std::wostream & serialize(::std::wostream & _Wostream) const virtual std::wostream & serialize(std::wostream & _Wostream) const
{ {
_CP_LOG << L"[warning] use base text_to_stream\n"; _CP_LOG << L"[warning] use base text_to_stream\n";
return _Wostream; return _Wostream;
} }
virtual ::std::wostream & xml_to_stream(::std::wostream & _Wostream) const virtual std::wostream & xml_to_stream(std::wostream & _Wostream) const
{ {
_CP_LOG << L"[warning] use base xml_to_stream\n"; _CP_LOG << L"[warning] use base xml_to_stream\n";
return _Wostream; return _Wostream;
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
* *
*/ */
#include "office_elements_create.h" #include "office_elements_create.h"
#include <iostream> #include <iostream>
...@@ -45,7 +44,7 @@ office_element_creator::office_element_creator() ...@@ -45,7 +44,7 @@ office_element_creator::office_element_creator()
{ {
} }
office_element_ptr office_element_creator::create(const ::std::wstring & ns, const ::std::wstring & name, odf_conversion_context * Context, bool isRoot) const office_element_ptr office_element_creator::create(const std::wstring & ns, const std::wstring & name, odf_conversion_context * Context, bool isRoot) const
{ {
const std::wstring fullName = ns + (ns.size() > 0 ? L":" : L"") + name; const std::wstring fullName = ns + (ns.size() > 0 ? L":" : L"") + name;
...@@ -124,8 +123,8 @@ void not_applicable_element(const office_element * CurrentElm, const std::wstrin ...@@ -124,8 +123,8 @@ void not_applicable_element(const office_element * CurrentElm, const std::wstrin
not_applicable_element(ss.str(), Ns, Name); not_applicable_element(ss.str(), Ns, Name);
} }
bool create_element(const ::std::wstring & Ns, bool create_element(const std::wstring & Ns,
const ::std::wstring & Name, const std::wstring & Name,
office_element_ptr & _Element, office_element_ptr & _Element,
odf_conversion_context * Context, odf_conversion_context * Context,
bool isRoot) bool isRoot)
...@@ -149,8 +148,8 @@ bool create_element(const ::std::wstring & Ns, ...@@ -149,8 +148,8 @@ bool create_element(const ::std::wstring & Ns,
return false; return false;
} }
bool create_element(const ::std::wstring & Ns, bool create_element(const std::wstring & Ns,
const ::std::wstring & Name, const std::wstring & Name,
office_element_ptr_array & _Elements, office_element_ptr_array & _Elements,
odf_conversion_context * Context, odf_conversion_context * Context,
bool isRoot) bool isRoot)
......
...@@ -64,10 +64,10 @@ public: ...@@ -64,10 +64,10 @@ public:
bool register_element(const std::wstring &ns, const std::wstring & name, CreateFuncImpl f); bool register_element(const std::wstring &ns, const std::wstring & name, CreateFuncImpl f);
// Создать элемент по имени // Создать элемент по имени
office_element_ptr create(const ::std::wstring & ns, const ::std::wstring & name, odf_conversion_context * Context = NULL, bool isRoot = false) const; office_element_ptr create(const std::wstring & ns, const std::wstring & name, odf_conversion_context * Context = NULL, bool isRoot = false) const;
private: private:
typedef std::map<::std::wstring, CreateFuncImpl> MapType; typedef std::map<std::wstring, CreateFuncImpl> MapType;
MapType map_; MapType map_;
public: public:
...@@ -120,8 +120,8 @@ bool create_element(const std::wstring & Ns, ...@@ -120,8 +120,8 @@ bool create_element(const std::wstring & Ns,
odf_conversion_context * Context, odf_conversion_context * Context,
bool isRoot = false); bool isRoot = false);
bool create_element(const ::std::wstring & Ns, bool create_element(const std::wstring & Ns,
const ::std::wstring & Name, const std::wstring & Name,
office_element_ptr_array & _Elements, office_element_ptr_array & _Elements,
odf_conversion_context * Context, odf_conversion_context * Context,
bool isRoot = false); bool isRoot = false);
......
...@@ -87,6 +87,18 @@ enum ElementType ...@@ -87,6 +87,18 @@ enum ElementType
typeTextSectionSource, typeTextSectionSource,
typeTextIndexTitle, typeTextIndexTitle,
typeTextIndexBody, typeTextIndexBody,
typeTextTrackedChanges,
typeTextChangedRegion,
typeTextChangeStart,
typeTextChangeEnd,
typeTextChange,
typeOfficeChangeInfo,
typeTextUnknownChange,
typeTextDeletion,
typeTextFormatChange,
typeTextInsertion,
typeTextNumberedParagraph, typeTextNumberedParagraph,
...@@ -188,7 +200,17 @@ enum ElementType ...@@ -188,7 +200,17 @@ enum ElementType
typeTableTableRowGroup, typeTableTableRowGroup,
typeTableTableRowNoGroup, typeTableTableRowNoGroup,
typeOfficeBody, typeTableShapes,
typeTableCalculationSettings,
typeTableNullDate,
typeTableTrackedChanges,
typeTableChangeTrackTableCell,
typeTableCellContentChange,
typeTableDeletion,
typeTablePrevious,
typeOfficeBody,
typeOfficeText, typeOfficeText,
typeOfficeDocument, typeOfficeDocument,
typeOfficeDocumentContent, typeOfficeDocumentContent,
...@@ -278,8 +300,7 @@ enum ElementType ...@@ -278,8 +300,7 @@ enum ElementType
typeScriptEventListener, typeScriptEventListener,
typeTableCalculationSettings,
typeTableNullDate,
typeNumberNumberStyle, typeNumberNumberStyle,
typeNumberDataStyle, typeNumberDataStyle,
...@@ -303,7 +324,6 @@ enum ElementType ...@@ -303,7 +324,6 @@ enum ElementType
typeNumberMinutes, typeNumberMinutes,
typeNumberSeconds, typeNumberSeconds,
typeNumberAmPm, typeNumberAmPm,
typeTableShapes,
typeChartChart, typeChartChart,
typeChartTitle, typeChartTitle,
......
...@@ -45,7 +45,7 @@ namespace odf_writer { ...@@ -45,7 +45,7 @@ namespace odf_writer {
const wchar_t * office_settings::ns = L"office"; const wchar_t * office_settings::ns = L"office";
const wchar_t * office_settings::name = L"settings"; const wchar_t * office_settings::name = L"settings";
void office_settings::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void office_settings::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -73,7 +73,7 @@ void office_settings::add_child_element( const office_element_ptr & child_elemen ...@@ -73,7 +73,7 @@ void office_settings::add_child_element( const office_element_ptr & child_elemen
const wchar_t * settings_config_item_set::ns = L"config"; const wchar_t * settings_config_item_set::ns = L"config";
const wchar_t * settings_config_item_set::name = L"config-item-set"; const wchar_t * settings_config_item_set::name = L"config-item-set";
void settings_config_item_set::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void settings_config_item_set::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -104,7 +104,7 @@ void settings_config_item_set::add_child_element( const office_element_ptr & chi ...@@ -104,7 +104,7 @@ void settings_config_item_set::add_child_element( const office_element_ptr & chi
const wchar_t * settings_config_item::ns = L"config"; const wchar_t * settings_config_item::ns = L"config";
const wchar_t * settings_config_item::name = L"config-item"; const wchar_t * settings_config_item::name = L"config-item";
void settings_config_item::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void settings_config_item::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
} }
...@@ -132,7 +132,7 @@ const wchar_t * settings_config_item_map_indexed::ns = L"config"; ...@@ -132,7 +132,7 @@ const wchar_t * settings_config_item_map_indexed::ns = L"config";
const wchar_t * settings_config_item_map_indexed::name = L"config-item-map-indexed"; const wchar_t * settings_config_item_map_indexed::name = L"config-item-map-indexed";
void settings_config_item_map_indexed::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void settings_config_item_map_indexed::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -161,7 +161,7 @@ void settings_config_item_map_indexed::add_child_element( const office_element_p ...@@ -161,7 +161,7 @@ void settings_config_item_map_indexed::add_child_element( const office_element_p
const wchar_t * settings_config_item_map_named::ns = L"config"; const wchar_t * settings_config_item_map_named::ns = L"config";
const wchar_t * settings_config_item_map_named::name = L"config-item-map-named"; const wchar_t * settings_config_item_map_named::name = L"config-item-map-named";
void settings_config_item_map_named::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void settings_config_item_map_named::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
...@@ -190,7 +190,7 @@ void settings_config_item_map_named::add_child_element( const office_element_ptr ...@@ -190,7 +190,7 @@ void settings_config_item_map_named::add_child_element( const office_element_ptr
const wchar_t * settings_config_item_map_entry::ns = L"config"; const wchar_t * settings_config_item_map_entry::ns = L"config";
const wchar_t * settings_config_item_map_entry::name = L"config-item-map-entry"; const wchar_t * settings_config_item_map_entry::name = L"config-item-map-entry";
void settings_config_item_map_entry::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void settings_config_item_map_entry::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
static const ElementType type = typeOfficeSettings; static const ElementType type = typeOfficeSettings;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -73,7 +73,7 @@ public: ...@@ -73,7 +73,7 @@ public:
static const ElementType type = typeOfficeSettingsConfigItemSet; static const ElementType type = typeOfficeSettingsConfigItemSet;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
static const ElementType type = typeOfficeSettingsConfigItem; static const ElementType type = typeOfficeSettingsConfigItem;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -114,7 +114,7 @@ public: ...@@ -114,7 +114,7 @@ public:
static const ElementType type = typeOfficeSettingsConfigItemMapIndexed; static const ElementType type = typeOfficeSettingsConfigItemMapIndexed;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -134,7 +134,7 @@ public: ...@@ -134,7 +134,7 @@ public:
static const ElementType type = typeOfficeSettingsConfigItemMapNamed; static const ElementType type = typeOfficeSettingsConfigItemMapNamed;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -154,7 +154,7 @@ public: ...@@ -154,7 +154,7 @@ public:
static const ElementType type = typeOfficeSettingsConfigItemMapEntry; static const ElementType type = typeOfficeSettingsConfigItemMapEntry;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -44,12 +44,11 @@ ...@@ -44,12 +44,11 @@
namespace cpdoccore { namespace cpdoccore {
namespace odf_writer { namespace odf_writer {
// office:spreadsheet
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * office_spreadsheet::ns = L"office"; const wchar_t * office_spreadsheet::ns = L"office";
const wchar_t * office_spreadsheet::name = L"spreadsheet"; const wchar_t * office_spreadsheet::name = L"spreadsheet";
void office_spreadsheet::create_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_); CP_CREATE_ELEMENT(content_);
} }
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
office_element_ptr_array & getContent(){return content_;} office_element_ptr_array & getContent(){return content_;}
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -67,8 +67,6 @@ bool is_text_content(const std::wstring & ns, const std::wstring & name) ...@@ -67,8 +67,6 @@ bool is_text_content(const std::wstring & ns, const std::wstring & name)
name == L"user-index" || name == L"user-index" ||
name == L"alphabetical-index" || name == L"alphabetical-index" ||
name == L"bibliography" || name == L"bibliography" ||
// change-marks
name == L"change" || name == L"change" ||
name == L"change-start" || name == L"change-start" ||
name == L"change-end" name == L"change-end"
...@@ -92,19 +90,40 @@ void office_text_attlist::serialize(CP_ATTR_NODE) ...@@ -92,19 +90,40 @@ void office_text_attlist::serialize(CP_ATTR_NODE)
{ {
CP_XML_ATTR_OPT(L"text:use-soft-page-breaks", text_use_soft_page_breaks_); CP_XML_ATTR_OPT(L"text:use-soft-page-breaks", text_use_soft_page_breaks_);
} }
void office_text::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void office_text::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (is_text_content(Ns, Name)) if (is_text_content(Ns, Name))
{ {
CP_CREATE_ELEMENT(content_); CP_CREATE_ELEMENT(content_);
} }
else if CP_CHECK_NAME(L"text", L"tracked-changes")
{
CP_CREATE_ELEMENT(tracked_changes_);
}
else else
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
} }
void office_text::add_child_element( const office_element_ptr & child_element) void office_text::add_child_element( const office_element_ptr & child_element)
{ {
content_.push_back(child_element); if (!child_element) return;
switch(child_element->get_type())
{
case typeTextTrackedChanges:
{
tracked_changes_ = child_element;
}break;
case typeTextChangedRegion:
{
if (!tracked_changes_)
create_child_element(L"text", L"tracked-changes");
tracked_changes_->add_child_element(child_element);
}break;
default:
content_.push_back(child_element);
}
} }
void office_text::serialize(std::wostream & _Wostream) void office_text::serialize(std::wostream & _Wostream)
{ {
...@@ -114,12 +133,51 @@ void office_text::serialize(std::wostream & _Wostream) ...@@ -114,12 +133,51 @@ void office_text::serialize(std::wostream & _Wostream)
{ {
office_text_attlist_.serialize(CP_GET_XML_NODE()); office_text_attlist_.serialize(CP_GET_XML_NODE());
BOOST_FOREACH(office_element_ptr & elm, content_) if (tracked_changes_)
tracked_changes_->serialize(CP_XML_STREAM());
for (int i = 0; i < content_.size(); i++)
{ {
elm->serialize(CP_XML_STREAM()); content_[i]->serialize(CP_XML_STREAM());
} }
} }
} }
} }
// office:change-info
//-------------------------------------------------------------------------------------------------------------------
const wchar_t * office_change_info::ns = L"office";
const wchar_t * office_change_info::name = L"change-info";
void office_change_info::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{
if (Ns==L"dc" && Name == L"date")
{
CP_CREATE_ELEMENT(dc_date_);
}
else if (Ns==L"dc" && Name == L"creator")
{
CP_CREATE_ELEMENT(dc_creator_);
}
}
void office_change_info::add_child_element( const office_element_ptr & child_element)
{
ElementType type = child_element->get_type();
if (type == typeDcCreator)
dc_creator_ = child_element;
else if (type == typeDcDate)
dc_date_ = child_element;
}
void office_change_info::serialize(std::wostream & _Wostream)
{
CP_XML_WRITER(_Wostream)
{
CP_XML_NODE_SIMPLE()
{
if (dc_creator_)dc_creator_->serialize (CP_XML_STREAM());
if (dc_date_) dc_date_->serialize (CP_XML_STREAM());
}
}
}
} }
} }
...@@ -45,52 +45,66 @@ ...@@ -45,52 +45,66 @@
namespace cpdoccore { namespace cpdoccore {
namespace odf_writer { namespace odf_writer {
//office_text_attlist
class office_text_attlist class office_text_attlist
{ {
public: public:
_CP_OPT(odf_types::Bool) text_use_soft_page_breaks_; _CP_OPT(odf_types::Bool) text_use_soft_page_breaks_;
void serialize(CP_ATTR_NODE); void serialize(CP_ATTR_NODE);
}; };
/// \brief office:text
class office_text : public office_element_impl<office_text> class office_text : public office_element_impl<office_text>
{ {
public: public:
static const wchar_t * ns; static const wchar_t * ns;
static const wchar_t * name; static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeText; static const ElementType type = typeOfficeText;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
// virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ); office_text_attlist office_text_attlist_;
// virtual void add_child_element(const xml::sax * Reader, const ::std::wstring & Ns, const ::std::wstring & Name);
// virtual void add_text(const std::wstring & Text);
office_text_attlist office_text_attlist_;
private: private:
bool text_global_; office_element_ptr tracked_changes_;
// TODO: office-text-content-prelude: office_element_ptr_array content_;
// TODO: office-forms
// TODO: text-tracked-changes // TODO: office-text-content-prelude:
// TODO: text-decls // TODO: office-forms
// TODO: table-decls // TODO: text-decls
// TODO: table-decls
office_element_ptr_array content_; // TODO: text-page-sequence
// TODO: text-page-sequence
// TODO: office-text-content-epilogue: // TODO: office-text-content-epilogue:
// TODO: table-functions // TODO: table-functions
};
CP_REGISTER_OFFICE_ELEMENT2(office_text)
//-------------------------------------------------------------------------------------
class office_change_info : public office_element_impl<office_change_info>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeOfficeChangeInfo;
CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream);
private:
office_element_ptr dc_date_;
office_element_ptr dc_creator_;
}; };
CP_REGISTER_OFFICE_ELEMENT2(office_change_info)
CP_REGISTER_OFFICE_ELEMENT2(office_text)
} }
} }
......
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
...@@ -161,7 +161,7 @@ public: ...@@ -161,7 +161,7 @@ public:
graphic_format_properties & content(){ return graphic_format_properties_; } graphic_format_properties & content(){ return graphic_format_properties_; }
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
...@@ -50,7 +50,7 @@ namespace odf_writer { ...@@ -50,7 +50,7 @@ namespace odf_writer {
const wchar_t * style_map::ns = L"style"; const wchar_t * style_map::ns = L"style";
const wchar_t * style_map::name = L"map"; const wchar_t * style_map::name = L"map";
void style_map::create_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(); CP_NOT_APPLICABLE_ELM();
} }
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
static const ElementType type = typeStyleMap; static const ElementType type = typeStyleMap;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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 serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
std::wstring style_condition_; std::wstring style_condition_;
......
...@@ -159,7 +159,7 @@ void style_page_layout_properties_attlist::serialize(CP_ATTR_NODE) ...@@ -159,7 +159,7 @@ void style_page_layout_properties_attlist::serialize(CP_ATTR_NODE)
const wchar_t * style_page_layout_properties::ns = L"style"; const wchar_t * style_page_layout_properties::ns = L"style";
const wchar_t * style_page_layout_properties::name = L"page-layout-properties"; const wchar_t * style_page_layout_properties::name = L"page-layout-properties";
void style_page_layout_properties::create_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_.create_child_element( Ns, Name, getContext()); style_page_layout_properties_elements_.create_child_element( Ns, Name, getContext());
} }
...@@ -182,7 +182,7 @@ void style_page_layout_properties::serialize(std::wostream & strm) ...@@ -182,7 +182,7 @@ void style_page_layout_properties::serialize(std::wostream & strm)
} }
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void style_page_layout_properties_elements::create_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) if (L"style" == Ns && L"background-image" == Name)
{ {
......
...@@ -103,7 +103,7 @@ public: ...@@ -103,7 +103,7 @@ public:
class style_page_layout_properties_elements class style_page_layout_properties_elements
{ {
public: public:
void create_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( const office_element_ptr & child); void add_child_element( const office_element_ptr & child);
void serialize(std::wostream & strm); void serialize(std::wostream & strm);
...@@ -125,7 +125,7 @@ public: ...@@ -125,7 +125,7 @@ public:
style_page_layout_properties() { } style_page_layout_properties() { }
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
...@@ -137,7 +137,7 @@ void style_background_image::serialize(std::wostream & strm) ...@@ -137,7 +137,7 @@ void style_background_image::serialize(std::wostream & strm)
} }
} }
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void paragraph_format_properties::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name,odf_conversion_context * Context) void paragraph_format_properties::create_child_element(const std::wstring & Ns, const std::wstring & Name,odf_conversion_context * Context)
{ {
if (L"style" == Ns) if (L"style" == Ns)
{ {
...@@ -251,7 +251,7 @@ void paragraph_format_properties::serialize(std::wostream & _Wostream ,const wch ...@@ -251,7 +251,7 @@ void paragraph_format_properties::serialize(std::wostream & _Wostream ,const wch
const wchar_t * style_paragraph_properties::ns = L"style"; const wchar_t * style_paragraph_properties::ns = L"style";
const wchar_t * style_paragraph_properties::name = L"paragraph-properties"; const wchar_t * style_paragraph_properties::name = L"paragraph-properties";
void style_paragraph_properties::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void style_paragraph_properties::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
style_paragraph_properties_content_.create_child_element(Ns, Name, getContext()); style_paragraph_properties_content_.create_child_element(Ns, Name, getContext());
} }
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
size_t size() const { return style_tab_stops_.size(); } size_t size() const { return style_tab_stops_.size(); }
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -185,7 +185,7 @@ CP_REGISTER_OFFICE_ELEMENT2(style_background_image) ...@@ -185,7 +185,7 @@ CP_REGISTER_OFFICE_ELEMENT2(style_background_image)
class paragraph_format_properties class paragraph_format_properties
{ {
public: public:
void create_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( const office_element_ptr & child); void add_child_element( const office_element_ptr & child);
void serialize(std::wostream & strm, const wchar_t * ns, const wchar_t * name ); void serialize(std::wostream & strm, const wchar_t * ns, const wchar_t * name );
...@@ -270,7 +270,7 @@ public: ...@@ -270,7 +270,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
void apply_from(style_paragraph_properties * Other); void apply_from(style_paragraph_properties * Other);
......
...@@ -53,7 +53,7 @@ namespace odf_writer { ...@@ -53,7 +53,7 @@ namespace odf_writer {
const wchar_t * style_columns::ns = L"style"; const wchar_t * style_columns::ns = L"style";
const wchar_t * style_columns::name = L"columns"; const wchar_t * style_columns::name = L"columns";
void style_columns::create_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) if (L"style" == Ns && L"column" == Name)
CP_CREATE_ELEMENT(style_column_); CP_CREATE_ELEMENT(style_column_);
...@@ -103,7 +103,7 @@ void style_columns::serialize(std::wostream & strm) ...@@ -103,7 +103,7 @@ void style_columns::serialize(std::wostream & strm)
const wchar_t * style_column::ns = L"style"; const wchar_t * style_column::ns = L"style";
const wchar_t * style_column::name = L"column"; const wchar_t * style_column::name = L"column";
void style_column::create_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(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -127,7 +127,7 @@ void style_column::serialize(std::wostream & strm) ...@@ -127,7 +127,7 @@ void style_column::serialize(std::wostream & strm)
const wchar_t * style_column_sep::ns = L"style"; const wchar_t * style_column_sep::ns = L"style";
const wchar_t * style_column_sep::name = L"column-sep"; const wchar_t * style_column_sep::name = L"column-sep";
void style_column_sep::create_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(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -151,7 +151,7 @@ void style_column_sep::serialize(std::wostream & strm) ...@@ -151,7 +151,7 @@ void style_column_sep::serialize(std::wostream & strm)
const wchar_t * style_section_properties::ns = L"style"; const wchar_t * style_section_properties::ns = L"style";
const wchar_t * style_section_properties::name = L"section-properties"; const wchar_t * style_section_properties::name = L"section-properties";
void style_section_properties::create_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) if (L"style" == Ns && L"background-image" == Name)
CP_CREATE_ELEMENT(style_background_image_); CP_CREATE_ELEMENT(style_background_image_);
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
static const ElementType type = typeStyleColumns; static const ElementType type = typeStyleColumns;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
static const ElementType type = typeStyleColumn; static const ElementType type = typeStyleColumn;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
static const ElementType type = typeStyleColumnSep; static const ElementType type = typeStyleColumnSep;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
static const ElementType type = typeStyleSectionProperties; static const ElementType type = typeStyleSectionProperties;
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child); virtual void add_child_element( const office_element_ptr & child);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
...@@ -45,7 +45,7 @@ namespace odf_writer { ...@@ -45,7 +45,7 @@ namespace odf_writer {
using xml::xml_char_wc; using xml::xml_char_wc;
bool table_format_properties::create_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) if (L"style" == Ns && L"background-image" == Name)
{ {
...@@ -118,7 +118,7 @@ const wchar_t * style_table_properties::ns = L"style"; ...@@ -118,7 +118,7 @@ const wchar_t * style_table_properties::ns = L"style";
const wchar_t * style_table_properties::name = L"table-properties"; const wchar_t * style_table_properties::name = L"table-properties";
void style_table_properties::create_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_.create_child_element(Ns, Name, getContext()); table_format_properties_.create_child_element(Ns, Name, getContext());
} }
...@@ -157,7 +157,7 @@ void style_table_column_properties_attlist::serialize(std::wostream & _Wostream, ...@@ -157,7 +157,7 @@ void style_table_column_properties_attlist::serialize(std::wostream & _Wostream,
const wchar_t * style_table_column_properties::ns = L"style"; const wchar_t * style_table_column_properties::ns = L"style";
const wchar_t * style_table_column_properties::name = L"table-column-properties"; const wchar_t * style_table_column_properties::name = L"table-column-properties";
void style_table_column_properties::create_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(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -173,7 +173,7 @@ void style_table_column_properties::serialize(std::wostream & strm) ...@@ -173,7 +173,7 @@ void style_table_column_properties::serialize(std::wostream & strm)
const wchar_t * style_table_cell_properties::ns = L"style"; const wchar_t * style_table_cell_properties::ns = L"style";
const wchar_t * style_table_cell_properties::name = L"table-cell-properties"; const wchar_t * style_table_cell_properties::name = L"table-cell-properties";
void style_table_cell_properties::create_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) if (L"style" == Ns && L"background-image" == Name)
{ {
...@@ -281,7 +281,7 @@ const wchar_t * style_table_row_properties::ns = L"style"; ...@@ -281,7 +281,7 @@ const wchar_t * style_table_row_properties::ns = L"style";
const wchar_t * style_table_row_properties::name = L"table-row-properties"; const wchar_t * style_table_row_properties::name = L"table-row-properties";
void style_table_row_properties::create_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) if (L"style" == Ns && L"background-image" == Name)
{ {
......
...@@ -60,7 +60,7 @@ namespace odf_writer { ...@@ -60,7 +60,7 @@ namespace odf_writer {
class table_format_properties class table_format_properties
{ {
public: public:
bool create_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 apply_from(const table_format_properties & Other); void apply_from(const table_format_properties & Other);
void serialize(std::wostream & strm ,const wchar_t * ns, const wchar_t * name ); void serialize(std::wostream & strm ,const wchar_t * ns, const wchar_t * name );
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
}; };
/// style:table-properties // style:table-properties
class style_table_properties : public office_element_impl<style_table_properties> class style_table_properties : public office_element_impl<style_table_properties>
{ {
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
void apply_from(const style_table_properties * Other); void apply_from(const style_table_properties * Other);
...@@ -127,7 +127,7 @@ public: ...@@ -127,7 +127,7 @@ public:
}; };
/// style:table-column-properties // style:table-column-properties
class style_table_column_properties : public office_element_impl<style_table_column_properties> class style_table_column_properties : public office_element_impl<style_table_column_properties>
{ {
public: public:
...@@ -138,7 +138,7 @@ public: ...@@ -138,7 +138,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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 serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
style_table_column_properties_attlist style_table_column_properties_attlist_; style_table_column_properties_attlist style_table_column_properties_attlist_;
...@@ -161,7 +161,7 @@ public: ...@@ -161,7 +161,7 @@ public:
odf_types::common_break_attlist common_break_attlist_; odf_types::common_break_attlist common_break_attlist_;
}; };
/// style:table-row-properties // style:table-row-properties
class style_table_row_properties : public office_element_impl<style_table_row_properties> class style_table_row_properties : public office_element_impl<style_table_row_properties>
{ {
public: public:
...@@ -172,7 +172,7 @@ public: ...@@ -172,7 +172,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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 serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
public: public:
...@@ -225,7 +225,6 @@ public: ...@@ -225,7 +225,6 @@ public:
class style_table_cell_properties_elements class style_table_cell_properties_elements
{ {
public: public:
// 15.11.6
office_element_ptr style_background_image_; office_element_ptr style_background_image_;
}; };
...@@ -241,7 +240,7 @@ public: ...@@ -241,7 +240,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void create_child_element( const std::wstring & Ns, const std::wstring & Name);
void apply_from(const style_table_cell_properties * Other); void apply_from(const style_table_cell_properties * Other);
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
...@@ -387,7 +387,7 @@ void text_format_properties_content::serialize(std::wostream & _Wostream,const w ...@@ -387,7 +387,7 @@ void text_format_properties_content::serialize(std::wostream & _Wostream,const w
const wchar_t * style_text_properties::ns = L"style"; const wchar_t * style_text_properties::ns = L"style";
const wchar_t * style_text_properties::name = L"text-properties"; const wchar_t * style_text_properties::name = L"text-properties";
void style_text_properties::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void style_text_properties::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
} }
......
...@@ -211,7 +211,7 @@ public: ...@@ -211,7 +211,7 @@ public:
void apply_from(const style_text_properties * Other); void apply_from(const style_text_properties * Other);
virtual void create_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( const office_element_ptr & child){} virtual void add_child_element( const office_element_ptr & child){}
virtual void serialize(std::wostream & strm); virtual void serialize(std::wostream & strm);
......
This diff is collapsed.
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
*/ */
#include "styles_list.h" #include "styles_list.h"
//#include "style_text_properties.h"
#include <cpdoccore/xml/simple_xml_writer.h> #include <cpdoccore/xml/simple_xml_writer.h>
namespace cpdoccore { namespace cpdoccore {
...@@ -85,7 +81,7 @@ const wchar_t * text_list_style::ns = L"text"; ...@@ -85,7 +81,7 @@ const wchar_t * text_list_style::ns = L"text";
const wchar_t * text_list_style::name = L"list-style"; const wchar_t * text_list_style::name = L"list-style";
void text_list_style::create_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) if (L"text" == Ns && L"list-level-style-number" == Name)
CP_CREATE_ELEMENT(text_list_style_content_); CP_CREATE_ELEMENT(text_list_style_content_);
...@@ -124,7 +120,7 @@ const wchar_t * text_list_level_style_number::ns = L"text"; ...@@ -124,7 +120,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"; const wchar_t * text_list_level_style_number::name = L"list-level-style-number";
void text_list_level_style_number::create_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) if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_); CP_CREATE_ELEMENT(style_list_level_properties_);
...@@ -166,7 +162,7 @@ void text_list_level_style_number::serialize(std::wostream & strm) ...@@ -166,7 +162,7 @@ void text_list_level_style_number::serialize(std::wostream & strm)
const wchar_t * style_list_level_properties::ns = L"style"; const wchar_t * style_list_level_properties::ns = L"style";
const wchar_t * style_list_level_properties::name = L"list-level-properties"; const wchar_t * style_list_level_properties::name = L"list-level-properties";
void style_list_level_properties::create_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") if CP_CHECK_NAME(L"style", L"list-level-label-alignment")
{ {
...@@ -217,7 +213,7 @@ void style_list_level_properties::serialize(std::wostream & strm) ...@@ -217,7 +213,7 @@ void style_list_level_properties::serialize(std::wostream & strm)
const wchar_t * style_list_level_label_alignment::ns = L"style"; const wchar_t * style_list_level_label_alignment::ns = L"style";
const wchar_t * style_list_level_label_alignment::name = L"list-level-label-alignment"; const wchar_t * style_list_level_label_alignment::name = L"list-level-label-alignment";
void style_list_level_label_alignment::create_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(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -246,7 +242,7 @@ const wchar_t * text_list_level_style_bullet::ns = L"text"; ...@@ -246,7 +242,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"; const wchar_t * text_list_level_style_bullet::name = L"list-level-style-bullet";
void text_list_level_style_bullet::create_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) if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_); CP_CREATE_ELEMENT(style_list_level_properties_);
...@@ -290,7 +286,7 @@ const wchar_t * text_list_level_style_image::ns = L"text"; ...@@ -290,7 +286,7 @@ const wchar_t * text_list_level_style_image::ns = L"text";
const wchar_t * text_list_level_style_image::name = L"list-level-style-image"; const wchar_t * text_list_level_style_image::name = L"list-level-style-image";
void text_list_level_style_image::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void text_list_level_style_image::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (L"style" == Ns && L"list-level-properties" == Name) if (L"style" == Ns && L"list-level-properties" == Name)
CP_CREATE_ELEMENT(style_list_level_properties_); CP_CREATE_ELEMENT(style_list_level_properties_);
......
...@@ -124,7 +124,7 @@ void table_table_column_attlist::serialize(CP_ATTR_NODE) ...@@ -124,7 +124,7 @@ void table_table_column_attlist::serialize(CP_ATTR_NODE)
const wchar_t * table_table_source::ns = L"table"; const wchar_t * table_table_source::ns = L"table";
const wchar_t * table_table_source::name = L"table-source"; const wchar_t * table_table_source::name = L"table-source";
void table_table_source::create_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(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -148,7 +148,7 @@ void table_table_source::serialize(std::wostream & _Wostream) ...@@ -148,7 +148,7 @@ void table_table_source::serialize(std::wostream & _Wostream)
const wchar_t * table_table::ns = L"table"; const wchar_t * table_table::ns = L"table";
const wchar_t * table_table::name = L"table"; const wchar_t * table_table::name = L"table";
void table_table::create_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) if (L"table" == Ns && L"table-source" == Name)
{ {
...@@ -243,7 +243,7 @@ void table_table::serialize(std::wostream & _Wostream) ...@@ -243,7 +243,7 @@ void table_table::serialize(std::wostream & _Wostream)
const wchar_t * table_table_column::ns = L"table"; const wchar_t * table_table_column::ns = L"table";
const wchar_t * table_table_column::name = L"table-column"; const wchar_t * table_table_column::name = L"table-column";
void table_table_column::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_column::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
} }
...@@ -266,7 +266,7 @@ void table_table_column::serialize(std::wostream & _Wostream) ...@@ -266,7 +266,7 @@ void table_table_column::serialize(std::wostream & _Wostream)
const wchar_t * table_table_columns::ns = L"table"; const wchar_t * table_table_columns::ns = L"table";
const wchar_t * table_table_columns::name = L"table-columns"; const wchar_t * table_table_columns::name = L"table-columns";
void table_table_columns::create_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") if CP_CHECK_NAME(L"table", L"table-column")
{ {
...@@ -301,7 +301,7 @@ void table_table_columns::serialize(std::wostream & _Wostream) ...@@ -301,7 +301,7 @@ void table_table_columns::serialize(std::wostream & _Wostream)
const wchar_t * table_table_header_columns::ns = L"table"; const wchar_t * table_table_header_columns::ns = L"table";
const wchar_t * table_table_header_columns::name = L"table-header-columns"; const wchar_t * table_table_header_columns::name = L"table-header-columns";
void table_table_header_columns::create_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") if CP_CHECK_NAME(L"table", L"table-column")
{ {
...@@ -333,7 +333,7 @@ void table_table_header_columns::serialize(std::wostream & _Wostream) ...@@ -333,7 +333,7 @@ void table_table_header_columns::serialize(std::wostream & _Wostream)
// table-columns // table-columns
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void table_columns::create_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") if CP_CHECK_NAME(L"table", L"table-columns")
{ {
...@@ -380,7 +380,7 @@ table_columns_no_group::table_columns_no_group(odf_conversion_context * _Context ...@@ -380,7 +380,7 @@ table_columns_no_group::table_columns_no_group(odf_conversion_context * _Context
Context = _Context; Context = _Context;
}; };
void table_columns_no_group::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_columns_no_group::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (CP_CHECK_NAME(L"table", L"table-columns") || CP_CHECK_NAME(L"table", L"table-column")) if (CP_CHECK_NAME(L"table", L"table-columns") || CP_CHECK_NAME(L"table", L"table-column"))
{ {
...@@ -440,7 +440,7 @@ _CP_PTR(table_columns_no_group) table_columns_no_group::create(odf_conversion_co ...@@ -440,7 +440,7 @@ _CP_PTR(table_columns_no_group) table_columns_no_group::create(odf_conversion_co
const wchar_t * table_table_column_group::ns = L"table"; const wchar_t * table_table_column_group::ns = L"table";
const wchar_t * table_table_column_group::name = L"table-column-group"; const wchar_t * table_table_column_group::name = L"table-column-group";
void table_table_column_group::create_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_.create_child_element(Ns, Name, getContext()); table_columns_and_groups_.create_child_element(Ns, Name, getContext());
} }
...@@ -468,7 +468,7 @@ table_columns_and_groups::table_columns_and_groups() ...@@ -468,7 +468,7 @@ table_columns_and_groups::table_columns_and_groups()
} }
void table_columns_and_groups::create_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")) if (CP_CHECK_NAME(L"table", L"table-column-group"))
{ {
...@@ -519,7 +519,7 @@ void table_columns_and_groups::serialize(std::wostream & _Wostream) ...@@ -519,7 +519,7 @@ void table_columns_and_groups::serialize(std::wostream & _Wostream)
// table-table-cell-content // table-table-cell-content
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_cell_content::create_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_); CP_CREATE_ELEMENT_SIMPLE(text_content_);
} }
...@@ -540,7 +540,7 @@ void table_table_cell_content::serialize(std::wostream & _Wostream) ...@@ -540,7 +540,7 @@ void table_table_cell_content::serialize(std::wostream & _Wostream)
const wchar_t * table_table_cell::ns = L"table"; const wchar_t * table_table_cell::ns = L"table";
const wchar_t * table_table_cell::name = L"table-cell"; const wchar_t * table_table_cell::name = L"table-cell";
void table_table_cell::create_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_.create_child_element(Ns, Name, getContext()); table_table_cell_content_.create_child_element(Ns, Name, getContext());
} }
...@@ -568,7 +568,7 @@ void table_table_cell::serialize(std::wostream & _Wostream) ...@@ -568,7 +568,7 @@ void table_table_cell::serialize(std::wostream & _Wostream)
const wchar_t * table_covered_table_cell::ns = L"table"; const wchar_t * table_covered_table_cell::ns = L"table";
const wchar_t * table_covered_table_cell::name = L"covered-table-cell"; const wchar_t * table_covered_table_cell::name = L"covered-table-cell";
void table_covered_table_cell::create_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; empty_ = false;
table_table_cell_content_.create_child_element( Ns, Name, getContext()); table_table_cell_content_.create_child_element( Ns, Name, getContext());
...@@ -596,7 +596,7 @@ void table_covered_table_cell::serialize(std::wostream & _Wostream) ...@@ -596,7 +596,7 @@ void table_covered_table_cell::serialize(std::wostream & _Wostream)
const wchar_t * table_table_row::ns = L"table"; const wchar_t * table_table_row::ns = L"table";
const wchar_t * table_table_row::name = L"table-row"; const wchar_t * table_table_row::name = L"table-row";
void table_table_row::create_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") || if ( CP_CHECK_NAME(L"table", L"table-cell") ||
CP_CHECK_NAME(L"table", L"table-covered-cell") ) CP_CHECK_NAME(L"table", L"table-covered-cell") )
...@@ -634,7 +634,7 @@ void table_table_row::serialize(std::wostream & _Wostream) ...@@ -634,7 +634,7 @@ void table_table_row::serialize(std::wostream & _Wostream)
const wchar_t * table_table_rows::ns = L"table"; const wchar_t * table_table_rows::ns = L"table";
const wchar_t * table_table_rows::name = L"table-rows"; const wchar_t * table_table_rows::name = L"table-rows";
void table_table_rows::create_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_); CP_CREATE_ELEMENT(table_table_row_);
} }
...@@ -661,7 +661,7 @@ void table_table_rows::serialize(std::wostream & _Wostream) ...@@ -661,7 +661,7 @@ void table_table_rows::serialize(std::wostream & _Wostream)
const wchar_t * table_table_header_rows::ns = L"table"; const wchar_t * table_table_header_rows::ns = L"table";
const wchar_t * table_table_header_rows::name = L"table-header-rows"; const wchar_t * table_table_header_rows::name = L"table-header-rows";
void table_table_header_rows::create_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") if CP_CHECK_NAME(L"table", L"table-row")
{ {
...@@ -692,7 +692,7 @@ void table_table_header_rows::serialize(std::wostream & _Wostream) ...@@ -692,7 +692,7 @@ void table_table_header_rows::serialize(std::wostream & _Wostream)
} }
// table-rows // table-rows
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void table_rows::create_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") if CP_CHECK_NAME(L"table", L"table-rows")
{ {
...@@ -742,7 +742,7 @@ table_rows_no_group::table_rows_no_group(odf_conversion_context * _Context) : wa ...@@ -742,7 +742,7 @@ table_rows_no_group::table_rows_no_group(odf_conversion_context * _Context) : wa
Context = _Context; Context = _Context;
}; };
void table_rows_no_group::create_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_rows_no_group::create_child_element( const std::wstring & Ns, const std::wstring & Name)
{ {
if (CP_CHECK_NAME(L"table", L"table-rows") || CP_CHECK_NAME(L"table", L"table-row")) if (CP_CHECK_NAME(L"table", L"table-rows") || CP_CHECK_NAME(L"table", L"table-row"))
{ {
...@@ -799,7 +799,7 @@ table_rows_and_groups::table_rows_and_groups() ...@@ -799,7 +799,7 @@ table_rows_and_groups::table_rows_and_groups()
{ {
} }
void table_rows_and_groups::create_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) if (L"table" == Ns && L"table-row-group" == Name)
{ {
...@@ -843,7 +843,7 @@ const wchar_t * table_table_row_group::ns = L"table"; ...@@ -843,7 +843,7 @@ const wchar_t * table_table_row_group::ns = L"table";
const wchar_t * table_table_row_group::name = L"table-row-group"; const wchar_t * table_table_row_group::name = L"table-row-group";
void table_table_row_group::create_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_.create_child_element(Ns, Name, getContext()); table_rows_and_groups_.create_child_element(Ns, Name, getContext());
} }
...@@ -873,7 +873,7 @@ void table_table_row_group::add_child_element( const office_element_ptr & child_ ...@@ -873,7 +873,7 @@ void table_table_row_group::add_child_element( const office_element_ptr & child_
const wchar_t * table_shapes::ns = L"table"; const wchar_t * table_shapes::ns = L"table";
const wchar_t * table_shapes::name = L"shapes"; const wchar_t * table_shapes::name = L"shapes";
void table_shapes::create_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()); create_element(Ns,Name,content_,getContext());
} }
......
...@@ -168,7 +168,7 @@ public: ...@@ -168,7 +168,7 @@ public:
table_table_source_attlist table_table_source_attlist_; table_table_source_attlist table_table_source_attlist_;
table_linked_source_attlist table_linked_source_attlist_; table_linked_source_attlist table_linked_source_attlist_;
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -181,7 +181,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_source); ...@@ -181,7 +181,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_source);
class table_columns class table_columns
{ {
public: public:
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -207,7 +207,7 @@ public: ...@@ -207,7 +207,7 @@ public:
public: public:
table_columns_no_group(odf_conversion_context * _Context); table_columns_no_group(odf_conversion_context * _Context);
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -232,7 +232,7 @@ class table_columns_and_groups ...@@ -232,7 +232,7 @@ class table_columns_and_groups
public: public:
table_columns_and_groups(); table_columns_and_groups();
virtual void create_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( const office_element_ptr & child_element, odf_conversion_context * Context); virtual void add_child_element( const office_element_ptr & child_element, odf_conversion_context * Context);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -271,7 +271,7 @@ public: ...@@ -271,7 +271,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -296,7 +296,7 @@ public: ...@@ -296,7 +296,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -320,7 +320,7 @@ public: ...@@ -320,7 +320,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -353,7 +353,7 @@ public: ...@@ -353,7 +353,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -382,7 +382,7 @@ public: ...@@ -382,7 +382,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -399,7 +399,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_row); ...@@ -399,7 +399,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_row);
class table_table_cell_content class table_table_cell_content
{ {
public: public:
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -425,7 +425,7 @@ public: ...@@ -425,7 +425,7 @@ public:
table_table_cell() { } table_table_cell() { }
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -453,7 +453,7 @@ public: ...@@ -453,7 +453,7 @@ public:
table_covered_table_cell() {empty_ = true; } table_covered_table_cell() {empty_ = true; }
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -479,7 +479,7 @@ public: ...@@ -479,7 +479,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -507,7 +507,7 @@ public: ...@@ -507,7 +507,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -523,7 +523,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_rows); ...@@ -523,7 +523,7 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_rows);
class table_rows class table_rows
{ {
public: public:
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -550,7 +550,7 @@ public: ...@@ -550,7 +550,7 @@ public:
public: public:
table_rows_no_group(odf_conversion_context * Context); table_rows_no_group(odf_conversion_context * Context);
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -573,7 +573,7 @@ class table_rows_and_groups ...@@ -573,7 +573,7 @@ class table_rows_and_groups
public: public:
table_rows_and_groups(); table_rows_and_groups();
virtual void create_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( const office_element_ptr & child_element, odf_conversion_context * Context); virtual void add_child_element( const office_element_ptr & child_element, odf_conversion_context * Context);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -609,7 +609,7 @@ public: ...@@ -609,7 +609,7 @@ public:
table_table_row_group() table_table_row_group()
{ {
} }
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -634,7 +634,7 @@ public: ...@@ -634,7 +634,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -667,7 +667,7 @@ public: ...@@ -667,7 +667,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -51,7 +51,7 @@ using xml::xml_char_wc; ...@@ -51,7 +51,7 @@ using xml::xml_char_wc;
const wchar_t * table_database_ranges::ns = L"table"; const wchar_t * table_database_ranges::ns = L"table";
const wchar_t * table_database_ranges::name = L"database-ranges"; const wchar_t * table_database_ranges::name = L"database-ranges";
void table_database_ranges::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_database_ranges::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"table", L"database-range") if CP_CHECK_NAME(L"table", L"database-range")
{ {
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE() CPDOCCORE_DEFINE_VISITABLE()
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -51,7 +51,7 @@ using xml::xml_char_wc; ...@@ -51,7 +51,7 @@ using xml::xml_char_wc;
const wchar_t * table_named_expressions::ns = L"table"; const wchar_t * table_named_expressions::ns = L"table";
const wchar_t * table_named_expressions::name = L"named-expressions"; const wchar_t * table_named_expressions::name = L"named-expressions";
void table_named_expressions::create_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_named_expressions::create_child_element(const std::wstring & Ns, const std::wstring & Name)
{ {
if CP_CHECK_NAME(L"table", L"named-range") if CP_CHECK_NAME(L"table", L"named-range")
{ {
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element); virtual void add_child_element( const office_element_ptr & child_element);
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -76,7 +76,7 @@ public: ...@@ -76,7 +76,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
...@@ -103,7 +103,7 @@ public: ...@@ -103,7 +103,7 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void create_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( const office_element_ptr & child_element){} virtual void add_child_element( const office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
......
...@@ -48,11 +48,18 @@ namespace OOX ...@@ -48,11 +48,18 @@ namespace OOX
namespace Logic namespace Logic
{ {
class CPTab;
class CSmartTag;
class CIns; class CIns;
class CDel;
class CPPrChange;
class CRPrChange;
class CSectPrChange;
class CTrPrChange;
class CTcPrChange;
class CTblPrChange;
class CParagraph; class CParagraph;
class CParagraphProperty; class CParagraphProperty;
class CPTab;
class CSmartTag;
class CRun; class CRun;
class CSym; class CSym;
class CRunProperty; class CRunProperty;
...@@ -69,6 +76,7 @@ namespace OOX ...@@ -69,6 +76,7 @@ namespace OOX
class CFldChar; class CFldChar;
class CFldSimple; class CFldSimple;
class CInstrText; class CInstrText;
class CDelText;
class CCommentRangeStart; class CCommentRangeStart;
class CCommentRangeEnd; class CCommentRangeEnd;
class CCommentReference; class CCommentReference;
...@@ -176,20 +184,30 @@ namespace Oox2Odf ...@@ -176,20 +184,30 @@ namespace Oox2Odf
void convert(OOX::Logic::CSectionProperty *oox_section_pr, bool root = false); void convert(OOX::Logic::CSectionProperty *oox_section_pr, bool root = false);
void convert(OOX::Logic::CParagraph *oox_paragraph); void convert(OOX::Logic::CParagraph *oox_paragraph);
void convert(OOX::Logic::CRun *oox_run); void convert(OOX::Logic::CRun *oox_run);
void convert(OOX::Logic::CParagraphProperty *oox_paragraph_prop, odf_writer::style_paragraph_properties *paragraph_properties); void convert(OOX::Logic::CParagraphProperty *oox_para_prop, odf_writer::style_paragraph_properties *paragraph_properties);
void convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf_writer::style_paragraph_properties *paragraph_properties); void convert(ComplexTypes::Word::CFramePr *oox_frame_pr, odf_writer::style_paragraph_properties *paragraph_properties);
void convert(OOX::Logic::CRunProperty *oox_run_prop, odf_writer::style_text_properties *text_properties); void convert(OOX::Logic::CRunProperty *oox_run_prop, odf_writer::style_text_properties *text_properties);
void convert(ComplexTypes::Word::CShading *oox_shading, odf_writer::style_text_properties *text_properties ); void convert(ComplexTypes::Word::CShading *oox_shading, odf_writer::style_text_properties *text_properties );
void convert(OOX::Logic::CFldSimple *oox_fld); void convert(OOX::Logic::CFldSimple *oox_fld);
void convert(OOX::Logic::CFldChar *oox_fld); void convert(OOX::Logic::CFldChar *oox_fld);
void convert(OOX::Logic::CInstrText *oox_instr); void convert(OOX::Logic::CInstrText *oox_instrText);
void convert(OOX::Logic::CDelText *oox_delText);
void convert(OOX::Logic::CText *oox_text); void convert(OOX::Logic::CText *oox_text);
void convert(OOX::Logic::CHyperlink *oox_hyperlink); void convert(OOX::Logic::CHyperlink *oox_hyperlink);
void convert(OOX::Logic::CSym *oox_sym); void convert(OOX::Logic::CSym *oox_sym);
void convert(OOX::Logic::CIns *oox_ins);
void convert(OOX::Logic::CSmartTag *oox_tag); void convert(OOX::Logic::CSmartTag *oox_tag);
void convert(OOX::Logic::CPTab *oox_ptab); void convert(OOX::Logic::CPTab *oox_ptab);
void convert(OOX::Logic::CIns *oox_ins);
void convert(OOX::Logic::CDel *oox_del);
int convert(OOX::Logic::CPPrChange *oox_para_prop_change);
int convert(OOX::Logic::CRPrChange *oox_run_prop_change);
int convert(OOX::Logic::CSectPrChange *oox_sect_prop_change);
int convert(OOX::Logic::CTrPrChange *oox_tr_prop_change);
int convert(OOX::Logic::CTcPrChange *oox_tc_prop_change);
int convert(OOX::Logic::CTblPrChange *oox_table_prop_change);
void convert(OOX::Logic::CAlternateContent *oox_alt_content); void convert(OOX::Logic::CAlternateContent *oox_alt_content);
void convert(OOX::Logic::CDrawing *oox_drawing); void convert(OOX::Logic::CDrawing *oox_drawing);
void convert(OOX::Logic::CGroupShape *oox_group_shape); void convert(OOX::Logic::CGroupShape *oox_group_shape);
......
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