mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #65260
This commit is contained in:
@ -3391,9 +3391,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSparklines *sparklines)
|
||||
ods_context->current_table()->start_sparklines();
|
||||
for (size_t i = 0; i < sparklines->m_arrItems.size(); ++i)
|
||||
{
|
||||
if (!sparklines->m_arrItems[i]) continue;
|
||||
ods_context->current_table()->start_sparkline();
|
||||
ods_context->current_table()->set_sparkline_range(*sparklines->m_arrItems[i]->m_oRef);
|
||||
ods_context->current_table()->set_sparkline_cell(*sparklines->m_arrItems[i]->m_oSqRef);
|
||||
if (sparklines->m_arrItems[i]->m_oRef.IsInit())
|
||||
ods_context->current_table()->set_sparkline_range(*sparklines->m_arrItems[i]->m_oRef);
|
||||
if (sparklines->m_arrItems[i]->m_oSqRef.IsInit())
|
||||
ods_context->current_table()->set_sparkline_cell(*sparklines->m_arrItems[i]->m_oSqRef);
|
||||
ods_context->current_table()->end_sparkline();
|
||||
}
|
||||
ods_context->current_table()->end_sparklines();
|
||||
|
||||
@ -642,6 +642,11 @@ void odf_chart_context::set_view3D(int rotX, int rotY, int depthPercent, int per
|
||||
if (impl_->current_level_.back().chart_properties)
|
||||
{
|
||||
impl_->current_level_.back().chart_properties->right_angled_axes_ = angAx;
|
||||
|
||||
if (!angAx)
|
||||
{
|
||||
plot_area->chart_plot_area_attlist_.common_dr3d_attlist_.projection_ = L"perspective";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ ods_table_state_ptr & ods_table_context::state()
|
||||
|
||||
void ods_table_context::start_table_part(const std::wstring &name, std::wstring ref)
|
||||
{
|
||||
if (!table_database_ranges_.root) create_element(L"table", L"database-ranges",table_database_ranges_.root,&context_);
|
||||
if (!table_database_ranges_.root) create_element(L"table", L"database-ranges", table_database_ranges_.root, &context_);
|
||||
|
||||
office_element_ptr elm;
|
||||
create_element(L"table", L"database-range",elm, &context_);
|
||||
@ -118,11 +118,17 @@ void ods_table_context::start_table_part(const std::wstring &name, std::wstring
|
||||
part_state.name = name;
|
||||
part_state.ref = ref;
|
||||
|
||||
int r = ref.rfind(L":");
|
||||
if (r < 0) return;//тута однозначно .. по правилам оох
|
||||
size_t pos = ref.rfind(L"!");
|
||||
if (pos != std::wstring::npos)
|
||||
{
|
||||
ref = ref.substr(pos + 1);
|
||||
}
|
||||
|
||||
utils::parsing_ref (ref.substr(0, r), part_state.col_start, part_state.row_start);
|
||||
utils::parsing_ref (ref.substr(r + 1, ref.size() - r), part_state.col_end, part_state.row_end);
|
||||
pos = ref.rfind(L":");
|
||||
if (pos == std::wstring::npos) return;//тута однозначно .. по правилам оох
|
||||
|
||||
utils::parsing_ref (ref.substr(0, pos), part_state.col_start, part_state.row_start);
|
||||
utils::parsing_ref (ref.substr(pos + 1, ref.size() - pos), part_state.col_end, part_state.row_end);
|
||||
|
||||
state()->table_parts_.push_back(part_state);
|
||||
}
|
||||
@ -138,14 +144,22 @@ void ods_table_context::add_table_part_column(std::wstring name)
|
||||
bool bQuotes = (std::wstring::npos != table_state_list_.back()->office_table_name_.find(L" "));
|
||||
|
||||
std::wstring ref = L"$";
|
||||
|
||||
std::wstring refUse = L"$";
|
||||
|
||||
ref += (bQuotes ? L"'" : L"") + table_state_list_.back()->office_table_name_ + (bQuotes ? L"'" : L"") + L".";
|
||||
refUse += (bQuotes ? L"'" : L"") + table_state_list_.back()->office_table_name_ + (bQuotes ? L"'" : L"") + L".";
|
||||
|
||||
ref += sCol + std::to_wstring(state()->table_parts_.back().row_start);
|
||||
ref += L":";
|
||||
ref += sCol + std::to_wstring(state()->table_parts_.back().row_end);
|
||||
|
||||
state()->table_parts_.back().columns.push_back(std::make_pair(name, ref));
|
||||
refUse += sCol + std::to_wstring(state()->table_parts_.back().row_start + 1);
|
||||
refUse += L":";
|
||||
refUse += sCol + std::to_wstring(state()->table_parts_.back().row_end);
|
||||
|
||||
state()->mapTabled.insert(std::make_pair(name, refUse));
|
||||
|
||||
state()->table_parts_.back().columns.push_back(std::make_pair(name, refUse));
|
||||
}
|
||||
void ods_table_context::set_table_part_autofilter(bool val)
|
||||
{
|
||||
|
||||
@ -990,7 +990,14 @@ void ods_table_state::set_cell_spanned(int spanned_cols, int spanned_rows)
|
||||
}
|
||||
void ods_table_state::set_cell_formula(std::wstring & formula)
|
||||
{
|
||||
if (formula.empty())return;
|
||||
if (formula.empty()) return;
|
||||
|
||||
//todooo used tabled columns in formula - TableName[TableColumn]
|
||||
for (size_t i = 0; i < table_parts_.size(); ++i)
|
||||
{
|
||||
if (std::wstring::npos != formula.find(table_parts_[i].name + L"["))
|
||||
return;
|
||||
}
|
||||
|
||||
ods_conversion_context* ods_context = dynamic_cast<ods_conversion_context*>(context_);
|
||||
|
||||
|
||||
@ -552,6 +552,8 @@ private:
|
||||
std::vector<ods_hyperlink_state> hyperlinks_;
|
||||
std::map<unsigned int, ods_shared_formula_state> shared_formulas_;
|
||||
|
||||
std::map<std::wstring, std::wstring> mapTabled; // for formula used ... perhaps
|
||||
|
||||
std::vector<table_part_state> table_parts_;
|
||||
|
||||
std::vector<data_validation_state> data_validations_;
|
||||
|
||||
Reference in New Issue
Block a user