Commit b3a83ad6 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 8d4e78ed
...@@ -357,6 +357,8 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook) ...@@ -357,6 +357,8 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
xls_global_info->current_sheet = -1; xls_global_info->current_sheet = -1;
xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"ChartSheet_" + std::to_wstring(count_chart_sheets)); xlsx_context->start_table(xls_global_info->sheets_names.size() > i ? xls_global_info->sheets_names[i] : L"ChartSheet_" + std::to_wstring(count_chart_sheets));
xlsx_context->set_chart_view();
XLS::ChartSheetSubstream* chart = dynamic_cast<XLS::ChartSheetSubstream*>(woorkbook->m_arWorksheetSubstream[i].get()); XLS::ChartSheetSubstream* chart = dynamic_cast<XLS::ChartSheetSubstream*>(woorkbook->m_arWorksheetSubstream[i].get());
convert_chart_sheet(chart); convert_chart_sheet(chart);
......
...@@ -104,6 +104,13 @@ bool xlsx_conversion_context::start_table(const std::wstring & name) ...@@ -104,6 +104,13 @@ bool xlsx_conversion_context::start_table(const std::wstring & name)
return true; return true;
} }
void xlsx_conversion_context::set_chart_view()
{
if (sheets_.empty()) return;
get_table_context().set_chart_view();
}
void xlsx_conversion_context::set_state(const std::wstring & state) void xlsx_conversion_context::set_state(const std::wstring & state)
{ {
if (state.empty()) return; if (state.empty()) return;
......
...@@ -66,6 +66,7 @@ public: ...@@ -66,6 +66,7 @@ public:
bool start_table(const std::wstring & name); bool start_table(const std::wstring & name);
void set_state(const std::wstring & state); void set_state(const std::wstring & state);
void set_chart_view();
void end_table(); void end_table();
void start_chart(); void start_chart();
......
...@@ -61,6 +61,21 @@ void xlsx_table_context::start_table(const std::wstring & name) ...@@ -61,6 +61,21 @@ void xlsx_table_context::start_table(const std::wstring & name)
tables_state_.push_back( table_state_ptr(new table_state(context_))); tables_state_.push_back( table_state_ptr(new table_state(context_)));
} }
void xlsx_table_context::set_chart_view()
{
CP_XML_WRITER(context_.current_sheet().sheetViews())
{
CP_XML_NODE(L"sheetViews")
{
CP_XML_NODE(L"sheetView")
{
CP_XML_ATTR(L"showGridLines", 0);
CP_XML_ATTR(L"workbookViewId", 0);
}
}
}
}
void xlsx_table_context::end_table() void xlsx_table_context::end_table()
{ {
if (!get_drawing_context().empty()) if (!get_drawing_context().empty())
......
...@@ -60,6 +60,7 @@ public: ...@@ -60,6 +60,7 @@ public:
public: public:
void start_table(const std::wstring & name); void start_table(const std::wstring & name);
void set_chart_view();
void end_table(); void end_table();
xlsx_drawing_context & get_drawing_context(); xlsx_drawing_context & get_drawing_context();
......
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