IndexOf()
MathParagraph::IndexOf(System::SharedPtr<IMathBlock>) method
Determines the index of a specific IMathBlock in collection.
int32_t Aspose::Slides::MathText::MathParagraph::IndexOf(System::SharedPtr<IMathBlock> mathBlock) override
Arguments
Parameter | Type | Description |
---|---|---|
mathBlock | System::SharedPtr<IMathBlock> | The item to locate in the collection. |
Return Value
The index of mathBlock if found in the collection; otherwise, -1.
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->Add(block);
int32_t index = mathParagraph->IndexOf(block);
See Also
- Typedef SharedPtr
- Class IMathBlock
- Class MathParagraph
- Namespace Aspose::Slides::MathText
- Library Aspose.Slides