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

(1.0.0.99) - XlsxSerializerCom.dll

Добавил чтение закрепленных областей

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53231 954022d7-b5bf-4e40-9824-e11837661b57
parent 9622aacb
...@@ -410,6 +410,65 @@ namespace OOX ...@@ -410,6 +410,65 @@ namespace OOX
nullable<SimpleTypes::COnOff<>> m_oZeroHeight; nullable<SimpleTypes::COnOff<>> m_oZeroHeight;
}; };
class CPane : public WritingElement
{
public:
WritingElementSpreadsheet_AdditionConstructors(CPane)
CPane()
{
}
virtual ~CPane()
{
}
public:
virtual CString toXML() const
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
if ( !oReader.IsEmptyNode() )
oReader.ReadTillEnd();
}
virtual EElementType getType () const
{
return et_Pane;
}
private:
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
//
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, _T("activePane") , m_oActivePane)
WritingElement_ReadAttributes_Read_if ( oReader, _T("state") , m_oState)
WritingElement_ReadAttributes_Read_if ( oReader, _T("topLeftCell") , m_oTopLeftCell)
WritingElement_ReadAttributes_Read_if ( oReader, _T("xSplit") , m_oXSplit)
WritingElement_ReadAttributes_Read_if ( oReader, _T("ySplit") , m_oYSplit)
WritingElement_ReadAttributes_End( oReader )
}
public:
nullable<CString> m_oActivePane;
nullable<CString> m_oState; // frozen - ; split - 2 ; frozenSplit - , ( , )
nullable<CString> m_oTopLeftCell;
nullable<SimpleTypes::CDouble> m_oXSplit;
nullable<SimpleTypes::CDouble> m_oYSplit;
};
//:
//<extLst>
//<pivotSelection>
//<selection>
class CSheetView : public WritingElement class CSheetView : public WritingElement
{ {
public: public:
...@@ -530,8 +589,17 @@ namespace OOX ...@@ -530,8 +589,17 @@ namespace OOX
{ {
ReadAttributes( oReader ); ReadAttributes( oReader );
if ( !oReader.IsEmptyNode() ) if (oReader.IsEmptyNode())
oReader.ReadTillEnd(); return;
int nCurDepth = oReader.GetDepth();
while (oReader.ReadNextSiblingNode(nCurDepth))
{
CWCharWrapper sName = oReader.GetName();
if (_T("pane") == sName)
m_oPane = oReader;
}
} }
virtual EElementType getType () const virtual EElementType getType () const
...@@ -570,6 +638,8 @@ namespace OOX ...@@ -570,6 +638,8 @@ namespace OOX
} }
public: public:
nullable<CPane> m_oPane;
nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oColorId; nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oColorId;
nullable<SimpleTypes::COnOff<>> m_oDefaultGridColor; nullable<SimpleTypes::COnOff<>> m_oDefaultGridColor;
nullable<SimpleTypes::COnOff<>> m_oRightToLeft; nullable<SimpleTypes::COnOff<>> m_oRightToLeft;
......
...@@ -714,7 +714,8 @@ namespace Spreadsheet ...@@ -714,7 +714,8 @@ namespace Spreadsheet
et_FormulaCF, et_FormulaCF,
et_IconSet, et_IconSet,
et_ConditionalFormatValueObject, et_ConditionalFormatValueObject,
et_SheetPr et_SheetPr,
et_Pane
}; };
class WritingElement class WritingElement
{ {
......
...@@ -674,7 +674,17 @@ namespace BinXlsxRW ...@@ -674,7 +674,17 @@ namespace BinXlsxRW
ZoomScale = 15, ZoomScale = 15,
ZoomScaleNormal = 16, ZoomScaleNormal = 16,
ZoomScalePageLayoutView = 17, ZoomScalePageLayoutView = 17,
ZoomScaleSheetLayoutView = 18 ZoomScaleSheetLayoutView = 18,
Pane = 19
};}
namespace c_oSer_Pane{enum c_oSer_Pane
{
ActivePane = 0,
State = 1,
TopLeftCell = 2,
XSplit = 3,
YSplit = 4
};} };}
namespace c_oSer_CellStyle{enum c_oSer_CellStyle namespace c_oSer_CellStyle{enum c_oSer_CellStyle
{ {
......
...@@ -2438,6 +2438,27 @@ namespace BinXlsxRW { ...@@ -2438,6 +2438,27 @@ namespace BinXlsxRW {
m_oBcw.m_oStream.WriteBool(oSheetView.m_oShowRowColHeaders->ToBool()); m_oBcw.m_oStream.WriteBool(oSheetView.m_oShowRowColHeaders->ToBool());
m_oBcw.WriteItemEnd(nCurPos); m_oBcw.WriteItemEnd(nCurPos);
} }
if (oSheetView.m_oPane.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSer_SheetView::Pane);
WritePane(oSheetView.m_oPane.get());
m_oBcw.WriteItemEnd(nCurPos);
}
}
void WritePane(const OOX::Spreadsheet::CPane& oPane)
{
int nCurPos = 0;
if (oPane.m_oState.IsInit())
{
m_oBcw.m_oStream.WriteByte(c_oSer_Pane::State);
m_oBcw.m_oStream.WriteString2(oPane.m_oState.get2());
}
if (oPane.m_oTopLeftCell.IsInit())
{
m_oBcw.m_oStream.WriteByte(c_oSer_Pane::TopLeftCell);
m_oBcw.m_oStream.WriteString2(oPane.m_oTopLeftCell.get2());
}
} }
void WriteSheetFormatPr(const OOX::Spreadsheet::CSheetFormatPr& oSheetFormatPr) void WriteSheetFormatPr(const OOX::Spreadsheet::CSheetFormatPr& oSheetFormatPr)
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//98 //99
#define INTVER 1,0,0,98 #define INTVER 1,0,0,99
#define STRVER "1,0,0,98\0" #define STRVER "1,0,0,99\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