Aspose::Words::Loading::LoadOptions::set_ConvertShapeToOfficeMath method
LoadOptions::set_ConvertShapeToOfficeMath method
Sets whether to convert shapes with EquationXML to Office Math objects.
void Aspose::Words::Loading::LoadOptions::set_ConvertShapeToOfficeMath(bool value)
Examples
Shows how to convert EquationXML shapes to Office Math objects.
auto loadOptions = System::MakeObject<Aspose::Words::Loading::LoadOptions>();
// Use this flag to specify whether to convert the shapes with EquationXML attributes
// to Office Math objects and then load the document.
loadOptions->set_ConvertShapeToOfficeMath(isConvertShapeToOfficeMath);
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Math shapes.docx", loadOptions);
if (isConvertShapeToOfficeMath)
{
ASSERT_EQ(doc->GetChildNodes(NodeType::Shape, true)->get_Count(), 16);
ASSERT_EQ(doc->GetChildNodes(NodeType::OfficeMath, true)->get_Count(), 34);
}
else
{
ASSERT_EQ(doc->GetChildNodes(NodeType::Shape, true)->get_Count(), 24);
ASSERT_EQ(doc->GetChildNodes(NodeType::OfficeMath, true)->get_Count(), 0);
}
See Also
- Class LoadOptions
- Namespace Aspose::Words::Loading
- Library Aspose.Words for C++