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

миноритарные свойства диаграмм разных типов

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56339 954022d7-b5bf-4e40-9824-e11837661b57
parent 2d619c36
......@@ -100,12 +100,22 @@ public:
chart_chart *get_current_chart();
chart_axis *get_current_axis();
chart_series *get_current_series();
};
chart_chart* odf_chart_context::Impl::get_current_chart()
{
for (long i=current_chart_state_.elements_.size()-1; i>=0; i--)
for (long i=current_level_.size()-1; i>=0; i--)
{
chart_chart * chart = dynamic_cast<chart_chart*>(current_chart_state_.elements_[i].elm.get());
chart_chart * chart = dynamic_cast<chart_chart*>(current_level_[i].elm.get());
if (chart) return chart;
}
return NULL;
}
chart_series* odf_chart_context::Impl::get_current_series()
{
for (long i=current_level_.size()-1; i>=0; i--)
{
chart_series * chart = dynamic_cast<chart_series*>(current_level_[i].elm.get());
if (chart) return chart;
}
return NULL;
......@@ -218,10 +228,127 @@ void odf_chart_context::set_chart_type(std::wstring type)
chart->chart_chart_attlist_.chart_class_ = std::wstring(L"chart:") + type;
}
void odf_chart_context::set_chart_bar_type(int type)
{
if (!impl_->current_level_.back().chart_properties_) return;
switch(type)
{
case 0: // st_shapeCONE = 0,
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::cone); break;
case 1: // st_shapeCONETOMAX = 1,
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::cone); break;
case 2: // st_shapeBOX = 2,
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::cuboid); break;
case 3: // st_shapeCYLINDER = 3,
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::cylinder); break;
case 4: // st_shapePYRAMID = 4,
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::pyramid); break;
case 5: // st_shapePYRAMIDTOMAX = 5
impl_->current_level_.back().chart_properties_->content().chart_solid_type_ = chart_solid_type(chart_solid_type::pyramid); break;
}
}
void odf_chart_context::set_chart_bar_direction(int type)
{
if (!impl_->current_level_.back().chart_properties_) return;
switch(type)
{
case 0: // st_bardirBAR = 0,
impl_->current_level_.back().chart_properties_->content().chart_vertical_ = true; break;
case 1: // st_bardirCOL = 1
break;
}
}
void odf_chart_context::set_chart_bar_gap_width(std::wstring val)
{
if (!impl_->current_level_.back().chart_properties_) return;
int res = val.find(L"%");
bool percent=false;
if (res > 0)
{
val = val.substr(0,res);
percent=true;
}
double dVal = boost::lexical_cast<double>(val);
impl_->current_level_.back().chart_properties_->content().chart_gap_width_ = (int)dVal;
}
void odf_chart_context::set_chart_bar_overlap(std::wstring val)
{
if (!impl_->current_level_.back().chart_properties_) return;
int res = val.find(L"%");
bool percent=false;
if (res > 0)
{
val = val.substr(0,res);
percent=true;
}
double dVal = boost::lexical_cast<double>(val);
impl_->current_level_.back().chart_properties_->content().chart_overlap_ = (int)dVal;
}
void odf_chart_context::set_chart_radar_type(int type)
{
switch(type)
{
case 0: // st_radarstyleSTANDARD = 0,
break;
case 1: // st_radarstyleMARKER = 1,
set_marker_type(12);//automatic
break;
case 2: // st_radarstyleFILLED = 2
chart_chart *chart = impl_->get_current_chart();
if (chart)chart->chart_chart_attlist_.chart_class_ = std::wstring(L"chart:filled-radar");
break;
}
}
void odf_chart_context::set_chart_bar_grouping(int type)
{
if (!impl_->current_level_.back().chart_properties_) return;
switch(type)
{
case 0: // st_groupingPERCENTSTACKED = 0,
impl_->current_level_.back().chart_properties_->content().chart_percentage_ = true; break;
case 1: // st_bargroupingCLUSTERED = 1,
case 2: // st_bargroupingSTANDARD = 2,
break;
case 3: // st_bargroupingSTACKED = 3
impl_->current_level_.back().chart_properties_->content().chart_stacked_ = true; break;
}
}
void odf_chart_context::set_chart_grouping(int type)
{
if (!impl_->current_level_.back().chart_properties_) return;
switch(type)
{
case 0: // st_groupingPERCENTSTACKED = 0,
impl_->current_level_.back().chart_properties_->content().chart_percentage_ = true; break;
case 1: // st_groupingSTANDARD = 1,
break;
case 2: // st_groupingSTACKED = 2
impl_->current_level_.back().chart_properties_->content().chart_stacked_ = true; break;
}
}
void odf_chart_context::set_chart_3D(bool val)
{
if (!impl_->current_level_.back().chart_properties_) return;
impl_->current_level_.back().chart_properties_->content().chart_three_dimensional_ = val;
impl_->current_level_.back().chart_properties_->content().chart_treat_empty_cells_ = boost::none;
impl_->current_level_.back().chart_properties_->content().chart_series_source_ = chart_series_source(chart_series_source::rows);
//impl_->current_level_.back().chart_properties_->content().
//chart:treat-empty-cells="leave-gap"
//chart:series-source="rows"
//impl_->current_level_.back().chart_properties_->content().chart_deep_ = true;
//chart_plot_area *plot_area = dynamic_cast<chart_plot_area*>(current_level_.back().elm.get());
//if (!plot_area)return;
//plot_area->chart_plot_area_attlist_.dr3d_shade_mode=L"gouraud";
}
void odf_chart_context::set_chart_colored(bool val)
{
......@@ -322,20 +449,26 @@ void odf_chart_context::start_series(std::wstring type)
style_name = style_->style_name_;
series->chart_series_attlist_.common_attlist_.chart_style_name_ = style_name;
series->chart_series_attlist_.chart_class_ = std::wstring(L"chart:") + type;
}
start_element(elm, style_elm, style_name);
impl_->group_series_.push_back(elm);
//////////////////////////////////////////////////////////////
chart_chart * chart = impl_->get_current_chart();
if (chart)
{
// ??
if (type == L"radar" || (*chart->chart_chart_attlist_.chart_class_ == L"chart:stock" && type == L"line"))
series->chart_series_attlist_.chart_class_ = chart->chart_chart_attlist_.chart_class_;
}
if (style_)
{
impl_->current_level_.back().graphic_properties_ = style_->style_content_.get_style_graphic_properties();
impl_->set_default_series_color();
}
//if (type == L"scatter" || type == L"line" || type == L"radar")
//{
// impl_->current_level_.back().chart_properties_->content().chart_symbol_type_ = chart_symbol_type(chart_symbol_type::noneSymbol);
//}
impl_->current_series_count_ ++;
}
void odf_chart_context::end_series()
......@@ -366,7 +499,7 @@ void odf_chart_context::set_label_show_legend_key(bool val)
void odf_chart_context::set_label_show_percent(bool val)
{
if (!impl_->current_level_.back().chart_properties_)return;
impl_->current_level_.back().chart_properties_->content().chart_percentage_ = val;
//impl_->current_level_.back().chart_properties_->content().chart_percentage_ = val;
}
void odf_chart_context::set_label_show_ser_name(bool val)
{
......@@ -567,6 +700,11 @@ void odf_chart_context::start_plot_area()
plot_area->chart_plot_area_attlist_.common_attlist_.chart_style_name_ = style_name;
}
start_element(chart_elm, style_elm, style_name);
if (!impl_->current_level_.back().chart_properties_) return;
impl_->current_level_.back().chart_properties_->content().chart_treat_empty_cells_ = true;
}
void odf_chart_context::start_text()
{
......@@ -613,7 +751,6 @@ void odf_chart_context::start_floor()
create_element(L"chart", L"floor", elm, impl_->odf_context_);
chart_floor *floor = dynamic_cast<chart_floor*>(elm.get());
if (floor == NULL)return;
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
......@@ -621,7 +758,7 @@ void odf_chart_context::start_floor()
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_)
if (style_ && floor)
{
style_name = style_->style_name_;
floor->common_attlist_.chart_style_name_ = style_name;
......@@ -634,7 +771,6 @@ void odf_chart_context::start_wall()
create_element(L"chart", L"wall", elm, impl_->odf_context_);
chart_wall *wall = dynamic_cast<chart_wall*>(elm.get());
if (wall == NULL)return;
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
......@@ -642,7 +778,7 @@ void odf_chart_context::start_wall()
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_)
if (style_ && wall)
{
style_name = style_->style_name_;
wall->chart_wall_attlist_.common_attlist_.chart_style_name_ = style_name;
......@@ -662,7 +798,6 @@ void odf_chart_context::start_legend()
create_element(L"chart", L"legend", elm, impl_->odf_context_);
chart_legend *legend = dynamic_cast<chart_legend*>(elm.get());
if (legend == NULL)return;
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
......@@ -670,13 +805,82 @@ void odf_chart_context::start_legend()
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_)
if (style_ && legend)
{
style_name = style_->style_name_;
legend->chart_legend_attlist_.common_attlist_.chart_style_name_ = style_name;
}
start_element(elm, style_elm, style_name);
}
void odf_chart_context::start_stock_range_line()
{
office_element_ptr elm;
create_element(L"chart", L"stock-range-line", elm, impl_->odf_context_);
chart_stock_range_line *line = dynamic_cast<chart_stock_range_line*>(elm.get());
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
office_element_ptr & style_elm = impl_->styles_context_->last_state().get_office_element();
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_ && line)
{
style_name = style_->style_name_;
line->common_attlist_.chart_style_name_ = style_name;
impl_->current_level_.back().graphic_properties_ = style_->style_content_.get_style_graphic_properties();
impl_->set_default_series_color();
}
start_element(elm, style_elm, style_name);
}
void odf_chart_context::start_stock_gain_marker()
{
office_element_ptr elm;
create_element(L"chart", L"stock-gain-marker", elm, impl_->odf_context_);
chart_stock_gain_marker *marker = dynamic_cast<chart_stock_gain_marker*>(elm.get());
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
office_element_ptr & style_elm = impl_->styles_context_->last_state().get_office_element();
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_ && marker)
{
style_name = style_->style_name_;
marker->common_attlist_.chart_style_name_ = style_name;
impl_->current_level_.back().graphic_properties_ = style_->style_content_.get_style_graphic_properties();
impl_->set_default_series_color();
}
start_element(elm, style_elm, style_name);
}
void odf_chart_context::start_stock_loss_marker()
{
office_element_ptr elm;
create_element(L"chart", L"stock-gain-marker", elm, impl_->odf_context_);
chart_stock_gain_marker *marker = dynamic_cast<chart_stock_gain_marker*>(elm.get());
//////////
impl_->styles_context_->create_style(L"",style_family::Chart, true, false, -1);
office_element_ptr & style_elm = impl_->styles_context_->last_state().get_office_element();
std::wstring style_name;
style* style_ = dynamic_cast<style*>(style_elm.get());
if (style_ && marker)
{
style_name = style_->style_name_;
marker->common_attlist_.chart_style_name_ = style_name;
impl_->current_level_.back().graphic_properties_ = style_->style_content_.get_style_graphic_properties();
impl_->set_default_series_color();
}
start_element(elm, style_elm, style_name);
}
long odf_chart_context::get_count_data_points_series()
{
return impl_->current_data_points_series_count_;
......@@ -704,6 +908,8 @@ void odf_chart_context::start_data_point_series(int count)
data_point->chart_data_point_attlist_.common_attlist_.chart_style_name_ = style_name;
}
start_element(elm, style_elm, style_name);
//defaults
chart_series * series = impl_->get_current_series();
}
void odf_chart_context::set_legend_position(int val)
{
......
......@@ -34,7 +34,14 @@ public:
void set_chart_3D(bool Val);
void set_chart_size(double width_pt, double height_pt);
void set_chart_colored(bool val);
void set_chart_grouping(int type);
void set_chart_scatter_type(int type);
void set_chart_bar_grouping(int type);
void set_chart_bar_direction(int type);
void set_chart_bar_type(int type);
void set_chart_bar_gap_width(std::wstring val);
void set_chart_bar_overlap(std::wstring val);
void set_chart_radar_type(int type);
void set_marker_size(int size);
void set_marker_type(int type);
......@@ -79,6 +86,9 @@ public:
void start_floor();
void start_wall();
void set_legend_position(int val);
void start_stock_gain_marker();
void start_stock_loss_marker();
void start_stock_range_line();
void start_element(office_element_ptr & elm, office_element_ptr & style_elm, std::wstring style_name);
void end_element();
......
......@@ -493,7 +493,7 @@ 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().common_draw_fill_attlist_.draw_fill_ = draw_fill::none;??????
impl_->current_graphic_properties->content().draw_stroke_ = line_style (line_style::None);
break;
}
......
......@@ -44,6 +44,7 @@ void chart_format_properties::serialize(std::wostream & _Wostream ,const wchar_t
CP_XML_ATTR_OPT(L"chart:mean-value", chart_mean_value_ );
CP_XML_ATTR_OPT(L"chart:error-upper-indicator", chart_error_upper_indicator_ );
CP_XML_ATTR_OPT(L"chart:error-lower-indicator", chart_error_lower_indicator_ );
CP_XML_ATTR_OPT(L"chart:treat-empty-cells", chart_treat_empty_cells_);
CP_XML_ATTR_OPT(L"chart:symbol-type", chart_symbol_type_);
CP_XML_ATTR_OPT(L"chart:symbol-name", chart_symbol_name_);
......
......@@ -51,6 +51,7 @@ public:
_CP_OPT(Bool) chart_mean_value_;
_CP_OPT(Bool) chart_error_upper_indicator_;
_CP_OPT(Bool) chart_error_lower_indicator_;
_CP_OPT(Bool) chart_treat_empty_cells_;
_CP_OPT(chart_symbol_type) chart_symbol_type_;
_CP_OPT(chart_symbol_name) chart_symbol_name_;
......@@ -82,7 +83,7 @@ public:
_CP_OPT(chart_error_category) chart_error_category_;
_CP_OPT(std::wstring) chart_axis_label_position_;
_CP_OPT(std::wstring) chart_axis_position_;
_CP_OPT(std::wstring) chart_axis_position_;
common_rotation_angle_attlist common_rotation_angle_attlist_;
};
......
......@@ -304,7 +304,7 @@ public:
void convert(OOX::Spreadsheet::CT_ChartLines *grid, int type);
void convert(OOX::Spreadsheet::CT_SerTx *ser_tx);
void convert(OOX::Spreadsheet::CT_DLbls *ser_lbls);
void convert(OOX::Spreadsheet::CT_Marker *marker, int count);
void convert(OOX::Spreadsheet::CT_Marker *marker);
void convert(OOX::Spreadsheet::CT_Marker *marker, CAtlArray<OOX::Spreadsheet::CT_DPt*> & dPt);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
void convert(double oox_font_size, cpdoccore::_CP_OPT(cpdoccore::odf::font_size) & odf_font_size);
......
......@@ -295,13 +295,26 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_ValAx* axis)
odf_context()->chart_context()->end_element();
}
////////////////////////////////////////////////////////////////////////////////////////////
void OoxConverter::convert(OOX::Spreadsheet::CT_ChartLines *grid, int type)
void OoxConverter::convert(OOX::Spreadsheet::CT_ChartLines *line, int type)
{
if (grid == NULL)return;
if (line == NULL)return;
odf_context()->chart_context()->start_grid(type);
convert(grid->m_oSpPr.GetPointer());
odf_context()->chart_context()->end_element();
if (type <3)//grid lines
{
odf_context()->chart_context()->start_grid(type);
convert(line->m_oSpPr.GetPointer());
odf_context()->chart_context()->end_element();
}
//if (type == 3)//drop line
//{
// odf_context()->chart_context()->s
//}
if (type == 4)//Hi-Lo line
{
odf_context()->chart_context()->start_stock_range_line();
convert(line->m_oSpPr.GetPointer());
odf_context()->chart_context()->end_element();
}
}
void OoxConverter::convert(OOX::Spreadsheet::CT_Area3DChart *chart)
......@@ -311,6 +324,11 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Area3DChart *chart)
odf_context()->chart_context()->set_chart_type(L"area");
odf_context()->chart_context()->set_chart_3D(true);
convert (chart->m_dropLines, 3);
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_grouping(*chart->m_grouping->m_val);
for (long i=0; i< chart->m_ser.GetCount(); i++)
{
convert(chart->m_ser[i]);
......@@ -322,6 +340,11 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_AreaChart *chart)
odf_context()->chart_context()->set_chart_type(L"area");
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_grouping(*chart->m_grouping->m_val);
convert (chart->m_dropLines, 3);
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
......@@ -341,7 +364,22 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Bar3DChart *chart)
odf_context()->chart_context()->set_chart_type(L"bar");
odf_context()->chart_context()->set_chart_3D(true);
if (chart->m_shape && chart->m_shape->m_val)
odf_context()->chart_context()->set_chart_bar_type(*chart->m_shape->m_val);
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_bar_grouping(*chart->m_grouping->m_val);
if (chart->m_barDir && chart->m_barDir->m_val)
odf_context()->chart_context()->set_chart_bar_direction(*chart->m_barDir->m_val);
if (chart->m_gapWidth && chart->m_gapWidth->m_val)
odf_context()->chart_context()->set_chart_bar_gap_width(string2std_string(*chart->m_gapWidth->m_val));
//if (chart->m_overlap && chart->m_overlap->m_val)
// odf_context()->chart_context()->set_chart_bar_overlap(string2std_string(*chart->m_overlap->m_val));
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
......@@ -361,6 +399,18 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_BarChart *chart)
odf_context()->chart_context()->set_chart_type(L"bar");
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_bar_grouping(*chart->m_grouping->m_val);
if (chart->m_barDir && chart->m_barDir->m_val)
odf_context()->chart_context()->set_chart_bar_direction(*chart->m_barDir->m_val);
if (chart->m_gapWidth && chart->m_gapWidth->m_val)
odf_context()->chart_context()->set_chart_bar_gap_width(string2std_string(*chart->m_gapWidth->m_val));
if (chart->m_overlap && chart->m_overlap->m_val)
odf_context()->chart_context()->set_chart_bar_overlap(string2std_string(*chart->m_overlap->m_val));
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
......@@ -379,6 +429,11 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Line3DChart *chart)
odf_context()->chart_context()->set_chart_type(L"line");
odf_context()->chart_context()->set_chart_3D(true);
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_grouping(*chart->m_grouping->m_val);
convert (chart->m_dropLines, 3);
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
for (long i=0; i< chart->m_ser.GetCount(); i++)
......@@ -397,6 +452,11 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_LineChart *chart)
odf_context()->chart_context()->set_chart_type(L"line");
if (chart->m_grouping && chart->m_grouping->m_val)
odf_context()->chart_context()->set_chart_grouping(*chart->m_grouping->m_val);
convert (chart->m_dropLines, 3);
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
for (long i=0; i< chart->m_ser.GetCount(); i++)
......@@ -542,6 +602,9 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_RadarChart *chart)
if (chart == NULL)return;
odf_context()->chart_context()->set_chart_type(L"radar");
if (chart->m_radarStyle && chart->m_radarStyle->m_val)
odf_context()->chart_context()->set_chart_radar_type(*chart->m_radarStyle->m_val);
//odf_context()->chart_context()->set_chart_grouping(2);???
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
......@@ -563,6 +626,25 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_StockChart *chart)
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
convert (chart->m_dropLines ,3);
convert (chart->m_hiLowLines, 4);
if (chart->m_upDownBars)
{
//m_gapWidth
if (chart->m_upDownBars->m_upBars)
{
odf_context()->chart_context()->start_stock_gain_marker();
convert(chart->m_upDownBars->m_upBars->m_oSpPr.GetPointer());
odf_context()->chart_context()->end_element();
}
if (chart->m_upDownBars->m_downBars)
{
odf_context()->chart_context()->start_stock_loss_marker();
convert(chart->m_upDownBars->m_downBars->m_oSpPr.GetPointer());
odf_context()->chart_context()->end_element();
}
}
for (long i=0; i< chart->m_ser.GetCount(); i++)
{
convert(chart->m_ser[i]);
......@@ -578,7 +660,7 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_OfPieChart *chart)
if (chart == NULL)return;
odf_context()->chart_context()->set_chart_type(L"circle");
odf_context()->chart_context()->start_group_series();
convert(chart->m_dLbls);
for (long i=0; i< chart->m_ser.GetCount(); i++)
......@@ -664,6 +746,10 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_BarSer* ser)
{
convert(NULL, ser->m_dPt);
}
if (ser->m_shape && ser->m_shape->m_val)
odf_context()->chart_context()->set_chart_bar_type(*ser->m_shape->m_val);
//m_trendline;
//m_errBars
odf_context()->chart_context()->end_series();
}
void OoxConverter::convert(OOX::Spreadsheet::CT_ScatterSer* ser)
......@@ -716,7 +802,7 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_LineSer* ser)
}
void OoxConverter::convert(OOX::Spreadsheet::CT_Marker* marker, CAtlArray<OOX::Spreadsheet::CT_DPt*> & dPt)
{
if (dPt.GetCount() <1) return convert(marker , -1);
if (dPt.GetCount() <1) return convert(marker);
long count_point = odf_context()->chart_context()->get_count_data_points_series();
long current_point = 0;
......@@ -727,24 +813,35 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Marker* marker, CAtlArray<OOX::S
if (dPt[i]->m_idx && dPt[i]->m_idx->m_val) set_point = *dPt[i]->m_idx->m_val;
if (set_point - current_point > 0)convert(marker,set_point - current_point);
convert(dPt[i]->m_marker,1);
if (set_point - current_point > 0)
{
odf_context()->chart_context()->start_data_point_series(set_point - current_point);
convert(marker);
odf_context()->chart_context()->end_element();
}
odf_context()->chart_context()->start_data_point_series(1);
convert(dPt[i]->m_oSpPr.GetPointer());
convert(dPt[i]->m_marker);
odf_context()->chart_context()->end_element();
current_point = set_point+1;
}
if (count_point - current_point >0) convert(marker,count_point - current_point);
if (count_point - current_point >0)
{
odf_context()->chart_context()->start_data_point_series(count_point - current_point);
convert(marker);
odf_context()->chart_context()->end_element();
}
}
void OoxConverter::convert(OOX::Spreadsheet::CT_Marker* marker, int count)
void OoxConverter::convert(OOX::Spreadsheet::CT_Marker* marker)
{
if (count >0)odf_context()->chart_context()->start_data_point_series(count);
if (marker)
{
if (marker->m_symbol && marker->m_symbol->m_val)
odf_context()->chart_context()->set_marker_type(*marker->m_symbol->m_val);
if (marker->m_size && marker->m_size->m_val)
odf_context()->chart_context()->set_marker_size(*marker->m_size->m_val);
convert(marker->m_oSpPr.GetPointer());
}
if (count >0)odf_context()->chart_context()->end_element();
if (marker == NULL) return;
if (marker->m_symbol && marker->m_symbol->m_val)
odf_context()->chart_context()->set_marker_type(*marker->m_symbol->m_val);
if (marker->m_size && marker->m_size->m_val)
odf_context()->chart_context()->set_marker_size(*marker->m_size->m_val);
convert(marker->m_oSpPr.GetPointer());
}
void OoxConverter::convert(OOX::Spreadsheet::CT_DLbls* ser_lbls)
{
......
......@@ -2,6 +2,6 @@
//1
//2
//0
//45
#define INTVER 1,2,0,45
#define STRVER "1,2,0,45\0"
//46
#define INTVER 1,2,0,46
#define STRVER "1,2,0,46\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