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

XlsFormatReader - конвертация кривых(неопределенных) именных диапазонов

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68557 954022d7-b5bf-4e40-9824-e11837661b57
parent 66d4c193
......@@ -61,6 +61,9 @@ const std::wstring PtgExtraArray::toString() const
{
std::wstring ret_val;
unsigned char col_cnt = cols + 1;
if (array_.empty()) return L"";
for(std::vector<SerArPtr>::const_iterator it = array_.begin(), itEnd = --array_.end(); it != itEnd; ++it)
{
ret_val += (*it)->toString();
......
......@@ -164,9 +164,11 @@ int FORMULA::serialize(std::wostream & stream)
CP_XML_ATTR(L"ref", array_->ref_.toString());
CP_XML_ATTR(L"t", L"array");
CP_XML_ATTR(L"ca", L"true");
if (array_->fAlwaysCalc) CP_XML_ATTR(L"aca", L"true");
formula_str = array_->formula.getAssembledFormula();
//aca="true" ca="true"
}
if (!formula_str.empty())
......@@ -175,21 +177,21 @@ int FORMULA::serialize(std::wostream & stream)
}
}
if (formula_cash.empty())
{
if (m_Cash)
{
String * str = dynamic_cast<String*>(m_Cash.get());
if (str)
formula_cash =str->string.value();
}
}
//if (formula_cash.empty())
//{ todooo - general_formulas.xls
// if (m_Cash)
//
// String * str = dynamic_cast<String*>(m_Cash.get());
// if (str)
// formula_cash =str->string.value();
// }
//}
if (!formula_cash.empty())
{
CP_XML_NODE(L"v")
{
CP_XML_STREAM() << formula_cash;
CP_XML_STREAM() << xml::utils::replace_text_to_xml(formula_cash);
}
}
}
......
......@@ -110,10 +110,16 @@ int LBL::serialize(std::wostream & stream)
Lbl *lbl = dynamic_cast<Lbl*>(m_Lbl.get());
if (lbl == NULL) return 0;
const std::wstring & value = lbl->rgce.getAssembledFormula();
std::wstring value = lbl->rgce.getAssembledFormula();
if (value.empty()) return 0;
int res = 0;
if (lbl->itab == 0 && (res = value.find(L"!")) < 0)
{
value = std::wstring(L"#REF!");
}
CP_XML_WRITER(stream)
{
CP_XML_NODE(L"definedName")
......
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