Insert()

MathParagraph::Insert(int32_t, System::SharedPtr<IMathBlock>) method

Inserts IMathBlock into the collection at the specified index.

void Aspose::Slides::MathText::MathParagraph::Insert(int32_t index, System::SharedPtr<IMathBlock> mathBlock) override

Arguments

ParameterTypeDescription
indexint32_tThe zero-based index at which an item should be inserted.
mathBlockSystem::SharedPtr<IMathBlock>The IMathBlock to insert.

Remarks

Example:

auto shape = slide->get_Shapes()->AddMathShape(x, y, width, height);
auto mathParagraph = (System::AsCast<MathPortion>(shape->get_TextFrame()->get_Paragraphs()->idx_get(0)->get_Portions()->idx_get(0)))->get_MathParagraph();
auto block = System::MakeObject<MathBlock>(System::MakeObject<MathematicalText>(u"y"));
mathParagraph->Insert(0, block);

See Also