This commit is contained in:
Kirill Polyakov
2026-02-17 01:51:21 +03:00
parent 0f920531ac
commit 5a662b3567
4 changed files with 10 additions and 6 deletions

View File

@ -1100,9 +1100,6 @@ bool CHTMLReader::ReadTable(std::vector<NSCSS::CNode>& arSelectors)
oTable.SetAlign(pStyle->m_oDisplay.GetHAlign().ToWString());
//------
if (!m_mTags[HTML_TAG(TABLE)]->Open(arSelectors, &oTable))
return false;
int nDeath = m_oLightReader.GetDepth();
while(m_oLightReader.ReadNextSiblingNode(nDeath))
{
@ -1149,7 +1146,10 @@ bool CHTMLReader::ReadTable(std::vector<NSCSS::CNode>& arSelectors)
m_mTags[HTML_TAG(TD)]->Open(arSelectors, boost::tuple<const CStorageTableCell&, const CStorageTable&, UINT, ERowParseMode, ERowPosition>(*arCells[unCol], oTable, unCol, parse_mode, eRowPosition));\
\
if (0 != arCells[unCol]->GetData()->GetCurSize())\
{\
WriteToStringBuilder(*(arCells[unCol]->GetData()), *(m_pWriter->GetCurrentDocument()));\
arCells[unCol]->GetData()->Clear();\
}\
else\
m_pWriter->WriteEmptyParagraph();\
\
@ -1159,6 +1159,9 @@ bool CHTMLReader::ReadTable(std::vector<NSCSS::CNode>& arSelectors)
m_mTags[HTML_TAG(TR)]->Close(arSelectors);\
}}
if (!m_mTags[HTML_TAG(TABLE)]->Open(arSelectors, &oTable))
return false;
if (!oTable.HaveHeader())
{
if (m_mTags[HTML_TAG(TR)]->Open(arSelectors, boost::tuple<const TTableRowStyle*, const CStorageTable&, ERowParseMode, ERowPosition>(nullptr, oTable, ERowParseMode::Header, ERowPosition::First)))