mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-03-06 19:53:21 +08:00
Compare commits
16 Commits
core-win-6
...
v5.0.99.27
| Author | SHA1 | Date | |
|---|---|---|---|
| 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)
|
||||
{
|
||||
|
||||
@ -46,7 +46,7 @@ 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);
|
||||
}
|
||||
|
||||
@ -93,13 +93,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 +109,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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of BopPop record in BIFF8
|
||||
class BopPop: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(BopPop)
|
||||
@ -47,7 +45,6 @@ public:
|
||||
~BopPop();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -57,7 +54,7 @@ public:
|
||||
|
||||
//-----------------------------
|
||||
unsigned char pst;
|
||||
unsigned char fAutoSplit;
|
||||
bool fAutoSplit;
|
||||
_UINT16 split;
|
||||
_INT16 iSplitPos;
|
||||
_INT16 pcSplitPercent;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -35,9 +35,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of CrtLayout12 record in BIFF8
|
||||
class CrtLayout12: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(CrtLayout12)
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "Feat.h"
|
||||
#include <Logic/Biff_structures/FrtHeader.h>
|
||||
#include "../Biff_structures/FrtHeader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -54,20 +54,21 @@ BaseObjectPtr Feat::clone()
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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,22 +49,20 @@ public:
|
||||
~Feat();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeat;
|
||||
|
||||
//-----------------------------
|
||||
SharedFeatureType isf;
|
||||
_UINT16 cref;
|
||||
_UINT32 cbFeatData;
|
||||
SharedFeatureType isf;
|
||||
_UINT16 cref;
|
||||
_UINT32 cbFeatData;
|
||||
BiffStructurePtrVector refs;
|
||||
BIFF_BSTR sqref;
|
||||
std::wstring sqref;
|
||||
|
||||
FeatProtection protection;
|
||||
FeatFormulaErr2 formula_err;
|
||||
FeatSmartTag smart_tag;
|
||||
FeatProtection protection;
|
||||
FeatFormulaErr2 formula_err;
|
||||
FeatSmartTag smart_tag;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -50,21 +50,17 @@ public:
|
||||
~Feature11();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeFeature11;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
FrtRefHeaderU frtRefHeaderU;
|
||||
_UINT16 isf;
|
||||
_UINT16 cref2;
|
||||
_UINT32 cbFeatData;
|
||||
BiffStructurePtrVector refs2;
|
||||
BIFF_BSTR sqref;
|
||||
std::wstring sqref;
|
||||
|
||||
TableFeatureType rgbFeat;
|
||||
};
|
||||
|
||||
@ -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,6 +32,10 @@
|
||||
|
||||
#include "List12.h"
|
||||
|
||||
#include "../Biff_structures/List12BlockLevel.h"
|
||||
#include "../Biff_structures/List12TableStyleClientInfo.h"
|
||||
#include "../Biff_structures/List12DisplayName.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -56,20 +60,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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of SerAuxErrBar record in BIFF8
|
||||
class SerAuxErrBar: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(SerAuxErrBar)
|
||||
|
||||
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
//-----------------------------
|
||||
std::wstring guid;
|
||||
TabId iTabid;
|
||||
BIFF_DWORD wScale;
|
||||
_UINT32 wScale;
|
||||
Icv icvHdr;
|
||||
PaneType pnnSel;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -78,9 +78,7 @@ 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
|
||||
|
||||
@ -50,7 +50,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
unsigned short icf;
|
||||
unsigned char cp;
|
||||
unsigned char icfTemplate;
|
||||
|
||||
@ -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,7 @@ BiffStructurePtr DXFN12List::clone()
|
||||
|
||||
DXFN12List::DXFN12List()
|
||||
{
|
||||
size = -1;
|
||||
}
|
||||
|
||||
|
||||
@ -53,8 +54,20 @@ 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)
|
||||
{
|
||||
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,9 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
DXFN dxfn;
|
||||
XFExtNoFRT xfext;
|
||||
int size;
|
||||
DXFN dxfn;
|
||||
XFExtNoFRT xfext;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<DXFN12List> DXFN12ListPtr;
|
||||
|
||||
@ -36,16 +36,12 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
BiffStructurePtr Feat11FieldDataItem::clone()
|
||||
{
|
||||
return BiffStructurePtr(new Feat11FieldDataItem(*this));
|
||||
}
|
||||
|
||||
|
||||
void Feat11FieldDataItem::load(CFRecord& record)
|
||||
{
|
||||
|
||||
record >> idField;
|
||||
record >> lfdt;
|
||||
record >> lfxidt;
|
||||
@ -56,15 +52,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 +71,69 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
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,9 @@
|
||||
*/
|
||||
#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 "Feat11FdaAutoFilter.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -51,7 +50,6 @@ public:
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
_UINT32 idField;
|
||||
_UINT32 lfdt;
|
||||
_UINT32 lfxidt;
|
||||
@ -59,15 +57,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;
|
||||
@ -82,6 +80,60 @@ public:
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -40,8 +40,7 @@ namespace ODRAW
|
||||
{
|
||||
|
||||
|
||||
OfficeArtClientAnchorSheet::OfficeArtClientAnchorSheet()
|
||||
: OfficeArtRecord(0x00, ClientAnchor)
|
||||
OfficeArtClientAnchorSheet::OfficeArtClientAnchorSheet() : OfficeArtRecord(0x00, ClientAnchor)
|
||||
{
|
||||
_x = _y = _cx = _cy = 0;
|
||||
}
|
||||
|
||||
@ -36,8 +36,7 @@
|
||||
namespace ODRAW
|
||||
{
|
||||
|
||||
OfficeArtDgContainer::OfficeArtDgContainer(const OfficeArtClientAnchorType anchor_type)
|
||||
: OfficeArtContainer(0x0F, DgContainer, anchor_type)
|
||||
OfficeArtDgContainer::OfficeArtDgContainer(const OfficeArtClientAnchorType anchor_type) : OfficeArtContainer(0x0F, DgContainer, anchor_type)
|
||||
{
|
||||
}
|
||||
|
||||
@ -73,6 +72,14 @@ void OfficeArtDgContainer::loadFields(XLS::CFRecord& record)
|
||||
{
|
||||
try
|
||||
{
|
||||
OfficeArtRecordHeader rh_test;
|
||||
record >> rh_test;
|
||||
record.RollRdPtrBack(8);//sizeof(OfficeArtRecordHeader)
|
||||
|
||||
if ((rh_test.recType & 0xF000) != 0xF000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
OfficeArtContainer::loadFields(record);
|
||||
}catch(...)
|
||||
{
|
||||
|
||||
@ -41,8 +41,7 @@ namespace XLS
|
||||
{
|
||||
|
||||
|
||||
PtgArea3d::PtgArea3d(const CellRef& cell_base_ref_init)
|
||||
: cell_base_ref(cell_base_ref_init)
|
||||
PtgArea3d::PtgArea3d(const CellRef& cell_base_ref_init) : cell_base_ref(cell_base_ref_init)
|
||||
{
|
||||
}
|
||||
|
||||
@ -137,8 +136,13 @@ void PtgArea3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool f
|
||||
std::wstring link = global_info->arXti[ixti].link;
|
||||
if (!link.empty() && !range_ref.empty())
|
||||
link += L"!";
|
||||
|
||||
if (full_ref && link.empty()) //4673306.xls defined name "Категория"
|
||||
{
|
||||
link = L"#REF!";
|
||||
}
|
||||
|
||||
ptg_stack.push(link + range_ref); // full_ref ???
|
||||
ptg_stack.push(link + range_ref);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -42,9 +42,7 @@ PtgErr::PtgErr()
|
||||
}
|
||||
|
||||
|
||||
PtgErr::PtgErr(const std::wstring str)
|
||||
: err(str),
|
||||
OperandPtg(fixed_id)
|
||||
PtgErr::PtgErr(const std::wstring str) : err(str), OperandPtg(fixed_id)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -41,8 +41,7 @@ namespace XLS
|
||||
{
|
||||
|
||||
|
||||
PtgRef3d::PtgRef3d(const CellRef& cell_base_ref_init)
|
||||
: cell_base_ref(cell_base_ref_init)
|
||||
PtgRef3d::PtgRef3d(const CellRef& cell_base_ref_init) : cell_base_ref(cell_base_ref_init)
|
||||
{
|
||||
}
|
||||
|
||||
@ -133,7 +132,11 @@ void PtgRef3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
|
||||
if (!link.empty() && !cell_ref.empty())
|
||||
link += L"!";
|
||||
|
||||
ptg_stack.push(link + cell_ref); // full_ref ???
|
||||
if (full_ref && link.empty()) //Stock symbols comparison1.xls defined name "check_phrase"
|
||||
{
|
||||
link = L"#REF!";
|
||||
}
|
||||
ptg_stack.push(link + cell_ref);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
#include "TableFeatureType.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
#include "../Biff_structures/Feat11FieldDataItem.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -53,7 +54,13 @@ TableFeatureType::~TableFeatureType()
|
||||
|
||||
void TableFeatureType::load(CFRecord& record)
|
||||
{
|
||||
record >> lt; // SourceType
|
||||
record >> lt;
|
||||
|
||||
//LTRANGE 0x00000000 Range
|
||||
//LTSHAREPOINT 0x00000001 Read/write Web-based data provider list
|
||||
//LTXML 0x00000002 XML Mapper data
|
||||
//LTEXTERNALDATA 0x00000003 External data source (query table)<180>
|
||||
|
||||
record >> idList; // Unique ID
|
||||
record >> crwHeader; // 0 - Table has no header row, 1 - Table has a header row
|
||||
record >> crwTotals; // 0 - Table has no total row, 1 - Table has a total row
|
||||
@ -61,39 +68,31 @@ void TableFeatureType::load(CFRecord& record)
|
||||
record >> cbFSData; // 64
|
||||
record >> rupBuild; // Build number of the application
|
||||
|
||||
_UINT32 _lt = lt;
|
||||
_UINT32 _idList = idList;
|
||||
_UINT32 _crwHeader = crwHeader;
|
||||
_UINT32 _crwTotals = crwTotals;
|
||||
_UINT32 _idFieldNext = idFieldNext;
|
||||
_UINT32 _cbFSData = cbFSData;
|
||||
_UINT32 _rupBuild = rupBuild;
|
||||
|
||||
record.skipNunBytes(2); // unused1
|
||||
|
||||
_UINT16 flags;
|
||||
record >> flags;
|
||||
|
||||
fAutoFilter = static_cast<unsigned char>(GETBIT(flags, 1));
|
||||
fPersistAutoFilter = static_cast<unsigned char>(GETBIT(flags, 2));
|
||||
fShowInsertRow = static_cast<unsigned char>(GETBIT(flags, 3));
|
||||
fInsertRowInsCells = static_cast<unsigned char>(GETBIT(flags, 4));
|
||||
fLoadPldwIdDeleted = static_cast<unsigned char>(GETBIT(flags, 5));
|
||||
fShownTotalRow = static_cast<unsigned char>(GETBIT(flags, 6));
|
||||
fNeedsCommit = static_cast<unsigned char>(GETBIT(flags, 8));
|
||||
fSingleCell = static_cast<unsigned char>(GETBIT(flags, 9));
|
||||
fApplyAutoFilter = static_cast<unsigned char>(GETBIT(flags, 11));
|
||||
fForceInsertToBeVis = static_cast<unsigned char>(GETBIT(flags, 12));
|
||||
fCompressedXml = static_cast<unsigned char>(GETBIT(flags, 13));
|
||||
fLoadCSPName = static_cast<unsigned char>(GETBIT(flags, 14));
|
||||
fLoadPldwIdChanged = static_cast<unsigned char>(GETBIT(flags, 15));
|
||||
fAutoFilter = GETBIT(flags, 1);
|
||||
fPersistAutoFilter = GETBIT(flags, 2);
|
||||
fShowInsertRow = GETBIT(flags, 3);
|
||||
fInsertRowInsCells = GETBIT(flags, 4);
|
||||
fLoadPldwIdDeleted = GETBIT(flags, 5);
|
||||
fShownTotalRow = GETBIT(flags, 6);
|
||||
fNeedsCommit = GETBIT(flags, 8);
|
||||
fSingleCell = GETBIT(flags, 9);
|
||||
fApplyAutoFilter = GETBIT(flags, 11);
|
||||
fForceInsertToBeVis = GETBIT(flags, 12);
|
||||
fCompressedXml = GETBIT(flags, 13);
|
||||
fLoadCSPName = GETBIT(flags, 14);
|
||||
fLoadPldwIdChanged = GETBIT(flags, 15);
|
||||
|
||||
record >> flags;
|
||||
verXL = static_cast<unsigned char>(GETBITS(flags, 0, 4));
|
||||
fLoadEntryId = static_cast<unsigned char>(GETBIT(flags, 4));
|
||||
fLoadPllstclInvalid = static_cast<unsigned char>(GETBIT(flags, 5));
|
||||
fGoodRupBld = static_cast<unsigned char>(GETBIT(flags, 6));
|
||||
fPublished = static_cast<unsigned char>(GETBIT(flags, 8));
|
||||
verXL = GETBITS(flags, 0, 4);
|
||||
fLoadEntryId = GETBIT(flags, 4);
|
||||
fLoadPllstclInvalid = GETBIT(flags, 5);
|
||||
fGoodRupBld = GETBIT(flags, 6);
|
||||
fPublished = GETBIT(flags, 8);
|
||||
|
||||
if (lt != 1)
|
||||
{
|
||||
@ -106,24 +105,39 @@ void TableFeatureType::load(CFRecord& record)
|
||||
record.skipNunBytes(16); // rgbHashParam
|
||||
|
||||
record >> rgbName;
|
||||
record >> cFieldData;
|
||||
|
||||
int r = cFieldData;
|
||||
record >> cFieldData; //from 1 to 100
|
||||
|
||||
if (fLoadCSPName)
|
||||
record >> cSPName;
|
||||
|
||||
if (fLoadEntryId == BIFF_BYTE(1))
|
||||
if (fLoadEntryId)
|
||||
record >> entryId;
|
||||
|
||||
for (size_t i = 0; i < cFieldData; i++)
|
||||
for (_UINT16 i = 0; i < cFieldData; i++)
|
||||
{
|
||||
if (record.getRdPtr() >= record.getDataSize())
|
||||
return;
|
||||
|
||||
Feat11FieldDataItemPtr item(new Feat11FieldDataItem);
|
||||
BiffStructurePtr item(new Feat11FieldDataItem);
|
||||
item->load(record);
|
||||
fieldData.push_back(item);
|
||||
|
||||
arFieldData.push_back(item);
|
||||
}
|
||||
if (fLoadPldwIdDeleted)
|
||||
{
|
||||
idDeleted = BiffStructurePtr (new Feat11RgSharepointIdDel);
|
||||
idDeleted->load(record);
|
||||
}
|
||||
if (fLoadPldwIdChanged)
|
||||
{
|
||||
idChanged = BiffStructurePtr (new Feat11RgSharepointIdChange);
|
||||
idChanged->load(record);
|
||||
|
||||
}
|
||||
if (fLoadPllstclInvalid)
|
||||
{
|
||||
cellInvalid = BiffStructurePtr(new Feat11RgInvalidCells);
|
||||
cellInvalid->load(record);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -31,10 +31,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Logic/Biff_records/BiffRecord.h>
|
||||
#include <Logic/Biff_structures/BiffString.h>
|
||||
#include <Logic/Biff_structures/Feat11FieldDataItem.h>
|
||||
|
||||
#include "../Biff_records/BiffRecord.h"
|
||||
#include "../Biff_structures/BiffString.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -48,11 +46,10 @@ public:
|
||||
TableFeatureType();
|
||||
~TableFeatureType();
|
||||
|
||||
static const ElementType type = typeTableFeatureType;
|
||||
static const ElementType type = typeTableFeatureType;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
_UINT32 lt; // SourceType
|
||||
_UINT32 idList;
|
||||
_UINT32 crwHeader;
|
||||
@ -61,36 +58,40 @@ public:
|
||||
_UINT32 cbFSData;
|
||||
_UINT16 rupBuild;
|
||||
|
||||
unsigned char fAutoFilter;
|
||||
unsigned char fPersistAutoFilter;
|
||||
unsigned char fShowInsertRow;
|
||||
unsigned char fInsertRowInsCells;
|
||||
unsigned char fLoadPldwIdDeleted;
|
||||
unsigned char fShownTotalRow;
|
||||
unsigned char fNeedsCommit;
|
||||
unsigned char fSingleCell;
|
||||
unsigned char fApplyAutoFilter;
|
||||
unsigned char fForceInsertToBeVis;
|
||||
unsigned char fCompressedXml;
|
||||
unsigned char fLoadCSPName;
|
||||
unsigned char fLoadPldwIdChanged;
|
||||
unsigned char verXL;
|
||||
unsigned char fLoadEntryId;
|
||||
unsigned char fLoadPllstclInvalid;
|
||||
unsigned char fGoodRupBld;
|
||||
unsigned char fPublished;
|
||||
bool fAutoFilter;
|
||||
bool fPersistAutoFilter;
|
||||
bool fShowInsertRow;
|
||||
bool fInsertRowInsCells;
|
||||
bool fLoadPldwIdDeleted;
|
||||
bool fShownTotalRow;
|
||||
bool fNeedsCommit;
|
||||
bool fSingleCell;
|
||||
bool fApplyAutoFilter;
|
||||
bool fForceInsertToBeVis;
|
||||
bool fCompressedXml;
|
||||
bool fLoadCSPName;
|
||||
bool fLoadPldwIdChanged;
|
||||
bool fLoadEntryId;
|
||||
bool fLoadPllstclInvalid;
|
||||
bool fGoodRupBld;
|
||||
bool fPublished;
|
||||
|
||||
_UINT32 lPosStmCache;
|
||||
_UINT32 cbStmCache;
|
||||
_UINT32 cchStmCache;
|
||||
_UINT32 lem; // LEMMode
|
||||
unsigned char verXL;
|
||||
_UINT32 lPosStmCache;
|
||||
_UINT32 cbStmCache;
|
||||
_UINT32 cchStmCache;
|
||||
_UINT32 lem; // LEMMode
|
||||
|
||||
XLUnicodeString rgbName;
|
||||
_UINT16 cFieldData;
|
||||
_UINT16 cFieldData;
|
||||
XLUnicodeString cSPName;
|
||||
XLUnicodeString entryId;
|
||||
|
||||
BiffStructurePtrVector fieldData;
|
||||
BiffStructurePtrVector arFieldData;
|
||||
|
||||
BiffStructurePtr idDeleted;
|
||||
BiffStructurePtr idChanged;
|
||||
BiffStructurePtr cellInvalid;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<TableFeatureType> TableFeatureTypePtr;
|
||||
|
||||
@ -47,12 +47,10 @@ public:
|
||||
XFExtNoFRT(CFRecord& record);
|
||||
BiffStructurePtr clone();
|
||||
|
||||
static const ElementType type = typeXFExtNoFRT;
|
||||
static const ElementType type = typeXFExtNoFRT;
|
||||
|
||||
virtual void load(CFRecord& record);
|
||||
|
||||
|
||||
private:
|
||||
std::vector<ExtProp> rgExt;
|
||||
};
|
||||
|
||||
|
||||
@ -220,9 +220,9 @@ int AUTOFILTER::serialize(std::wostream & stream)
|
||||
AutoFilter12* af12 = dynamic_cast<AutoFilter12*>(itF->second[j].get());
|
||||
if (af12 == NULL) continue;
|
||||
|
||||
for (size_t k = 0 ; k < af12->rgbAF12Criteries.size(); k++)
|
||||
for (size_t k = 0 ; k < af12->arAF12Criteries.size(); k++)
|
||||
{
|
||||
AF12Criteria * af12Criteria = dynamic_cast<AF12Criteria *>(af12->rgbAF12Criteries[k].get());
|
||||
AF12Criteria * af12Criteria = dynamic_cast<AF12Criteria *>(af12->arAF12Criteries[k].get());
|
||||
if (af12Criteria == NULL) continue;
|
||||
|
||||
CP_XML_NODE(L"filter")
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of BIGNAME union of records
|
||||
class BIGNAME: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(BIGNAME)
|
||||
@ -49,6 +47,7 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
BaseObjectPtr m_BigName;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,29 +31,25 @@
|
||||
*/
|
||||
|
||||
#include "BIGNAME.h"
|
||||
#include <Logic/Biff_records/BigName.h>
|
||||
#include <Logic/Biff_records/ContinueBigName.h>
|
||||
|
||||
#include "../Biff_records/BigName.h"
|
||||
#include "../Biff_records/ContinueBigName.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
BIGNAME::BIGNAME()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BIGNAME::~BIGNAME()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr BIGNAME::clone()
|
||||
{
|
||||
return BaseObjectPtr(new BIGNAME(*this));
|
||||
}
|
||||
|
||||
|
||||
// BIGNAME = BigName *ContinueBigName
|
||||
const bool BIGNAME::loadContent(BinProcessor& proc)
|
||||
{
|
||||
@ -61,7 +57,10 @@ const bool BIGNAME::loadContent(BinProcessor& proc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
proc.repeated<ContinueBigName>(0, 0);
|
||||
m_BigName = elements_.back();
|
||||
elements_.pop_back();
|
||||
|
||||
int count = proc.repeated<ContinueBigName>(0, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ const bool COLUMNS::loadContent(BinProcessor& proc)
|
||||
|
||||
for (int i = column_info->colFirst; i <= column_info->colLast; i++)
|
||||
{
|
||||
global_info_->sheets_info.back().customColumnsWidth.insert(std::make_pair(i, column_info->coldx / 256.));
|
||||
global_info_->sheets_info[global_info_->current_sheet - 1].customColumnsWidth.insert(std::make_pair(i, column_info->coldx / 256.));
|
||||
//else if (def_ok)
|
||||
//{
|
||||
// global_info_->sheets_info.back().customColumnsWidth.insert(std::make_pair(i, global_info_->sheets_info.back().defaultColumnWidth));
|
||||
|
||||
@ -42,6 +42,9 @@
|
||||
|
||||
#include "../Biff_structures/DConnConnectionWeb.h"
|
||||
#include "../Biff_structures/DConnConnectionOleDb.h"
|
||||
#include "../Biff_structures/ConnGrbitDbtWeb.h"
|
||||
#include "../Biff_structures/ConnGrbitDbtOledb.h"
|
||||
#include "../Biff_structures/ConnGrbitDbtAdo.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -231,6 +234,10 @@ int DBQUERY::serialize_connection(std::wstring & name)
|
||||
DConnConnectionOleDb *oleDb = dcon ? dynamic_cast<DConnConnectionOleDb*>(dcon->connection.get()) : NULL;
|
||||
XLUnicodeStringSegmented*adoDb = dcon ? dynamic_cast<XLUnicodeStringSegmented*>(dcon->connection.get()) : NULL;
|
||||
|
||||
ConnGrbitDbtWeb *webGrDb = dcon ? dynamic_cast<ConnGrbitDbtWeb*>(dcon->grbitDbt.get()) : NULL;
|
||||
ConnGrbitDbtOledb *oleGrDb = dcon ? dynamic_cast<ConnGrbitDbtOledb*>(dcon->grbitDbt.get()) : NULL;
|
||||
ConnGrbitDbtAdo *adoGrDb = dcon ? dynamic_cast<ConnGrbitDbtAdo*>(dcon->grbitDbt.get()) : NULL;
|
||||
|
||||
CP_XML_WRITER(global_info->connections_stream)
|
||||
{
|
||||
CP_XML_NODE(L"connection")
|
||||
@ -330,15 +337,28 @@ int DBQUERY::serialize_connection(std::wstring & name)
|
||||
|
||||
CP_XML_ATTR(L"connection", connection);
|
||||
CP_XML_ATTR(L"command", command);
|
||||
if (commandType > 0)
|
||||
CP_XML_ATTR(L"commandType", commandType);
|
||||
|
||||
if (oleGrDb && commandType > 0)
|
||||
{
|
||||
//1. Query specifies a cube name
|
||||
//2. Query specifies a SQL statement
|
||||
//3. Query specifies a table name
|
||||
//4. Query specifies that default information has been given, and it is up to the provider
|
||||
//5. Query is against a web based List Data Provider.
|
||||
CP_XML_ATTR(L"commandType", oleGrDb->dbost);
|
||||
}
|
||||
}
|
||||
if (oleDb)
|
||||
{
|
||||
CP_XML_NODE(L"olapPr")
|
||||
{
|
||||
CP_XML_ATTR(L"sendLocale", 1);
|
||||
CP_XML_ATTR(L"rowDrillCount", oleDb->nDrillthroughRows);
|
||||
if (oleGrDb)
|
||||
{
|
||||
if (oleGrDb->fLocalConn)
|
||||
CP_XML_ATTR(L"local", oleGrDb->fLocalConn);
|
||||
}
|
||||
if (oleDb->nDrillthroughRows > 0)
|
||||
CP_XML_ATTR(L"rowDrillCount", oleDb->nDrillthroughRows);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of FEAT union of records
|
||||
class FEAT: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(FEAT)
|
||||
@ -49,7 +47,15 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
static const ElementType type = typeFEAT;
|
||||
static const ElementType type = typeFEAT;
|
||||
|
||||
struct _data
|
||||
{
|
||||
BaseObjectPtr m_Feat;
|
||||
std::vector<BaseObjectPtr> m_arContinueFrt;
|
||||
};
|
||||
BaseObjectPtr m_FeatHdr;
|
||||
std::vector<_data> m_arFEAT;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,15 +31,15 @@
|
||||
*/
|
||||
|
||||
#include "FEAT11.h"
|
||||
#include <Logic/Biff_records/FeatHdr11.h>
|
||||
#include <Logic/Biff_records/Feature11.h>
|
||||
#include <Logic/Biff_records/Feature12.h>
|
||||
#include <Logic/Biff_records/ContinueFrt11.h>
|
||||
#include <Logic/Biff_records/List12.h>
|
||||
#include <Logic/Biff_records/AutoFilter12.h>
|
||||
#include <Logic/Biff_records/ContinueFrt12.h>
|
||||
#include <Logic/Biff_records/List12.h>
|
||||
#include <Logic/Biff_unions/SORTDATA12.h>
|
||||
#include "../Biff_records/FeatHdr11.h"
|
||||
#include "../Biff_records/Feature11.h"
|
||||
#include "../Biff_records/Feature12.h"
|
||||
#include "../Biff_records/ContinueFrt11.h"
|
||||
#include "../Biff_records/List12.h"
|
||||
#include "../Biff_records/AutoFilter12.h"
|
||||
#include "../Biff_records/ContinueFrt12.h"
|
||||
#include "../Biff_records/List12.h"
|
||||
#include "../Biff_unions/SORTDATA12.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -112,34 +112,47 @@ const bool FEAT11::loadContent(BinProcessor& proc)
|
||||
|
||||
while(!elements_.empty())
|
||||
{
|
||||
if (elements_.front()->get_type() == typeFeature11 ||
|
||||
elements_.front()->get_type() == typeFeature12 )
|
||||
switch(elements_.front()->get_type())
|
||||
{
|
||||
_data new_data;
|
||||
new_data.m_Feature = elements_.front();
|
||||
case typeFeature11:
|
||||
case typeFeature12:
|
||||
{
|
||||
_data new_data;
|
||||
new_data.m_Feature = elements_.front();
|
||||
|
||||
m_arFEAT.push_back(new_data);
|
||||
}
|
||||
|
||||
if (elements_.front()->get_type() == typeList12)
|
||||
{
|
||||
if (m_arFEAT.back().m_AutoFilter12)
|
||||
m_arFEAT.back().m_arList12_second.push_back(elements_.front());
|
||||
else
|
||||
m_arFEAT.back().m_arList12.push_back(elements_.front());
|
||||
}
|
||||
if (elements_.front()->get_type() == typeAutoFilter12)
|
||||
{
|
||||
m_arFEAT.back().m_AutoFilter12 = elements_.front();
|
||||
}
|
||||
if (elements_.front()->get_type() == typeSORTDATA12)
|
||||
{
|
||||
m_arFEAT.back().m_SORTDATA12 = elements_.front();
|
||||
m_arFEAT.push_back(new_data);
|
||||
}break;
|
||||
case typeList12:
|
||||
{
|
||||
if (m_arFEAT.back().m_AutoFilter12)
|
||||
m_arFEAT.back().m_arList12_second.push_back(elements_.front());
|
||||
else
|
||||
m_arFEAT.back().m_arList12.push_back(elements_.front());
|
||||
}break;
|
||||
case typeAutoFilter12:
|
||||
{
|
||||
m_arFEAT.back().m_AutoFilter12 = elements_.front();
|
||||
}break;
|
||||
case typeSORTDATA12:
|
||||
{
|
||||
m_arFEAT.back().m_SORTDATA12 = elements_.front();
|
||||
}break;
|
||||
}
|
||||
elements_.pop_front();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int FEAT11::serialize(std::wostream & strm)
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"table")
|
||||
{
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.openxmlformats.org/spreadsheetml/2006/main");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -37,8 +37,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of FEAT11 union of records
|
||||
class FEAT11: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(FEAT11)
|
||||
@ -49,6 +47,7 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
static const ElementType type = typeFEAT11;
|
||||
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "FEAT.h"
|
||||
#include <Logic/Biff_records/FeatHdr.h>
|
||||
#include <Logic/Biff_records/Feat.h>
|
||||
#include <Logic/Biff_records/ContinueFrt.h>
|
||||
#include "../Biff_records/FeatHdr.h"
|
||||
#include "../Biff_records/Feat.h"
|
||||
#include "../Biff_records/ContinueFrt.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -64,7 +64,9 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
proc.repeated<ContinueFrt>(0, 0);
|
||||
|
||||
int count = proc.repeated<ContinueFrt>(0, 0);
|
||||
|
||||
return true;
|
||||
};
|
||||
};
|
||||
@ -85,8 +87,27 @@ const bool FEAT::loadContent(BinProcessor& proc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
proc.repeated<Parenthesis_FEAT_1>(0, 0);
|
||||
m_FeatHdr = elements_.back();
|
||||
elements_.pop_back();
|
||||
|
||||
int count = proc.repeated<Parenthesis_FEAT_1>(0, 0);
|
||||
|
||||
while(!elements_.empty())
|
||||
{
|
||||
if (elements_.front()->get_type() == typeFeat)
|
||||
{
|
||||
_data new_data;
|
||||
new_data.m_Feat = elements_.front();
|
||||
|
||||
m_arFEAT.push_back(new_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_arFEAT.back().m_arContinueFrt.push_back(elements_.front());
|
||||
}
|
||||
|
||||
elements_.pop_front();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ const bool LBL::loadContent(BinProcessor& proc)
|
||||
|
||||
std::wstring name;
|
||||
|
||||
if (lbl->fBuiltin) name = lbl->Name.value().get_value_or(L"");
|
||||
if (lbl->fBuiltin) name = lbl->Name;
|
||||
if (name.empty()) name = lbl->Name_bin.value();
|
||||
|
||||
NameCmt namecmt(name);
|
||||
@ -139,7 +139,7 @@ int LBL::serialize(std::wostream & stream)
|
||||
CP_XML_NODE(L"definedName")
|
||||
{
|
||||
std::wstring name;
|
||||
if (lbl->fBuiltin) name = lbl->Name.value().get_value_or(L"");
|
||||
if (lbl->fBuiltin) name = lbl->Name;
|
||||
|
||||
if (name.empty()) name = lbl->Name_bin.value();
|
||||
|
||||
|
||||
@ -96,21 +96,21 @@ const bool METADATA::loadContent(BinProcessor& proc)
|
||||
int count2 = proc.repeated<MDXSTR>(0, 0);
|
||||
while(!elements_.empty())
|
||||
{
|
||||
m_arMDXSTR.insert(m_arMDTINFO.begin(), elements_.back());
|
||||
m_arMDXSTR.insert(m_arMDXSTR.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
int count3 = proc.repeated<Parenthesis_METADATA_1>(0, 0);
|
||||
while(!elements_.empty())
|
||||
{
|
||||
m_arMDTSET.insert(m_arMDTINFO.begin(), elements_.back());
|
||||
m_arMDTSET.insert(m_arMDTSET.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
int count4 = proc.repeated<MDBLOCK>(0, 0);
|
||||
while(!elements_.empty())
|
||||
{
|
||||
m_arMDBLOCK.insert(m_arMDTINFO.begin(), elements_.back());
|
||||
m_arMDBLOCK.insert(m_arMDBLOCK.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
}
|
||||
if (count1 > 0 || count2 > 0 || count3 > 0 || count4 > 0)
|
||||
|
||||
@ -31,11 +31,12 @@
|
||||
*/
|
||||
|
||||
#include "PROTECTION.h"
|
||||
#include <Logic/Biff_records/WinProtect.h>
|
||||
#include <Logic/Biff_records/Protect.h>
|
||||
#include <Logic/Biff_records/Password.h>
|
||||
#include <Logic/Biff_records/Prot4Rev.h>
|
||||
#include <Logic/Biff_records/Prot4RevPass.h>
|
||||
|
||||
#include "../Biff_records/WinProtect.h"
|
||||
#include "../Biff_records/Protect.h"
|
||||
#include "../Biff_records/Password.h"
|
||||
#include "../Biff_records/Prot4Rev.h"
|
||||
#include "../Biff_records/Prot4RevPass.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -85,7 +86,7 @@ const bool PROTECTION::loadContent(BinProcessor& proc)
|
||||
m_Prot4RevPass = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
return true;
|
||||
return m_WinProtect || m_Protect || m_Password;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of PROTECTION union of records
|
||||
class PROTECTION: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(PROTECTION)
|
||||
@ -49,7 +47,7 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
static const ElementType type = typePROTECTION;
|
||||
static const ElementType type = typePROTECTION;
|
||||
|
||||
BaseObjectPtr m_WinProtect;
|
||||
BaseObjectPtr m_Protect;
|
||||
|
||||
@ -31,25 +31,23 @@
|
||||
*/
|
||||
|
||||
#include "PROTECTION_COMMON.h"
|
||||
#include <Logic/Biff_records/Protect.h>
|
||||
#include <Logic/Biff_records/ScenarioProtect.h>
|
||||
#include <Logic/Biff_records/ObjProtect.h>
|
||||
#include <Logic/Biff_records/Password.h>
|
||||
|
||||
#include "../Biff_records/Protect.h"
|
||||
#include "../Biff_records/ScenarioProtect.h"
|
||||
#include "../Biff_records/ObjProtect.h"
|
||||
#include "../Biff_records/Password.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
PROTECTION_COMMON::PROTECTION_COMMON()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PROTECTION_COMMON::~PROTECTION_COMMON()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr PROTECTION_COMMON::clone()
|
||||
{
|
||||
return BaseObjectPtr(new PROTECTION_COMMON(*this));
|
||||
@ -59,12 +57,58 @@ BaseObjectPtr PROTECTION_COMMON::clone()
|
||||
// PROTECTION_COMMON = [Protect] [ScenarioProtect] [ObjProtect] [Password]
|
||||
const bool PROTECTION_COMMON::loadContent(BinProcessor& proc)
|
||||
{
|
||||
bool res1 = proc.optional<Protect>();
|
||||
bool res2 = proc.optional<ScenarioProtect>();
|
||||
bool res3 = proc.optional<ObjProtect>();
|
||||
bool res4 = proc.optional<Password>();
|
||||
if (proc.optional<Protect>())
|
||||
{
|
||||
m_Protect = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
if (proc.optional<ScenarioProtect>())
|
||||
{
|
||||
m_ScenarioProtect = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
if (proc.optional<ObjProtect>())
|
||||
{
|
||||
m_ObjProtect = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
if (proc.optional<Password>())
|
||||
{
|
||||
m_Password = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
return res1 || res2 || res3 || res4;
|
||||
return m_Protect || m_ScenarioProtect || m_ObjProtect || m_Password;
|
||||
}
|
||||
|
||||
int PROTECTION_COMMON::serialize (std::wostream & _stream)
|
||||
{
|
||||
Protect *protect = dynamic_cast<Protect*> (m_Protect.get());
|
||||
Password *password = dynamic_cast<Password*> (m_Password.get());
|
||||
ScenarioProtect *scenario = dynamic_cast<ScenarioProtect*>(m_ScenarioProtect.get());
|
||||
ObjProtect *object = dynamic_cast<ObjProtect*> (m_ObjProtect.get());
|
||||
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
CP_XML_NODE(L"sheetProtection")
|
||||
{
|
||||
if (protect)
|
||||
{
|
||||
CP_XML_ATTR(L"sheet", (protect->fLock ? 1 : 0));
|
||||
}
|
||||
if (object)
|
||||
{
|
||||
CP_XML_ATTR(L"objects", (object->fLockObj ? 1 : 0));
|
||||
}
|
||||
if (scenario)
|
||||
{
|
||||
CP_XML_ATTR(L"scenarios", (scenario->fScenProtect ? 1 : 0));
|
||||
}
|
||||
CP_XML_ATTR(L"selectLockedCells", 1);
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of PROTECTION_COMMON union of records
|
||||
class PROTECTION_COMMON: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(PROTECTION)
|
||||
@ -48,8 +46,14 @@ public:
|
||||
BaseObjectPtr clone();
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
int serialize (std::wostream & _stream);
|
||||
|
||||
static const ElementType type = typePROTECTION_COMMON;
|
||||
static const ElementType type = typePROTECTION_COMMON;
|
||||
|
||||
BaseObjectPtr m_Protect;
|
||||
BaseObjectPtr m_ScenarioProtect;
|
||||
BaseObjectPtr m_ObjProtect;
|
||||
BaseObjectPtr m_Password;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,12 +31,11 @@
|
||||
*/
|
||||
|
||||
#include "RECORD12.h"
|
||||
#include <Logic/Biff_records/HeaderFooter.h>
|
||||
#include "../Biff_records/HeaderFooter.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
RECORD12::RECORD12()
|
||||
{
|
||||
}
|
||||
@ -60,6 +59,9 @@ const bool RECORD12::loadContent(BinProcessor& proc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_HeaderFooter = elements_.back();
|
||||
elements_.pop_back();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of RECORD12 union of records
|
||||
class RECORD12: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(RECORD12)
|
||||
@ -49,7 +47,9 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
static const ElementType type = typeRECORD12;
|
||||
static const ElementType type = typeRECORD12;
|
||||
|
||||
BaseObjectPtr m_HeaderFooter;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,8 +36,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of TABLESTYLES union of records
|
||||
class TABLESTYLES: public CompositeObject
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(TABLESTYLES)
|
||||
@ -49,7 +47,7 @@ public:
|
||||
|
||||
virtual const bool loadContent(BinProcessor& proc);
|
||||
|
||||
static const ElementType type = typeTABLESTYLES;
|
||||
static const ElementType type = typeTABLESTYLES;
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
@ -31,9 +31,10 @@
|
||||
*/
|
||||
|
||||
#include "TABLESTYLES.h"
|
||||
#include <Logic/Biff_records/TableStyles.h>
|
||||
#include <Logic/Biff_records/TableStyle.h>
|
||||
#include <Logic/Biff_records/TableStyleElement.h>
|
||||
|
||||
#include "../Biff_records/TableStyles.h"
|
||||
#include "../Biff_records/TableStyle.h"
|
||||
#include "../Biff_records/TableStyleElement.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -103,7 +104,7 @@ const bool TABLESTYLES::loadContent(BinProcessor& proc)
|
||||
if (m_arTableStyles.size() > 0)
|
||||
m_arTableStyles.back().elements_.push_back(elements_.front());
|
||||
}
|
||||
elements_.pop_back();
|
||||
elements_.pop_front();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -127,6 +128,62 @@ int TABLESTYLES::serialize(std::wostream & stream)
|
||||
CP_XML_ATTR(L"defaultTableStyle", styles->rgchDefTableStyle.value());
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < m_arTableStyles.size(); i++)
|
||||
{
|
||||
TableStyle* style = dynamic_cast<TableStyle*>(m_arTableStyles[i].style_.get());
|
||||
if (!style) continue;
|
||||
|
||||
CP_XML_NODE(L"tableStyle")
|
||||
{
|
||||
CP_XML_ATTR(L"count", m_arTableStyles[i].elements_.size());
|
||||
CP_XML_ATTR(L"name", style->rgchName.value());
|
||||
CP_XML_ATTR(L"pivot", style->fIsPivot);
|
||||
|
||||
for (size_t j = 0; j < m_arTableStyles[i].elements_.size(); j++)
|
||||
{
|
||||
TableStyleElement* elem = dynamic_cast<TableStyleElement*>(m_arTableStyles[i].elements_[j].get());
|
||||
if (!elem) continue;
|
||||
|
||||
CP_XML_NODE(L"tableStyleElement")
|
||||
{
|
||||
CP_XML_ATTR(L"dxfId", elem->index);
|
||||
|
||||
switch(elem->tseType)
|
||||
{
|
||||
case 0x00000000: CP_XML_ATTR(L"type", L"wholeTable"); break;
|
||||
case 0x00000001: CP_XML_ATTR(L"type", L"headerRow"); break;
|
||||
case 0x00000002: CP_XML_ATTR(L"type", L"totalRow"); break;
|
||||
case 0x00000003: CP_XML_ATTR(L"type", L"firstColumn"); break;
|
||||
case 0x00000004: CP_XML_ATTR(L"type", L"lastColumn"); break;
|
||||
case 0x00000005: CP_XML_ATTR(L"type", L"firstRowStripe"); break;
|
||||
case 0x00000006: CP_XML_ATTR(L"type", L"secondRowStripe"); break;
|
||||
case 0x00000007: CP_XML_ATTR(L"type", L"firstColumnStripe"); break;
|
||||
case 0x00000008: CP_XML_ATTR(L"type", L"secondColumnStripe"); break;
|
||||
case 0x00000009: CP_XML_ATTR(L"type", L"firstHeaderCell"); break;
|
||||
case 0x0000000a: CP_XML_ATTR(L"type", L"lastHeaderCell"); break;
|
||||
case 0x0000000b: CP_XML_ATTR(L"type", L"firstTotalCell"); break;
|
||||
case 0x0000000c: CP_XML_ATTR(L"type", L"lastTotalCell"); break;
|
||||
case 0x0000000d: CP_XML_ATTR(L"type", L"firstSubtotalColumn"); break;//??
|
||||
case 0x0000000e: CP_XML_ATTR(L"type", L"firstSubtotalColumn"); break;//even
|
||||
case 0x0000000f: CP_XML_ATTR(L"type", L"lastSubtotalColumn"); break;//odd
|
||||
case 0x00000010: CP_XML_ATTR(L"type", L"firstSubtotalRow"); break;//??
|
||||
case 0x00000011: CP_XML_ATTR(L"type", L"firstSubtotalRow"); break;//even
|
||||
case 0x00000012: CP_XML_ATTR(L"type", L"lastSubtotalRow"); break;//odd
|
||||
case 0x00000013: CP_XML_ATTR(L"type", L"blankRow"); break;
|
||||
case 0x00000014: CP_XML_ATTR(L"type", L"firstColumnSubheading");break;
|
||||
case 0x00000015: CP_XML_ATTR(L"type", L"firstColumnSubheading");break;
|
||||
case 0x00000016: CP_XML_ATTR(L"type", L"lastColumnSubheading"); break;
|
||||
case 0x00000017: CP_XML_ATTR(L"type", L"firstRowSubheading"); break;
|
||||
case 0x00000018: CP_XML_ATTR(L"type", L"firstRowSubheading"); break;
|
||||
case 0x00000019: CP_XML_ATTR(L"type", L"lastRowSubheading"); break;
|
||||
case 0x0000001a: CP_XML_ATTR(L"type", L"pageFieldLabels"); break;
|
||||
case 0x0000001b: CP_XML_ATTR(L"type", L"pageFieldValues"); break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
@ -129,9 +129,9 @@ int WINDOW::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"view", L"pageLayout");
|
||||
}
|
||||
if ((window2->topLeftCell.value()) && (*window2->topLeftCell.value() != L"A1"))
|
||||
if (window2->topLeftCell != L"A1")
|
||||
{
|
||||
CP_XML_ATTR(L"topLeftCell", *window2->topLeftCell.value());
|
||||
CP_XML_ATTR(L"topLeftCell", window2->topLeftCell);
|
||||
}
|
||||
if ( window2->icvHdr != (_UINT16)64)
|
||||
{
|
||||
@ -159,8 +159,8 @@ int WINDOW::serialize(std::wostream & stream)
|
||||
if (pane->x != (_INT32)0) CP_XML_ATTR(L"xSplit", pane->x);
|
||||
if (pane->y != (_INT32)0) CP_XML_ATTR(L"ySplit", pane->y);
|
||||
|
||||
if ((pane->topLeftCell.value()) && (*pane->topLeftCell.value() != L"A1"))
|
||||
CP_XML_ATTR(L"topLeftCell", *pane->topLeftCell.value());
|
||||
if (pane->topLeftCell != L"A1")
|
||||
CP_XML_ATTR(L"topLeftCell", pane->topLeftCell);
|
||||
switch(pane->pnnAcct)
|
||||
{
|
||||
case PaneType::REVTPNNBOTRIGHT: CP_XML_ATTR(L"activePane", L"bottomRight"); break;
|
||||
|
||||
@ -68,7 +68,7 @@ const bool XFS::loadContent(BinProcessor& proc)
|
||||
int cellXfs_count = 0;
|
||||
|
||||
XF xf(cell_xf_current_id, style_xf_current_id);
|
||||
int count = proc.repeated(xf ,16, 0);
|
||||
int count = proc.repeated(xf , 0/*16*/, 0); // "Stock symbols comparison1.xls" (второй FORMATING)
|
||||
|
||||
int ind = 0;
|
||||
while (count > 0 && elements_.size() > 0)
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include "Biff_records/WebPub.h"
|
||||
#include "Biff_records/HFPicture.h"
|
||||
#include "Biff_records/PrintSize.h"
|
||||
#include "Biff_records/HeaderFooter.h"
|
||||
#include "Biff_records/Fbi.h"
|
||||
#include "Biff_records/Fbi2.h"
|
||||
#include "Biff_records/ClrtClient.h"
|
||||
@ -92,6 +91,7 @@
|
||||
#include "Biff_unions/LD.h"
|
||||
#include "Biff_unions/DAT.h"
|
||||
#include "Biff_unions/PIVOTVIEW.h"
|
||||
#include "Biff_unions/RECORD12.h"
|
||||
|
||||
#include "../../XlsXlsxConverter/XlsConverter.h"
|
||||
#include "../../XlsXlsxConverter/xlsx_conversion_context.h"
|
||||
@ -101,7 +101,7 @@ namespace XLS
|
||||
{;
|
||||
|
||||
|
||||
ChartSheetSubstream::ChartSheetSubstream(const size_t ws_index) : ws_index_(ws_index)
|
||||
ChartSheetSubstream::ChartSheetSubstream(const size_t ws_index) : CommonSubstream(ws_index)
|
||||
{
|
||||
}
|
||||
|
||||
@ -127,6 +127,7 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin
|
||||
const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
{
|
||||
global_info_ = proc.getGlobalWorkbookInfo();
|
||||
global_info_->current_sheet = ws_index_ + 1;
|
||||
|
||||
int count = 0 ;
|
||||
|
||||
@ -150,7 +151,14 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case rt_WriteProtect: proc.optional<WriteProtect>(); break;
|
||||
case rt_WriteProtect:
|
||||
{
|
||||
if (proc.optional<WriteProtect>())
|
||||
{
|
||||
m_WriteProtect = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_SheetExt:
|
||||
{
|
||||
if (proc.optional<SheetExt>())
|
||||
@ -160,19 +168,47 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
}
|
||||
}break;
|
||||
case rt_WebPub: proc.optional<WebPub>(); break;
|
||||
case rt_HFPicture: proc.repeated<HFPicture>(0, 0); break;
|
||||
|
||||
case rt_HFPicture:
|
||||
{
|
||||
count = proc.repeated<HFPicture>(0, 0);
|
||||
while(count > 0)
|
||||
{
|
||||
m_arHFPicture.insert(m_arHFPicture.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
count--;
|
||||
}
|
||||
}break;
|
||||
case rt_Header:
|
||||
case rt_Footer:
|
||||
case rt_BottomMargin:
|
||||
case rt_TopMargin:
|
||||
case rt_LeftMargin:
|
||||
case rt_RightMargin:
|
||||
proc.mandatory<PAGESETUP>(); break;
|
||||
|
||||
case rt_PrintSize: proc.mandatory<PrintSize>(); break;
|
||||
case rt_HeaderFooter: proc.optional<HeaderFooter>(); break;
|
||||
|
||||
{
|
||||
if (proc.mandatory<PAGESETUP>())
|
||||
{
|
||||
m_PAGESETUP = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_PrintSize:
|
||||
{
|
||||
if (proc.mandatory<PrintSize>())
|
||||
{
|
||||
m_PrintSize = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_HeaderFooter:
|
||||
{
|
||||
count = proc.repeated<RECORD12> (0, 0);
|
||||
while(count > 0)
|
||||
{
|
||||
m_arRECORD12.insert(m_arRECORD12.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
count--;
|
||||
}
|
||||
}break;
|
||||
case rt_BkHim:
|
||||
{
|
||||
if (proc.optional<BACKGROUND>())
|
||||
@ -207,10 +243,22 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
case rt_Protect:
|
||||
case rt_ScenarioProtect:
|
||||
case rt_ObjProtect:
|
||||
case rt_Password:
|
||||
proc.optional<PROTECTION_COMMON>(); break;
|
||||
|
||||
case rt_Palette: proc.optional<Palette>(); break;
|
||||
case rt_Password:
|
||||
{
|
||||
if (proc.optional<PROTECTION_COMMON>())
|
||||
{
|
||||
m_PROTECTION = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_Palette:
|
||||
{
|
||||
if (proc.optional<Palette>())
|
||||
{
|
||||
m_Palette = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_SXViewLink:
|
||||
{
|
||||
if (proc.optional<SXViewLink>())
|
||||
@ -244,7 +292,7 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
OBJECTS objects(true);
|
||||
if (proc.mandatory(objects))
|
||||
{
|
||||
m_OBJECTSCHART = elements_.back();
|
||||
m_OBJECTS = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
@ -310,7 +358,14 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
}
|
||||
}break;
|
||||
|
||||
case rt_CodeName: proc.optional<CodeName>(); break;
|
||||
case rt_CodeName:
|
||||
{
|
||||
if (proc.optional<CodeName>())
|
||||
{
|
||||
m_CodeName = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
}break;
|
||||
case rt_CrtMlFrt: proc.optional<CRTMLFRT>(); break;
|
||||
|
||||
default://unknown .... skip
|
||||
@ -319,7 +374,8 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
|
||||
}break;
|
||||
}
|
||||
}
|
||||
|
||||
LoadHFPicture();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Logic/CompositeObject.h>
|
||||
#include "CommonSubstream.h"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace XLS
|
||||
@ -44,7 +45,7 @@ class CRT;
|
||||
class ChartSheetSubstream;
|
||||
typedef boost::shared_ptr<ChartSheetSubstream> ChartSheetSubstreamPtr;
|
||||
|
||||
class ChartSheetSubstream: public CompositeObject
|
||||
class ChartSheetSubstream: public CompositeObject, public CommonSubstream
|
||||
{
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(ChartSheetSubstream)
|
||||
public:
|
||||
@ -68,25 +69,17 @@ public:
|
||||
|
||||
static const ElementType type = typeChartSheetSubstream;
|
||||
|
||||
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
size_t ws_index_;
|
||||
|
||||
BaseObjectPtr m_BACKGROUND;
|
||||
std::vector<BaseObjectPtr> m_arFbi;
|
||||
BaseObjectPtr m_CHARTFORMATS;
|
||||
BaseObjectPtr m_SERIESDATA;
|
||||
BaseObjectPtr m_OBJECTSCHART;
|
||||
std::vector<BaseObjectPtr> m_arWINDOW;
|
||||
std::vector<BaseObjectPtr> m_arCUSTOMVIEW;
|
||||
BaseObjectPtr m_Units;
|
||||
BaseObjectPtr m_ExternSheet;
|
||||
BaseObjectPtr m_SXViewLink;
|
||||
BaseObjectPtr m_PivotChartBits;
|
||||
BaseObjectPtr m_SBaseRef;
|
||||
|
||||
BaseObjectPtr m_CodeName;
|
||||
BaseObjectPtr m_SheetExt;
|
||||
BaseObjectPtr m_PrintSize;
|
||||
BaseObjectPtr m_Palette;
|
||||
BaseObjectPtr m_WriteProtect;
|
||||
private:
|
||||
|
||||
void recalc(CHARTFORMATS* charts);
|
||||
|
||||
120
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.cpp
Normal file
120
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.cpp
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* (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 "CommonSubstream.h"
|
||||
|
||||
#include "Biff_records/HFPicture.h"
|
||||
#include "Biff_records/SheetExt.h"
|
||||
#include "Biff_records/CodeName.h"
|
||||
|
||||
#include "Biff_structures/ODRAW/OfficeArtDgContainer.h"
|
||||
|
||||
namespace XLS
|
||||
{;
|
||||
|
||||
void CommonSubstream::LoadHFPicture()
|
||||
{
|
||||
if (m_arHFPicture.empty()) return;
|
||||
|
||||
size_t current_size_hf = 0, j = 0;
|
||||
for ( size_t i = 0; i < m_arHFPicture.size(); i++)
|
||||
{
|
||||
HFPicture* hf = dynamic_cast<HFPicture*>(m_arHFPicture[i].get());
|
||||
if ((hf) && (hf->recordDrawingGroup))
|
||||
{
|
||||
if (!hf->fContinue && current_size_hf > 0)
|
||||
{
|
||||
XLS::CFRecord record(CFRecordType::ANY_TYPE, global_info_);
|
||||
for (; j < i; j++)
|
||||
{
|
||||
hf = dynamic_cast<HFPicture*>(m_arHFPicture[j].get());
|
||||
record.appendRawData(hf->recordDrawingGroup);
|
||||
}
|
||||
ODRAW::OfficeArtDgContainerPtr rgDrawing = ODRAW::OfficeArtDgContainerPtr(new ODRAW::OfficeArtDgContainer(ODRAW::OfficeArtRecord::CA_HF));
|
||||
rgDrawing->loadFields(record);
|
||||
m_arHFPictureDrawing.push_back(rgDrawing);
|
||||
current_size_hf = 0;
|
||||
|
||||
}
|
||||
current_size_hf += hf->recordDrawingGroup->getDataSize();
|
||||
}
|
||||
}
|
||||
if (current_size_hf > 0)
|
||||
{
|
||||
XLS::CFRecord record(ODRAW::OfficeArtRecord::DggContainer, global_info_);
|
||||
for (; j < m_arHFPicture.size(); j++)
|
||||
{
|
||||
HFPicture* hf = dynamic_cast<HFPicture*>(m_arHFPicture[j].get());
|
||||
record.appendRawData(hf->recordDrawingGroup);
|
||||
}
|
||||
ODRAW::OfficeArtDgContainerPtr rgDrawing = ODRAW::OfficeArtDgContainerPtr(new ODRAW::OfficeArtDgContainer(ODRAW::OfficeArtRecord::CA_HF));
|
||||
rgDrawing->loadFields(record);
|
||||
m_arHFPictureDrawing.push_back(rgDrawing);
|
||||
}
|
||||
}
|
||||
|
||||
int CommonSubstream::serialize_format(std::wostream & strm)
|
||||
{
|
||||
SheetExt *sheet_ext = dynamic_cast<SheetExt*>(m_SheetExt.get());
|
||||
CodeName *code_name = dynamic_cast<CodeName*>(m_CodeName.get());
|
||||
|
||||
if (!code_name || !sheet_ext) return 0;
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"sheetPr")
|
||||
{
|
||||
if (code_name)
|
||||
{
|
||||
CP_XML_ATTR(L"codeName", code_name->value);
|
||||
}
|
||||
if ((sheet_ext) && (sheet_ext->sheetExtOptional.bEnabled))
|
||||
{
|
||||
if (!sheet_ext->sheetExtOptional.fCondFmtCalc)
|
||||
CP_XML_ATTR(L"enableFormatConditionsCalculation", false);
|
||||
if (!sheet_ext->sheetExtOptional.fNotPublished)
|
||||
CP_XML_ATTR(L"published" ,false);
|
||||
|
||||
if (sheet_ext->sheetExtOptional.color.xclrType.type == XColorType::XCLRRGB)
|
||||
{
|
||||
CP_XML_NODE(L"tabColor")
|
||||
{
|
||||
CP_XML_ATTR(L"rgb", sheet_ext->sheetExtOptional.color.rgb.strARGB);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
78
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.h
Normal file
78
ASCOfficeXlsFile2/source/XlsFormat/Logic/CommonSubstream.h
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* (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 "CompositeObject.h"
|
||||
#include "Biff_structures/CellRef.h"
|
||||
|
||||
namespace XLS
|
||||
{;
|
||||
|
||||
class CommonSubstream
|
||||
{
|
||||
public:
|
||||
CommonSubstream(const size_t ws_index) : ws_index_(ws_index) {}
|
||||
~CommonSubstream(){}
|
||||
|
||||
int serialize_format(std::wostream & _stream);
|
||||
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
size_t ws_index_;
|
||||
|
||||
std::vector<BiffStructurePtr> m_arHFPictureDrawing;
|
||||
|
||||
BaseObjectPtr m_PAGESETUP;
|
||||
BaseObjectPtr m_PROTECTION;
|
||||
BaseObjectPtr m_BACKGROUND;
|
||||
BaseObjectPtr m_GLOBALS;
|
||||
BaseObjectPtr m_COLUMNS;
|
||||
BaseObjectPtr m_CELLTABLE;
|
||||
BaseObjectPtr m_SORTANDFILTER;
|
||||
BaseObjectPtr m_OBJECTS;
|
||||
BaseObjectPtr m_DCON;
|
||||
BaseObjectPtr m_CodeName;
|
||||
BaseObjectPtr m_SheetExt;
|
||||
BaseObjectPtr m_SXADDLDBQUERY;
|
||||
|
||||
std::vector<BaseObjectPtr> m_arHFPicture;
|
||||
std::vector<BaseObjectPtr> m_arWINDOW;
|
||||
std::vector<BaseObjectPtr> m_arCUSTOMVIEW;
|
||||
std::vector<BaseObjectPtr> m_arFEAT;
|
||||
std::vector<BaseObjectPtr> m_arRECORD12;
|
||||
std::vector<BaseObjectPtr> m_arFEAT11;
|
||||
std::vector<BaseObjectPtr> m_arSORT;
|
||||
|
||||
void LoadHFPicture();
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -692,7 +692,7 @@ void GlobalsSubstream::UpdateDefineNames()
|
||||
std::wstring name;
|
||||
std::wstring comment;
|
||||
|
||||
if (lbl->fBuiltin) name = lbl->Name.value().get_value_or(L"");
|
||||
if (lbl->fBuiltin) name = lbl->Name;
|
||||
if (name.empty()) name = lbl->Name_bin.value();
|
||||
|
||||
NameCmt *namecmt = dynamic_cast<NameCmt*>(LBL_->m_NameCmt.get());
|
||||
|
||||
@ -73,6 +73,7 @@ public:
|
||||
BaseObjectPtr m_METADATA;
|
||||
BaseObjectPtr m_MTRSettings;
|
||||
|
||||
std::vector<BaseObjectPtr> m_arBIGNAME;
|
||||
std::vector<BaseObjectPtr> m_arHFPicture;
|
||||
std::vector<BaseObjectPtr> m_arLBL;
|
||||
std::vector<BaseObjectPtr> m_arMSODRAWINGGROUP;
|
||||
|
||||
@ -67,7 +67,7 @@ namespace XLS
|
||||
{;
|
||||
|
||||
|
||||
MacroSheetSubstream::MacroSheetSubstream(const size_t ws_index) : ws_index_(ws_index)
|
||||
MacroSheetSubstream::MacroSheetSubstream(const size_t ws_index) : CommonSubstream(ws_index)
|
||||
{
|
||||
}
|
||||
|
||||
@ -98,8 +98,7 @@ const bool MacroSheetSubstream::loadContent(BinProcessor& proc)
|
||||
return false;
|
||||
}
|
||||
global_info_ = proc.getGlobalWorkbookInfo();
|
||||
|
||||
global_info_->current_sheet = global_info_->sheets_info.size();
|
||||
global_info_->current_sheet = ws_index_ + 1;
|
||||
|
||||
proc.optional<Uncalced>();
|
||||
proc.mandatory<Index>();
|
||||
@ -125,7 +124,12 @@ const bool MacroSheetSubstream::loadContent(BinProcessor& proc)
|
||||
elements_.pop_back();
|
||||
}
|
||||
proc.repeated<BIGNAME>(0, 0);
|
||||
proc.optional<PROTECTION_COMMON>();
|
||||
|
||||
if (proc.optional<PROTECTION_COMMON>())
|
||||
{
|
||||
m_PROTECTION = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
|
||||
if (proc.mandatory<COLUMNS>())
|
||||
{
|
||||
@ -186,8 +190,7 @@ const bool MacroSheetSubstream::loadContent(BinProcessor& proc)
|
||||
m_arWINDOW.insert(m_arWINDOW.begin(), elements_.back());
|
||||
elements_.pop_back();
|
||||
count--;
|
||||
}
|
||||
|
||||
}
|
||||
count = proc.repeated<CUSTOMVIEW>(0, 0);
|
||||
while(count > 0)
|
||||
{
|
||||
@ -224,7 +227,7 @@ const bool MacroSheetSubstream::loadContent(BinProcessor& proc)
|
||||
m_SheetExt = elements_.back();
|
||||
elements_.pop_back();
|
||||
}
|
||||
count = proc.repeated<FEAT> (0, 0);
|
||||
count = proc.repeated<FEAT> (0, 0);
|
||||
while(count > 0)
|
||||
{
|
||||
m_arFEAT.insert(m_arFEAT.begin(), elements_.back());
|
||||
@ -240,6 +243,8 @@ const bool MacroSheetSubstream::loadContent(BinProcessor& proc)
|
||||
}
|
||||
proc.mandatory<EOF_T>();
|
||||
|
||||
LoadHFPicture();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user