mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-03-06 19:53:21 +08:00
Compare commits
20 Commits
core-win-6
...
v5.0.99.28
| Author | SHA1 | Date | |
|---|---|---|---|
| 23029a6a92 | |||
| eda8e4d13f | |||
| 64f578e59f | |||
| 16c57b50cc | |||
| 83c0ba9dab | |||
| a2443dadeb | |||
| 789bb1d4b3 | |||
| 4138ae5ce2 | |||
| 239b5dbf11 | |||
| c046776b9c | |||
| 055a02570b | |||
| 1e2e5996f3 | |||
| 875717acd4 | |||
| 033feeaf9d | |||
| de336e5f96 | |||
| 82b3dbdae6 | |||
| d1227f7759 | |||
| 4d134387f9 | |||
| 3f8600dfb7 | |||
| 511f043d63 |
@ -3734,6 +3734,18 @@ public:
|
||||
res = Read2(length, &Binary_DocumentTableReader::Read_Background, this, &oBackground);
|
||||
m_oDocumentWriter.m_oBackground.WriteString(oBackground.Write());
|
||||
}
|
||||
else if ( c_oSerParType::BookmarkStart == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkStart oBookmarkStart;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkStart, this, &oBookmarkStart);
|
||||
m_oDocumentWriter.m_oContent.WriteString(oBookmarkStart.toXML());
|
||||
}
|
||||
else if ( c_oSerParType::BookmarkEnd == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd oBookmarkEnd;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkEnd, this, &oBookmarkEnd);
|
||||
m_oDocumentWriter.m_oContent.WriteString(oBookmarkEnd.toXML());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3872,6 +3884,18 @@ public:
|
||||
SdtWraper oSdt(1);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else if ( c_oSerParType::BookmarkStart == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkStart oBookmarkStart;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkStart, this, &oBookmarkStart);
|
||||
m_oDocumentWriter.m_oContent.WriteString(oBookmarkStart.toXML());
|
||||
}
|
||||
else if ( c_oSerParType::BookmarkEnd == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd oBookmarkEnd;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkEnd, this, &oBookmarkEnd);
|
||||
m_oDocumentWriter.m_oContent.WriteString(oBookmarkEnd.toXML());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -4267,6 +4291,57 @@ public:
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadBookmarkStart(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(poResult);
|
||||
if ( c_oSerBookmark::Id == type )
|
||||
{
|
||||
pBookmarkStart->m_oId.Init();
|
||||
pBookmarkStart->m_oId->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if ( c_oSerBookmark::Name == type )
|
||||
{
|
||||
pBookmarkStart->m_sName.Init();
|
||||
pBookmarkStart->m_sName->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if ( c_oSerBookmark::DisplacedByCustomXml == type )
|
||||
{
|
||||
pBookmarkStart->m_oDisplacedByCustomXml.Init();
|
||||
pBookmarkStart->m_oDisplacedByCustomXml->SetValue((SimpleTypes::EDisplacedByCustomXml)m_oBufferedStream.GetUChar());
|
||||
}
|
||||
else if ( c_oSerBookmark::ColFirst == type )
|
||||
{
|
||||
pBookmarkStart->m_oColFirst.Init();
|
||||
pBookmarkStart->m_oColFirst->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if ( c_oSerBookmark::ColLast == type )
|
||||
{
|
||||
pBookmarkStart->m_oColLast.Init();
|
||||
pBookmarkStart->m_oColLast->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadBookmarkEnd(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(poResult);
|
||||
if ( c_oSerBookmark::Id == type )
|
||||
{
|
||||
pBookmarkEnd->m_oId.Init();
|
||||
pBookmarkEnd->m_oId->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if ( c_oSerBookmark::DisplacedByCustomXml == type )
|
||||
{
|
||||
pBookmarkEnd->m_oDisplacedByCustomXml.Init();
|
||||
pBookmarkEnd->m_oDisplacedByCustomXml->SetValue((SimpleTypes::EDisplacedByCustomXml)m_oBufferedStream.GetUChar());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
|
||||
int ReadHyperlink(BYTE type, long length, void* poResult)
|
||||
{
|
||||
@ -4460,6 +4535,18 @@ public:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadMathSSup, this, poResult);
|
||||
GetRunStringWriter().WriteString(std::wstring(_T("</m:sSup>")));
|
||||
}
|
||||
else if ( c_oSer_OMathContentType::BookmarkStart == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkStart oBookmarkStart;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkStart, this, &oBookmarkStart);
|
||||
GetRunStringWriter().WriteString(oBookmarkStart.toXML());
|
||||
}
|
||||
else if ( c_oSer_OMathContentType::BookmarkEnd == type )
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd oBookmarkEnd;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkEnd, this, &oBookmarkEnd);
|
||||
GetRunStringWriter().WriteString(oBookmarkEnd.toXML());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -6923,6 +7010,18 @@ public:
|
||||
SdtWraper oSdt(2);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else if (c_oSerDocTableType::BookmarkStart == type)
|
||||
{
|
||||
OOX::Logic::CBookmarkStart oBookmarkStart;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkStart, this, &oBookmarkStart);
|
||||
pCStringWriter->WriteString(oBookmarkStart.toXML());
|
||||
}
|
||||
else if (c_oSerDocTableType::BookmarkEnd == type)
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd oBookmarkEnd;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkEnd, this, &oBookmarkEnd);
|
||||
pCStringWriter->WriteString(oBookmarkEnd.toXML());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -6960,6 +7059,18 @@ public:
|
||||
SdtWraper oSdt(3);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else if (c_oSerDocTableType::BookmarkStart == type)
|
||||
{
|
||||
OOX::Logic::CBookmarkStart oBookmarkStart;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkStart, this, &oBookmarkStart);
|
||||
pCStringWriter->WriteString(oBookmarkStart.toXML());
|
||||
}
|
||||
else if (c_oSerDocTableType::BookmarkEnd == type)
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd oBookmarkEnd;
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadBookmarkEnd, this, &oBookmarkEnd);
|
||||
pCStringWriter->WriteString(oBookmarkEnd.toXML());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
|
||||
@ -476,7 +476,9 @@ extern int g_nCurFormatVersion;
|
||||
MoveFromRangeStart = 18,
|
||||
MoveFromRangeEnd = 19,
|
||||
MoveToRangeStart = 20,
|
||||
MoveToRangeEnd = 21
|
||||
MoveToRangeEnd = 21,
|
||||
BookmarkStart = 22,
|
||||
BookmarkEnd = 23
|
||||
};}
|
||||
namespace c_oSerDocTableType{enum c_oSerDocTableType
|
||||
{
|
||||
@ -491,7 +493,9 @@ extern int g_nCurFormatVersion;
|
||||
Cell_Pr = 7,
|
||||
Cell_Content = 8,
|
||||
tblGridChange = 9,
|
||||
Sdt = 10
|
||||
Sdt = 10,
|
||||
BookmarkStart = 11,
|
||||
BookmarkEnd = 12
|
||||
};}
|
||||
namespace c_oSerRunType{enum c_oSerRunType
|
||||
{
|
||||
@ -900,7 +904,9 @@ extern int g_nCurFormatVersion;
|
||||
Ins = 62,
|
||||
Del = 63,
|
||||
columnbreak = 64,
|
||||
ARPr = 65
|
||||
ARPr = 65,
|
||||
BookmarkStart = 66,
|
||||
BookmarkEnd = 67
|
||||
};}
|
||||
namespace c_oSer_FramePrType{ enum c_oSer_FramePrType
|
||||
{
|
||||
@ -1105,6 +1111,14 @@ extern int g_nCurFormatVersion;
|
||||
Name = 6,
|
||||
UserId = 7
|
||||
};}
|
||||
namespace c_oSerBookmark{enum c_oSerBookmark
|
||||
{
|
||||
Id = 0,
|
||||
Name = 1,
|
||||
DisplacedByCustomXml = 2,
|
||||
ColFirst = 3,
|
||||
ColLast = 4
|
||||
};}
|
||||
}
|
||||
|
||||
#endif // #ifndef DOCX_BIN_READER_WRITER_DEFINES
|
||||
|
||||
@ -3076,6 +3076,20 @@ namespace BinDocxRW
|
||||
OOX::Logic::CBdo* pBdo = static_cast<OOX::Logic::CBdo*>(item);
|
||||
WriteDocumentContent(pBdo->m_arrItems);
|
||||
}break;
|
||||
case OOX::et_w_bookmarkStart:
|
||||
{
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::BookmarkStart);
|
||||
WriteBookmarkStart(*pBookmarkStart);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}break;
|
||||
case OOX::et_w_bookmarkEnd:
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::BookmarkEnd);
|
||||
WriteBookmarkEnd(*pBookmarkEnd);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3249,6 +3263,22 @@ namespace BinDocxRW
|
||||
WriteComment(OOX::et_w_commentRangeEnd, pCommentRangeEnd->m_oId);
|
||||
break;
|
||||
}
|
||||
case OOX::et_w_bookmarkStart:
|
||||
{
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::BookmarkStart);
|
||||
WriteBookmarkStart(*pBookmarkStart);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
case OOX::et_w_bookmarkEnd:
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::BookmarkEnd);
|
||||
WriteBookmarkEnd(*pBookmarkEnd);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
//todo moveRange on all levels(body, p ...)
|
||||
// case OOX::et_w_moveFromRangeStart:
|
||||
// {
|
||||
@ -3660,6 +3690,56 @@ namespace BinDocxRW
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteBookmarkStart(const OOX::Logic::CBookmarkStart& oBookmarkStart)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if (oBookmarkStart.m_oId.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::Id);
|
||||
m_oBcw.m_oStream.WriteLONG(oBookmarkStart.m_oId->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oBookmarkStart.m_sName.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::Name);
|
||||
m_oBcw.m_oStream.WriteStringW3(oBookmarkStart.m_sName.get());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oBookmarkStart.m_oDisplacedByCustomXml.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::DisplacedByCustomXml);
|
||||
m_oBcw.m_oStream.WriteBYTE((BYTE)oBookmarkStart.m_oDisplacedByCustomXml->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oBookmarkStart.m_oColFirst.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::ColFirst);
|
||||
m_oBcw.m_oStream.WriteLONG(oBookmarkStart.m_oColFirst->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oBookmarkStart.m_oColLast.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::ColLast);
|
||||
m_oBcw.m_oStream.WriteLONG(oBookmarkStart.m_oColLast->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteBookmarkEnd(const OOX::Logic::CBookmarkEnd& oBookmarkEnd)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if (oBookmarkEnd.m_oId.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::Id);
|
||||
m_oBcw.m_oStream.WriteLONG(oBookmarkEnd.m_oId->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
if (oBookmarkEnd.m_oDisplacedByCustomXml.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerBookmark::DisplacedByCustomXml);
|
||||
m_oBcw.m_oStream.WriteBYTE((BYTE)oBookmarkEnd.m_oDisplacedByCustomXml->GetValue());
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteHyperlink(OOX::Logic::CHyperlink* pHyperlink)
|
||||
{
|
||||
@ -4097,6 +4177,22 @@ namespace BinDocxRW
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
case OOX::et_w_bookmarkStart:
|
||||
{
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathContentType::BookmarkStart);
|
||||
WriteBookmarkStart(*pBookmarkStart);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
case OOX::et_w_bookmarkEnd:
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_OMathContentType::BookmarkEnd);
|
||||
WriteBookmarkEnd(*pBookmarkEnd);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -6638,6 +6734,20 @@ namespace BinDocxRW
|
||||
OOX::Logic::CBdo* pBdo = static_cast<OOX::Logic::CBdo*>(item);
|
||||
WriteTableContent(pBdo->m_arrItems, pTblPr, nRows, nCols);
|
||||
}
|
||||
else if(OOX::et_w_bookmarkStart == item->getType())
|
||||
{
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::BookmarkStart);
|
||||
WriteBookmarkStart(*pBookmarkStart);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
else if(OOX::et_w_bookmarkEnd == item->getType())
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::BookmarkEnd);
|
||||
WriteBookmarkEnd(*pBookmarkEnd);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
void WriteRow(const OOX::Logic::CTr& Row, OOX::Logic::CTableProperty* pTblPr, int nCurRowIndex, int nRows, int nCols)
|
||||
@ -6698,6 +6808,20 @@ namespace BinDocxRW
|
||||
OOX::Logic::CBdo* pBdo = static_cast<OOX::Logic::CBdo*>(item);
|
||||
WriteRowContent(pBdo->m_arrItems, pTblPr, nCurRowIndex, nRows, nCols);
|
||||
}
|
||||
else if(OOX::et_w_bookmarkStart == item->getType())
|
||||
{
|
||||
OOX::Logic::CBookmarkStart* pBookmarkStart = static_cast<OOX::Logic::CBookmarkStart*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::BookmarkStart);
|
||||
WriteBookmarkStart(*pBookmarkStart);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
else if(OOX::et_w_bookmarkEnd == item->getType())
|
||||
{
|
||||
OOX::Logic::CBookmarkEnd* pBookmarkEnd = static_cast<OOX::Logic::CBookmarkEnd*>(item);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::BookmarkEnd);
|
||||
WriteBookmarkEnd(*pBookmarkEnd);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
void WriteCell(OOX::Logic::CTc& tc, OOX::Logic::CTableProperty* pTblPr, int nCurRowIndex, int nCurColIndex, int nRows, int nCols)
|
||||
|
||||
@ -133,7 +133,8 @@ xlsx_table_state::xlsx_table_state(xlsx_conversion_context * Context, std::wstri
|
||||
xlsx_drawing_context_ (Context->get_drawing_context_handle()),
|
||||
xlsx_comments_context_ (Context->get_comments_context_handle()),
|
||||
table_column_last_width_(0.0),
|
||||
in_cell(false)
|
||||
in_cell(false),
|
||||
bEndTable(false)
|
||||
|
||||
{
|
||||
memset(&group_row_,0,sizeof(_group_row));
|
||||
|
||||
@ -91,6 +91,9 @@ public:
|
||||
void end_row ();
|
||||
|
||||
void add_empty_row(int count);
|
||||
|
||||
void set_end_table(){ bEndTable = true; }
|
||||
bool get_end_table(){ return bEndTable; }
|
||||
|
||||
std::wstring current_row_style () const;
|
||||
std::wstring default_row_cell_style () const;
|
||||
@ -153,6 +156,7 @@ public:
|
||||
friend class xlsx_table_context;
|
||||
|
||||
private:
|
||||
bool bEndTable;
|
||||
xlsx_conversion_context * context_;
|
||||
|
||||
std::wstring tableName_;
|
||||
|
||||
@ -195,7 +195,14 @@ std::wstring cellType2Str(XlsxCellType::type type)
|
||||
|
||||
boost::int64_t convertDate(int Year, int Month, int Day)
|
||||
{
|
||||
boost::int64_t daysFrom1900 = boost::gregorian::date_duration(boost::gregorian::date(Year, Month, Day) - boost::gregorian::date(1900, 1, 1)).days() + 1;
|
||||
if (Year < 1400 || Year >10000)
|
||||
return - 1;
|
||||
if (Month < 1 || Month > 12)
|
||||
return - 1;
|
||||
if (Day < 1 || Day > 31)
|
||||
return - 1;
|
||||
|
||||
boost::int64_t daysFrom1900 = boost::gregorian::date_duration(boost::gregorian::date(Year, Month, Day) - boost::gregorian::date(1900, 1, 1)).days() + 1;
|
||||
|
||||
if (Year <= 1900 &&
|
||||
Month <= 2 &&
|
||||
|
||||
@ -78,13 +78,16 @@ int table_table_cell_content::xlsx_convert(oox::xlsx_conversion_context & Contex
|
||||
|
||||
void table_table_row::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
bool bEndTable = Context.get_table_context().state()->get_end_table();
|
||||
|
||||
if (attlist_.table_number_rows_repeated_ > 1 && empty())
|
||||
{
|
||||
Context.get_table_context().state()->add_empty_row(attlist_.table_number_rows_repeated_);
|
||||
return;
|
||||
}
|
||||
if (attlist_.table_number_rows_repeated_ > 0xf000 && empty_content_cells())
|
||||
if (attlist_.table_number_rows_repeated_ > 0x0f00 && empty_content_cells() || bEndTable)//0xf000 - conv_KDZO3J3xLIbZ5fC0HR0__xlsx.ods
|
||||
{
|
||||
Context.get_table_context().state()->set_end_table();
|
||||
Context.get_table_context().state()->add_empty_row(attlist_.table_number_rows_repeated_);
|
||||
return; //conv_hSX8n3lVbhALjt0aafg__xlsx.ods, conv_MA2CauoNfX_7ejKS5eg__xlsx.ods
|
||||
}
|
||||
@ -731,7 +734,15 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
int y, m, d;
|
||||
if (oox::parseDate(attr.office_date_value_.get(), y, m, d))
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(oox::convertDate(y, m, d));
|
||||
boost::int64_t intDate = oox::convertDate(y, m, d);
|
||||
if (intDate > 0)
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(intDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
str_val = attr.office_date_value_.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -742,11 +753,19 @@ void table_table_cell::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (attr.office_time_value_)
|
||||
{
|
||||
const std::wstring tv = attr.office_time_value_.get();
|
||||
int h,m;
|
||||
int h, m;
|
||||
double s;
|
||||
if (oox::parseTime(tv, h, m, s))
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(oox::convertTime(h, m, s));
|
||||
boost::int64_t intTime = oox::convertTime(h, m, s);
|
||||
if (intTime > 0)
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(intTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
str_val = tv;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -999,7 +1018,15 @@ void table_covered_table_cell::xlsx_convert(oox::xlsx_conversion_context & Conte
|
||||
int y, m, d;
|
||||
if (oox::parseDate(attr.office_date_value_.get(), y, m, d))
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(oox::convertDate(y, m, d));
|
||||
boost::int64_t intDate = oox::convertDate(y, m, d);
|
||||
if (intDate > 0)
|
||||
{
|
||||
number_val = boost::lexical_cast<std::wstring>(intDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
str_val = attr.office_date_value_.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1687,6 +1687,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
|
||||
NSPresentationEditor::CShapeElement oShapeElem;
|
||||
CPPTShape* pPPTShape = NULL;
|
||||
bool bSetShape = false;
|
||||
|
||||
if (L"v:background" == strNameNode)
|
||||
{
|
||||
@ -1885,6 +1886,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
}
|
||||
}
|
||||
oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape));
|
||||
bSetShape = true;
|
||||
|
||||
if (bIsNeedCoordSizes)
|
||||
{
|
||||
@ -1895,7 +1897,8 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
|
||||
if (pPPTShape != NULL)
|
||||
{
|
||||
oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape));
|
||||
if (!bSetShape)
|
||||
oShapeElem.m_pShape->setBaseShape(CBaseShapePtr(pPPTShape));
|
||||
if (bIsNeedCoordSizes)
|
||||
{
|
||||
LoadCoordSize(oNodeShape, oShapeElem.m_pShape);
|
||||
|
||||
@ -637,11 +637,18 @@ namespace PPTX
|
||||
{
|
||||
pWriter->StartRecord(SPTREE_TYPE_OLE);
|
||||
|
||||
if (oleObject->m_sShapeId.IsInit() && (!blipFill.blip->embed.IsInit() && blipFill.blip->oleFilepathImage.empty()) &&
|
||||
parentFileIs<PPTX::Slide>() && parentFileAs<PPTX::Slide>().Vml.IsInit())
|
||||
OOX::CVmlDrawing *pVml = NULL;
|
||||
|
||||
if (parentFileIs<PPTX::Slide>())
|
||||
{
|
||||
OOX::CVmlDrawing *pVml = parentFileAs<PPTX::Slide>().Vml.operator->();
|
||||
|
||||
pVml = parentFileAs<PPTX::Slide>().Vml.operator->();
|
||||
}
|
||||
else if (parentFileIs<PPTX::SlideMaster>())
|
||||
{
|
||||
pVml = parentFileAs<PPTX::SlideMaster>().Vml.operator->();
|
||||
}
|
||||
if (oleObject->m_sShapeId.IsInit() && pVml && !blipFill.blip->embed.IsInit() && blipFill.blip->oleFilepathImage.empty())
|
||||
{
|
||||
std::map<std::wstring, OOX::CVmlDrawing::_vml_shape>::iterator pPair = pVml->m_mapShapes.find(*oleObject->m_sShapeId);
|
||||
if (pVml->m_mapShapes.end() != pPair)
|
||||
{
|
||||
|
||||
@ -73,6 +73,47 @@ void CFStream::read(void* buf, const size_t size)
|
||||
return;// EndOfStreamReached
|
||||
}
|
||||
}
|
||||
void CFStream::copy( std::wstring streamNameCreate, POLE::Storage * storageOut)
|
||||
{
|
||||
stream_->seek(0);
|
||||
int size_stream = stream_->size();
|
||||
|
||||
POLE::Stream *streamNew = new POLE::Stream(storageOut, streamNameCreate, true, size_stream);
|
||||
if (!streamNew) return;
|
||||
|
||||
unsigned char buffer[4096];
|
||||
int bytesRead = 0;
|
||||
|
||||
while(true)
|
||||
{
|
||||
int bytesToRead = size_stream - bytesRead;
|
||||
if (bytesToRead <= 0)
|
||||
break;
|
||||
if (bytesToRead > 4096)
|
||||
bytesToRead = 4096;
|
||||
|
||||
stream_->read(buffer, bytesToRead);
|
||||
streamNew->write(buffer, bytesToRead);
|
||||
|
||||
bytesRead += bytesToRead;
|
||||
}
|
||||
//unsigned char* data_stream = new unsigned char[size_stream + 64];
|
||||
//memset(data_stream, 0, size_stream + 64);
|
||||
//if (data_stream)
|
||||
//{
|
||||
// stream->read(data_stream, size_stream);
|
||||
|
||||
// streamNew->write(data_stream, size_stream);
|
||||
|
||||
// delete []data_stream;
|
||||
// data_stream = NULL;
|
||||
//}
|
||||
|
||||
streamNew->flush();
|
||||
|
||||
delete streamNew;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Write 'size' unsigned chars to the stream
|
||||
|
||||
@ -46,6 +46,8 @@ class CFStream
|
||||
public:
|
||||
CFStream(POLE::Stream* stream);
|
||||
~CFStream();
|
||||
|
||||
void copy( std::wstring streamNameCreate, POLE::Storage * storageOut);
|
||||
|
||||
template<class Type>
|
||||
CFStream& operator>>(Type& val) // Read a simple type or an object (not array)
|
||||
|
||||
@ -103,7 +103,7 @@ void CompoundFile::copy_stream(std::wstring streamNameOpen, std::wstring streamN
|
||||
if (!stream) return;
|
||||
|
||||
stream->seek(0);
|
||||
int size_stream = stream->size();
|
||||
POLE::uint64 size_stream = stream->size();
|
||||
|
||||
if (bWithRoot == false)
|
||||
{
|
||||
|
||||
@ -35,8 +35,7 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Array::Array(const CellRef& cell_base_ref_init)
|
||||
: formula(false, cell_base_ref_init)
|
||||
Array::Array(const CellRef& cell_base_ref_init) :formula(false, cell_base_ref_init)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include <Logic/Biff_structures/ArrayParsedFormula.h>
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
#include "../Biff_structures/ArrayParsedFormula.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -49,7 +49,6 @@ public:
|
||||
~Array();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
|
||||
@ -46,13 +46,15 @@ static inline void trim(std::wstring &s)
|
||||
if (s[i] != 0) break;
|
||||
else new_size--;
|
||||
}
|
||||
if (new_size < s.length())
|
||||
if (new_size < (int)s.length())
|
||||
s.erase(new_size);
|
||||
}
|
||||
|
||||
AutoFilter::AutoFilter()
|
||||
{
|
||||
wTopN = wJoin = 0;
|
||||
size = -1;
|
||||
bExist = false;
|
||||
}
|
||||
|
||||
|
||||
@ -68,6 +70,15 @@ BaseObjectPtr AutoFilter::clone()
|
||||
|
||||
void AutoFilter::readFields(CFRecord& record)
|
||||
{
|
||||
size_t pos_record = record.getRdPtr();
|
||||
|
||||
if (size < 0) size = record.getDataSize() - pos_record;
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
bExist = true;
|
||||
}
|
||||
|
||||
m_bAutoFilter12 = false;
|
||||
|
||||
unsigned short flags;
|
||||
@ -93,13 +104,13 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
record >> doper2;
|
||||
}
|
||||
|
||||
if ((doper1.vt == BIFF_BYTE(0)) && (doper2.vt == BIFF_BYTE(0)))
|
||||
if (doper1.vt == 0 && doper2.vt == 0)
|
||||
{
|
||||
m_bAutoFilter12 = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (doper1.vt == BIFF_BYTE(0x06))
|
||||
if (doper1.vt == 0x06)
|
||||
{
|
||||
XLUnicodeStringNoCch s;
|
||||
s.setSize(doper1.vtValueStr.cch);
|
||||
@ -109,7 +120,7 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
trim(str1);
|
||||
}
|
||||
|
||||
if (doper2.vt == BIFF_BYTE(0x06))
|
||||
if (doper2.vt == 0x06)
|
||||
{
|
||||
XLUnicodeStringNoCch s;
|
||||
s.setSize(doper2.vtValueStr.cch);
|
||||
@ -119,9 +130,9 @@ void AutoFilter::readFields(CFRecord& record)
|
||||
trim(str2);
|
||||
}
|
||||
|
||||
if (record.getRdPtr() < record.getDataSize())
|
||||
if (record.getRdPtr() - pos_record < size)
|
||||
{
|
||||
int sz = record.getDataSize() - record.getRdPtr();
|
||||
int sz = size - (record.getRdPtr() - pos_record);
|
||||
char *dd = new char [sz];
|
||||
|
||||
memcpy(dd, record.getCurData<char>(), sz);
|
||||
|
||||
@ -32,13 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/AFDOper.h>
|
||||
#include "../Biff_structures/AFDOper.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of AutoFilter record in BIFF8
|
||||
class AutoFilter: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(AutoFilter)
|
||||
@ -74,6 +72,10 @@ public:
|
||||
std::wstring str1;
|
||||
std::wstring str2;
|
||||
|
||||
//----------------------------------------
|
||||
int size;
|
||||
bool bExist;
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -58,14 +58,6 @@ void AutoFilter12::readFields(CFRecord& record)
|
||||
|
||||
record >> frtRefHeader >> iEntry >> fHideArrow >> ft >> cft >> cCriteria >> cDateGroupings >> flags >> unused2 >> idList;
|
||||
|
||||
_UINT16 _iEntry = iEntry;
|
||||
_UINT32 _fHideArrow = fHideArrow;
|
||||
_UINT32 _ft = ft;
|
||||
_UINT32 _cft = cft;
|
||||
_UINT32 _cCriteria = cCriteria;
|
||||
_UINT32 _cDateGroupings = cDateGroupings;
|
||||
_UINT32 _idList = idList;
|
||||
|
||||
// TODO доделать
|
||||
record.skipNunBytes(record.getDataSize() - record.getRdPtr());
|
||||
|
||||
@ -82,11 +74,12 @@ void AutoFilter12::readFields(CFRecord& record)
|
||||
record >> frtRefHeaderContinue;
|
||||
if (frtRefHeaderContinue.rt == 0x087F)
|
||||
{
|
||||
if ( (ft == BIFF_DWORD(0)) && (cCriteria > 0) )
|
||||
if ( ft == 0 && cCriteria > 0)
|
||||
{
|
||||
AF12CriteriaPtr item(new AF12Criteria);
|
||||
item->load(record);
|
||||
rgbAF12Criteries.push_back(item);
|
||||
|
||||
arAF12Criteries.push_back(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,17 +32,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecordContinued.h"
|
||||
#include <Logic/Biff_structures/FrtRefHeader.h>
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_structures/FrtRefHeader.h>
|
||||
#include <Logic/Biff_structures/AFDOper.h>
|
||||
#include <Logic/Biff_structures/AF12Criteria.h>
|
||||
|
||||
#include "../Biff_structures/FrtRefHeader.h"
|
||||
#include "../Biff_structures/BiffString.h"
|
||||
#include "../Biff_structures/FrtRefHeader.h"
|
||||
#include "../Biff_structures/AFDOper.h"
|
||||
#include "../Biff_structures/AF12Criteria.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of AutoFilter12 record in BIFF8
|
||||
class AutoFilter12: public BiffRecordContinued
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(AutoFilter12)
|
||||
@ -53,21 +52,21 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeAutoFilter12;
|
||||
|
||||
FrtRefHeader frtRefHeader;
|
||||
_UINT16 iEntry;
|
||||
BIFF_DWORD fHideArrow;
|
||||
BIFF_DWORD ft;
|
||||
BIFF_DWORD cft;
|
||||
BIFF_DWORD cCriteria;
|
||||
BIFF_DWORD cDateGroupings;
|
||||
BIFF_DWORD idList;
|
||||
|
||||
BiffStructurePtrVector rgbAF12Criteries;
|
||||
_UINT16 iEntry;
|
||||
_UINT32 fHideArrow;
|
||||
_UINT32 ft;
|
||||
_UINT32 cft;
|
||||
_UINT32 cCriteria;
|
||||
_UINT32 cDateGroupings;
|
||||
_UINT32 idList;
|
||||
|
||||
BiffStructurePtrVector arAF12Criteries;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
#include "BiffRecord.h"
|
||||
|
||||
#include <Logic/Biff_structures/ChartParsedFormula.h>
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include "../Biff_structures/ChartParsedFormula.h"
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -70,7 +70,7 @@ const bool BiffRecord::read(CFStreamCacheReader& reader, BaseObject* parent, con
|
||||
size_t rdPtr = record->getRdPtr();
|
||||
size_t typeId = getTypeId();
|
||||
|
||||
if(record->getDataSize() != record->getRdPtr() && getTypeId() != rt_ANY_TYPE && getTypeId() != rt_MsoDrawing)
|
||||
if(record->getDataSize() != record->getRdPtr() && getTypeId() != rt_ANY_TYPE/* && getTypeId() != rt_MsoDrawing*/)
|
||||
{
|
||||
Log::warning(STR::int2str(record->getDataSize() - record->getRdPtr(), 10) + " unsigned chars were not processed while reading from " + record->getTypeString());
|
||||
}
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of BookBool record in BIFF8
|
||||
class BookBool: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(BookBool)
|
||||
@ -47,20 +45,18 @@ public:
|
||||
~BookBool();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeBookBool;
|
||||
|
||||
//-----------------------------
|
||||
bool fNoSaveSup;
|
||||
bool fHasEnvelope;
|
||||
bool fEnvelopeVisible;
|
||||
bool fEnvelopeInitDone;
|
||||
bool fHideBorderUnselLists;
|
||||
|
||||
BIFF_BSTR grUpdateLinks;
|
||||
std::wstring grUpdateLinks;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -56,6 +56,7 @@ void BopPop::readFields(CFRecord& record)
|
||||
{
|
||||
unsigned short flags;
|
||||
record >> pst >> fAutoSplit >> split >> iSplitPos >> pcSplitPercent >> pcPie2Size >> pcGap >> numSplitValue >> flags;
|
||||
|
||||
fHasShadow = GETBIT(flags, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of BopPop record in BIFF8
|
||||
class BopPop: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(BopPop)
|
||||
@ -47,7 +46,6 @@ public:
|
||||
~BopPop();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -63,7 +61,7 @@ public:
|
||||
_INT16 pcSplitPercent;
|
||||
_INT16 pcPie2Size;
|
||||
_INT16 pcGap;
|
||||
BIFF_DOUBLE numSplitValue;
|
||||
Xnum numSplitValue;
|
||||
|
||||
bool fHasShadow;
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of BottomMargin record in BIFF8
|
||||
class BottomMargin: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(BottomMargin)
|
||||
@ -54,7 +53,7 @@ public:
|
||||
static const ElementType type = typeBottomMargin;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE num;
|
||||
Xnum num;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CalcDelta record in BIFF8
|
||||
class CalcDelta: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CalcDelta)
|
||||
@ -54,7 +53,7 @@ public:
|
||||
static const ElementType type = typeCalcDelta;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE numDelta;
|
||||
Xnum numDelta;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CalcMode record in BIFF8
|
||||
class CalcMode: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CalcMode)
|
||||
@ -53,8 +51,7 @@ public:
|
||||
|
||||
static const ElementType type = typeCalcMode;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_BSTR fAutoRecalc;
|
||||
std::wstring fAutoRecalc;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CalcRefMode record in BIFF8
|
||||
class CalcRefMode: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CalcRefMode)
|
||||
@ -47,14 +45,12 @@ public:
|
||||
~CalcRefMode();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeCalcRefMode;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_BSTR fRefA1;
|
||||
std::wstring fRefA1;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -36,9 +36,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CondFmt record in BIFF8
|
||||
class CondFmt: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CondFmt)
|
||||
@ -48,20 +45,18 @@ public:
|
||||
~CondFmt();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeCondFmt;
|
||||
static const ElementType type = typeCondFmt;
|
||||
|
||||
const CellRef getLocation() const;
|
||||
|
||||
//-----------------------------
|
||||
_UINT16 ccf;
|
||||
bool fToughRecalc;
|
||||
_UINT16 nID;
|
||||
SqRefU sqref;
|
||||
BIFF_BSTR refBound;
|
||||
_UINT16 ccf;
|
||||
bool fToughRecalc;
|
||||
_UINT16 nID;
|
||||
SqRefU sqref;
|
||||
std::wstring refBound;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<CondFmt> CondFmtPtr;
|
||||
|
||||
@ -32,12 +32,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CrtLayout12 record in BIFF8
|
||||
class CrtLayout12: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CrtLayout12)
|
||||
@ -47,7 +45,6 @@ public:
|
||||
~CrtLayout12();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -62,10 +59,10 @@ public:
|
||||
CrtLayout12Mode wWidthMode;
|
||||
CrtLayout12Mode wHeightMode;
|
||||
|
||||
BIFF_DOUBLE x;
|
||||
BIFF_DOUBLE y;
|
||||
BIFF_DOUBLE dx;
|
||||
BIFF_DOUBLE dy;
|
||||
Xnum x;
|
||||
Xnum y;
|
||||
Xnum dx;
|
||||
Xnum dy;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "Feat.h"
|
||||
#include <Logic/Biff_structures/FrtHeader.h>
|
||||
#include "../Biff_structures/FrtHeader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -45,43 +45,48 @@ Feat::~Feat()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr Feat::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Feat(*this));
|
||||
}
|
||||
// ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
|
||||
// ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
|
||||
// ISFFACTOID = 0x0004, // Specifies the smart tag type.
|
||||
// ISFLIST = 0x0005, // Specifies the list type.
|
||||
|
||||
void Feat::readFields(CFRecord& record)
|
||||
{
|
||||
FrtHeader frtHeader(rt_Feat);
|
||||
record >> frtHeader;
|
||||
record >> isf;
|
||||
|
||||
record >> frtHeader >> isf;
|
||||
record.skipNunBytes(5); // reserved
|
||||
|
||||
record >> cref >> cbFeatData;
|
||||
record.skipNunBytes(2); // reserved
|
||||
std::wstring sqref_str;
|
||||
|
||||
for (int i = 0; i < cref ; ++i)
|
||||
{
|
||||
Ref8U reff;
|
||||
record >> reff;
|
||||
refs.push_back(BiffStructurePtr(new Ref8U(reff)));
|
||||
sqref_str += std::wstring (reff.toString().c_str()) + ((i == cref - 1) ? L"" : L" ");
|
||||
|
||||
sqref += reff.toString() + ((i == cref - 1) ? L"" : L" ");
|
||||
}
|
||||
sqref = sqref_str;
|
||||
|
||||
switch(isf)
|
||||
{
|
||||
case SharedFeatureType::ISFPROTECTION:
|
||||
record >> protection;
|
||||
case 0x0002://ISFPROTECTION:
|
||||
is_object = BiffStructurePtr(new FeatProtection);
|
||||
break;
|
||||
case SharedFeatureType::ISFFEC2:
|
||||
record >> formula_err;
|
||||
case 0x0003://ISFFEC2:
|
||||
is_object = BiffStructurePtr(new FeatFormulaErr2);
|
||||
break;
|
||||
case SharedFeatureType::ISFFACTOID:
|
||||
record >> smart_tag;
|
||||
case 0x0004://ISFFACTOID:
|
||||
is_object = BiffStructurePtr(new FeatSmartTag);
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_object)
|
||||
is_object->load(record);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -32,16 +32,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecordContinued.h"
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include <Logic/Biff_structures/FeatProtection.h>
|
||||
#include <Logic/Biff_structures/FeatFormulaErr2.h>
|
||||
#include <Logic/Biff_structures/FeatSmartTag.h>
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
#include "../Biff_structures/FeatProtection.h"
|
||||
#include "../Biff_structures/FeatFormulaErr2.h"
|
||||
#include "../Biff_structures/FeatSmartTag.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Feat record in BIFF8
|
||||
class Feat: public BiffRecordContinued
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Feat)
|
||||
@ -51,23 +49,18 @@ public:
|
||||
~Feat();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeat;
|
||||
|
||||
//-----------------------------
|
||||
SharedFeatureType isf;
|
||||
_UINT16 cref;
|
||||
_UINT32 cbFeatData;
|
||||
_UINT16 isf;
|
||||
_UINT16 cref;
|
||||
_UINT32 cbFeatData;
|
||||
BiffStructurePtrVector refs;
|
||||
BIFF_BSTR sqref;
|
||||
|
||||
FeatProtection protection;
|
||||
FeatFormulaErr2 formula_err;
|
||||
FeatSmartTag smart_tag;
|
||||
std::wstring sqref;
|
||||
|
||||
BiffStructurePtr is_object;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -63,10 +63,10 @@ void FeatHdr::readFields(CFRecord& record)
|
||||
{
|
||||
switch(isf)
|
||||
{
|
||||
case SharedFeatureType::ISFPROTECTION:
|
||||
case 0x0002://ISFPROTECTION:
|
||||
record >> protection;
|
||||
break;
|
||||
case SharedFeatureType::ISFFACTOID:
|
||||
case 0x0004://ISFFACTOID:
|
||||
if(is_contained_in_Globals)
|
||||
{
|
||||
record >> prop;
|
||||
|
||||
@ -55,12 +55,13 @@ public:
|
||||
|
||||
static const ElementType type = typeFeatHdr;
|
||||
|
||||
_UINT16 isf;
|
||||
_UINT32 cbHdrData;
|
||||
EnhancedProtection protection;
|
||||
OSHARED::PropertyBagStore prop;
|
||||
|
||||
//-----------------------------
|
||||
bool is_contained_in_Globals;
|
||||
SharedFeatureType isf;
|
||||
_UINT32 cbHdrData;
|
||||
EnhancedProtection protection;
|
||||
OSHARED::PropertyBagStore prop;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -54,6 +54,12 @@ void FeatHdr11::readFields(CFRecord& record)
|
||||
{
|
||||
record >> frt;
|
||||
record >> isf;
|
||||
|
||||
// ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
|
||||
// ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
|
||||
// ISFFACTOID = 0x0004, // Specifies the smart tag type.
|
||||
// ISFLIST = 0x0005, // Specifies the list type.
|
||||
|
||||
record.skipNunBytes(1); // reserved1
|
||||
record.skipNunBytes(4); // reserved2
|
||||
record.skipNunBytes(4); // reserved3
|
||||
|
||||
@ -32,13 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/FrtHeader.h>
|
||||
#include "../Biff_structures/FrtHeader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of FeatHdr11 record in BIFF8
|
||||
class FeatHdr11: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(FeatHdr11)
|
||||
@ -48,18 +46,14 @@ public:
|
||||
~FeatHdr11();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeatHdr11;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
FrtHeader frt;
|
||||
SharedFeatureType isf;
|
||||
_UINT32 idListNext;
|
||||
FrtHeader frt;
|
||||
_UINT16 isf;
|
||||
_UINT32 idListNext;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -39,12 +39,10 @@ Feature11::Feature11()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Feature11::~Feature11()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr Feature11::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Feature11(*this));
|
||||
@ -54,25 +52,21 @@ void Feature11::readFields(CFRecord& record)
|
||||
{
|
||||
record >> frtRefHeaderU;
|
||||
record >> isf;
|
||||
|
||||
record.skipNunBytes(1); // reserved1
|
||||
record.skipNunBytes(4); // reserved2
|
||||
|
||||
record >> cref2;
|
||||
record >> cbFeatData;
|
||||
record.skipNunBytes(2); // reserved3
|
||||
|
||||
unsigned short _isf = isf;
|
||||
unsigned short _cref2 = cref2;
|
||||
unsigned int _cbFeatData = cbFeatData;
|
||||
|
||||
std::wstring sqref_str;
|
||||
for (int i = 0; i < cref2 ; ++i)
|
||||
{
|
||||
Ref8U reff;
|
||||
record >> reff;
|
||||
refs2.push_back(BiffStructurePtr(new Ref8U(reff)));
|
||||
sqref_str += std::wstring (reff.toString().c_str()) + ((i == cref2 - 1) ? L"" : L" ");
|
||||
sqref += reff.toString() + ((i == cref2 - 1) ? L"" : L" ");
|
||||
}
|
||||
sqref = sqref_str;
|
||||
|
||||
record >> rgbFeat;
|
||||
}
|
||||
|
||||
@ -32,15 +32,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/FrtRefHeaderU.h>
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include <Logic/Biff_structures/TableFeatureType.h>
|
||||
|
||||
#include "../Biff_structures/FrtRefHeaderU.h"
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
#include "../Biff_structures/TableFeatureType.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Feature11 record in BIFF8
|
||||
class Feature11: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Feature11)
|
||||
@ -50,23 +49,19 @@ public:
|
||||
~Feature11();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeature11;
|
||||
static const ElementType type = typeFeature11;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
FrtRefHeaderU frtRefHeaderU;
|
||||
_UINT16 isf;
|
||||
_UINT16 cref2;
|
||||
_UINT32 cbFeatData;
|
||||
BiffStructurePtrVector refs2;
|
||||
BIFF_BSTR sqref;
|
||||
std::wstring sqref;
|
||||
|
||||
TableFeatureType rgbFeat;
|
||||
TableFeatureType rgbFeat;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -39,12 +39,10 @@ Feature12::Feature12()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Feature12::~Feature12()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr Feature12::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Feature12(*this));
|
||||
@ -53,6 +51,7 @@ BaseObjectPtr Feature12::clone()
|
||||
|
||||
void Feature12::readFields(CFRecord& record)
|
||||
{
|
||||
feature11.readFields(record);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -32,12 +32,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecordContinued.h"
|
||||
#include "Feature11.h"
|
||||
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Feature12 record in BIFF8
|
||||
class Feature12: public BiffRecordContinued
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Feature12)
|
||||
@ -47,12 +47,12 @@ public:
|
||||
~Feature12();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeature12;
|
||||
static const ElementType type = typeFeature12;
|
||||
|
||||
Feature11 feature11;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -32,13 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include "../Biff_structures/BiffString.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of FileSharing record in BIFF8
|
||||
class FileSharing: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(FileSharing)
|
||||
@ -48,16 +46,14 @@ public:
|
||||
~FileSharing();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFileSharing;
|
||||
|
||||
//-----------------------------
|
||||
Boolean<unsigned short> fReadOnlyRec;
|
||||
unsigned short wResPassNum;
|
||||
BIFF_BSTR wResPass;
|
||||
std::wstring wResPass;
|
||||
_UINT16 iNoResPass;
|
||||
XLUnicodeString stUNUsername;
|
||||
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of HLinkTooltip record in BIFF8
|
||||
class HLinkTooltip: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(HLinkTooltip)
|
||||
@ -47,15 +45,13 @@ public:
|
||||
~HLinkTooltip();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeHLinkTooltip;
|
||||
static const ElementType type = typeHLinkTooltip;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_BSTR wzTooltip;
|
||||
BackwardOnlyParam<std::wstring > ref_;
|
||||
std::wstring wzTooltip;
|
||||
BackwardOnlyParam<std::wstring > ref_;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -80,12 +80,9 @@ int LabelSst::serialize(std::wostream & stream)
|
||||
|
||||
CP_XML_ATTR(L"t", L"s");
|
||||
|
||||
if (isst.value())
|
||||
CP_XML_NODE(L"v")
|
||||
{
|
||||
CP_XML_NODE(L"v")
|
||||
{
|
||||
CP_XML_STREAM() << isst;
|
||||
}
|
||||
CP_XML_STREAM() << isst;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ public:
|
||||
|
||||
CellOffsetResender resender;
|
||||
Cell cell;
|
||||
BIFF_DWORD isst;
|
||||
_UINT32 isst;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -44,8 +44,7 @@ const wchar_t* const AutoFilterDefineNames[] =
|
||||
};
|
||||
|
||||
|
||||
Lbl::Lbl()
|
||||
: rgce(false), fGrp(0)
|
||||
Lbl::Lbl() : rgce(false), fGrp(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -167,10 +166,6 @@ void Lbl::readFields(CFRecord& record)
|
||||
}
|
||||
}
|
||||
|
||||
const XLUnicodeStringNoCch Lbl::getName() const
|
||||
{
|
||||
return Name_bin;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -39,8 +39,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Lbl record in BIFF8
|
||||
class Lbl: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Lbl)
|
||||
@ -51,15 +49,10 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeLbl;
|
||||
|
||||
|
||||
const XLUnicodeStringNoCch getName() const;
|
||||
|
||||
//-----------------------------
|
||||
bool fHidden;
|
||||
bool fFunc;
|
||||
bool fOB;
|
||||
@ -70,11 +63,11 @@ public:
|
||||
bool fPublished;
|
||||
bool fWorkbookParam;
|
||||
|
||||
unsigned char chKey;
|
||||
_UINT16 itab;
|
||||
XLUnicodeStringNoCch Name_bin;
|
||||
BIFF_BSTR Name;
|
||||
NameParsedFormula rgce;
|
||||
unsigned char chKey;
|
||||
_UINT16 itab;
|
||||
XLUnicodeStringNoCch Name_bin;
|
||||
std::wstring Name;
|
||||
NameParsedFormula rgce;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of LeftMargin record in BIFF8
|
||||
class LeftMargin: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(LeftMargin)
|
||||
@ -50,10 +49,9 @@ public:
|
||||
|
||||
static const ElementType type = typeLeftMargin;
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE num;
|
||||
Xnum num;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -32,6 +32,10 @@
|
||||
|
||||
#include "List12.h"
|
||||
|
||||
#include "../Biff_structures/List12BlockLevel.h"
|
||||
#include "../Biff_structures/List12TableStyleClientInfo.h"
|
||||
#include "../Biff_structures/List12DisplayName.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -39,12 +43,10 @@ List12::List12()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
List12::~List12()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr List12::clone()
|
||||
{
|
||||
return BaseObjectPtr(new List12(*this));
|
||||
@ -56,20 +58,20 @@ void List12::readFields(CFRecord& record)
|
||||
record >> lsd;
|
||||
record >> idList;
|
||||
|
||||
unsigned short _lsd = lsd;
|
||||
|
||||
switch (lsd)
|
||||
{
|
||||
case 0:
|
||||
record >> rgbList12BlockLevel;
|
||||
rgbList12 = BiffStructurePtr(new List12BlockLevel);
|
||||
break;
|
||||
case 1:
|
||||
record >> rgbList12TableStyleClientInfo;
|
||||
rgbList12 = BiffStructurePtr(new List12TableStyleClientInfo);
|
||||
break;
|
||||
case 2:
|
||||
record >> rgbList12DisplayName;
|
||||
rgbList12 = BiffStructurePtr(new List12DisplayName);
|
||||
break;
|
||||
}
|
||||
if (rgbList12)
|
||||
rgbList12->load(record);
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -32,16 +32,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/FrtHeader.h>
|
||||
#include <Logic/Biff_structures/List12BlockLevel.h>
|
||||
#include <Logic/Biff_structures/List12TableStyleClientInfo.h>
|
||||
#include <Logic/Biff_structures/List12DisplayName.h>
|
||||
#include "../Biff_structures/FrtHeader.h"
|
||||
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of List12 record in BIFF8
|
||||
class List12: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(List12)
|
||||
@ -51,19 +47,16 @@ public:
|
||||
~List12();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeList12;
|
||||
static const ElementType type = typeList12;
|
||||
|
||||
FrtHeader frtHeader;
|
||||
_UINT16 lsd;
|
||||
_UINT32 idList;
|
||||
|
||||
List12BlockLevel rgbList12BlockLevel;
|
||||
List12TableStyleClientInfo rgbList12TableStyleClientInfo;
|
||||
List12DisplayName rgbList12DisplayName;
|
||||
BiffStructurePtr rgbList12;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -83,12 +83,9 @@ int Number::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
if (num.value())
|
||||
CP_XML_NODE(L"v")
|
||||
{
|
||||
CP_XML_NODE(L"v")
|
||||
{
|
||||
CP_XML_STREAM() << STR::double2str(num);
|
||||
}
|
||||
CP_XML_STREAM() << std::to_wstring(num.data.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,14 +32,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/CellOffsetResender.h>
|
||||
#include <Logic/Biff_structures/Cell.h>
|
||||
#include "../Biff_structures/CellOffsetResender.h"
|
||||
#include "../Biff_structures/Cell.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Number record in BIFF8
|
||||
class Number: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Number)
|
||||
@ -59,13 +58,11 @@ public:
|
||||
|
||||
const CellRef getLocation() const;
|
||||
|
||||
//-----------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
CellOffsetResender resender;
|
||||
Cell cell;
|
||||
BIFF_DOUBLE num;
|
||||
|
||||
|
||||
Xnum num;
|
||||
//-----------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of ObjProtect record in BIFF8
|
||||
class ObjProtect: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(ObjProtect)
|
||||
@ -51,7 +49,7 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeObjProtect;
|
||||
static const ElementType type = typeObjProtect;
|
||||
|
||||
//-----------------------------
|
||||
Boolean<unsigned short> fLockObj;
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Pane record in BIFF8
|
||||
class Pane: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Pane)
|
||||
@ -49,20 +47,18 @@ public:
|
||||
~Pane();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typePane;
|
||||
static const ElementType type = typePane;
|
||||
|
||||
//-----------------------------
|
||||
_UINT16 x;
|
||||
_UINT16 y;
|
||||
_UINT16 rwTop;
|
||||
_UINT16 colLeft;
|
||||
PaneType pnnAcct;
|
||||
|
||||
BIFF_BSTR topLeftCell;
|
||||
std::wstring topLeftCell;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Protect record in BIFF8
|
||||
class Protect: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Protect)
|
||||
|
||||
@ -32,12 +32,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of RightMargin record in BIFF8
|
||||
class RightMargin: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(RightMargin)
|
||||
@ -48,14 +46,12 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeRightMargin;
|
||||
static const ElementType type = typeRightMargin;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE num;
|
||||
|
||||
Xnum num;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -81,7 +81,7 @@ int SIIndex::serialize(std::wostream & _stream, int idx, const CellRef & in_ref)
|
||||
CP_XML_NODE(L"c:pt")
|
||||
{
|
||||
CP_XML_ATTR(L"idx", idx++);
|
||||
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num; }
|
||||
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num.data.value; }
|
||||
}
|
||||
res = 1;
|
||||
}
|
||||
@ -122,7 +122,7 @@ int SIIndex::serialize(std::wostream & _stream, ChartParsedFormula & in_ref)
|
||||
CP_XML_NODE(L"c:pt")
|
||||
{
|
||||
CP_XML_ATTR(L"idx", idx++);
|
||||
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << number->num; }
|
||||
CP_XML_NODE(L"c:v") { CP_XML_STREAM() << std::to_wstring(number->num.data.value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,6 @@ ScenarioProtect::~ScenarioProtect()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr ScenarioProtect::clone()
|
||||
{
|
||||
return BaseObjectPtr(new ScenarioProtect(*this));
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of ScenarioProtect record in BIFF8
|
||||
class ScenarioProtect: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(ScenarioProtect)
|
||||
@ -48,14 +46,12 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeScenarioProtect;
|
||||
|
||||
//-----------------------------
|
||||
Boolean<unsigned short> fScenProtect;
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -84,14 +84,14 @@ int Selection::serialize(std::wostream & stream)
|
||||
// default: CP_XML_ATTR(L"pane", L"topLeft");
|
||||
}
|
||||
|
||||
if (*activeCell.value() != L"A1")
|
||||
CP_XML_ATTR(L"activeCell", *activeCell.value());
|
||||
if (activeCell != L"A1")
|
||||
CP_XML_ATTR(L"activeCell", activeCell);
|
||||
|
||||
if (irefAct != 0)
|
||||
CP_XML_ATTR(L"activeCellId", irefAct);
|
||||
|
||||
if (*sqref.value() != L"A1")
|
||||
CP_XML_ATTR(L"sqref", *sqref.value());
|
||||
if (sqref != L"A1")
|
||||
CP_XML_ATTR(L"sqref", sqref);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Selection record in BIFF8
|
||||
class Selection: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Selection)
|
||||
@ -49,7 +47,6 @@ public:
|
||||
~Selection();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -57,15 +54,14 @@ public:
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
//-----------------------------
|
||||
PaneType pnn;
|
||||
|
||||
R_RwU rwAct;
|
||||
ColU colAct;
|
||||
_INT16 irefAct;
|
||||
R_RwU rwAct;
|
||||
ColU colAct;
|
||||
_INT16 irefAct;
|
||||
|
||||
BIFF_BSTR sqref;
|
||||
BIFF_BSTR activeCell;
|
||||
std::wstring sqref;
|
||||
std::wstring activeCell;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of SerAuxErrBar record in BIFF8
|
||||
class SerAuxErrBar: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(SerAuxErrBar)
|
||||
@ -57,7 +56,7 @@ public:
|
||||
unsigned char sertm;
|
||||
unsigned char ebsrc;
|
||||
unsigned char fTeeTop;
|
||||
BIFF_DOUBLE numValue;
|
||||
Xnum numValue;
|
||||
_UINT16 cnum;
|
||||
|
||||
};
|
||||
|
||||
@ -32,13 +32,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/ChartNumNillable.h>
|
||||
#include "../Biff_structures/ChartNumNillable.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of SerAuxTrend record in BIFF8
|
||||
class SerAuxTrend: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(SerAuxTrend)
|
||||
@ -48,20 +47,19 @@ public:
|
||||
~SerAuxTrend();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSerAuxTrend;
|
||||
|
||||
//-----------------------------
|
||||
unsigned char regt;
|
||||
unsigned char ordUser;
|
||||
ChartNumNillable numIntercept;
|
||||
unsigned char fEquation;
|
||||
unsigned char fRSquared;
|
||||
BIFF_DOUBLE numForecast;
|
||||
BIFF_DOUBLE numBackcast;
|
||||
unsigned char regt;
|
||||
unsigned char ordUser;
|
||||
ChartNumNillable numIntercept;
|
||||
unsigned char fEquation;
|
||||
unsigned char fRSquared;
|
||||
Xnum numForecast;
|
||||
Xnum numBackcast;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Setup record in BIFF8
|
||||
class Setup: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Setup)
|
||||
@ -73,8 +72,8 @@ public:
|
||||
|
||||
_UINT16 iRes;
|
||||
_UINT16 iVRes;
|
||||
BIFF_DOUBLE numHdr;
|
||||
BIFF_DOUBLE numFtr;
|
||||
Xnum numHdr;
|
||||
Xnum numFtr;
|
||||
_UINT16 iCopies;
|
||||
|
||||
};
|
||||
|
||||
@ -58,8 +58,8 @@ public:
|
||||
bool fAltMethod;
|
||||
unsigned char sfp;
|
||||
|
||||
BIFF_DWORD cconditions;
|
||||
BIFF_DWORD idParent;
|
||||
_UINT32 cconditions;
|
||||
_UINT32 idParent;
|
||||
|
||||
BiffStructurePtrVector sortCond12Array;
|
||||
FrtHeader frtHeader;
|
||||
|
||||
@ -37,8 +37,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Table record in BIFF8
|
||||
class Table: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Table)
|
||||
@ -54,7 +52,6 @@ public:
|
||||
|
||||
static const ElementType type = typeTable;
|
||||
|
||||
//-----------------------------
|
||||
Ref ref_;
|
||||
|
||||
bool fAlwaysCalc;
|
||||
@ -63,8 +60,8 @@ public:
|
||||
bool fDeleted1;
|
||||
bool fDeleted2;
|
||||
|
||||
BIFF_BSTR r1;
|
||||
BIFF_BSTR r2;
|
||||
std::wstring r1;
|
||||
std::wstring r2;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of TopMargin record in BIFF8
|
||||
class TopMargin: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(TopMargin)
|
||||
@ -50,10 +49,10 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeTopMargin;
|
||||
static const ElementType type = typeTopMargin;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE num;
|
||||
Xnum num;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -58,10 +58,10 @@ public:
|
||||
_UINT16 tabId;
|
||||
std::wstring guid;
|
||||
|
||||
BIFF_DWORD x;
|
||||
BIFF_DWORD y;
|
||||
BIFF_DWORD dx;
|
||||
BIFF_DWORD dy;
|
||||
_UINT32 x;
|
||||
_UINT32 y;
|
||||
_UINT32 dx;
|
||||
_UINT32 dy;
|
||||
|
||||
_UINT16 wTabRatio;
|
||||
|
||||
|
||||
@ -46,7 +46,6 @@ UserSViewBegin::~UserSViewBegin()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr UserSViewBegin::clone()
|
||||
{
|
||||
return BaseObjectPtr(new UserSViewBegin(*this));
|
||||
|
||||
@ -32,13 +32,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include <Logic/Biff_structures/PaneType.h>
|
||||
#include "../Biff_structures/PaneType.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of UserSViewBegin record in BIFF8
|
||||
class UserSViewBegin: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(UserSViewBegin)
|
||||
@ -56,7 +55,7 @@ public:
|
||||
//-----------------------------
|
||||
std::wstring guid;
|
||||
TabId iTabid;
|
||||
BIFF_DWORD wScale;
|
||||
_UINT32 wScale;
|
||||
Icv icvHdr;
|
||||
PaneType pnnSel;
|
||||
|
||||
@ -88,8 +87,8 @@ public:
|
||||
bool fRuler;
|
||||
|
||||
std::wstring ref8TopLeft;
|
||||
BIFF_DOUBLE operNumX;
|
||||
BIFF_DOUBLE operNumY;
|
||||
Xnum operNumX;
|
||||
Xnum operNumY;
|
||||
|
||||
ForwardOnlyParam<unsigned short> colRPane;
|
||||
ForwardOnlyParam<unsigned short> rwBPane;
|
||||
|
||||
@ -32,12 +32,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "../Biff_structures/Xnum.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of ValueRange record in BIFF8
|
||||
class ValueRange: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(ValueRange)
|
||||
@ -53,11 +52,11 @@ public:
|
||||
static const ElementType type = typeValueRange;
|
||||
|
||||
//-----------------------------
|
||||
BIFF_DOUBLE numMin;
|
||||
BIFF_DOUBLE numMax;
|
||||
BIFF_DOUBLE numMajor;
|
||||
BIFF_DOUBLE numMinor;
|
||||
BIFF_DOUBLE numCross;
|
||||
Xnum numMin;
|
||||
Xnum numMax;
|
||||
Xnum numMajor;
|
||||
Xnum numMinor;
|
||||
Xnum numCross;
|
||||
|
||||
bool fAutoMin;
|
||||
bool fAutoMax;
|
||||
|
||||
@ -37,8 +37,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Window2 record in BIFF8
|
||||
class Window2: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Window2)
|
||||
@ -53,7 +51,6 @@ public:
|
||||
|
||||
static const ElementType type = typeWindow2;
|
||||
|
||||
//-----------------------------
|
||||
bool fDspFmlaRt;
|
||||
bool fDspGridRt;
|
||||
bool fDspRwColRt;
|
||||
@ -76,7 +73,7 @@ public:
|
||||
|
||||
_UINT16 wScaleSLV;
|
||||
_UINT16 wScaleNormal;
|
||||
BIFF_BSTR topLeftCell;
|
||||
std::wstring topLeftCell;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -56,7 +56,7 @@ void AF12Criteria::load(CFRecord& record)
|
||||
doper.m_bAutoFilter = false;
|
||||
record >> doper;
|
||||
|
||||
if (doper.vt == BIFF_BYTE(0x06))
|
||||
if (doper.vt == 0x06)
|
||||
{
|
||||
unsigned char _cch = doper.vtValueStr.cch;
|
||||
|
||||
|
||||
@ -54,7 +54,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
static const ElementType type = typeAFDOper;
|
||||
|
||||
unsigned char vt;
|
||||
|
||||
@ -52,7 +52,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
unsigned char cch;
|
||||
unsigned char fCompare;
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ class CFRecord;
|
||||
|
||||
class ArrayParsedFormula : public ParsedFormula
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(ArrayParsedFormula)
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(ArrayParsedFormula)
|
||||
public:
|
||||
ArrayParsedFormula(const bool is_part_of_a_revision, const CellRef& cell_base_ref);
|
||||
BiffStructurePtr clone();
|
||||
|
||||
@ -78,10 +78,6 @@ typedef unsigned char FillPattern;
|
||||
typedef BiffAttributeSimple<unsigned char> BIFF_BYTE;
|
||||
typedef BiffAttributeSimple<_UINT16> BIFF_WORD;
|
||||
typedef BiffAttributeSimple<_UINT32> BIFF_DWORD;
|
||||
typedef BiffAttributeSimple<_INT32> BIFF_LONG;
|
||||
typedef BiffAttributeSimple<double> BIFF_DOUBLE;
|
||||
typedef BiffAttributeSimple<std::wstring> BIFF_BSTR;
|
||||
|
||||
|
||||
struct PtgAttrSpaceType : public BiffStructure_NoVtbl
|
||||
{
|
||||
@ -259,22 +255,6 @@ public:
|
||||
unsigned char ifmt;
|
||||
};
|
||||
|
||||
|
||||
class SharedFeatureType : public BiffAttributeSimple<_UINT16>
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
ISFPROTECTION = 0x0002, // Specifies the enhanced protection type.
|
||||
ISFFEC2 = 0x0003, // Specifies the ignored formula errors type.
|
||||
ISFFACTOID = 0x0004, // Specifies the smart tag type.
|
||||
ISFLIST = 0x0005, // Specifies the list type.
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct FFErrorCheck : public BiffStructure_NoVtbl
|
||||
{
|
||||
unsigned int ffecCalcError : 1;
|
||||
|
||||
@ -50,7 +50,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
unsigned short icf;
|
||||
unsigned char cp;
|
||||
unsigned char icfTemplate;
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include "CachedDiskHeader.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
BiffStructurePtr CachedDiskHeader::clone()
|
||||
{
|
||||
return BiffStructurePtr(new CachedDiskHeader(*this));
|
||||
}
|
||||
|
||||
void CachedDiskHeader::load(CFRecord& record)
|
||||
{
|
||||
record >> cbdxfHdrDisk;
|
||||
|
||||
if (cbdxfHdrDisk > 0)
|
||||
{
|
||||
rgHdrDisk.size = cbdxfHdrDisk;
|
||||
rgHdrDisk.load(record);
|
||||
}
|
||||
record >> strStyleName;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BiffString.h"
|
||||
#include "DXFN12List.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class CFRecord;
|
||||
|
||||
class CachedDiskHeader : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(CachedDiskHeader)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeCachedDiskHeader;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT32 cbdxfHdrDisk;
|
||||
DXFN12List rgHdrDisk;
|
||||
XLUnicodeString strStyleName;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<CachedDiskHeader> CachedDiskHeaderPtr;
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -47,10 +47,10 @@ void ControlInfo::load(CFRecord& record)
|
||||
unsigned short flags;
|
||||
record >> flags;
|
||||
|
||||
fDefault = GETBIT(flags, 0);
|
||||
fHelp = GETBIT(flags, 1);
|
||||
fCancel = GETBIT(flags, 2);
|
||||
fDismiss = GETBIT(flags, 3);
|
||||
fDefault = GETBIT(flags, 0);
|
||||
fHelp = GETBIT(flags, 1);
|
||||
fCancel = GETBIT(flags, 2);
|
||||
fDismiss = GETBIT(flags, 3);
|
||||
|
||||
record >> accel1;
|
||||
record.skipNunBytes(2); // reserved2
|
||||
|
||||
@ -46,11 +46,12 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
unsigned char fDefault;
|
||||
unsigned char fHelp;
|
||||
unsigned char fCancel;
|
||||
unsigned char fDismiss;
|
||||
_UINT16 accel1;
|
||||
bool fDefault;
|
||||
bool fHelp;
|
||||
bool fCancel;
|
||||
bool fDismiss;
|
||||
|
||||
_UINT16 accel1;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -53,11 +53,10 @@ class DXFN : public BiffStructure
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeDXFN;
|
||||
static const ElementType type = typeDXFN;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
bool alchNinch;
|
||||
|
||||
@ -44,6 +44,8 @@ BiffStructurePtr DXFN12List::clone()
|
||||
|
||||
DXFN12List::DXFN12List()
|
||||
{
|
||||
bExist = false;
|
||||
size = -1;
|
||||
}
|
||||
|
||||
|
||||
@ -53,8 +55,21 @@ DXFN12List::~DXFN12List()
|
||||
|
||||
void DXFN12List::load(CFRecord& record)
|
||||
{
|
||||
record >> dxfn;
|
||||
record >> xfext;
|
||||
size_t pos_record = record.getRdPtr();
|
||||
|
||||
if (size < 0) size = record.getDataSize() - pos_record;
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
bExist = true;
|
||||
record >> dxfn;
|
||||
size -= (record.getRdPtr() - pos_record);
|
||||
}
|
||||
if (size > 0)
|
||||
{
|
||||
record >> xfext;
|
||||
size -= (record.getRdPtr() - pos_record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,10 +31,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Logic/Biff_records/BiffRecord.h>
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_structures/DXFN.h>
|
||||
#include <Logic/Biff_structures/XFExtNoFRT.h>
|
||||
#include "../Biff_records/BiffRecord.h"
|
||||
#include "../Biff_structures/BiffString.h"
|
||||
#include "../Biff_structures/DXFN.h"
|
||||
#include "../Biff_structures/XFExtNoFRT.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -52,9 +52,11 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
DXFN dxfn;
|
||||
XFExtNoFRT xfext;
|
||||
DXFN dxfn;
|
||||
XFExtNoFRT xfext;
|
||||
//-----------------------------------------------------------------
|
||||
bool bExist;
|
||||
int size;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<DXFN12List> DXFN12ListPtr;
|
||||
|
||||
@ -37,14 +37,12 @@
|
||||
#include "ExtPtgRefErr3D.h"
|
||||
#include "ExtPtgAreaErr3D.h"
|
||||
#include "ExtPtgErr.h"
|
||||
//#include <Exception/UnexpectedProgramPath.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
ExtNameParsedFormula::ExtNameParsedFormula()
|
||||
: ParsedFormula(CellRef())
|
||||
ExtNameParsedFormula::ExtNameParsedFormula() : ParsedFormula(CellRef())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -47,9 +47,11 @@ void Feat11FdaAutoFilter::load(CFRecord& record)
|
||||
record >> cbAutoFilter;
|
||||
record.skipNunBytes(2);
|
||||
|
||||
_UINT32 size = cbAutoFilter;
|
||||
if (cbAutoFilter)
|
||||
if (cbAutoFilter > 0 && cbAutoFilter < 2080)
|
||||
{
|
||||
recAutoFilter.size = cbAutoFilter;
|
||||
recAutoFilter.readFields(record);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "BiffStructure.h"
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_records/AutoFilter.h>
|
||||
|
||||
#include "BiffString.h"
|
||||
#include "../Biff_records/AutoFilter.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -51,7 +51,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
_UINT32 cbAutoFilter;
|
||||
AutoFilter recAutoFilter;
|
||||
};
|
||||
|
||||
@ -30,22 +30,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Feat11FieldDataItem.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
#include "Feat11FieldDataItem.h"
|
||||
#include "CellRangeRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
Feat11FieldDataItem::Feat11FieldDataItem(_UINT32 _lt, bool bDskHeaderCache) : lt(_lt), bDiskHdrCache(bDskHeaderCache)
|
||||
{
|
||||
}
|
||||
BiffStructurePtr Feat11FieldDataItem::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11FieldDataItem(*this));
|
||||
}
|
||||
|
||||
|
||||
void Feat11FieldDataItem::load(CFRecord& record)
|
||||
{
|
||||
|
||||
record >> idField;
|
||||
record >> lfdt;
|
||||
record >> lfxidt;
|
||||
@ -56,15 +55,15 @@ void Feat11FieldDataItem::load(CFRecord& record)
|
||||
_UINT32 flags;
|
||||
record >> flags;
|
||||
|
||||
fAutoFilter = static_cast<unsigned char>(GETBIT(flags, 0));
|
||||
fAutoFilterHidden = static_cast<unsigned char>(GETBIT(flags, 1));
|
||||
fLoadXmapi = static_cast<unsigned char>(GETBIT(flags, 2));
|
||||
fLoadFmla = static_cast<unsigned char>(GETBIT(flags, 3));
|
||||
fLoadTotalFmla = static_cast<unsigned char>(GETBIT(flags, 7));
|
||||
fLoadTotalArray = static_cast<unsigned char>(GETBIT(flags, 8));
|
||||
fSaveStyleName = static_cast<unsigned char>(GETBIT(flags, 9));
|
||||
fLoadTotalStr = static_cast<unsigned char>(GETBIT(flags, 10));
|
||||
fAutoCreateCalcCol = static_cast<unsigned char>(GETBIT(flags, 11));
|
||||
fAutoFilter = GETBIT(flags, 0);
|
||||
fAutoFilterHidden = GETBIT(flags, 1);
|
||||
fLoadXmapi = GETBIT(flags, 2);
|
||||
fLoadFmla = GETBIT(flags, 3);
|
||||
fLoadTotalFmla = GETBIT(flags, 7);
|
||||
fLoadTotalArray = GETBIT(flags, 8);
|
||||
fSaveStyleName = GETBIT(flags, 9);
|
||||
fLoadTotalStr = GETBIT(flags, 10);
|
||||
fAutoCreateCalcCol = GETBIT(flags, 11);
|
||||
|
||||
record >> cbFmtInsertRow;
|
||||
record >> istnInsertRow;
|
||||
@ -75,12 +74,107 @@ void Feat11FieldDataItem::load(CFRecord& record)
|
||||
return;//125 Planilhas de Excel.xls
|
||||
|
||||
if (cbFmtAgg > 0)
|
||||
{
|
||||
dxfFmtAgg.size = cbFmtAgg;
|
||||
record >> dxfFmtAgg;
|
||||
}
|
||||
|
||||
if (cbFmtInsertRow > 0)
|
||||
{
|
||||
dxfFmtInsertRow.size = cbFmtInsertRow;
|
||||
record >> dxfFmtInsertRow;
|
||||
if (fAutoFilter == BIFF_BYTE(1))
|
||||
}
|
||||
|
||||
if (fAutoFilter)
|
||||
{
|
||||
record >> AutoFilter;
|
||||
}
|
||||
|
||||
if (fLoadXmapi)
|
||||
{
|
||||
record >> AutoFilter;
|
||||
}
|
||||
|
||||
if (fLoadFmla)
|
||||
{
|
||||
fmla.load(record);
|
||||
}
|
||||
if (fLoadTotalFmla)
|
||||
{
|
||||
if (fLoadTotalArray)
|
||||
{
|
||||
totalArrayFmla.load(record);
|
||||
}
|
||||
else
|
||||
{
|
||||
totalFmla.load(record);
|
||||
}
|
||||
}
|
||||
record >> strTotal;
|
||||
|
||||
if (lt == 0x00000001)
|
||||
{
|
||||
wssInfo.lfdt = lfdt;
|
||||
record >> wssInfo;
|
||||
}
|
||||
if (lt == 0x00000003)
|
||||
{
|
||||
record >> qsif;
|
||||
}
|
||||
if (bDiskHdrCache)
|
||||
{
|
||||
record >> dskHdrCache;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
BiffStructurePtr Feat11RgSharepointIdDel::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11RgSharepointIdDel(*this));
|
||||
}
|
||||
void Feat11RgSharepointIdDel::load(CFRecord& record)
|
||||
{
|
||||
record >> cId;
|
||||
|
||||
for (_UINT16 i = 0; i < cId; i++)
|
||||
{
|
||||
_UINT32 val;
|
||||
record >> val;
|
||||
rgId.push_back(val);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
BiffStructurePtr Feat11RgSharepointIdChange::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11RgSharepointIdChange(*this));
|
||||
}
|
||||
void Feat11RgSharepointIdChange::load(CFRecord& record)
|
||||
{
|
||||
record >> cId;
|
||||
|
||||
for (_UINT16 i = 0; i < cId; i++)
|
||||
{
|
||||
_UINT32 val;
|
||||
record >> val;
|
||||
rgId.push_back(val);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
BiffStructurePtr Feat11RgInvalidCells::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11RgInvalidCells(*this));
|
||||
}
|
||||
void Feat11RgInvalidCells::load(CFRecord& record)
|
||||
{
|
||||
record >> cCellInvalid;
|
||||
|
||||
for (_UINT16 i = 0; i < cCellInvalid; i++)
|
||||
{
|
||||
Feat11CellStruct val;
|
||||
record >> val.idxRow >> val.idxField;
|
||||
rgCellInvalid.push_back(val);
|
||||
}
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,10 +31,15 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BiffStructure.h"
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_structures/DXFN12List.h>
|
||||
#include <Logic/Biff_structures/Feat11FdaAutoFilter.h>
|
||||
#include "BiffString.h"
|
||||
#include "DXFN12List.h"
|
||||
#include "ListParsedFormula.h"
|
||||
|
||||
#include "Feat11FdaAutoFilter.h"
|
||||
#include "Feat11Fmla.h"
|
||||
#include "Feat11XMap.h"
|
||||
#include "Feat11WSSListInfo.h"
|
||||
#include "CachedDiskHeader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -45,13 +50,13 @@ class Feat11FieldDataItem : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11FieldDataItem)
|
||||
public:
|
||||
Feat11FieldDataItem(_UINT32 lt, bool bDskHeaderCache);
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11FieldDataItem;
|
||||
static const ElementType type = typeFeat11FieldDataItem;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
_UINT32 idField;
|
||||
_UINT32 lfdt;
|
||||
_UINT32 lfxidt;
|
||||
@ -59,15 +64,15 @@ public:
|
||||
_UINT32 cbFmtAgg;
|
||||
_UINT32 istnAgg;
|
||||
|
||||
unsigned char fAutoFilter;
|
||||
unsigned char fAutoFilterHidden;
|
||||
unsigned char fLoadXmapi;
|
||||
unsigned char fLoadFmla;
|
||||
unsigned char fLoadTotalFmla;
|
||||
unsigned char fLoadTotalArray;
|
||||
unsigned char fSaveStyleName;
|
||||
unsigned char fLoadTotalStr;
|
||||
unsigned char fAutoCreateCalcCol;
|
||||
bool fAutoFilter;
|
||||
bool fAutoFilterHidden;
|
||||
bool fLoadXmapi;
|
||||
bool fLoadFmla;
|
||||
bool fLoadTotalFmla;
|
||||
bool fLoadTotalArray;
|
||||
bool fSaveStyleName;
|
||||
bool fLoadTotalStr;
|
||||
bool fAutoCreateCalcCol;
|
||||
|
||||
_UINT32 cbFmtInsertRow;
|
||||
_UINT32 istnInsertRow;
|
||||
@ -79,9 +84,76 @@ public:
|
||||
DXFN12List dxfFmtInsertRow;
|
||||
|
||||
Feat11FdaAutoFilter AutoFilter;
|
||||
|
||||
Feat11XMap rgXmap;
|
||||
Feat11Fmla fmla;
|
||||
ListParsedFormula totalFmla;
|
||||
ListParsedArrayFormula totalArrayFmla;
|
||||
XLUnicodeString strTotal;
|
||||
Feat11WSSListInfo wssInfo;
|
||||
_UINT32 qsif;
|
||||
CachedDiskHeader dskHdrCache;
|
||||
|
||||
//------------------------------------------------
|
||||
_UINT32 lt;
|
||||
bool bDiskHdrCache;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Feat11FieldDataItem> Feat11FieldDataItemPtr;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class Feat11RgSharepointIdDel : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11RgSharepointIdDel)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11RgSharepointIdDel;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT16 cId;
|
||||
std::vector<_UINT32> rgId;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Feat11RgSharepointIdDel> Feat11RgSharepointIdDelPtr;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class Feat11RgSharepointIdChange : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11RgSharepointIdChange)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11RgSharepointIdChange;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT16 cId;
|
||||
std::vector<_UINT32> rgId;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Feat11RgSharepointIdChange> Feat11RgSharepointIdChangePtr;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
struct Feat11CellStruct
|
||||
{
|
||||
_UINT32 idxRow = 0;
|
||||
_UINT32 idxField = 0;
|
||||
};
|
||||
class Feat11RgInvalidCells : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11RgInvalidCells)
|
||||
public:
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11RgInvalidCells;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT16 cCellInvalid;
|
||||
std::vector<Feat11CellStruct> rgCellInvalid;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Feat11RgInvalidCells> Feat11RgInvalidCellsPtr;
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Binary/CFRecord.h>
|
||||
#include "Feat11Fmla.h"
|
||||
#include "CellRangeRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
Feat11Fmla::Feat11Fmla() : bFmlaExist(false)
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr Feat11Fmla::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11Fmla(*this));
|
||||
}
|
||||
|
||||
void Feat11Fmla::load(CFRecord& record)
|
||||
{
|
||||
unsigned short cbFmla;
|
||||
record >> cbFmla;
|
||||
|
||||
if(0 != cbFmla)
|
||||
{
|
||||
bFmlaExist = true;
|
||||
|
||||
fmla.load(record);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BiffStructure.h"
|
||||
#include "ObjectParsedFormula.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class CFRecord;
|
||||
|
||||
class Feat11Fmla : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11Fmla)
|
||||
public:
|
||||
Feat11Fmla();
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11Fmla;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
ObjectParsedFormula fmla;
|
||||
|
||||
bool bFmlaExist;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Feat11WSSListInfo.h"
|
||||
#include "BiffString.h"
|
||||
#include "Xnum.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Feat11WSSListInfo::Feat11WSSListInfo()
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr Feat11WSSListInfo::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11WSSListInfo(*this));
|
||||
}
|
||||
|
||||
void Feat11WSSListInfo::load(CFRecord& record)
|
||||
{
|
||||
_UINT32 flags1, reserved;
|
||||
_UINT16 unused2;
|
||||
unsigned char flags2;
|
||||
|
||||
record >> LCID >> cDec >> flags1 >> flags2 >> bDefaultType >> unused2;
|
||||
|
||||
switch(lfdt)
|
||||
{
|
||||
case 0x00000002://Number
|
||||
case 0x00000006://Currency
|
||||
rgbDV = BiffStructurePtr(new Xnum); break;
|
||||
case 0x00000003://Boolean
|
||||
rgbDV = BiffStructurePtr(new BIFF_DWORD); break;
|
||||
case 0x00000004:
|
||||
rgbDV = BiffStructurePtr(new DateAsNum); break;
|
||||
case 0x00000005://Invalid
|
||||
case 0x00000007://Invalid
|
||||
case 0x00000009://Invalid
|
||||
case 0x0000000a://Invalid
|
||||
break;
|
||||
case 0x00000001://Short Text
|
||||
case 0x00000008://Choice
|
||||
case 0x0000000b://Multi-choice
|
||||
rgbDV = BiffStructurePtr(new XLUnicodeString); break;
|
||||
}
|
||||
if (rgbDV)
|
||||
rgbDV->load(record);
|
||||
|
||||
record >> strFormula;
|
||||
record >> reserved;
|
||||
|
||||
|
||||
fPercent = GETBIT(flags1, 0);
|
||||
fDecSet = GETBIT(flags1, 1);
|
||||
fDateOnly = GETBIT(flags1, 2);
|
||||
fReadingOrder = GETBITS(flags1, 3, 4);
|
||||
fRichText = GETBIT(flags1, 5);
|
||||
fUnkRTFormatting= GETBIT(flags1, 6);
|
||||
fAlertUnkRTFormatting = GETBIT(flags1, 7);
|
||||
|
||||
fReadOnly = GETBIT(flags2, 0);
|
||||
fRequired = GETBIT(flags2, 1);
|
||||
fMinSet = GETBIT(flags2, 2);
|
||||
fMaxSet = GETBIT(flags2, 3);
|
||||
fDefaultSet = GETBIT(flags2, 4);
|
||||
fDefaultDateToday = GETBIT(flags2, 5);
|
||||
fLoadFormula = GETBIT(flags2, 6);
|
||||
fAllowFillIn = GETBIT(flags2, 6);
|
||||
}
|
||||
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BiffString.h"
|
||||
#include "ParsedFormula.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class CFRecord;
|
||||
|
||||
class Feat11WSSListInfo : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11WSSListInfo)
|
||||
public:
|
||||
Feat11WSSListInfo();
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11WSSListInfo;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT32 LCID;
|
||||
_UINT32 cDec;
|
||||
|
||||
bool fPercent;
|
||||
bool fDecSet;
|
||||
bool fDateOnly;
|
||||
unsigned char fReadingOrder;
|
||||
bool fRichText;
|
||||
bool fUnkRTFormatting;
|
||||
bool fAlertUnkRTFormatting;
|
||||
bool fReadOnly;
|
||||
bool fRequired;
|
||||
bool fMinSet;
|
||||
bool fMaxSet;
|
||||
bool fDefaultSet;
|
||||
bool fDefaultDateToday;
|
||||
bool fLoadFormula;
|
||||
bool fAllowFillIn;
|
||||
|
||||
unsigned char bDefaultType;
|
||||
BiffStructurePtr rgbDV;
|
||||
XLUnicodeString strFormula;
|
||||
//------------------------------------------------------
|
||||
short lfdt;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Feat11XMap.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Feat11XMapEntry2::Feat11XMapEntry2()
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr Feat11XMapEntry2::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11XMapEntry2(*this));
|
||||
}
|
||||
|
||||
void Feat11XMapEntry2::load(CFRecord& record)
|
||||
{
|
||||
record >> dwMapId >> rgbXPath;
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
Feat11XMapEntry::Feat11XMapEntry()
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr Feat11XMapEntry::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11XMapEntry(*this));
|
||||
}
|
||||
|
||||
void Feat11XMapEntry::load(CFRecord& record)
|
||||
{
|
||||
_UINT32 flags;
|
||||
record >> flags >> entry;
|
||||
|
||||
fLoadXMap = GETBIT(flags, 1);
|
||||
fCanBeSingle = GETBIT(flags, 2);
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
Feat11XMap::Feat11XMap()
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr Feat11XMap::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11XMap(*this));
|
||||
}
|
||||
|
||||
void Feat11XMap::load(CFRecord& record)
|
||||
{
|
||||
_UINT16 cbFmla;
|
||||
record >> cbFmla;
|
||||
|
||||
for (_UINT16 i = 0; i < cbFmla; i++)
|
||||
{
|
||||
Feat11XMapEntry entry;
|
||||
|
||||
entry.load(record);
|
||||
rgXmap.push_back(entry);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "BiffString.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class CFRecord;
|
||||
|
||||
class Feat11XMapEntry2 : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMapEntry2)
|
||||
public:
|
||||
Feat11XMapEntry2();
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11XMapEntry2;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
_UINT32 dwMapId;
|
||||
XLUnicodeString rgbXPath;
|
||||
};
|
||||
|
||||
class Feat11XMapEntry : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMapEntry)
|
||||
public:
|
||||
Feat11XMapEntry();
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11XMapEntry;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
bool fLoadXMap;
|
||||
bool fCanBeSingle;
|
||||
|
||||
Feat11XMapEntry2 entry;
|
||||
};
|
||||
|
||||
class Feat11XMap : public BiffStructure
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(Feat11XMap)
|
||||
public:
|
||||
Feat11XMap();
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeFeat11XMap;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
std::vector<Feat11XMapEntry> rgXmap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -44,6 +44,15 @@ BiffStructurePtr List12BlockLevel::clone()
|
||||
|
||||
List12BlockLevel::List12BlockLevel()
|
||||
{
|
||||
cbdxfHeader = 0xffffffff;
|
||||
istnHeader = 0xffffffff;
|
||||
cbdxfData = 0xffffffff;
|
||||
istnData = 0xffffffff;
|
||||
cbdxfAgg = 0xffffffff;
|
||||
istnAgg = 0xffffffff;
|
||||
cbdxfBorder = 0xffffffff;
|
||||
cbdxfHeaderBorder = 0xffffffff;
|
||||
cbdxfAggBorder = 0xffffffff;
|
||||
}
|
||||
|
||||
|
||||
@ -64,17 +73,35 @@ void List12BlockLevel::load(CFRecord& record)
|
||||
record >> cbdxfAggBorder;
|
||||
|
||||
if (cbdxfHeader)
|
||||
{
|
||||
dxfHeader.size = cbdxfHeader;
|
||||
record >> dxfHeader;
|
||||
}
|
||||
if (cbdxfData)
|
||||
{
|
||||
dxfData.size = cbdxfData;
|
||||
record >> dxfData;
|
||||
}
|
||||
if (cbdxfAgg)
|
||||
{
|
||||
dxfAgg.size = cbdxfAgg;
|
||||
record >> dxfAgg;
|
||||
}
|
||||
if (cbdxfBorder)
|
||||
{
|
||||
dxfBorder.size = cbdxfBorder;
|
||||
record >> dxfBorder;
|
||||
}
|
||||
if (cbdxfHeaderBorder)
|
||||
{
|
||||
dxfHeaderBorder.size = cbdxfHeaderBorder;
|
||||
record >> dxfHeaderBorder;
|
||||
}
|
||||
if (cbdxfAggBorder)
|
||||
{
|
||||
dxfAggBorder.size = cbdxfAggBorder;
|
||||
record >> dxfAggBorder;
|
||||
}
|
||||
if (istnHeader != -1)
|
||||
record >> stHeader;
|
||||
if (istnData != -1)
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Logic/Biff_records/BiffRecord.h>
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_structures/DXFN12List.h>
|
||||
#include "../Biff_records/BiffRecord.h"
|
||||
#include "BiffString.h"
|
||||
#include "DXFN12List.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -51,7 +51,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
_UINT32 cbdxfHeader;
|
||||
_UINT32 istnHeader;
|
||||
_UINT32 cbdxfData;
|
||||
|
||||
@ -57,11 +57,11 @@ void List12TableStyleClientInfo::load(CFRecord& record)
|
||||
unsigned short flags;
|
||||
record >> flags;
|
||||
|
||||
fFirstColumn = static_cast<unsigned char>(GETBITS(flags, 0, 1));
|
||||
fLastColumn = static_cast<unsigned char>(GETBITS(flags, 1, 2));
|
||||
fRowStripes = static_cast<unsigned char>(GETBITS(flags, 3, 4));
|
||||
fColumnStripes = static_cast<unsigned char>(GETBITS(flags, 5, 6));
|
||||
fDefaultStyle = static_cast<unsigned char>(GETBITS(flags, 9, 10));
|
||||
nFirstColumn = GETBITS(flags, 0, 1);
|
||||
nLastColumn = GETBITS(flags, 1, 2);
|
||||
nRowStripes = GETBITS(flags, 3, 4);
|
||||
nColumnStripes = GETBITS(flags, 5, 6);
|
||||
nDefaultStyle = GETBITS(flags, 9, 10);
|
||||
|
||||
record >> stListStyleName;
|
||||
}
|
||||
|
||||
@ -47,16 +47,16 @@ public:
|
||||
List12TableStyleClientInfo();
|
||||
~List12TableStyleClientInfo();
|
||||
|
||||
static const ElementType type = typeList12TableStyleClientInfo;
|
||||
static const ElementType type = typeList12TableStyleClientInfo;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
unsigned char nFirstColumn;
|
||||
unsigned char nLastColumn;
|
||||
unsigned char nRowStripes;
|
||||
unsigned char nColumnStripes;
|
||||
unsigned char nDefaultStyle;
|
||||
|
||||
unsigned char fFirstColumn;
|
||||
unsigned char fLastColumn;
|
||||
unsigned char fRowStripes;
|
||||
unsigned char fColumnStripes;
|
||||
unsigned char fDefaultStyle;
|
||||
XLUnicodeString stListStyleName;
|
||||
};
|
||||
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ListParsedFormula.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
ListParsedFormula::ListParsedFormula() : ParsedFormula(CellRef())
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr ListParsedFormula::clone()
|
||||
{
|
||||
return BiffStructurePtr(new ListParsedFormula(*this));
|
||||
}
|
||||
|
||||
void ListParsedFormula::load(CFRecord& record)
|
||||
{
|
||||
unsigned short cce;
|
||||
record >> cce;
|
||||
record.skipNunBytes(2); // unused
|
||||
rgce.load(record, cce);
|
||||
}
|
||||
//-------------------------------------------------------------------------------
|
||||
ListParsedArrayFormula::ListParsedArrayFormula() : ArrayParsedFormula(false, CellRef())
|
||||
{
|
||||
}
|
||||
|
||||
BiffStructurePtr ListParsedArrayFormula::clone()
|
||||
{
|
||||
return BiffStructurePtr(new ListParsedArrayFormula(*this));
|
||||
}
|
||||
|
||||
void ListParsedArrayFormula::load(CFRecord& record)
|
||||
{
|
||||
ArrayParsedFormula::load(record);
|
||||
}
|
||||
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2017
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ArrayParsedFormula.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
class ListParsedFormula : public ParsedFormula
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(ListParsedFormula)
|
||||
public:
|
||||
ListParsedFormula();
|
||||
BiffStructurePtr clone();
|
||||
virtual void load(CFRecord& record);
|
||||
};
|
||||
class ListParsedArrayFormula : public ArrayParsedFormula
|
||||
{
|
||||
BASE_STRUCTURE_DEFINE_CLASS_NAME(ListParsedFormula)
|
||||
public:
|
||||
ListParsedArrayFormula();
|
||||
BiffStructurePtr clone();
|
||||
virtual void load(CFRecord& record);
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user