mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 04:36:10 +08:00
[x2t] Add OutlineLevelCol, OutlineLevelRow to Editor.bin
This commit is contained in:
@ -301,7 +301,8 @@ namespace BinXlsxRW
|
||||
Style = 4,
|
||||
Width = 5,
|
||||
CustomWidth = 6,
|
||||
OutLevel = 7
|
||||
OutLevel = 7,
|
||||
Collapsed = 8
|
||||
};}
|
||||
namespace c_oSerHyperlinkTypes{enum c_oSerWorksheetColTypes
|
||||
{
|
||||
@ -317,7 +318,9 @@ namespace BinXlsxRW
|
||||
DefaultRowHeight = 1,
|
||||
BaseColWidth = 2,
|
||||
CustomHeight = 3,
|
||||
ZeroHeight = 4
|
||||
ZeroHeight = 4,
|
||||
OutlineLevelCol = 5,
|
||||
OutlineLevelRow = 6
|
||||
};}
|
||||
namespace c_oSerRowTypes{enum c_oSerRowTypes
|
||||
{
|
||||
@ -328,7 +331,8 @@ namespace BinXlsxRW
|
||||
Cells = 4,
|
||||
Cell = 5,
|
||||
CustomHeight = 6,
|
||||
OutLevel = 7
|
||||
OutLevel = 7,
|
||||
Collapsed = 8
|
||||
};}
|
||||
namespace c_oSerCellTypes{enum c_oSerCellTypes
|
||||
{
|
||||
|
||||
@ -2478,6 +2478,12 @@ void BinaryWorksheetTableWriter::WriteCol(const OOX::Spreadsheet::CCol& oCol)
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(oCol.m_oOutlineLevel->GetValue());
|
||||
}
|
||||
if(oCol.m_oCollapsed.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerWorksheetColTypes::Collapsed);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBOOL(oCol.m_oCollapsed->ToBool());
|
||||
}
|
||||
}
|
||||
|
||||
void BinaryWorksheetTableWriter::WriteSheetViews(const OOX::Spreadsheet::CSheetViews& oSheetViews)
|
||||
@ -2726,6 +2732,20 @@ void BinaryWorksheetTableWriter::WriteSheetFormatPr(const OOX::Spreadsheet::CShe
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oSheetFormatPr.m_oZeroHeight->ToBool());
|
||||
}
|
||||
//OutlineLevelCol
|
||||
if(oSheetFormatPr.m_oOutlineLevelCol.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSheetFormatPrTypes::OutlineLevelCol);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(oSheetFormatPr.m_oOutlineLevelCol->GetValue());
|
||||
}
|
||||
//OutlineLevelRow
|
||||
if(oSheetFormatPr.m_oOutlineLevelRow.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerSheetFormatPrTypes::OutlineLevelRow);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(oSheetFormatPr.m_oOutlineLevelRow->GetValue());
|
||||
}
|
||||
}
|
||||
void BinaryWorksheetTableWriter::WritePageMargins(const OOX::Spreadsheet::CPageMargins& oPageMargins)
|
||||
{
|
||||
@ -2939,6 +2959,12 @@ void BinaryWorksheetTableWriter::WriteRow(const OOX::Spreadsheet::CRow& oRows)
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Long);
|
||||
m_oBcw.m_oStream.WriteLONG(oRows.m_oOutlineLevel->GetValue());
|
||||
}
|
||||
if(oRows.m_oCollapsed.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerRowTypes::Collapsed);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBOOL(oRows.m_oCollapsed->ToBool());
|
||||
}
|
||||
if(oRows.m_arrItems.size() > 0)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerRowTypes::Cells);
|
||||
|
||||
@ -3033,6 +3033,11 @@ int BinaryWorksheetsTableReader::ReadWorksheetCol(BYTE type, long length, void*
|
||||
pCol->m_oOutlineLevel.Init();
|
||||
pCol->m_oOutlineLevel->SetValue( m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if(c_oSerWorksheetColTypes::Collapsed == type)
|
||||
{
|
||||
pCol->m_oCollapsed.Init();
|
||||
pCol->m_oCollapsed->FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -3318,6 +3323,16 @@ int BinaryWorksheetsTableReader::ReadSheetFormatPr(BYTE type, long length, void*
|
||||
pSheetFormatPr->m_oZeroHeight.Init();
|
||||
pSheetFormatPr->m_oZeroHeight->FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else if (c_oSerSheetFormatPrTypes::OutlineLevelCol == type)
|
||||
{
|
||||
pSheetFormatPr->m_oOutlineLevelCol.Init();
|
||||
pSheetFormatPr->m_oOutlineLevelCol->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if (c_oSerSheetFormatPrTypes::OutlineLevelRow == type)
|
||||
{
|
||||
pSheetFormatPr->m_oOutlineLevelRow.Init();
|
||||
pSheetFormatPr->m_oOutlineLevelRow->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -4064,6 +4079,11 @@ int BinaryWorksheetsTableReader::ReadRow(BYTE type, long length, void* poResult)
|
||||
pRow->m_oOutlineLevel.Init();
|
||||
pRow->m_oOutlineLevel->SetValue(m_oBufferedStream.GetLong());
|
||||
}
|
||||
else if(c_oSerRowTypes::Collapsed == type)
|
||||
{
|
||||
pRow->m_oCollapsed.Init();
|
||||
pRow->m_oCollapsed->FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else if(c_oSerRowTypes::Cells == type)
|
||||
{
|
||||
if (NULL == m_oSaveParams.pCSVWriter)
|
||||
|
||||
Reference in New Issue
Block a user