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

.....

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56147 954022d7-b5bf-4e40-9824-e11837661b57
parent b451e1d8
......@@ -32,11 +32,23 @@ public:
void start_chart(office_element_ptr & root);
void set_type_chart(std::wstring type);
void set_3D(bool Val);
void set_size_chart(double width_pt, double height_pt);
void start_series(std::wstring type);
void set_series_value_formula(std::wstring oox_formula);
void set_series_label_formula(std::wstring oox_formula);
void set_series_name(std::wstring name);
void set_category_axis_formula(std::wstring oox_formula);
void start_axis();
void set_axis_dimension(std::wstring val);
void set_axis_orientation(int type);
void set_axis_logarithmic(bool val);
void set_axis_label(int type);
void set_axis_position(int type);
void set_axis_label_position(int type);
void start_title();
void start_grid(int type);
void start_plot_area();
void start_legend();
void set_legend_position(int val);
......@@ -44,8 +56,6 @@ public:
void start_element(office_element_ptr & elm, office_element_ptr & style_elm, std::wstring style_name);
void end_element();
void set_series_formula(int category, std::wstring oox_formula);
void start_text();
void end_text();
......
......@@ -493,6 +493,8 @@ void odf_drawing_context::set_no_fill()
impl_->current_graphic_properties->content().common_draw_fill_attlist_.draw_fill_ = draw_fill::none;
break;
case Line:
impl_->current_graphic_properties->content().common_draw_fill_attlist_.draw_fill_ = draw_fill::none;
impl_->current_graphic_properties->content().draw_stroke_ = line_style (line_style::None);
break;
}
}
......@@ -564,6 +566,14 @@ void odf_drawing_context::set_rect(double x_pt, double y_pt, double width_pt, do
impl_->current_drawing_state_.svg_height_ = length(length(height_pt,length::pt).get_value_unit(length::cm),length::cm);
impl_->current_drawing_state_.svg_width_ = length(length(width_pt,length::pt).get_value_unit(length::cm),length::cm);
}
void odf_drawing_context::get_size( double & width_pt, double & height_pt)
{
if (!impl_->current_drawing_state_.svg_width_ || !impl_->current_drawing_state_.svg_height_) return;
width_pt = impl_->current_drawing_state_.svg_width_->get_value_unit(length::pt);
height_pt = impl_->current_drawing_state_.svg_height_->get_value_unit(length::pt);
}
void odf_drawing_context::set_line_width(double pt)
{
if (!impl_->current_graphic_properties)return;
......
......@@ -61,6 +61,7 @@ public:
///////////////////////////////////////////////////////////////////////////////////////
void set_rect(double x_pt, double y_pt, double width_pt, double height_pt);
void get_size( double & width_pt, double & height_pt);
void set_name(std::wstring name);
void set_z_order(int id);
......
......@@ -370,7 +370,7 @@ void chart_categories::serialize(std::wostream & _Wostream)
void chart_series_attlist::serialize(CP_ATTR_NODE)
{
CP_XML_ATTR_OPT(L"chart:values-cell-range-address", chart_values_cell_range_address_);
CP_XML_ATTR_OPT(L"chart:label-cell-", chart_label_cell_address_);
CP_XML_ATTR_OPT(L"chart:label-cell-range-address", chart_label_cell_address_);
CP_XML_ATTR_OPT(L"chart:class", chart_class_);
CP_XML_ATTR_OPT(L"chart:attached-axis", chart_attached_axis_);
common_attlist_.serialize(CP_GET_XML_NODE());
......
......@@ -74,6 +74,8 @@ void chart_format_properties::serialize(std::wostream & _Wostream ,const wchar_t
CP_XML_ATTR_OPT(L"chart:regression-type", chart_regression_type_);
CP_XML_ATTR_OPT(L"chart:data-label-number", chart_data_label_number_);
CP_XML_ATTR_OPT(L"chart:error-category", chart_error_category_);
CP_XML_ATTR_OPT(L"chart:axis-label-position", chart_axis_label_position_);
CP_XML_ATTR_OPT(L"chart:axis-position", chart_axis_position_);
common_rotation_angle_attlist_.serialize(CP_GET_XML_NODE());
}
......
......@@ -81,6 +81,9 @@ public:
_CP_OPT(chart_data_label_number) chart_data_label_number_;
_CP_OPT(chart_error_category) chart_error_category_;
_CP_OPT(std::wstring) chart_axis_label_position_;
_CP_OPT(std::wstring) chart_axis_position_;
common_rotation_angle_attlist common_rotation_angle_attlist_;
};
/// \class style_chart_properties
......
......@@ -831,25 +831,4 @@ void OoxConverter::convert(double oox_font_size, _CP_OPT(odf::font_size) & odf_
odf_font_size = odf::font_size(odf_length.get());
}
void OoxConverter::convert(OOX::Spreadsheet::CChartSpace *oox_chart)
{
if ((!oox_chart) && (!oox_chart->m_oChartSpace.m_chart))return;
oox_current_chart = oox_chart;
odf_context()->start_chart();
convert(oox_chart->m_oChartSpace.m_oSpPr.GetPointer());
convert(oox_chart->m_oChartSpace.m_oTxPr.GetPointer());
convert(oox_chart->m_oChartSpace.m_chart->m_title);
convert(oox_chart->m_oChartSpace.m_chart->m_legend);
convert(oox_chart->m_oChartSpace.m_chart->m_plotArea);
convert(oox_chart->m_oChartSpace.m_chart->m_sideWall, 2);
convert(oox_chart->m_oChartSpace.m_chart->m_backWall, 3);
convert(oox_chart->m_oChartSpace.m_chart->m_floor, 1);
odf_context()->end_chart();
oox_current_chart = NULL;
}
}
\ No newline at end of file
......@@ -259,7 +259,7 @@ public:
void convert(OOX::Drawing::CRunProperty *oox_run_pr, cpdoccore::odf::style_text_properties * text_properties);
void convert(OOX::Drawing::CLineSpacing *oox_spacing, cpdoccore::odf::length_or_percent & length_or_percent);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
void convert(OOX::Spreadsheet::CChartSpace *oox_chart);
void convert(OOX::Spreadsheet::CT_ChartSpace *oox_chart);
void convert(OOX::Spreadsheet::CT_Title *ct_title);
void convert(OOX::Spreadsheet::CT_Legend *ct_legend);
void convert(OOX::Spreadsheet::CT_LegendEntry *ct_legend);
......@@ -293,13 +293,15 @@ public:
void convert(OOX::Spreadsheet::CT_ScatterSer *ser);
void convert(OOX::Spreadsheet::CT_RadarSer *ser);
void convert(OOX::Spreadsheet::CT_LineSer *ser);
void convert(OOX::Spreadsheet::CT_AxDataSource *cat, int category);
void convert(OOX::Spreadsheet::CT_NumDataSource *val, int category);
void convert(OOX::Spreadsheet::CT_AxDataSource *cat);
void convert(OOX::Spreadsheet::CT_NumDataSource *val);
void convert(OOX::Spreadsheet::CRichText *rich);
void convert(OOX::Spreadsheet::CTextProperties *txPr);
void convert(OOX::Spreadsheet::CT_Tx *ct_tx);
void convert(OOX::Spreadsheet::CT_Layout *ct_layout);
void convert(OOX::Spreadsheet::CT_ManualLayout *ct_layout);
void convert(OOX::Spreadsheet::CT_ChartLines *grid, int type);
void convert(OOX::Spreadsheet::CT_SerTx *ser_tx);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
void convert(double oox_font_size, cpdoccore::_CP_OPT(cpdoccore::odf::font_size) & odf_font_size);
};
......
......@@ -1164,8 +1164,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CGraphicFrame* oox_graphic_frame)
{
if (!oox_graphic_frame)return;
////////////////////////////////////////////////////////////////////////////////
ods_context->drawing_context()->start_object(ods_context->get_next_name_object());
{
double width =0, height =0;
ods_context->drawing_context()->get_size(width, height);
if (oox_graphic_frame->m_oNvGraphicFramePr.IsInit())
{
if (oox_graphic_frame->m_oNvGraphicFramePr->m_oCNvPr.IsInit())
......@@ -1185,7 +1189,15 @@ void XlsxConverter::convert(OOX::Spreadsheet::CGraphicFrame* oox_graphic_frame)
{
OOX::Spreadsheet::CChartSpace* pChart = (OOX::Spreadsheet::CChartSpace*)oFile.operator->();
OoxConverter::convert(pChart);
if (pChart)
{
oox_current_chart = pChart;
odf_context()->start_chart();
odf_context()->chart_context()->set_size_chart(width, height);
OoxConverter::convert(&pChart->m_oChartSpace);
odf_context()->end_chart();
oox_current_chart = NULL; // object???
}
}
}
//
......
......@@ -2,6 +2,6 @@
//1
//2
//0
//37
#define INTVER 1,2,0,37
#define STRVER "1,2,0,37\0"
//38
#define INTVER 1,2,0,38
#define STRVER "1,2,0,38\0"
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