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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54795 954022d7-b5bf-4e40-9824-e11837661b57
parent b85da715
...@@ -140,8 +140,7 @@ HRESULT COfficeOdfFileW::SaveToFileImpl(const std::wstring & srcPath, ...@@ -140,8 +140,7 @@ HRESULT COfficeOdfFileW::SaveToFileImpl(const std::wstring & srcPath,
try try
{ {
std::wstring type = L"spreadsheet"; Oox2Odf::Converter converter(srcTempPath);
Oox2Odf::Converter converter(srcTempPath,type);
converter.convert(); converter.convert();
converter.write(dstTempPath); converter.write(dstTempPath);
......
...@@ -950,6 +950,22 @@ ...@@ -950,6 +950,22 @@
RelativePath=".\OdfFormat\header_footer.h" RelativePath=".\OdfFormat\header_footer.h"
> >
</File> </File>
<File
RelativePath=".\OdfFormat\odf_style_context.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\odf_style_context.h"
>
</File>
<File
RelativePath=".\OdfFormat\odf_style_state.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\odf_style_state.h"
>
</File>
<File <File
RelativePath=".\OdfFormat\style_map.cpp" RelativePath=".\OdfFormat\style_map.cpp"
> >
...@@ -982,6 +998,14 @@ ...@@ -982,6 +998,14 @@
RelativePath=".\OdfFormat\styles_list.h" RelativePath=".\OdfFormat\styles_list.h"
> >
</File> </File>
<File
RelativePath=".\OdfFormat\styles_lite_container.cpp"
>
</File>
<File
RelativePath=".\OdfFormat\styles_lite_container.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="odf text" Name="odf text"
......
...@@ -25,8 +25,6 @@ void style_header_footer_properties::add_child_element( const ::std::wstring & ...@@ -25,8 +25,6 @@ void style_header_footer_properties::add_child_element( const ::std::wstring &
} }
} }
void header_footer_content::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context) void header_footer_content::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
{ {
CP_CREATE_ELEMENT_SIMPLE(content_); CP_CREATE_ELEMENT_SIMPLE(content_);
......
...@@ -45,6 +45,8 @@ public: ...@@ -45,6 +45,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
style_header_footer_properties_attlist style_header_footer_properties_attlist_; style_header_footer_properties_attlist style_header_footer_properties_attlist_;
...@@ -68,6 +70,8 @@ class header_footer_content ...@@ -68,6 +70,8 @@ class header_footer_content
{ {
public: public:
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context); void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
virtual void add_child_element(office_element_ptr & child, odf_conversion_context * Context)
{}
office_element_ptr_array content_; office_element_ptr_array content_;
......
...@@ -13,7 +13,7 @@ namespace odf { ...@@ -13,7 +13,7 @@ namespace odf {
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
odf_conversion_context::odf_conversion_context(package::odf_document * outputDocument) odf_conversion_context::odf_conversion_context(package::odf_document * outputDocument) : style_context_(*this)
{ {
output_document_ = outputDocument; output_document_ = outputDocument;
} }
...@@ -36,8 +36,20 @@ office_element_ptr & odf_conversion_context::getCurrentElement() ...@@ -36,8 +36,20 @@ office_element_ptr & odf_conversion_context::getCurrentElement()
} }
} }
//void odf_conversion_context::start_font_face()
//{
// create_element(L"office", L"font-face-decls", styles_, this,true);
//}
void odf_conversion_context::end_document() void odf_conversion_context::end_document()
{ {
///////////////////çàâåðøàþùàÿ îáðàáîòêà
process_styles();
//////////////////////////////////////////////////////////////////////
package::content_content_ptr content_root_ = package::content_content::create(); package::content_content_ptr content_root_ = package::content_content::create();
...@@ -47,8 +59,13 @@ void odf_conversion_context::end_document() ...@@ -47,8 +59,13 @@ void odf_conversion_context::end_document()
} }
std::wstringstream styles_root_strm; std::wstringstream styles_root_strm;
//odf_styles_.serialize(styles_root_strm);// ìàñòåð-ïåéäæû, çàäàííûå çàëèâêè (ãðàäèåíòû, áèòìàïû), äåôîëòíûå ñòèëè, êîëîíòèòóëû, ðàçìåòêè, çàìåòêè,... //////////////////////////////////////////////////////////////////////////////////////////
BOOST_FOREACH(const office_element_ptr & elm, styles_)
{// ìàñòåð-ïåéäæû, çàäàííûå çàëèâêè (ãðàäèåíòû, áèòìàïû), äåôîëòíûå ñòèëè, êîëîíòèòóëû, ðàçìåòêè, çàìåòêè,...
elm->serialize(styles_root_strm);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
package::object_files *object_files = new package::object_files(); package::object_files *object_files = new package::object_files();
if (object_files) if (object_files)
{ {
...@@ -61,10 +78,6 @@ void odf_conversion_context::end_document() ...@@ -61,10 +78,6 @@ void odf_conversion_context::end_document()
std::vector<package::content_content_ptr> objects_; //styles â îáúåêòàõ ïî÷òè ïóñòûå .. - ññûëêè íà êàðòèíêè ... è òîëüêî std::vector<package::content_content_ptr> objects_; //styles â îáúåêòàõ ïî÷òè ïóñòûå .. - ññûëêè íà êàðòèíêè ... è òîëüêî
//ñîáñòâåííî ñòèëè çàïèñûâàþòñÿ â ñàì êîíòåíò //ñîáñòâåííî ñòèëè çàïèñûâàþòñÿ â ñàì êîíòåíò
{
//...
}
output_document_->set_rels(rels_); output_document_->set_rels(rels_);
} }
...@@ -73,6 +86,18 @@ void odf_conversion_context::add_rel(relationship const & r) ...@@ -73,6 +86,18 @@ void odf_conversion_context::add_rel(relationship const & r)
rels_.add(r); rels_.add(r);
} }
void odf_conversion_context::process_styles()
{
create_element(L"office", L"office-styles", styles_, this,true);
style_context_.process_office(styles_.back());
create_element(L"office", L"automatic-styles", styles_, this,true);
style_context_.process_automatic(styles_.back());
create_element(L"office", L"master-styles", styles_, this,true);
style_context_.process_master(styles_.back());
}
} }
......
#pragma once #pragma once
#include "object_package.h" #include "object_package.h"
#include "odf_style_context.h"
namespace cpdoccore { namespace cpdoccore {
namespace odf { namespace odf {
class office_element; class office_element;
typedef shared_ptr<office_element>::Type office_element_ptr; typedef shared_ptr<office_element>::Type office_element_ptr;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class odf_style_manager; //class styles_container;
//class style_instance;
//typedef boost::shared_ptr<style_instance> style_instance_ptr;
//typedef boost::shared_ptr<styles_container> styles_container_ptr;
//class style_instance
//{
//public:
// style_instance(
// styles_container * Container,
// const std::wstring & Name,
// style_family::type Type,
// style_content * Content,
// bool IsAutomatic,
// bool IsDefault,
// const std::wstring & ParentStyleName,
// const std::wstring & NextStyleName,
// const std::wstring & DataStyleName
// );
//
//
// const std::wstring & name() const;
// style_family::type type() const;
// style_content * content() const;
// style_instance * parent() const;
// const std::wstring & parent_name() const;
// style_instance * next() const;
// const std::wstring & next_name() const;
// bool is_automatic() const;
// bool is_default() const;
// const styles_container * container() const { return container_; }
// const std::wstring & data_style_name() const;
//
//private:
// styles_container * container_;
// std::wstring name_;
// style_family::type style_type_;
// style_content * content_;
//
// bool is_automatic_;
// bool is_default_;
//
// std::wstring parent_name_;
// std::wstring next_name_;
// mutable style_instance * parent_;
// mutable style_instance * next_;
// std::wstring data_style_name_;
//};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//class styles_container
//{
//public:
// styles_container() : hyperlink_style_pos_(-1)
// {}
//
// typedef std::vector<style_instance_ptr> instances_array;
//
// void add_style(const std::wstring & Name,
// style_family::type Type,
// style_content * Content,
// bool IsAutomatic,
// bool IsDefault,
// const std::wstring & ParentStyleName,
// const std::wstring & NextStyleName,
// const std::wstring & DataStyleName);
//
// void add_master_page_name(const std::wstring & StyleName, const std::wstring & MasterPageName);
//
// style_instance * hyperlink_style();
// style_instance * style_by_name(const std::wstring & Name, style_family::type Type,bool object_in_styles) const;
// style_instance * style_default_by_type(style_family::type Type) const;
//
// const std::wstring master_page_name_by_name(const std::wstring & StyleName) const;
//
// instances_array & instances() { return instances_; }
//
// presentation_layouts_instance & presentation_layouts() { return presentation_layouts_; }
// presentation_masters_instance & presentation_masters() { return presentation_masters_; }
//
//private:
// //presentation_layouts_instance presentation_layouts_;
// //presentation_masters_instance presentation_masters_;
//
// instances_array instances_;
//
// typedef boost::unordered_map<std::wstring, int> map_wstring_int_t;
// map_wstring_int_t map_;
//
// typedef boost::unordered_map<std::wstring, std::wstring> map_wstring_wstring;
// map_wstring_wstring master_page_name_;
//
// typedef boost::unordered_map<style_family::type, int> map_style_family_int;
// map_style_family_int default_map_;
// int hyperlink_style_pos_;
//};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class odf_conversion_context : boost::noncopyable class odf_conversion_context : boost::noncopyable
{ {
...@@ -22,15 +122,44 @@ public: ...@@ -22,15 +122,44 @@ public:
office_element_ptr & getCurrentElement(); office_element_ptr & getCurrentElement();
std::vector<office_element_ptr> content_; std::vector<office_element_ptr> content_;
std::vector<office_element_ptr> styles_;
void add_rel(relationship const & r); void add_rel(relationship const & r);
package::odf_document * output_document_; package::odf_document * output_document_;
odf_style_context & styles_context(){return style_context_;}
private: private:
//odf_style_manager odf_styles_;
rels rels_; rels rels_;
void process_styles();
public:
odf_style_context style_context_;
//styles_container & styleContainer() { return major_style_container_; }
//page_layout_container & pageLayoutContainer() { return page_layout_container_; }
//fonts_container & fontContainer() { return fonts_container_; }
//list_style_container & listStyleContainer() { return list_style_container_; }
//notes_configuration & noteConfiguration() { return notes_configuration_; }
//styles_lite_container & numberStyles() { return number_style_container_; }
//styles_lite_container & drawStyles() { return draw_style_container_; }
//styles_lite_container & Templates() { return template_container_; }
private:
//styles_container major_style_container_;
//page_layout_container page_layout_container_;
//fonts_container fonts_container_;
//list_style_container list_style_container_;
//notes_configuration notes_configuration_;
//styles_lite_container number_style_container_;
//styles_lite_container draw_style_container_;
//styles_lite_container template_container_;
}; };
} }
......
#include "precompiled_cpodf.h"
#include "odf_style_context.h"
//#include "ods_textcontext.h"
#include "ods_conversion_context.h"
#include "logging.h"
#include "styles.h"
#include <boost/foreach.hpp>
#include <iostream>
namespace cpdoccore {
namespace odf {
odf_style_context::odf_style_context(odf_conversion_context & Context/*, xlsx_text_context & textCotnext*/): context_(Context)
{
}
odf_style_state & odf_style_context::state()
{
return style_state_list_.back();
}
const odf_style_state & odf_style_context::state() const
{
return style_state_list_.back();
}
void odf_style_context::start_style(std::wstring name,const style_family family, bool automatic )
{
int id = style_state_list_.size();
office_element_ptr elm;
create_element(L"style", L"style", elm, &context_);
style_state_list_.push_back( odf_style_state(context_, elm, family) );
///////////////////////////////////////
state().set_name(name);
state().set_automatic(automatic);
state().style_oox_id_ = id;
}
void odf_style_context::process_automatic(office_element_ptr root )
{
for (std::list<odf_style_state>::iterator it = style_state_list_.begin(); it != style_state_list_.end(); it++)
{
if (it->automatic_== true && it->odf_style_)
root->add_child_element(it->odf_style_);
}
}
void odf_style_context::process_office(office_element_ptr root )
{
for (std::list<odf_style_state>::iterator it = style_state_list_.begin(); it != style_state_list_.end(); it++)
{
if (it->automatic_== false && it->master_ == false && it->odf_style_)
root->add_child_element(it->odf_style_);
}
}
void odf_style_context::process_master(office_element_ptr root )
{
for (std::list<odf_style_state>::iterator it = style_state_list_.begin(); it != style_state_list_.end(); it++)
{
if (it->master_ == true && it->odf_style_)
root->add_child_element(it->odf_style_);
}
}
//office_element_ptr & odf_style_context::find_by_id()
//{
// for (std::list<odf_style_state>::iterator it = style_state_list_.begin(); it != style_state_list_.end(); it++)
// {
// if (it->odf_style_)
// {
// if (it->odf_style_->style_family_ == family && it->style_oox_id_ == id)
// return it->get_office_element();
// }
// }
// return office_element_ptr();
//}
void odf_style_context::end_style()
{
state().convert();
}
}
}
\ No newline at end of file
#pragma once
#include <string>
#include "odf_style_state.h"
namespace cpdoccore {
namespace odf {
//class ods_conversion_context;
//class odt_conversion_context;
class odf_conversion_context;
class office_element;
typedef shared_ptr<office_element>::Type office_element_ptr;
/// \class ods_table_context
class odf_style_context
{
public:
odf_style_context(odf_conversion_context & Context/*, ods_text_context & textCotnext*/);
void start_style(std::wstring name, const style_family style_family, bool automatic = false);
void end_style();
//office_element_ptr & find_by_id(int id, const style_family family);
void process_automatic(office_element_ptr root );
void process_master(office_element_ptr root );
void process_office(office_element_ptr root );
//std::wstring get_current_table_name() const;
//void start_cell(const std::wstring & formula,
// size_t columnsSpanned,
// size_t rowsSpanned);
//void end_cell();
// std::wstring default_row_cell_style() const;
// std::wstring default_column_cell_style() const;
// void start_covered_cell();
// void end_covered_cell();
// void start_cell_content();
// int end_cell_content();
// void set_current_cell_style_id(unsigned int xfId);
// int get_current_cell_style_id();
// int current_column() const;
// int current_row() const;
//void set_table_row_group(int count, bool collapsed, int level);
// void start_row(const std::wstring & StyleName, const std::wstring & defaultCellStyleName);
// void non_empty_row();
// bool is_empty_row() const;
// void end_row();
// void start_column(unsigned int repeated, const std::wstring & defaultCellStyleName);
// size_t depth() const { return table_state_stack_.size(); }
// unsigned int columns_count();
// void serialize_merge_cells(std::wostream & _Wostream);
//void serialize_table_format(std::wostream & _Wostream);
//xlsx_table_metrics & get_table_metrics();
//
//xlsx_drawing_context & get_drawing_context();
// xlsx_comments_context & get_comments_context();
//
// void table_column_last_width(double w);
// double table_column_last_width() const;
odf_style_state & state();
const odf_style_state & state() const;
// void start_hyperlink();
//std::wstring end_hyperlink(std::wstring const & ref, std::wstring const & href, std::wstring const & display);
// void dump_rels_hyperlinks(rels & Rels);
// void serialize_hyperlinks(std::wostream & _Wostream);
private:
odf_conversion_context & context_;
std::list<odf_style_state> style_state_list_;// content_
};
}
}
#include "precompiled_cpodf.h"
#include "logging.h"
#include "odf_style_state.h"
#include "odf_conversion_context.h"
#include "styles.h"
namespace cpdoccore {
namespace odf {
odf_style_state::odf_style_state(odf_conversion_context & Context, office_element_ptr & elm, const style_family family ): context_(Context)
{
odf_style_ = elm;
automatic_= false;
style* style_ = dynamic_cast<style*>(elm.get());
if (!style_)return;
style_->style_family_ = family;
//set default
}
office_element_ptr & odf_style_state::get_office_element()
{
return odf_style_;
}
void odf_style_state::set_name(std::wstring name)
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return;
style_->style_name_ = name;
}
std::wstring & odf_style_state::get_name()
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return std::wstring();
return style_->style_name_;
}
void odf_style_state::set_automatic(bool val)
{
automatic_ = val;
}
void odf_style_state::convert()
{
if (odf_style_== NULL)return;
}
}
}
#pragma once
#include <string>
#include <vector>
//
//#include "ods_row_spanned.h"
//#include "ods_merge_cells.h"
//#include "ods_table_metrics.h"
//#include "ods_drawing_context.h"
//#include "ods_comments_context.h"
//#include "ods_hyperlinks.h"
#include "office_elements.h"
#include "office_elements_create.h"
#include "stylefamily.h"
namespace cpdoccore {
namespace odf {
class odf_conversion_context;
class odf_style_context;
//class style;
class odf_style_state
{
public:
odf_style_state(odf_conversion_context & Context, office_element_ptr & elm, const style_family style_family );
void set_name(std::wstring);
void set_automatic(bool val);
std::wstring & get_name();
void convert();
office_element_ptr & get_office_element();
private:
int style_oox_id_;
bool automatic_;
bool master_;
office_element_ptr odf_style_;//
// !!! - , ... ,
// ???
odf_conversion_context & context_;
friend class odf_style_context;
};
}
}
...@@ -17,11 +17,12 @@ ods_conversion_context::ods_conversion_context(package::odf_document * outputDoc ...@@ -17,11 +17,12 @@ ods_conversion_context::ods_conversion_context(package::odf_document * outputDoc
void ods_conversion_context::start_document() void ods_conversion_context::start_document()
{ {
create_element(L"office", L"spreadsheet",content_, this,true); create_element(L"office", L"spreadsheet", content_, this,true);
current_spreadsheet_ = (office_spreadsheet*)dynamic_cast<office_spreadsheet*>(content_.back().get()); current_spreadsheet_ = (office_spreadsheet*)dynamic_cast<office_spreadsheet*>(content_.back().get());
} }
void ods_conversion_context::start_sheet(std::wstring & name) void ods_conversion_context::start_sheet(std::wstring & name)
{ {
create_element(L"table", L"table",current_spreadsheet_->getContent(),this); create_element(L"table", L"table",current_spreadsheet_->getContent(),this);
......
...@@ -25,7 +25,7 @@ void ods_table_state::convert() ...@@ -25,7 +25,7 @@ void ods_table_state::convert()
{ {
if (office_element_ == NULL)return; if (office_element_ == NULL)return;
// ??? .. //ïîñëåäíèå øòðèõè???
} }
......
...@@ -41,6 +41,8 @@ public: ...@@ -41,6 +41,8 @@ public:
odf_conversion_context * getContext() { return context_; } odf_conversion_context * getContext() { return context_; }
const odf_conversion_context * getContext() const { return context_; } const odf_conversion_context * getContext() const { return context_; }
virtual void add_child_element(office_element_ptr & child) = 0;
void set_root(bool root){is_root_ = root;} void set_root(bool root){is_root_ = root;}
//////////////////////// ////////////////////////
virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const
......
...@@ -25,6 +25,8 @@ public: ...@@ -25,6 +25,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
std::wstring style_condition_; std::wstring style_condition_;
......
...@@ -68,6 +68,8 @@ public: ...@@ -68,6 +68,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
table_format_properties table_format_properties_; table_format_properties table_format_properties_;
...@@ -81,7 +83,6 @@ CP_REGISTER_OFFICE_ELEMENT2(style_table_properties); ...@@ -81,7 +83,6 @@ CP_REGISTER_OFFICE_ELEMENT2(style_table_properties);
class style_table_column_properties_attlist class style_table_column_properties_attlist
{ {
public: public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
_CP_OPT(length) style_column_width_; _CP_OPT(length) style_column_width_;
_CP_OPT(length) style_rel_column_width_; _CP_OPT(length) style_rel_column_width_;
...@@ -104,6 +105,8 @@ public: ...@@ -104,6 +105,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} 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_;
...@@ -116,7 +119,6 @@ CP_REGISTER_OFFICE_ELEMENT2(style_table_column_properties); ...@@ -116,7 +119,6 @@ CP_REGISTER_OFFICE_ELEMENT2(style_table_column_properties);
class style_table_row_properties_attlist class style_table_row_properties_attlist
{ {
public: public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
_CP_OPT(length) style_row_height_; _CP_OPT(length) style_row_height_;
_CP_OPT(length) style_min_row_height_; _CP_OPT(length) style_min_row_height_;
...@@ -139,6 +141,8 @@ public: ...@@ -139,6 +141,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
...@@ -228,8 +232,6 @@ public: ...@@ -228,8 +232,6 @@ public:
class style_table_cell_properties_elements class style_table_cell_properties_elements
{ {
public: public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
// 15.11.6 // 15.11.6
office_element_ptr style_background_image_; office_element_ptr style_background_image_;
...@@ -249,6 +251,8 @@ public: ...@@ -249,6 +251,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
......
...@@ -57,6 +57,8 @@ class style_content : noncopyable ...@@ -57,6 +57,8 @@ class style_content : noncopyable
{ {
public: public:
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context); void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
virtual void add_child_element(office_element_ptr & child, odf_conversion_context * Context)
{std::wstringstream str; str <<L"Non add child in _ 1"; _CP_LOG(error) << str.str();}
style_text_properties * get_style_text_properties() const; style_text_properties * get_style_text_properties() const;
...@@ -102,6 +104,8 @@ public: ...@@ -102,6 +104,8 @@ public:
default_style() {}; default_style() {};
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
style_family style_family_; style_family style_family_;
...@@ -143,8 +147,9 @@ public: ...@@ -143,8 +147,9 @@ public:
_CP_OPT(std::wstring) draw_name_; _CP_OPT(std::wstring) draw_name_;
_CP_OPT(std::wstring) draw_display_name_; _CP_OPT(std::wstring) draw_display_name_;
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
}; };
...@@ -172,6 +177,8 @@ public: ...@@ -172,6 +177,8 @@ public:
_CP_OPT(std::wstring) draw_display_name_; _CP_OPT(std::wstring) draw_display_name_;
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
}; };
...@@ -202,6 +209,8 @@ public: ...@@ -202,6 +209,8 @@ public:
_CP_OPT(std::wstring) draw_display_name_; _CP_OPT(std::wstring) draw_display_name_;
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
}; };
...@@ -224,6 +233,8 @@ public: ...@@ -224,6 +233,8 @@ public:
_CP_OPT(std::wstring) draw_name_; _CP_OPT(std::wstring) draw_name_;
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
...@@ -236,7 +247,6 @@ typedef weak_ptr<style>::Type style_weak_ptr; ...@@ -236,7 +247,6 @@ typedef weak_ptr<style>::Type style_weak_ptr;
typedef ::std::vector< style_weak_ptr > style_weak_ptr_array; typedef ::std::vector< style_weak_ptr > style_weak_ptr_array;
typedef ::std::vector< style_ptr > style_ptr_array; typedef ::std::vector< style_ptr > style_ptr_array;
/// \class style
/// style:style /// style:style
class style : public office_element_impl<style> class style : public office_element_impl<style>
{ {
...@@ -247,14 +257,14 @@ public: ...@@ -247,14 +257,14 @@ public:
static const ElementType type = typeStyleStyle; static const ElementType type = typeStyleStyle;
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
//virtual ::std::wostream & text_to_stream(::std::wostream & _Wostream) const;
style() : style_auto_update_(false) { } style() : style_auto_update_(false) { }
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
// attr // attr
std::wstring style_name_; std::wstring style_name_;
_CP_OPT( std::wstring ) style_display_name_; // optional _CP_OPT( std::wstring ) style_display_name_; // optional
...@@ -282,6 +292,8 @@ class styles ...@@ -282,6 +292,8 @@ class styles
{ {
public: public:
void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context); void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
virtual void add_child_element(office_element_ptr & child, odf_conversion_context * Context)
{std::wstringstream str; str <<L"Non add child in _ 2"; _CP_LOG(error) << str.str();}
office_element_ptr_array style_style_; ///< style-style office_element_ptr_array style_style_; ///< style-style
office_element_ptr_array text_list_style_; ///< text-list-style office_element_ptr_array text_list_style_; ///< text-list-style
...@@ -300,6 +312,8 @@ class draw_styles ...@@ -300,6 +312,8 @@ class draw_styles
{ {
public: public:
void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context); void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
virtual void add_child_element(office_element_ptr & child, odf_conversion_context * Context)
{std::wstringstream str; str <<L"Non add child in _3"; _CP_LOG(error) << str.str();}
office_element_ptr_array draw_gradient_; office_element_ptr_array draw_gradient_;
office_element_ptr_array draw_fill_image_; office_element_ptr_array draw_fill_image_;
...@@ -334,6 +348,8 @@ public: ...@@ -334,6 +348,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
styles styles_; ///< styles styles styles_; ///< styles
...@@ -354,6 +370,8 @@ public: ...@@ -354,6 +370,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
office_element_ptr_array style_master_page_; // office_element_ptr_array style_master_page_; //
...@@ -394,6 +412,8 @@ public: ...@@ -394,6 +412,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
int find_placeHolderIndex(presentation_class::type placeHolder,int & last_idx); int find_placeHolderIndex(presentation_class::type placeHolder,int & last_idx);
...@@ -429,6 +449,8 @@ public: ...@@ -429,6 +449,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
styles styles_; styles styles_;
...@@ -479,6 +501,8 @@ public: ...@@ -479,6 +501,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
public: public:
...@@ -503,6 +527,8 @@ public: ...@@ -503,6 +527,8 @@ public:
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
public: public:
// header_footer_content_impl content_; // header_footer_content_impl content_;
...@@ -525,6 +551,8 @@ public: ...@@ -525,6 +551,8 @@ public:
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
//header_footer_content_impl content_; //header_footer_content_impl content_;
...@@ -545,6 +573,8 @@ public: ...@@ -545,6 +573,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
// header_footer_content_impl content_; // header_footer_content_impl content_;
...@@ -564,6 +594,8 @@ public: ...@@ -564,6 +594,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
// header_footer_content_impl content_; // header_footer_content_impl content_;
...@@ -582,6 +614,8 @@ public: ...@@ -582,6 +614,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
public: public:
...@@ -602,6 +636,8 @@ public: ...@@ -602,6 +636,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
_CP_OPT(unsigned int) fo_column_count_; _CP_OPT(unsigned int) fo_column_count_;
...@@ -625,6 +661,8 @@ public: ...@@ -625,6 +661,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
_CP_OPT(length) style_rel_width_; _CP_OPT(length) style_rel_width_;
...@@ -648,6 +686,8 @@ public: ...@@ -648,6 +686,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
std::wstring style_style_; // default solid std::wstring style_style_; // default solid
...@@ -670,6 +710,8 @@ public: ...@@ -670,6 +710,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
common_background_color_attlist common_background_color_attlist_; common_background_color_attlist common_background_color_attlist_;
...@@ -713,6 +755,8 @@ public: ...@@ -713,6 +755,8 @@ public:
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
office_element_ptr style_header_footer_properties_; office_element_ptr style_header_footer_properties_;
...@@ -733,6 +777,8 @@ public: ...@@ -733,6 +777,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
office_element_ptr style_header_footer_properties_; office_element_ptr style_header_footer_properties_;
...@@ -758,6 +804,8 @@ public: ...@@ -758,6 +804,8 @@ public:
office_element_ptr style_footer_style_; office_element_ptr style_footer_style_;
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
}; };
...@@ -865,6 +913,8 @@ public: ...@@ -865,6 +913,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
style_footnote_sep_attlist style_footnote_sep_attlist_; style_footnote_sep_attlist style_footnote_sep_attlist_;
...@@ -878,6 +928,8 @@ class style_page_layout_properties_elements ...@@ -878,6 +928,8 @@ class style_page_layout_properties_elements
{ {
public: public:
void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context); void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context);
virtual void add_child_element(office_element_ptr & child, odf_conversion_context * Context)
{std::wstringstream str; str <<L"Non add child in _4"; _CP_LOG(error) << str.str();}
office_element_ptr style_background_image_; office_element_ptr style_background_image_;
office_element_ptr style_columns_; office_element_ptr style_columns_;
...@@ -906,6 +958,8 @@ public: ...@@ -906,6 +958,8 @@ public:
style_page_layout_properties() { } style_page_layout_properties() { }
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
style_page_layout_properties_attlist style_page_layout_properties_attlist_; style_page_layout_properties_attlist style_page_layout_properties_attlist_;
...@@ -926,6 +980,8 @@ public: ...@@ -926,6 +980,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
noteclass noteclass_; noteclass noteclass_;
...@@ -962,6 +1018,8 @@ public: ...@@ -962,6 +1018,8 @@ public:
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name); virtual void add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
_CP_OPT(std::wstring) style_name_; _CP_OPT(std::wstring) style_name_;
......
...@@ -44,6 +44,8 @@ public: ...@@ -44,6 +44,8 @@ public:
office_element_ptr_array & get_content() { return text_list_style_content_; } office_element_ptr_array & get_content() { return text_list_style_content_; }
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name); virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
text_list_style_attr text_list_style_attr_; text_list_style_attr text_list_style_attr_;
...@@ -96,6 +98,8 @@ public: ...@@ -96,6 +98,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name); virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
friend class text_list_level_style_number; friend class text_list_level_style_number;
...@@ -133,6 +137,8 @@ public: ...@@ -133,6 +137,8 @@ public:
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name); virtual void add_child_element(const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
const _CP_OPT(length) & get_fo_text_indent() const { return fo_text_indent_; } const _CP_OPT(length) & get_fo_text_indent() const { return fo_text_indent_; }
...@@ -164,6 +170,8 @@ public: ...@@ -164,6 +170,8 @@ public:
office_element_ptr style_list_level_properties_; office_element_ptr style_list_level_properties_;
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name); virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
text_list_level_style_attr text_list_level_style_attr_; text_list_level_style_attr text_list_level_style_attr_;
...@@ -204,6 +212,8 @@ public: ...@@ -204,6 +212,8 @@ public:
office_element_ptr style_list_level_properties_; office_element_ptr style_list_level_properties_;
virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name); virtual void add_child_element( const std::wstring & Ns, const std::wstring & Name);
virtual void add_child_element(office_element_ptr & child)
{std::wstringstream str; str <<L"Non add child in "; str << ns; str << L":"; str <<name; _CP_LOG(error) << str.str();}
virtual void serialize(std::wostream & strm){} virtual void serialize(std::wostream & strm){}
text_list_level_style_attr text_list_level_style_attr_; text_list_level_style_attr text_list_level_style_attr_;
......
#include "precompiled_cpodf.h"
#include <vector>
#include <boost/unordered_map.hpp>
#include "styles_lite_container.h"
namespace cpdoccore {
namespace odf {
struct style_ref_lite_container
{
int style_oox;
office_element_ptr style;
};
struct styles_lite_container::Impl
{
typedef std::vector<style_ref_lite_container> array_t;
array_t array_;
typedef boost::unordered_map<int, size_t> map_t;
map_t map_;
};
styles_lite_container::styles_lite_container(): impl_(new styles_lite_container::Impl() )
{
}
styles_lite_container::~styles_lite_container()
{
}
void styles_lite_container::add(const int style_oox, office_element_ptr content)
{
style_ref_lite_container ref = {style_oox, content};
impl_->array_.push_back(ref);
impl_->map_[style_oox] = impl_->array_.size() - 1;
}
office_element_ptr styles_lite_container::find_by_style_oox(const int style_oox)
{
styles_lite_container::Impl::map_t::const_iterator i = impl_->map_.find(style_oox);
if (i != impl_->map_.end())
{
return impl_->array_[i->second].style;
}
else
{
return office_element_ptr();
}
}
}
}
\ No newline at end of file
#pragma once
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPScopedPtr.h>
namespace cpdoccore {
namespace odf {
class office_element;
typedef shared_ptr<office_element>::Type office_element_ptr;
class styles_lite_container
{
public:
styles_lite_container();
~styles_lite_container();
public:
void add(const int oox_style, office_element_ptr content);
office_element_ptr find_by_style_oox(const int style_oox);
private:
struct Impl;
_CP_SCOPED_PTR(Impl) impl_;
};
}
}
...@@ -16,92 +16,9 @@ namespace odf { ...@@ -16,92 +16,9 @@ namespace odf {
using xml::xml_char_wc; using xml::xml_char_wc;
// table-table-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:name", table_name_);
CP_APPLY_ATTR(L"table:style-name", table_style_name_);
CP_APPLY_ATTR(L"table:template-name", table_template_name_);
CP_APPLY_ATTR(L"table:protected", table_protected_, false);
CP_APPLY_ATTR(L"table:protection-key", table_protection_key_);
CP_APPLY_ATTR(L"table:print", table_print_, true);
CP_APPLY_ATTR(L"table:print-ranges", table_print_ranges_);
CP_APPLY_ATTR(L"table:use-first-row-styles", table_use_first_row_styles_,false);
CP_APPLY_ATTR(L"table:use-banding-rows-styles", table_use_banding_rows_styles_,false);
CP_APPLY_ATTR(L"table:use-banding-columns-styles", table_use_banding_columns_styles_,false);
CP_APPLY_ATTR(L"table:use-first-column-styles", table_use_first_column_styles_,false);
}
// table-table-row-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_row_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:number-rows-repeated", table_number_rows_repeated_, (unsigned int)1/*0*/);
CP_APPLY_ATTR(L"table:style-name", table_style_name_);
CP_APPLY_ATTR(L"table:default-cell-style-name", table_default_cell_style_name_);
CP_APPLY_ATTR(L"table:visibility", table_visibility_, table_visibility(table_visibility::Visible));
}
// table-table-cell-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_cell_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:number-columns-repeated", table_number_columns_repeated_, (unsigned int)1/*0*/);
CP_APPLY_ATTR(L"table:style-name", table_style_name_);
CP_APPLY_ATTR(L"table:content-validation-name", table_content_validation_name_);
CP_APPLY_ATTR(L"table:formula", table_formula_);
common_value_and_type_attlist tmp;
if (tmp.add_attributes(Attributes))
common_value_and_type_attlist_ = tmp;
CP_APPLY_ATTR(L"table:protect", table_protect_, (bool)table_protect_);
}
// table-table-cell-attlist-extra
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_cell_attlist_extra::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:number-columns-spanned", table_number_columns_spanned_, (unsigned int)/*1*/1);
CP_APPLY_ATTR(L"table:number-rows-spanned", table_number_rows_spanned_, (unsigned int)1);
CP_APPLY_ATTR(L"table:number-matrix-columns-spanned", table_number_matrix_columns_spanned_);
CP_APPLY_ATTR(L"table:number-matrix-rows-spanned", table_number_matrix_rows_spanned_);
}
// table-table-source-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_source_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:mode", table_mode_, table_mode( table_mode::CopyAll ) );
CP_APPLY_ATTR(L"table:table-name", table_table_name_);
}
void table_linked_source_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
common_xlink_attlist_.add_attributes(Attributes);
CP_APPLY_ATTR(L"table:filter-name", table_filter_name_);
CP_APPLY_ATTR(L"table:filter-options", table_filter_options_);
CP_APPLY_ATTR(L"table:refresh-delay", table_refresh_delay_);
}
// table:table-source
//////////////////////////////////////////////////////////////////////////////////////////////////
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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_source_attlist_.add_attributes(Attributes);
table_linked_source_attlist_.add_attributes(Attributes);
}
void table_table_source::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_source::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
...@@ -112,11 +29,6 @@ void table_table_source::add_child_element(const ::std::wstring & Ns, const ::st ...@@ -112,11 +29,6 @@ void table_table_source::add_child_element(const ::std::wstring & Ns, const ::st
const wchar_t * table_table::ns = L"table"; const wchar_t * table_table::ns = L"table";
const wchar_t * table_table::name = L"table"; const wchar_t * table_table::name = L"table";
void table_table::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_attlist_.add_attributes(Attributes);
}
void table_table::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_table::add_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)
...@@ -174,24 +86,11 @@ void table_table::serialize(std::wostream & _Wostream) ...@@ -174,24 +86,11 @@ void table_table::serialize(std::wostream & _Wostream)
} }
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_column_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:number-columns-repeated", table_number_columns_repeated_, (unsigned int)1/*0*/);
CP_APPLY_ATTR(L"table:style-name", table_style_name_);
CP_APPLY_ATTR(L"table:visibility", table_visibility_, table_visibility(table_visibility::Visible));
CP_APPLY_ATTR(L"table:default-cell-style-name", table_default_cell_style_name_);
}
// table:table-column // table:table-column
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_column_attlist_.add_attributes(Attributes);
}
void table_table_column::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context) void table_table_column::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name, odf_conversion_context * Context)
{ {
CP_NOT_APPLICABLE_ELM(); CP_NOT_APPLICABLE_ELM();
...@@ -202,10 +101,6 @@ void table_table_column::add_child_element( const ::std::wstring & Ns, const ::s ...@@ -202,10 +101,6 @@ void table_table_column::add_child_element( const ::std::wstring & Ns, const ::s
const wchar_t * table_table_columns::ns = L"table"; const wchar_t * table_table_columns::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_columns::add_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")
...@@ -221,10 +116,6 @@ void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::s ...@@ -221,10 +116,6 @@ void table_table_columns::add_child_element(const ::std::wstring & Ns, const ::s
const wchar_t * table_table_header_columns::ns = L"table"; const wchar_t * table_table_header_columns::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void table_table_header_columns::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_header_columns::add_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")
...@@ -281,24 +172,14 @@ _CP_PTR(table_columns_no_group) table_columns_no_group::create() ...@@ -281,24 +172,14 @@ _CP_PTR(table_columns_no_group) table_columns_no_group::create()
return boost::make_shared<table_columns_no_group>(); return boost::make_shared<table_columns_no_group>();
} }
// table-table-column-group-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_column_group_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:display", table_display_, true);
}
// table:table-column-group // table:table-column-group
////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////
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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_column_group_attlist_.add_attributes(Attributes);
}
void table_table_column_group::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_column_group::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
table_columns_and_groups_.add_child_element(Ns, Name, getContext()); table_columns_and_groups_.add_child_element(Ns, Name, getContext());
...@@ -345,12 +226,6 @@ void table_table_cell_content::add_child_element( const ::std::wstring & Ns, co ...@@ -345,12 +226,6 @@ void table_table_cell_content::add_child_element( const ::std::wstring & Ns, co
const wchar_t * table_table_cell::ns = L"table"; const wchar_t * table_table_cell::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_cell_attlist_.add_attributes(Attributes);
table_table_cell_attlist_extra_.add_attributes(Attributes);
}
void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
table_table_cell_content_.add_child_element(Ns, Name, getContext()); table_table_cell_content_.add_child_element(Ns, Name, getContext());
...@@ -363,11 +238,6 @@ void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std ...@@ -363,11 +238,6 @@ void table_table_cell::add_child_element( const ::std::wstring & Ns, const ::std
const wchar_t * table_covered_table_cell::ns = L"table"; const wchar_t * table_covered_table_cell::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_cell_attlist_.add_attributes(Attributes);
}
void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
empty_ = false; empty_ = false;
...@@ -381,11 +251,6 @@ void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, co ...@@ -381,11 +251,6 @@ void table_covered_table_cell::add_child_element( const ::std::wstring & Ns, co
const wchar_t * table_table_row::ns = L"table"; const wchar_t * table_table_row::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_row_attlist_.add_attributes( Attributes );
}
void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_row::add_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") ||
...@@ -403,11 +268,6 @@ void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std: ...@@ -403,11 +268,6 @@ void table_table_row::add_child_element( const ::std::wstring & Ns, const ::std:
const wchar_t * table_table_rows::ns = L"table"; const wchar_t * table_table_rows::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
CP_CREATE_ELEMENT(table_table_row_); CP_CREATE_ELEMENT(table_table_row_);
...@@ -419,10 +279,6 @@ void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::st ...@@ -419,10 +279,6 @@ void table_table_rows::add_child_element( const ::std::wstring & Ns, const ::st
const wchar_t * table_table_header_rows::ns = L"table"; const wchar_t * table_table_header_rows::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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void table_table_header_rows::add_child_element( const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_header_rows::add_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")
...@@ -514,22 +370,11 @@ const wchar_t * table_table_row_group::ns = L"table"; ...@@ -514,22 +370,11 @@ 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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
table_table_row_group_attlist_.add_attributes(Attributes);
}
void table_table_row_group::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_table_row_group::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
table_rows_and_groups_.add_child_element(Ns, Name, getContext()); table_rows_and_groups_.add_child_element(Ns, Name, getContext());
} }
// table-table-row-group-attlist
//////////////////////////////////////////////////////////////////////////////////////////////////
void table_table_row_group_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:display", table_display_, true);
}
/////////// ///////////
...@@ -540,11 +385,6 @@ void table_table_row_group_attlist::add_attributes( const xml::attributes_wc_ptr ...@@ -540,11 +385,6 @@ void table_table_row_group_attlist::add_attributes( const xml::attributes_wc_ptr
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::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
}
void table_shapes::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name) void table_shapes::add_child_element(const ::std::wstring & Ns, const ::std::wstring & Name)
{ {
create_element(Ns,Name,content_,getContext()); create_element(Ns,Name,content_,getContext());
......
...@@ -20,9 +20,6 @@ namespace odf { ...@@ -20,9 +20,6 @@ namespace odf {
// table-table-attlist // table-table-attlist
class table_table_attlist class table_table_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
_CP_OPT(std::wstring) table_name_; _CP_OPT(std::wstring) table_name_;
_CP_OPT(style_ref) table_style_name_; _CP_OPT(style_ref) table_style_name_;
...@@ -44,9 +41,6 @@ public: ...@@ -44,9 +41,6 @@ public:
// table-table-row-attlist // table-table-row-attlist
class table_table_row_attlist class table_table_row_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
unsigned int table_number_rows_repeated_; // default 1 unsigned int table_number_rows_repeated_; // default 1
_CP_OPT(style_ref) table_style_name_; _CP_OPT(style_ref) table_style_name_;
...@@ -58,9 +52,6 @@ public: ...@@ -58,9 +52,6 @@ public:
// table-table-cell-attlist // table-table-cell-attlist
class table_table_cell_attlist class table_table_cell_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
unsigned int table_number_columns_repeated_; // default 1 unsigned int table_number_columns_repeated_; // default 1
_CP_OPT(style_ref) table_style_name_; _CP_OPT(style_ref) table_style_name_;
...@@ -76,9 +67,6 @@ public: ...@@ -76,9 +67,6 @@ public:
// table-table-cell-attlist-extra // table-table-cell-attlist-extra
class table_table_cell_attlist_extra class table_table_cell_attlist_extra
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
unsigned int table_number_columns_spanned_; // default 1 unsigned int table_number_columns_spanned_; // default 1
unsigned int table_number_rows_spanned_; // default 1 unsigned int table_number_rows_spanned_; // default 1
...@@ -90,9 +78,6 @@ public: ...@@ -90,9 +78,6 @@ public:
// table-table-source-attlist // table-table-source-attlist
class table_table_source_attlist class table_table_source_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
table_mode table_mode_; // default CopyAll table_mode table_mode_; // default CopyAll
_CP_OPT(std::wstring) table_table_name_; _CP_OPT(std::wstring) table_table_name_;
...@@ -102,9 +87,6 @@ public: ...@@ -102,9 +87,6 @@ public:
// table-linked-source-attlist // table-linked-source-attlist
class table_linked_source_attlist class table_linked_source_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
common_xlink_attlist common_xlink_attlist_; common_xlink_attlist common_xlink_attlist_;
...@@ -135,10 +117,6 @@ public: ...@@ -135,10 +117,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
}; };
CP_REGISTER_OFFICE_ELEMENT2(table_table_source); CP_REGISTER_OFFICE_ELEMENT2(table_table_source);
...@@ -168,8 +146,6 @@ public: ...@@ -168,8 +146,6 @@ public:
xml::NodeType xml_type; xml::NodeType xml_type;
ElementType type; ElementType type;
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) {}
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
public: public:
...@@ -213,9 +189,6 @@ public: ...@@ -213,9 +189,6 @@ public:
// table-table-column-attlist // table-table-column-attlist
class table_table_column_attlist class table_table_column_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
unsigned int table_number_columns_repeated_; // default 1 unsigned int table_number_columns_repeated_; // default 1
_CP_OPT(style_ref) table_style_name_; _CP_OPT(style_ref) table_style_name_;
...@@ -242,9 +215,6 @@ public: ...@@ -242,9 +215,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public: public:
table_table_column_attlist table_table_column_attlist_; table_table_column_attlist table_table_column_attlist_;
...@@ -269,10 +239,7 @@ public: ...@@ -269,10 +239,7 @@ public:
virtual void add_child_element( office_element_ptr & child_element){} virtual void add_child_element( office_element_ptr & child_element){}
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
office_element_ptr_array table_table_column_; office_element_ptr_array table_table_column_;
}; };
...@@ -297,10 +264,6 @@ public: ...@@ -297,10 +264,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
office_element_ptr_array table_table_column_; office_element_ptr_array table_table_column_;
}; };
...@@ -310,10 +273,6 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_columns); ...@@ -310,10 +273,6 @@ CP_REGISTER_OFFICE_ELEMENT2(table_table_header_columns);
// table-table-column-group-attlist // table-table-column-group-attlist
class table_table_column_group_attlist class table_table_column_group_attlist
{ {
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
private:
bool table_display_; // default true bool table_display_; // default true
}; };
...@@ -340,10 +299,6 @@ public: ...@@ -340,10 +299,6 @@ public:
{ {
} }
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
table_table_column_group_attlist table_table_column_group_attlist_; table_table_column_group_attlist table_table_column_group_attlist_;
table_columns_and_groups table_columns_and_groups_; table_columns_and_groups table_columns_and_groups_;
...@@ -369,10 +324,6 @@ public: ...@@ -369,10 +324,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
table_table_row_attlist table_table_row_attlist_; table_table_row_attlist table_table_row_attlist_;
office_element_ptr_array content_; // table-table-cell, table-covered-table-cell office_element_ptr_array content_; // table-table-cell, table-covered-table-cell
...@@ -416,11 +367,6 @@ public: ...@@ -416,11 +367,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
table_table_cell_attlist table_table_cell_attlist_; table_table_cell_attlist table_table_cell_attlist_;
table_table_cell_attlist_extra table_table_cell_attlist_extra_; table_table_cell_attlist_extra table_table_cell_attlist_extra_;
table_table_cell_content table_table_cell_content_; table_table_cell_content table_table_cell_content_;
...@@ -449,10 +395,6 @@ public: ...@@ -449,10 +395,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
bool empty_; bool empty_;
table_table_cell_attlist table_table_cell_attlist_; table_table_cell_attlist table_table_cell_attlist_;
table_table_cell_content table_table_cell_content_; table_table_cell_content table_table_cell_content_;
...@@ -483,10 +425,6 @@ public: ...@@ -483,10 +425,6 @@ public:
{ {
} }
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
office_element_ptr_array table_table_row_; office_element_ptr_array table_table_row_;
}; };
...@@ -511,10 +449,6 @@ public: ...@@ -511,10 +449,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
office_element_ptr_array table_table_row_; office_element_ptr_array table_table_row_;
}; };
...@@ -531,7 +465,6 @@ public: ...@@ -531,7 +465,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
public:
office_element_ptr table_table_rows_; office_element_ptr table_table_rows_;
office_element_ptr_array table_table_row_; office_element_ptr_array table_table_row_;
...@@ -547,8 +480,6 @@ public: ...@@ -547,8 +480,6 @@ public:
static const xml::NodeType xml_type = xml::typeElement; static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTableTableRowNoGroup; static const ElementType type = typeTableTableRowNoGroup;
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ) {}
static _CP_PTR(table_rows_no_group) create(); static _CP_PTR(table_rows_no_group) create();
CPDOCCORE_DEFINE_VISITABLE(); CPDOCCORE_DEFINE_VISITABLE();
...@@ -561,7 +492,7 @@ public: ...@@ -561,7 +492,7 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
public:
table_rows table_rows_1_; table_rows table_rows_1_;
bool was_header_; bool was_header_;
...@@ -584,7 +515,6 @@ public: ...@@ -584,7 +515,6 @@ public:
int get_count(){return content_.size();}// .. int get_count(){return content_.size();}// ..
public:
office_element_ptr_array content_; office_element_ptr_array content_;
//int type_; //int type_;
//office_element_ptr table_table_row_group_; //office_element_ptr table_table_row_group_;
...@@ -596,15 +526,11 @@ public: ...@@ -596,15 +526,11 @@ public:
class table_table_row_group_attlist class table_table_row_group_attlist
{ {
public: public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
bool table_display_; // default true bool table_display_; // default true
}; };
//
// \class table_table_row_group
// table-table-row-group
// table:table-row-group // table:table-row-group
class table_table_row_group : public office_element_impl<table_table_row_group> class table_table_row_group : public office_element_impl<table_table_row_group>
{ {
...@@ -624,10 +550,6 @@ public: ...@@ -624,10 +550,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
table_table_row_group_attlist table_table_row_group_attlist_; table_table_row_group_attlist table_table_row_group_attlist_;
table_rows_and_groups table_rows_and_groups_; table_rows_and_groups table_rows_and_groups_;
...@@ -653,10 +575,6 @@ public: ...@@ -653,10 +575,6 @@ public:
virtual void serialize(std::wostream & _Wostream); virtual void serialize(std::wostream & _Wostream);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
table_table_attlist table_table_attlist_; table_table_attlist table_table_attlist_;
office_element_ptr table_table_source_;//table-table-source office_element_ptr table_table_source_;//table-table-source
//office-dde-source //office-dde-source
...@@ -688,10 +606,6 @@ public: ...@@ -688,10 +606,6 @@ public:
virtual void serialize(std::wostream & _Wostream){} virtual void serialize(std::wostream & _Wostream){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
private:
office_element_ptr_array content_; office_element_ptr_array content_;
}; };
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include" AdditionalIncludeDirectories="..\..\ASCOfficeOdfFile\src\odf\datatypes;.\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include" AdditionalIncludeDirectories="..\..\ASCOfficeOdfFile\src\odf\datatypes;.\OdfFormat;.\Oox2OdfConverter;..\..\Common\DocxFormat\Source;..\..\Common\DocxFormat\Source\XML;..\..\ASCOfficeOdfFile\include;..\..\ASCOfficeOdfFile\3dparty\utf8cpp\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER"
RuntimeLibrary="2" RuntimeLibrary="2"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
...@@ -152,6 +152,10 @@ ...@@ -152,6 +152,10 @@
RelativePath=".\Oox2OdfConverter\Converter.cpp" RelativePath=".\Oox2OdfConverter\Converter.cpp"
> >
</File> </File>
<File
RelativePath=".\Oox2OdfConverter\DocxConverter.cpp"
>
</File>
<File <File
RelativePath=".\Oox2OdfConverter\stdafx.cpp" RelativePath=".\Oox2OdfConverter\stdafx.cpp"
> >
...@@ -172,6 +176,10 @@ ...@@ -172,6 +176,10 @@
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath=".\Oox2OdfConverter\XlsxConverter.cpp"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="Header Files"
...@@ -182,10 +190,18 @@ ...@@ -182,10 +190,18 @@
RelativePath=".\Oox2OdfConverter\Converter.h" RelativePath=".\Oox2OdfConverter\Converter.h"
> >
</File> </File>
<File
RelativePath=".\Oox2OdfConverter\DocxConverter.h"
>
</File>
<File <File
RelativePath=".\Oox2OdfConverter\stdafx.h" RelativePath=".\Oox2OdfConverter\stdafx.h"
> >
</File> </File>
<File
RelativePath=".\Oox2OdfConverter\XlsxConverter.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
......
#pragma once
#include "stdAfx.h" #include "stdAfx.h"
#include "Converter.h" #include "Converter.h"
#include "XlsxConverter.h"
#include <XlsxFormat\Xlsx.h> #include "DocxConverter.h"
#include <DocxFormat\Docx.h>
#include <boost/foreach.hpp>
#include "ods_conversion_context.h"
//#include "odt_conversion_context.h"
using namespace cpdoccore;
namespace Oox2Odf namespace Oox2Odf
{ {
class Impl Converter::Converter(const std::wstring & path)
{
friend class Converter;
public:
Impl(const std::wstring & path,const std::wstring & type) : output_document(type)
{
const OOX::CPath oox_path(CString(path.c_str()));
docx_document =0;
xlsx_document =0;
if (type == L"text")
{
docx_document = new OOX::CDocx(oox_path);
}
if (type == L"spreadsheet")
{
xlsx_document = new OOX::Spreadsheet::CXlsx(oox_path);
}
}
public:
void convert(/*Odt::IOdtEvent& Event*/);
void write(const std::wstring & path);
private:
OOX::CDocx *docx_document;
OOX::Spreadsheet::CXlsx *xlsx_document;
odf::package::odf_document output_document;
};
void Impl::write(const std::wstring & path)
{
output_document.write(path);
}
void Impl::convert()
{
odf::ods_conversion_context ods_conversion_context_(&output_document);
if (docx_document)
{
// , (Core, App)
// -
const OOX::CDocument* document = docx_document->GetDocument();
if (document)
{ {
//odf_context.convert(document); - odf std::wstring type = L"spreadsheet";
} if (type == L"text") impl_ = new DocxConverter(path);
} if (type == L"spreadsheet") impl_ = new XlsxConverter(path);
else if (xlsx_document)
{
const OOX::Spreadsheet::CWorkbook *Workbook= xlsx_document->GetWorkbook();
CAtlMap<CString, OOX::Spreadsheet::CWorksheet*> &arrWorksheets = xlsx_document->GetWorksheets();
//convert(xlsx_document->GetWorkbook(),odf_conversion_context_);
if (Workbook)
{
ods_conversion_context_.start_document();
if(Workbook->m_oSheets.IsInit())
{
CSimpleArray<OOX::Spreadsheet::CSheet*>& aWs = Workbook->m_oSheets->m_arrItems;
for(int i = 0, length = aWs.GetSize(); i < length; ++i)
{
OOX::Spreadsheet::CSheet* pSheet = aWs[i];
if(pSheet->m_oRid.IsInit())
{
CString sSheetRId = pSheet->m_oRid.get2().ToString();
CAtlMap<CString, OOX::Spreadsheet::CWorksheet*>::CPair* pPair = arrWorksheets.Lookup(sSheetRId);
if (NULL != pPair)
{
OOX::Spreadsheet::CWorksheet *pWorksheet = pPair->m_value;
if (NULL != pWorksheet && pWorksheet->m_oSheetData.IsInit())
{
std::wstring name = string2std_string(pSheet->m_oName.get2());
ods_conversion_context_.start_sheet(name);
//CAtlMap<CString, OOX::Spreadsheet::CWorksheet*>::CPair* pair = aWorksheets.Lookup(pSheet->m_oRid->GetValue());
//if(NULL != pair)
//{
// nCurPos = m_oBcw.WriteItemStart(c_oSerWorksheetsTypes::Worksheet);
// WriteWorksheet(*pSheet, *pair->m_value);
// m_oBcw.WriteItemWithLengthEnd(nCurPos);
//}
ods_conversion_context_.end_sheet();
}
} }
}
}
}
ods_conversion_context_.end_document();
}
}
}
///////////////
Converter::Converter(const std::wstring & path, const std::wstring & type)
{
impl_ = new Impl(path,type);
}
Converter::~Converter() Converter::~Converter()
{ {
if (impl_ )delete impl_ ; if (impl_ )delete impl_ ;
} }
void Converter::convert(/*Odt::IOdtEvent& Event*/) void Converter::convert()
{ {
if (!impl_)return; if (!impl_)return;
impl_->convert(/*Event*/); impl_->convert();
} }
void Converter::write(const std::wstring & path) const void Converter::write(const std::wstring & path) const
{ {
......
...@@ -9,12 +9,19 @@ static std::wstring string2std_string(CString val) ...@@ -9,12 +9,19 @@ static std::wstring string2std_string(CString val)
namespace Oox2Odf namespace Oox2Odf
{ {
class Impl; class OoxConverter
{
public:
virtual void convert() = 0;
virtual void write(const std::wstring & path) = 0;
OoxConverter(){}
};
class Converter class Converter
{ {
public: public:
Converter(const std::wstring & path, const std::wstring & type); Converter(const std::wstring & path);
virtual ~Converter(); virtual ~Converter();
public: public:
...@@ -22,9 +29,9 @@ namespace Oox2Odf ...@@ -22,9 +29,9 @@ namespace Oox2Odf
void write(const std::wstring & path) const; void write(const std::wstring & path) const;
Impl * get_impl() { return impl_; } OoxConverter * get_ooxConverter() { return impl_; }
private: private:
Impl* impl_; OoxConverter* impl_;
}; };
} // namespace Oox2Odf:Convert } // namespace Oox2Odf:Convert
#pragma once
#include "stdAfx.h"
#include "DocxConverter.h"
#include <DocxFormat\Docx.h>
#include <boost/foreach.hpp>
#include "odf_conversion_context.h"
//#include "odt_conversion_context.h"
using namespace cpdoccore;
namespace Oox2Odf
{
DocxConverter::DocxConverter(const std::wstring & path)
{
output_document = new odf::package::odf_document(L"text");
const OOX::CPath oox_path(CString(path.c_str()));
docx_document = new OOX::CDocx(oox_path);
}
void DocxConverter::write(const std::wstring & path)
{
if (!output_document)return;
output_document->write(path);
}
void DocxConverter::convert()
{
if (!docx_document)return;
const OOX::CDocument* document = docx_document->GetDocument();
if (!document)return;
//odf_context_ = new odf::odf_conversion_context(output_document);
}
}
\ No newline at end of file
#pragma once
#include "Converter.h"
namespace OOX
{
class CDocx;
}
namespace cpdoccore
{
namespace odf
{
namespace package
{
class odf_document;
}
class ods_conversion_context;
}
}
namespace Oox2Odf
{
class DocxConverter : public OoxConverter
{
public:
DocxConverter(const std::wstring & path);
virtual void convert();
virtual void write(const std::wstring & path);
private:
OOX::CDocx *docx_document;
cpdoccore::odf::package::odf_document *output_document;
///////////////////////////////
};
}
\ No newline at end of file
#pragma once
#include "stdAfx.h"
#include "XlsxConverter.h"
#include <boost/foreach.hpp>
#include "ods_conversion_context.h"
using namespace cpdoccore;
namespace Oox2Odf
{
XlsxConverter::XlsxConverter(const std::wstring & path)
{
const OOX::CPath oox_path(CString(path.c_str()));
xlsx_document = new OOX::Spreadsheet::CXlsx(oox_path);
output_document = new odf::package::odf_document(L"spreadsheet");
}
void XlsxConverter::write(const std::wstring & path)
{
if (!output_document)return;
output_document->write(path);
}
void XlsxConverter::convert()
{
if (!xlsx_document)return;
if (!output_document)return;
ods_context = new odf::ods_conversion_context(output_document);
if (!ods_context)return;
convert_styles();
ods_context->start_document();
convert_sheets();
ods_context->end_document();
}
void XlsxConverter::convert_sheets()
{
if (!ods_context) return;
const OOX::Spreadsheet::CWorkbook *Workbook= xlsx_document->GetWorkbook();
if (!Workbook) return;
CAtlMap<CString, OOX::Spreadsheet::CWorksheet*> &arrWorksheets = xlsx_document->GetWorksheets();
if(Workbook->m_oSheets.IsInit())
{
CSimpleArray<OOX::Spreadsheet::CSheet*>& aWs = Workbook->m_oSheets->m_arrItems;//
for(int i = 0, length = aWs.GetSize(); i < length; ++i)
{
OOX::Spreadsheet::CSheet* pSheet = aWs[i];
if(pSheet->m_oRid.IsInit())
{
CString sSheetRId = pSheet->m_oRid.get2().ToString();
CAtlMap<CString, OOX::Spreadsheet::CWorksheet*>::CPair* pPair = arrWorksheets.Lookup(sSheetRId);
if (NULL != pPair)
{
OOX::Spreadsheet::CWorksheet *pWorksheet = pPair->m_value;
if (NULL != pWorksheet && pWorksheet->m_oSheetData.IsInit())
{
std::wstring name = string2std_string(pSheet->m_oName.get2());
ods_context->start_sheet(name);
convert(pWorksheet);
ods_context->end_sheet();
}
}
}
}
}
}
void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
{
}
void XlsxConverter::convert_styles()
{
if (!ods_context) return;
OOX::Spreadsheet::CStyles * xlsx_styles = xlsx_document->GetStyles();
if (!xlsx_styles)return;
if (!xlsx_styles->m_oCellStyleXfs.IsInit())return;
for (long i=0;i< xlsx_styles->m_oCellXfs->m_oCount->GetValue(); i++)
{
ods_context->styles_context().start_style(L"" ,odf::style_family::TableCell,true); // - () - oox
//
// //find_fill_by_id (xlsx_styles->m_oCellXfs->m_arrItems[i]->m_oFillId); // graphic_properies
// //find_num_format_by_id (xlsx_styles->m_oCellXfs->m_arrItems[i]->m_oNumFmtId); //
// //find_text_by_id (xlsx_styles->m_oCellXfs->m_arrItems[i]->m_oFontId); // text_properties
//
ods_context->styles_context().end_style();
}
for (long i=0;i< xlsx_styles->m_oCellStyles->m_oCount->GetValue(); i++)//styles.xml
{
std::wstring style_name = string2std_string(xlsx_styles->m_oCellStyles->m_arrItems[i]->m_oName.get2());
ods_context->styles_context().start_style(style_name ,odf::style_family::TableCell);
int id_xfd = xlsx_styles->m_oCellStyles->m_arrItems[i]->m_oXfId->GetValue();
xlsx_styles->m_oCellXfs->m_arrItems[id_xfd];//
//odf::office_element_ptr & elm = ods_context->styles_context().find_by_id(, odf::style_family::TableCell);
//ods_context->styles_.back()->add_child(elm);
//ods_context->styles_context().start_style(xlsx_styles->m_oCellStyles->m_arrItems[i]->m_oName,odf::style_family::TableCell);
//generate style:style
//ods_context->styles_context().current_style().set_cell_style_id();
//// - , text_properies, ... - //style:table-cell-properties, style:paragraph-properties , ...
//ods_context->styles_context().current_style().set_hidden(xlsx_styles->m_oCellStyles->m_arrItems[i]->m_oHidden->ToBool())
//ods_context->styles_context().current_style().set_level(xlsx_styles->m_oCellStyles->m_arrItems[i]->m_oILevel->GetValue())
//
ods_context->styles_context().end_style();
}
}
} // namespace Docx2Odt
\ No newline at end of file
#pragma once
#include "Converter.h"
#include <boost/foreach.hpp>
#include <XlsxFormat\Xlsx.h>
namespace OOX
{
class CDocx;
}
namespace cpdoccore
{
namespace odf
{
namespace package
{
class odf_document;
}
class ods_conversion_context;
}
}
namespace Oox2Odf
{
class XlsxConverter : public OoxConverter
{
public:
XlsxConverter(const std::wstring & path);
virtual void convert();
virtual void write(const std::wstring & path);
private:
OOX::Spreadsheet::CXlsx *xlsx_document;
cpdoccore::odf::package::odf_document *output_document;
cpdoccore::odf::ods_conversion_context *ods_context;
void convert_sheets();
void convert_styles();
void convert(OOX::Spreadsheet::CWorksheet *oox_sheet);
};
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment