Aspose::Words::Lists::ListLevel::get_CustomNumberStyleFormat method
ListLevel::get_CustomNumberStyleFormat method
Gets or sets the custom number style format for this list level. For example: “a, ç, ĝ, …”.
System::String Aspose::Words::Lists::ListLevel::get_CustomNumberStyleFormat()
Examples
Shows how to get the format for a list with the custom number style.
auto doc = MakeObject<Document>(MyDir + u"List with leading zero.docx");
SharedPtr<ListLevel> listLevel = doc->get_FirstSection()->get_Body()->get_Paragraphs()->idx_get(0)->get_ListFormat()->get_ListLevel();
String customNumberStyleFormat = String::Empty;
if (listLevel->get_NumberStyle() == NumberStyle::Custom)
{
customNumberStyleFormat = listLevel->get_CustomNumberStyleFormat();
}
ASSERT_EQ(u"001, 002, 003, ...", customNumberStyleFormat);
// We can get value for the specified index of the list item.
ASSERT_EQ(u"iv", ListLevel::GetEffectiveValue(4, NumberStyle::LowercaseRoman, nullptr));
ASSERT_EQ(u"005", ListLevel::GetEffectiveValue(5, NumberStyle::Custom, customNumberStyleFormat));
See Also
- Class ListLevel
- Namespace Aspose::Words::Lists
- Library Aspose.Words for C++