Commit eda8e4d1 authored by Sergey Konovalov's avatar Sergey Konovalov

add c_oSerCellTypes::ValueText for cell value; Read1 error with empty length

parent 64f578e5
...@@ -298,7 +298,8 @@ namespace BinXlsxRW ...@@ -298,7 +298,8 @@ namespace BinXlsxRW
Type = 2, Type = 2,
Value = 3, Value = 3,
Formula = 4, Formula = 4,
RefRowCol = 5 RefRowCol = 5,
ValueText = 6
};} };}
namespace c_oSerFormulaTypes{enum c_oSerFormulaTypes namespace c_oSerFormulaTypes{enum c_oSerFormulaTypes
{ {
......
...@@ -79,7 +79,7 @@ namespace BinXlsxRW { ...@@ -79,7 +79,7 @@ namespace BinXlsxRW {
return c_oSerConstants::ReadOk; return c_oSerConstants::ReadOk;
} }
res = (((CallbackType*)poFuncObj)->*fReadFunction)(type, length, arg); res = (((CallbackType*)poFuncObj)->*fReadFunction)(type, length, arg);
if(res == c_oSerConstants::ReadUnknown && length > 0) if(res == c_oSerConstants::ReadUnknown)
{ {
m_oBufferedStream.GetPointer(length); m_oBufferedStream.GetPointer(length);
res = c_oSerConstants::ReadOk; res = c_oSerConstants::ReadOk;
......
...@@ -3555,6 +3555,11 @@ namespace BinXlsxRW { ...@@ -3555,6 +3555,11 @@ namespace BinXlsxRW {
pCell->m_oValue.Init(); pCell->m_oValue.Init();
pCell->m_oValue->m_sText.append(OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(dValue)); pCell->m_oValue->m_sText.append(OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(dValue));
} }
else if(c_oSerCellTypes::ValueText == type)
{
pCell->m_oValue.Init();
pCell->m_oValue->m_sText.append(m_oBufferedStream.GetString4(length));
}
else else
res = c_oSerConstants::ReadUnknown; res = c_oSerConstants::ReadUnknown;
return res; return res;
......
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