Skip to content

Commit

Permalink
fix bug #73215
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaSubbotina committed Feb 13, 2025
1 parent dbdf4bd commit 5bc1c8d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion OdfFile/Writer/Converter/MathConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ namespace Oox2Odf
int base_font_size = current_font_size.empty() ? 12 : current_font_size.back();
std::wstring base_font_color;

if (odf_context()->is_child_text_context())
if (odf_context()->is_child_text_context() && odf_context()->drawing_context())
{
if (odf_context()->drawing_context()->get_text_properties())
{
Expand All @@ -187,6 +187,16 @@ namespace Oox2Odf
}
}
}
else
{
if (odf_context()->text_context()->get_text_properties())
{
if (odf_context()->text_context()->get_text_properties()->fo_color_)
{
base_font_color = odf_context()->drawing_context()->get_text_properties()->fo_color_->get_hex_value();
}
}
}
bool bStart = odf_context()->start_math(base_font_size, base_font_color);

for (size_t i = 0; i < oox_math->m_arrItems.size(); ++i)
Expand Down

0 comments on commit 5bc1c8d

Please sign in to comment.