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

x2t собран с конвертацией Open Office форматов (в обе стороны)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62955 954022d7-b5bf-4e40-9824-e11837661b57
parent 33ef5b44
......@@ -49,7 +49,6 @@ SOURCES += \
../src/odf/draw_frame_pptx.cpp \
../src/odf/draw_frame_xlsx.cpp \
../src/odf/draw_page.cpp \
../src/odf/draw_page_pptx.cpp \
../src/odf/draw_shapes.cpp \
../src/odf/draw_shapes_docx.cpp \
../src/odf/draw_shapes_pptx.cpp \
......
......@@ -17,7 +17,10 @@
#include <cpdoccore/xml/simple_xml_writer.h>
namespace cpdoccore {
namespace odf {
using namespace odf_types;
namespace odf_reader {
void draw_page::pptx_convert(oox::pptx_conversion_context & Context)
{
......
......@@ -48,7 +48,7 @@ public:
virtual void start_text_context() = 0;
virtual void end_text_context() = 0;
virtual void start_image(std::wstring & image_file_name) = 0;
virtual void start_image(const std::wstring & image_file_name) = 0;
virtual odf_style_context * styles_context();
......
......@@ -40,7 +40,7 @@ public:
void process_office_styles (office_element_ptr root );
void reset_defaults();
void add_default(odf_style_state_ptr & state) {current_default_styles_.push_back(state);}
void add_default(const odf_style_state_ptr & state) {current_default_styles_.push_back(state);}
std::wstring find_odf_style_name_default (odf_types::style_family::type family);
office_element_ptr find_odf_style_default (odf_types::style_family::type family);
......
......@@ -52,7 +52,7 @@ void odf_style_state::add_child(office_element_ptr & child)
odf_style_->add_child_element(child);
}
void odf_style_state::set_name(std::wstring & name)
void odf_style_state::set_name(std::wstring name)
{
odf_style_name_ = name;
......@@ -62,7 +62,7 @@ void odf_style_state::set_name(std::wstring & name)
style_->style_name_ = name;
}
void odf_style_state::set_display_name(std::wstring & name)
void odf_style_state::set_display_name(std::wstring name)
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return;
......@@ -82,7 +82,7 @@ style_family::type odf_style_state::get_family_type()
{
return style_family_;
}
void odf_style_state::set_parent_style_name(std::wstring & name)
void odf_style_state::set_parent_style_name(std::wstring name)
{
if (name.length() < 1) return;
......@@ -93,7 +93,7 @@ void odf_style_state::set_parent_style_name(std::wstring & name)
return;
style_->style_parent_style_name_ = name;
}
void odf_style_state::set_list_style_name(std::wstring & name)
void odf_style_state::set_list_style_name(std::wstring name)
{
if (name.length() < 1) return;
......@@ -108,7 +108,7 @@ void odf_style_state::set_dont_write(bool Val)
{
writable_ = !Val;
}
void odf_style_state::set_data_style_name(std::wstring & name)
void odf_style_state::set_data_style_name(std::wstring name)
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return;
......
......@@ -46,7 +46,7 @@ public:
void add_child(office_element_ptr & child);
/////////////////////////////////////////////////////////////////////////////////////////
void set_name(std::wstring & name);
void set_name(std::wstring name);
std::wstring get_name();
odf_types::style_family::type get_family_type();
......@@ -54,11 +54,11 @@ public:
void set_number_format(int id) {num_fmt_id_ = id;}
int get_number_format() {return num_fmt_id_;}
void set_parent_style_name(std::wstring & name) ;
void set_data_style_name(std::wstring & name);
void set_list_style_name(std::wstring & name);
void set_parent_style_name(std::wstring name) ;
void set_data_style_name(std::wstring name);
void set_list_style_name(std::wstring name);
void set_display_name(std::wstring & name);
void set_display_name(std::wstring name);
//////////////////////////////////////////////////////////////////////////////////////////
style_text_properties * get_text_properties();
style_paragraph_properties * get_paragraph_properties() ;
......
......@@ -74,11 +74,11 @@ void ods_conversion_context::start_conditional_formats()
current_table().start_conditional_formats();
}
void ods_conversion_context::add_defined_range(std::wstring & name,std::wstring & cell_range, int sheet_id, bool printable)
void ods_conversion_context::add_defined_range(const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable)
{
table_context_.add_defined_range(name,cell_range, sheet_id, printable);
}
void ods_conversion_context::add_defined_expression(std::wstring & name,std::wstring & value, int sheet_id, bool printable)
void ods_conversion_context::add_defined_expression( const std::wstring & name, const std::wstring & value, int sheet_id, bool printable)
{
table_context_.add_defined_expression(name,value, sheet_id, printable);
}
......@@ -95,7 +95,7 @@ void ods_conversion_context::start_sheet()
current_table().set_table_master_page(page_layout_context()->last_master().get_name());
}
void ods_conversion_context::set_sheet_dimension(std::wstring & ref)
void ods_conversion_context::set_sheet_dimension(const std::wstring & ref)
{
std::vector<std::wstring> ref_cells;
boost::algorithm::split(ref_cells,ref, boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
......@@ -246,7 +246,7 @@ void ods_conversion_context::add_hyperlink(std::wstring & ref, std::wstring & li
}
}
void ods_conversion_context::add_merge_cells(std::wstring & ref)
void ods_conversion_context::add_merge_cells(const std::wstring & ref)
{
std::vector<std::wstring> ref_cells;
boost::algorithm::split(ref_cells,ref, boost::algorithm::is_any_of(L":"), boost::algorithm::token_compress_on);
......@@ -414,7 +414,7 @@ void ods_conversion_context::end_text_context()
delete current_text_context_;
current_text_context_ = NULL;
}
void ods_conversion_context::add_text_content(std::wstring & text)
void ods_conversion_context::add_text_content(const std::wstring & text)
{
if (current_text_context_)
{
......@@ -463,7 +463,7 @@ void ods_conversion_context::end_drawings()
{
current_table().drawing_context()->clear();
}
void ods_conversion_context::start_image(std::wstring & image_file_name)
void ods_conversion_context::start_image(const std::wstring & image_file_name)
{
std::wstring odf_ref_name ;
......
......@@ -31,7 +31,7 @@ public:
virtual void end_document();
void start_sheet();
void set_sheet_dimension(std::wstring & ref);
void set_sheet_dimension(const std::wstring & ref);
void end_sheet();
void start_columns();
......@@ -49,10 +49,10 @@ public:
void end_rows();
void start_cell_text();
void add_text_content(std::wstring & text);
void add_text_content(const std::wstring & text);
void end_cell_text();
void add_merge_cells(std::wstring & ref);
void add_merge_cells(const std::wstring & ref);
void add_hyperlink(std::wstring & ref, std::wstring & link, std::wstring & display);
void start_comment (int col, int row, std::wstring & author);
......@@ -70,12 +70,12 @@ public:
void start_drawings();
void end_drawings();
virtual void start_image(std::wstring & image_file_name);
virtual void start_image(const std::wstring & image_file_name);
double convert_symbol_width(double val);
void add_defined_range(std::wstring & name,std::wstring & cell_range, int sheet_id, bool printable = false);
void add_defined_expression(std::wstring & name,std::wstring & value, int sheet_id, bool printable = false);
void add_defined_range(const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable = false);
void add_defined_expression(const std::wstring & name, const std::wstring & value, int sheet_id, bool printable = false);
void start_autofilter(std::wstring ref);
void end_autofilter(){}
......
......@@ -53,7 +53,7 @@ void ods_table_context::start_defined_expressions(office_element_ptr & root_elm)
table_defined_expressions_.root = root_elm;
}
void ods_table_context::add_defined_range(std::wstring & name,std::wstring & cell_range, int sheet_id, bool printable)
void ods_table_context::add_defined_range(const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable)
{
office_element_ptr elm;
create_element(L"table", L"named-range",elm, &context_);
......@@ -99,7 +99,7 @@ void ods_table_context::add_defined_range(std::wstring & name,std::wstring & cel
}
}
void ods_table_context::add_defined_expression(std::wstring & name,std::wstring & value, int sheet_id, bool printable)
void ods_table_context::add_defined_expression(const std::wstring & name, const std::wstring & value, int sheet_id, bool printable)
{
office_element_ptr elm;
create_element(L"table", L"named-expression",elm, &context_);
......
......@@ -38,8 +38,8 @@ public:
void start_defined_expressions(office_element_ptr & root_elm);
void add_defined_range(std::wstring & name,std::wstring & cell_range, int sheet_id, bool printable = false);
void add_defined_expression(std::wstring & name,std::wstring & value, int sheet_id, bool printable = false);
void add_defined_range(const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable = false);
void add_defined_expression(const std::wstring & name, const std::wstring & value, int sheet_id, bool printable = false);
void start_autofilter(std::wstring ref);
......
......@@ -152,7 +152,7 @@ void odt_conversion_context::end_text_context()
text_context_.pop_back();
}
}
void odt_conversion_context::add_text_content(std::wstring & text)
void odt_conversion_context::add_text_content(const std::wstring & text)
{
if (drop_cap_state_.enabled)
{
......@@ -658,7 +658,7 @@ void odt_conversion_context::end_comment(int oox_comm_id)
text_context()->current_level_.back().elm->add_child_element(comm_elm);
}
}
void odt_conversion_context::start_image(std::wstring & image_file_name)
void odt_conversion_context::start_image(const std::wstring & image_file_name)
{
std::wstring odf_ref_name ;
......
......@@ -49,8 +49,8 @@ public:
void start_drawings();
void end_drawings();
virtual void start_image(std::wstring & image_file_name);
void add_text_content (std::wstring & text);
virtual void start_image(const std::wstring & image_file_name);
void add_text_content (const std::wstring & text);
void start_paragraph(bool styled = false);
void end_paragraph();
......
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