Hi Frank,

or simply add some code to SwTxtFld::Dtor that registers the note with the notes manager).

Does sth. like that in general make sense(except the c-casts) or am I on the wrong track here?

SwTxtFld::~SwTxtFld( )
{
   if (Which()==RES_TXTATR_FIELD)
   {
if ( ((SwFmtFld&)(GetAttr())).GetFld()->GetTyp()->Which()==RES_POSTITFLD)
       {
SwDocShell* aShell = static_cast<SwPostItFieldType*>(((SwFmtFld&)GetAttr()).GetFld()
                                           ->GetTyp())->GetDoc()->GetDocShell();
           if (aShell)
           {
               aShell->GetView()->GetPostItMgr()->Delete((SwFmtFld&)GetAttr());
           }
       }
   }
}

I get an assertion that there is no attribute, but where is it? Or in other words, how can I get my SwFmtFld? Do I need the check if it is really a RES_TXTATR_FIELD, or is this always the case?

Regards
Max



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to