This commit is contained in:
Elena.Subbotina
2024-02-09 16:15:17 +03:00
parent 5ccef7bdff
commit 795274a886

View File

@ -485,6 +485,36 @@ namespace DocFileFormat
}
}
}
if (_doc->nWordVersion > 0)
{
if (false == m_sAsciiFont.empty())
{
if (m_sEastAsiaFont.empty())
{
m_sEastAsiaFont = m_sAsciiFont;
XMLTools::XMLAttribute* eastAsia = new XMLTools::XMLAttribute(L"w:eastAsia");
eastAsia->SetValue(FormatUtils::XmlEncode(m_sEastAsiaFont));
rFonts->AppendAttribute(*eastAsia);
RELEASEOBJECT(eastAsia);
}
if (m_shAnsiFont.empty())
{
m_shAnsiFont = m_sAsciiFont;
XMLTools::XMLAttribute* ansi = new XMLTools::XMLAttribute(L"w:hAnsi");
ansi->SetValue(FormatUtils::XmlEncode(m_shAnsiFont));
rFonts->AppendAttribute(*ansi);
RELEASEOBJECT(ansi);
}
if (m_sCsFont.empty())
{
m_sCsFont = m_sAsciiFont;
XMLTools::XMLAttribute* cs = new XMLTools::XMLAttribute(L"w:cs");
cs->SetValue(FormatUtils::XmlEncode(m_sCsFont, true));
rFonts->AppendAttribute(*cs);
RELEASEOBJECT(cs);
}
}
}
if ( lang->GetAttributeCount() > 0 )
{
parent->AppendChild( *lang );