- wxRichTextCharacterStyleDefinition* p = wxDynamicCast(sheet->GetCharacterStyle(i), wxRichTextCharacterStyleDefinition);
- if (p)
- m_basedOn->Append(p->GetName());
+ size_t i;
+ for (i = 0; i < sheet->GetListStyleCount(); i++)
+ {
+ wxRichTextListStyleDefinition* p = wxDynamicCast(sheet->GetListStyle(i), wxRichTextListStyleDefinition);
+ if (p)
+ m_basedOn->Append(p->GetName());
+ }
+ }
+ else if (paraDef)
+ {
+ size_t i;
+ for (i = 0; i < sheet->GetParagraphStyleCount(); i++)
+ {
+ wxRichTextParagraphStyleDefinition* p = wxDynamicCast(sheet->GetParagraphStyle(i), wxRichTextParagraphStyleDefinition);
+ if (p)
+ m_basedOn->Append(p->GetName());
+ }
+ }
+ else
+ {
+ size_t i;
+ for (i = 0; i < sheet->GetCharacterStyleCount(); i++)
+ {
+ wxRichTextCharacterStyleDefinition* p = wxDynamicCast(sheet->GetCharacterStyle(i), wxRichTextCharacterStyleDefinition);
+ if (p)
+ m_basedOn->Append(p->GetName());
+ }