Skip to content

Commit

Permalink
for bug #66401
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaSubbotina committed Feb 9, 2024
1 parent 5ccef7b commit 795274a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions MsBinaryFile/DocFile/CharacterPropertiesMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 795274a

Please sign in to comment.