Skip to content

Commit

Permalink
Fix bug #72667
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyakovKirill authored and K0R0L committed Jan 28, 2025
1 parent ab660cb commit 3c850e2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions HtmlFile2/htmlfile2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ class CTable
if (NULL == pCell)
continue;

pCell->SetColspan(unMaxIndex , MAXCOLUMNSINTABLE);
pCell->SetColspan(unMaxIndex, MAXCOLUMNSINTABLE);
continue;
}

Expand All @@ -1208,9 +1208,9 @@ class CTable
if (NULL == pCell)
continue;

if (1 < pCell->GetColspan() && unIndex + pCell->GetColspan() > m_arMinColspan[unIndex])
if (1 < pCell->GetColspan() && pCell->GetColspan() > m_arMinColspan[unIndex])
{
pCell->SetColspan(m_arMinColspan[unIndex] - unIndex, MAXCOLUMNSINTABLE);
pCell->SetColspan(m_arMinColspan[unIndex], MAXCOLUMNSINTABLE);
continue;
}

Expand Down Expand Up @@ -1746,6 +1746,15 @@ class CHtmlFile2_Private
oRelsWriter.CloseFile();
}

for (const std::pair<std::wstring, std::wstring>& oFootnote : m_mFootnotes)
{
m_oNoteXml.WriteString(L"<w:footnote w:id=\"");
m_oNoteXml.WriteString(oFootnote.second);
m_oNoteXml.WriteString(L"\"><w:p><w:pPr><w:pStyle w:val=\"footnote-p\"/></w:pPr><w:r><w:rPr><w:rStyle w:val=\"footnote\"/></w:rPr></w:r><w:r><w:t xml:space=\"preserve\">");
m_oNoteXml.WriteEncodeXmlString(oFootnote.first);
m_oNoteXml.WriteString(L"</w:t></w:r></w:p></w:footnote>");
}

m_oNoteXmlRels.WriteString(L"</Relationships>");
if (oRelsWriter.CreateFileW(m_sDst + L"/word/_rels/footnotes.xml.rels"))
{
Expand Down

0 comments on commit 3c850e2

Please sign in to comment.