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

OdfFileWriter в x2t

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62942 954022d7-b5bf-4e40-9824-e11837661b57
parent 90931b7a
This diff is collapsed.
......@@ -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();
......@@ -109,4 +109,4 @@ private:
};
}
}
\ No newline at end of file
}
......@@ -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 (style_family::type family);
office_element_ptr find_odf_style_default (style_family::type family);
......
......@@ -49,7 +49,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(const std::wstring & name)
{
odf_style_name_ = name;
......@@ -59,7 +59,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(const std::wstring & name)
{
style* style_ = dynamic_cast<style*>(odf_style_.get());
if (!style_)return;
......@@ -79,7 +79,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(const std::wstring & name)
{
if (name.length() < 1) return;
......
......@@ -46,7 +46,7 @@ public:
void add_child(office_element_ptr & child);
/////////////////////////////////////////////////////////////////////////////////////////
void set_name(std::wstring & name);
void set_name(const std::wstring & name);
std::wstring get_name();
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_parent_style_name(const 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(const std::wstring & name);
//////////////////////////////////////////////////////////////////////////////////////////
style_text_properties * get_text_properties();
style_paragraph_properties * get_paragraph_properties() ;
......
......@@ -71,11 +71,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);
}
......@@ -92,7 +92,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);
......@@ -243,7 +243,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);
......@@ -411,7 +411,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_)
{
......@@ -460,7 +460,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(){}
......@@ -95,4 +95,4 @@ private:
}
}
\ No newline at end of file
}
......@@ -50,7 +50,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_);
......@@ -96,7 +96,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);
......
......@@ -29,7 +29,7 @@ int ods_table_state::tmp_row_ =0;
namespace utils//////////////////////////////////////////// .. utils ???
{
std::wstring convert_date(std::wstring & oox_date)
std::wstring convert_date(const std::wstring & oox_date)
{
int iDate = 0;
......@@ -53,7 +53,7 @@ std::wstring convert_date(std::wstring & oox_date)
return date_str;
}
std::wstring convert_time(std::wstring & oox_time)
std::wstring convert_time(const std::wstring & oox_time)
{
double dTime = 0;
......@@ -865,7 +865,7 @@ void ods_table_state::set_cell_text(odf_text_context* text_context, bool cash_va
// table_cell_properties->style_table_cell_properties_attlist_.style_text_align_source_ = odf::text_align_source(odf::text_align_source::Fix);
//}
}
void ods_table_state::set_cell_value(std::wstring & value, bool need_cash)
void ods_table_state::set_cell_value(const std::wstring & value, bool need_cash)
{
if (cells_size_ < 1)return;
......
......@@ -210,7 +210,7 @@ public:
void set_cell_format_value(office_value_type::type value_type);
void set_cell_type(int type);
void set_cell_value(std::wstring & value, bool need_cash = false);
void set_cell_value(const std::wstring & value, bool need_cash = false);
void set_cell_text(odf_text_context *text_context, bool cash_value = false);
void set_cell_formula(std::wstring &formula);
void set_cell_array_formula(std::wstring & formula, std::wstring ref);
......
......@@ -149,7 +149,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)
{
......@@ -655,7 +655,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();
......@@ -161,4 +161,4 @@ private:
}
}
\ No newline at end of file
}
......@@ -222,7 +222,7 @@ void style_paragraph_properties::create_child_element(const ::std::wstring & Ns,
{
style_paragraph_properties_content_.create_child_element(Ns, Name, getContext());
}
void style_paragraph_properties::add_child_element( const office_element_ptr & child_element)
void style_paragraph_properties::add_child_element(const office_element_ptr & child_element)
{
style_paragraph_properties_content_.add_child_element(child_element);
}
......
......@@ -133,7 +133,7 @@ void DocxConverter::convertDocument()
{
if (!docx_document)return;
odt_context = new odf::odt_conversion_context(output_document);
odt_context = new odf::odt_conversion_context(output_document);
if (!odt_context)return;
......
......@@ -16,7 +16,7 @@
#include "../OdfFormat/style_paragraph_properties.h"
#include "../OdfFormat/style_graphic_properties.h"
#include "../../../Common/DocxFormat/source/XlsxFormat/Xlsx.h"
#include "../../../Common/DocxFormat/Source/XlsxFormat/Xlsx.h"
using namespace cpdoccore;
......@@ -2000,4 +2000,4 @@ void XlsxConverter::convert(OOX::Spreadsheet::CAutofilter *oox_filter)
ods_context->end_autofilter();
}
} // namespace Docx2Odt
\ No newline at end of file
} // namespace Docx2Odt
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