This commit is contained in:
ElenaSubbotina
2025-05-14 16:41:24 +03:00
parent 84de7e98be
commit 6b6118ffcc
2 changed files with 10 additions and 13 deletions

View File

@ -969,21 +969,18 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
}break;
case OOX::et_mc_alternateContent:
{
bool res = false;
OOX::Logic::CAlternateContent *ooxAlt = dynamic_cast<OOX::Logic::CAlternateContent* >(ooxItem);
if (!ooxAlt->m_arrChoiceItems.empty())
for (size_t i = 0; res == false && i < ooxAlt->m_arrFallbackItems.size(); i++)
{
for (size_t i = 0; i < ooxAlt->m_arrChoiceItems.size(); i++)
{
Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrChoiceItems[i]);
}
}
else
res = Parse(oParam, oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrFallbackItems[i]);
}
for (size_t i = 0; res == false && i < ooxAlt->m_arrChoiceItems.size(); i++)
{
for (size_t i = 0; i < ooxAlt->m_arrFallbackItems.size(); i++)
{
Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrFallbackItems[i]);
}
res = Parse(oParam, oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrChoiceItems[i]);
}
}break;
case OOX::et_w_sym:
{

View File

@ -1262,11 +1262,11 @@ bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
if ((oox_sp_style) && (oox_sp_style->fontRef.idx.IsInit()))
{
std::wstring font_name;
if (oox_sp_style->fontRef.idx->GetBYTECode() == 0)
if (oParam.oDocx->m_pTheme && oox_sp_style->fontRef.idx->GetBYTECode() == 0)
{
font_name = oParam.oDocx->m_pTheme->themeElements.fontScheme.majorFont.latin.typeface;
}
else if (oox_sp_style->fontRef.idx->GetBYTECode() == 1)
else if (oParam.oDocx->m_pTheme && oox_sp_style->fontRef.idx->GetBYTECode() == 1)
{
font_name = oParam.oDocx->m_pTheme->themeElements.fontScheme.minorFont.latin.typeface;
}