+ if(!status->m_line || status->m_line->GetNextLine() == NULL)
+ // reached end of list
+ return NULL;
+ }
+ export = new wxLayoutExportObject();
+ wxLayoutObjectType type;
+ if(status->m_iterator != NULLIT)
+ {
+ type = (** status->m_iterator).GetType();
+ if( mode == WXLO_EXPORT_AS_OBJECTS || ! WXLO_IS_TEXT(type)) // simple case
+ {
+ export->type = WXLO_EXPORT_OBJECT;
+ export->content.object = *status->m_iterator;
+ status->m_iterator++;
+ return export;
+ }
+ }
+ else
+ { // iterator == NULLIT
+ if(mode == WXLO_EXPORT_AS_OBJECTS)
+ {
+ export->type = WXLO_EXPORT_EMPTYLINE;
+ export->content.object = NULL; //empty line
+ status->m_line = status->m_line->GetNextLine();
+ if(status->m_line)
+ status->m_iterator = status->m_line->GetFirstObject();
+ return export;
+ }
+ else
+ type = WXLO_TYPE_TEXT;