mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Fix bug 65853
This commit is contained in:
@ -1551,65 +1551,27 @@ public:
|
|||||||
m_oTitleInfo.m_sKeywords = EncodeXmlString(sAtrContent);
|
m_oTitleInfo.m_sKeywords = EncodeXmlString(sAtrContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sName == L"h1")
|
else if (sName == L"h1" || sName == L"h2" || sName == L"h3" || sName == L"h4" || sName == L"h5" || sName == L"h6")
|
||||||
{
|
{
|
||||||
if (!m_bInTable)
|
bool bInH = false;
|
||||||
oXml.WriteString(L"<section><title><p>");
|
int nH = 0;
|
||||||
|
if (!m_bInTable && !m_bInP)
|
||||||
|
{
|
||||||
|
nH = stoi(sName.substr(1));
|
||||||
|
for (int i = 0; i < nH; ++i)
|
||||||
|
oXml.WriteString(L"<section>");
|
||||||
|
oXml.WriteString(L"<title><p>");
|
||||||
|
bInH = true;
|
||||||
m_bInP = true;
|
m_bInP = true;
|
||||||
readStream(oXml);
|
|
||||||
m_bInP = false;
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section>");
|
|
||||||
}
|
}
|
||||||
else if (sName == L"h2")
|
|
||||||
{
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"<section><section><title><p>");
|
|
||||||
m_bInP = true;
|
|
||||||
readStream(oXml);
|
readStream(oXml);
|
||||||
|
if (bInH)
|
||||||
|
{
|
||||||
|
oXml.WriteString(L"</p></title>");
|
||||||
|
for (int i = 0; i < nH; ++i)
|
||||||
|
oXml.WriteString(L"</section>");
|
||||||
m_bInP = false;
|
m_bInP = false;
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section></section>");
|
|
||||||
}
|
}
|
||||||
else if (sName == L"h3")
|
|
||||||
{
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"<section><section><section><title><p>");
|
|
||||||
m_bInP = true;
|
|
||||||
readStream(oXml);
|
|
||||||
m_bInP = false;
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section></section></section>");
|
|
||||||
}
|
|
||||||
else if (sName == L"h4")
|
|
||||||
{
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"<section><section><section><section><title><p>");
|
|
||||||
m_bInP = true;
|
|
||||||
readStream(oXml);
|
|
||||||
m_bInP = false;
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section></section></section></section>");
|
|
||||||
}
|
|
||||||
else if (sName == L"h5")
|
|
||||||
{
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"<section><section><section><section><section><title><p>");
|
|
||||||
m_bInP = true;
|
|
||||||
readStream(oXml);
|
|
||||||
m_bInP = false;
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section></section></section></section></section>");
|
|
||||||
}
|
|
||||||
else if (sName == L"h6")
|
|
||||||
{
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"<section><section><section><section><section><section><title><p>");
|
|
||||||
m_bInP = true;
|
|
||||||
readStream(oXml);
|
|
||||||
m_bInP = false;
|
|
||||||
if (!m_bInTable)
|
|
||||||
oXml.WriteString(L"</p></title></section></section></section></section></section></section>");
|
|
||||||
}
|
}
|
||||||
else if (sName == L"span")
|
else if (sName == L"span")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user