InsetText::~InsetText()
{
+ // delete all instances of LyXText before deleting the paragraps used
+ // by it.
for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
delete (*cit).second;
LyXParagraph * p = par->next;
void InsetText::clear()
{
+ // delete all instances of LyXText before deleting the paragraps used
+ // by it.
+ for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ delete (*cit).second;
LyXParagraph * p = par->next;
delete par;
while(p) {
#endif
LyXFont font(LyXFont::ALL_INHERIT);
+ // delete all instances of LyXText before deleting the paragraps used
+ // by it.
+ for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ delete (*cit).second;
+
LyXParagraph * p = par->next;
delete par;
while(p) {
void InsetText::SetParagraphData(LyXParagraph *p)
{
- LyXParagraph * np;
+ // delete all instances of LyXText before deleting the paragraps used
+ // by it.
+ for(Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ delete (*cit).second;
+ LyXParagraph * np;
if (par) {
np = par->next;
delete par;