This commit is contained in:
Elena Subbotina
2025-07-30 15:09:53 +03:00
parent f4489a3926
commit 5722599351
4 changed files with 21 additions and 19 deletions

View File

@ -2246,7 +2246,7 @@ int Binary_tblPrReader::Read_tblPr(BYTE type, long length, void* poResult)
{
std::wstring Name(m_oBufferedStream.GetString3(length));
Name = XmlUtils::EncodeXmlString(Name);
pWiterTblPr->Props += L"<w:tblStyle w:val=\"" + Name + L"\"/>";
pWiterTblPr->Style = L"<w:tblStyle w:val=\"" + Name + L"\"/>";
}
else if ( c_oSerProp_tblPrType::Look == type )
{

View File

@ -1253,13 +1253,14 @@ allowOverlap=\"1\">";
bool CWiterTblPr::IsEmpty()
{
return Props.empty() && tblPrChange.empty() && Caption.empty() && Description.empty();
return Style.empty() && Props.empty() && tblPrChange.empty() && Caption.empty() && Description.empty();
}
std::wstring CWiterTblPr::Write()
{
std::wstring sRes;
sRes += L"<w:tblPr>";
sRes += Style; // first
sRes += Props;
if (!Caption.empty())

View File

@ -447,6 +447,7 @@ public:
std::wstring Caption;
std::wstring Description;
std::wstring Style;
std::wstring Props;
bool IsEmpty();
std::wstring Write();

View File

@ -1140,27 +1140,27 @@ namespace OOX
{
std::wstring sResult = L"<w:tblPr>";
WritingElement_WriteNode_1( L"<w:bidiVisual ", m_oBidiVisual );
WritingElement_WriteNode_1( L"<w:jc ", m_oJc );
WritingElement_WriteNode_1( L"<w:shd ", m_oShade );
WritingElement_WriteNode_2( m_oTblBorders );
WritingElement_WriteNode_1( L"<w:tblCaption ", m_oTblCaption );
WritingElement_WriteNode_2( m_oTblCellMar );
WritingElement_WriteNode_1( L"<w:tblCellSpacing ", m_oTblCellSpacing );
WritingElement_WriteNode_1( L"<w:tblDescription ", m_oTblDescription );
WritingElement_WriteNode_1( L"<w:tblInd ", m_oTblInd );
WritingElement_WriteNode_1( L"<w:tblLayout ", m_oTblLayout );
WritingElement_WriteNode_1( L"<w:tblLook ", m_oTblLook );
WritingElement_WriteNode_1( L"<w:tblOverlap ", m_oTblOverlap );
WritingElement_WriteNode_1( L"<w:tblpPr ", m_oTblpPr );
WritingElement_WriteNode_1(L"<w:tblStyle ", m_oTblStyle);
WritingElement_WriteNode_1(L"<w:bidiVisual ", m_oBidiVisual);
WritingElement_WriteNode_1(L"<w:jc ", m_oJc);
WritingElement_WriteNode_1(L"<w:shd ", m_oShade);
WritingElement_WriteNode_2(m_oTblBorders);
WritingElement_WriteNode_1(L"<w:tblCaption ", m_oTblCaption);
WritingElement_WriteNode_2(m_oTblCellMar);
WritingElement_WriteNode_1(L"<w:tblCellSpacing ", m_oTblCellSpacing);
WritingElement_WriteNode_1(L"<w:tblDescription ", m_oTblDescription);
WritingElement_WriteNode_1(L"<w:tblInd ", m_oTblInd);
WritingElement_WriteNode_1(L"<w:tblLayout ", m_oTblLayout);
WritingElement_WriteNode_1(L"<w:tblLook ", m_oTblLook);
WritingElement_WriteNode_1(L"<w:tblOverlap ", m_oTblOverlap);
WritingElement_WriteNode_1(L"<w:tblpPr ", m_oTblpPr);
if ( !m_bTblPrChange )
WritingElement_WriteNode_2( m_oTblPrChange );
WritingElement_WriteNode_1( L"<w:tblStyle ", m_oTblStyle );
WritingElement_WriteNode_1( L"<w:tblStyleColBandSize ", m_oTblStyleColBandSize );
WritingElement_WriteNode_1( L"<w:tblStyleRowBandSize ", m_oTblStyleRowBandSize );
WritingElement_WriteNode_1( L"<w:tblW ", m_oTblW );
WritingElement_WriteNode_1(L"<w:tblStyleColBandSize ", m_oTblStyleColBandSize);
WritingElement_WriteNode_1(L"<w:tblStyleRowBandSize ", m_oTblStyleRowBandSize);
WritingElement_WriteNode_1(L"<w:tblW ", m_oTblW);
sResult += L"</w:tblPr>";