This commit is contained in:
ElenaSubbotina
2025-01-22 12:08:39 +03:00
parent 4085ee5002
commit 66ea88bf14

View File

@ -180,7 +180,25 @@ namespace Oox2Odf
convert(oox_math->m_arrItems[i]);
}
StarMath::COOXml2Odf starMathConverter;
starMathConverter.StartConversion(oox_math);
std::wstring annotation_text = starMathConverter.GetAnnotation();
if (false == annotation_text.empty())
{
CREATE_MATH_TAG(L"annotation");
typedef odf_writer::math_annotation* T;
T tmp = dynamic_cast<T>(elm.get());
if (tmp)
{
tmp->encoding_ = L"StarMath 5.0";
}
elm->add_text(annotation_text);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
}
if (bStart) odf_context()->end_math();
}
@ -220,26 +238,7 @@ namespace Oox2Odf
{
convert(oox_math_para->m_arrItems[i]);
}
// перенести в OMath
StarMath::COOXml2Odf starMathConverter;
starMathConverter.StartConversion(oox_math_para);
std::wstring annotation_text = starMathConverter.GetAnnotation();
if (false == annotation_text.empty())
{
CREATE_MATH_TAG(L"annotation");
typedef odf_writer::math_annotation* T;
T tmp = dynamic_cast<T>(elm.get());
if (tmp)
{
tmp->encoding_ = L"StarMath 5.0";
}
elm->add_text(annotation_text);
OPEN_MATH_TAG(elm);
CLOSE_MATH_TAG;
}
if (bStart)
odf_context()->end_math();
}