Commit bfbdc714 authored by konovalovsergey's avatar konovalovsergey

open/save RowBandSize, ColBandSize

parent 0890776e
......@@ -2267,13 +2267,15 @@ public:
CString Shd;
CString tblpPr;
CString Style;
CString RowBandSize;
CString ColBandSize;
CString Look;
CString Layout;
CString tblPrChange;
CString TableCellSpacing;
bool IsEmpty()
{
return Jc.IsEmpty() && TableInd.IsEmpty() && TableW.IsEmpty() && TableCellMar.IsEmpty() && TableBorders.IsEmpty() && Shd.IsEmpty() && tblpPr.IsEmpty()&& Style.IsEmpty() && Look.IsEmpty() && tblPrChange.IsEmpty() && TableCellSpacing.IsEmpty();
return Jc.IsEmpty() && TableInd.IsEmpty() && TableW.IsEmpty() && TableCellMar.IsEmpty() && TableBorders.IsEmpty() && Shd.IsEmpty() && tblpPr.IsEmpty()&& Style.IsEmpty() && Look.IsEmpty() && tblPrChange.IsEmpty() && TableCellSpacing.IsEmpty() && RowBandSize.IsEmpty() && ColBandSize.IsEmpty();
}
CString Write(bool bBandSize, bool bLayout)
{
......@@ -2283,8 +2285,10 @@ public:
sRes.Append(Style);
if(false == tblpPr.IsEmpty())
sRes.Append(tblpPr);
if(bBandSize)
sRes.Append(_T("<w:tblStyleRowBandSize w:val=\"1\"/><w:tblStyleColBandSize w:val=\"1\"/>"));
if(!RowBandSize.IsEmpty())
sRes.Append(RowBandSize);
if(!ColBandSize.IsEmpty())
sRes.Append(ColBandSize);
if(false == TableW.IsEmpty())
sRes.Append(TableW);
if(false == Jc.IsEmpty())
......
......@@ -1520,7 +1520,17 @@ public:
{
int res = c_oSerConstants::ReadOk;
CWiterTblPr* pWiterTblPr = static_cast<CWiterTblPr*>(poResult);
if( c_oSerProp_tblPrType::Jc == type )
if( c_oSerProp_tblPrType::RowBandSize == type )
{
long nRowBandSize = m_oBufferedStream.GetLong();
pWiterTblPr->RowBandSize.Format(_T("<w:tblStyleRowBandSize w:val=\"%d\"/>"), nRowBandSize);
}
else if( c_oSerProp_tblPrType::ColBandSize == type )
{
long nColBandSize = m_oBufferedStream.GetLong();
pWiterTblPr->ColBandSize.Format(_T("<w:tblStyleColBandSize w:val=\"%d\"/>"), nColBandSize);
}
else if( c_oSerProp_tblPrType::Jc == type )
{
BYTE jc = m_oBufferedStream.GetUChar();
switch(jc)
......
......@@ -249,7 +249,9 @@ extern int g_nCurFormatVersion;
tblpPr2 = 11,
Layout = 12,
tblPrChange = 13,
TableCellSpacing = 14
TableCellSpacing = 14,
RowBandSize = 15,
ColBandSize = 16
};}
namespace c_oSer_tblpPrType{enum c_oSer_tblpPrType
{
......
......@@ -1621,6 +1621,18 @@ namespace BinDocxRW
{
OOX::Logic::CTableProperty& tblPr = *p_tblPr;
int nCurPos = 0;
if(tblPr.m_oTblStyleRowBandSize.IsInit() && tblPr.m_oTblStyleRowBandSize->m_oVal.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::RowBandSize);
m_oBcw.m_oStream.WriteLONG(tblPr.m_oTblStyleRowBandSize->m_oVal->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
if(tblPr.m_oTblStyleColBandSize.IsInit() && tblPr.m_oTblStyleColBandSize->m_oVal.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerProp_tblPrType::ColBandSize);
m_oBcw.m_oStream.WriteLONG(tblPr.m_oTblStyleColBandSize->m_oVal->GetValue());
m_oBcw.WriteItemEnd(nCurPos);
}
//Jc
if(false != tblPr.m_oJc.IsInit() && tblPr.m_oJc->m_oVal.IsInit())
{
......
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