# pragma implementation "wxlparser.h"
#endif
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
# pragma hdrstop
static
wxString wxLayoutExportCmdAsHTML(wxLayoutObjectCmd const & cmd,
- wxLayoutStyleInfo *styleInfo)
+ wxLayoutStyleInfo *styleInfo,
+ bool firstTime)
{
static char buffer[20];
wxString html;
html +=">";
- if(styleInfo != NULL)
+ if(styleInfo != NULL && ! firstTime)
html ="</font>"+html; // terminate any previous font command
if((si->weight == wxBOLD) && ( (!styleInfo) || (styleInfo->weight != wxBOLD)))
m_si = list->GetDefaultStyleInfo();
m_line = list->GetFirstLine();
m_iterator = m_line->GetFirstObject();
+ m_FirstTime = TRUE;
}
{
while(status->m_iterator == NULLIT)
{
- if(flags & WXLO_EXPORT_AS_HTML)
+ if(mode & WXLO_EXPORT_AS_HTML)
*str += "<br>";
if(flags & WXLO_EXPORT_WITH_CRLF)
*str += "\r\n";
break;
case WXLO_TYPE_CMD:
if(mode == WXLO_EXPORT_AS_HTML)
- *str += wxLayoutExportCmdAsHTML(*(wxLayoutObjectCmd const
- *)*status->m_iterator, & status->m_si);
+ *str += wxLayoutExportCmdAsHTML(
+ *(wxLayoutObjectCmd const *)*status->m_iterator,
+ & status->m_si, status->m_FirstTime);
+ status->m_FirstTime = FALSE;
break;
default: // ignore icons
;
}
status->m_iterator++;
}
-
exp->type = (mode == WXLO_EXPORT_AS_HTML)
? WXLO_EXPORT_HTML : WXLO_EXPORT_TEXT;
exp->content.text = str;