Commit 3dcdcbdb authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander Trofimov

(1.0.0.109): XlsxSerializerCom

Добавил чтение из бинарника информации о закрепленной панели.
Добавил запись в xlsx данных о закрепленной панели.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55254 954022d7-b5bf-4e40-9824-e11837661b57
parent 296c5441
......@@ -428,6 +428,28 @@ namespace OOX
}
virtual void toXML(CStringWriter& writer) const
{
writer.WriteStringC(_T("<pane"));
if (m_oState.IsInit())
{
CString sVal; sVal.Format(_T(" state=\"%s\""), m_oState.get());
writer.WriteStringC(sVal);
}
if (m_oTopLeftCell.IsInit())
{
CString sVal; sVal.Format(_T(" topLeftCell=\"%s\""), m_oTopLeftCell.get());
writer.WriteStringC(sVal);
}
if (m_oXSplit.IsInit())
{
CString sVal; sVal.Format(_T(" xSplit=\"%s\""), SpreadsheetCommon::WriteDouble(m_oXSplit->GetValue()));
writer.WriteStringC(sVal);
}
if (m_oYSplit.IsInit())
{
CString sVal; sVal.Format(_T(" ySplit=\"%s\""), SpreadsheetCommon::WriteDouble(m_oYSplit->GetValue()));
writer.WriteStringC(sVal);
}
writer.WriteStringC(_T("/>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -583,7 +605,12 @@ namespace OOX
CString sVal; sVal.Format(_T(" zoomScaleSheetLayoutView=\"%d\""), m_oZoomScaleSheetLayoutView->GetValue());
writer.WriteStringC(sVal);
}
writer.WriteStringC(_T("/>"));
writer.WriteStringC(_T(">"));
if (m_oPane.IsInit())
m_oPane->toXML(writer);
writer.WriteStringC(_T("</sheetView>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -2746,6 +2746,39 @@ namespace BinXlsxRW {
pSheetView->m_oShowRowColHeaders.Init();
pSheetView->m_oShowRowColHeaders->SetValue(false != m_oBufferedStream.ReadBool() ? SimpleTypes::onoffTrue : SimpleTypes::onoffFalse);
}
else if (c_oSer_SheetView::Pane == type)
{
pSheetView->m_oPane.Init();
res = Read1(length, &BinaryWorksheetsTableReader::ReadPane, this, pSheetView->m_oPane.GetPointer());
}
else
res = c_oSerConstants::ReadUnknown;
return res;
}
int ReadPane(BYTE type, long length, void* poResult)
{
OOX::Spreadsheet::CPane* pPane = static_cast<OOX::Spreadsheet::CPane*>(poResult);
int res = c_oSerConstants::ReadOk;
if(c_oSer_Pane::State == type)
{
pPane->m_oState.Init();
pPane->m_oState->Append(m_oBufferedStream.ReadString2(length));
}
else if(c_oSer_Pane::TopLeftCell == type)
{
pPane->m_oTopLeftCell.Init();
pPane->m_oTopLeftCell->Append(m_oBufferedStream.ReadString2(length));
}
else if(c_oSer_Pane::XSplit == type)
{
pPane->m_oXSplit.Init();
pPane->m_oXSplit->SetValue(m_oBufferedStream.ReadDouble());
}
else if(c_oSer_Pane::YSplit == type)
{
pPane->m_oYSplit.Init();
pPane->m_oYSplit->SetValue(m_oBufferedStream.ReadDouble());
}
else
res = c_oSerConstants::ReadUnknown;
return res;
......
......@@ -2,6 +2,6 @@
//1
//0
//0
//108
#define INTVER 1,0,0,108
#define STRVER "1,0,0,108\0"
//109
#define INTVER 1,0,0,109
#define STRVER "1,0,0,109\0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment