#endif
#ifndef WXPRECOMP
-#include "wx/wx.h"
+ #include "wx/intl.h"
+ #include "wx/dc.h"
#endif
#include "wx/html/htmldefs.h"
char temp[wxHTML_BUFLEN];
register char d;
int templen = 0;
-
+
if (m_tmpLastWasSpace)
{
- while ((i < lng) && ((txt[i] == '\n') || (txt[i] == '\r') || (txt[i] == ' ') || (txt[i] == '\t'))) i++;
+ while ((i < lng) &&
+ ((txt[i] == '\n') || (txt[i] == '\r') || (txt[i] == ' ') ||
+ (txt[i] == '\t'))) i++;
}
while (i < lng)
if ((d == '\n') || (d == '\r') || (d == ' ') || (d == '\t'))
{
i++, x++;
- while ((i < lng) && ((txt[i] == '\n') || (txt[i] == '\r') || (txt[i] == ' ') || (txt[i] == '\t'))) i++, x++;
+ while ((i < lng) && ((txt[i] == '\n') || (txt[i] == '\r') ||
+ (txt[i] == ' ') || (txt[i] == '\t'))) i++, x++;
}
else i++;
temp[templen-1] = ' ';
temp[templen] = 0;
templen = 0;
- if (m_EncConv) m_EncConv->Convert(temp);
- c = new wxHtmlWordCell(temp, *(GetDC()));
- if (m_UseLink) c->SetLink(m_Link);
+ if (m_EncConv)
+ m_EncConv->Convert(temp);
+ c = new wxHtmlWordCell(GetEntitiesParser()->Parse(temp), *(GetDC()));
+ if (m_UseLink)
+ c->SetLink(m_Link);
m_Container->InsertCell(c);
m_tmpLastWasSpace = TRUE;
}
if (templen)
{
temp[templen] = 0;
- if (m_EncConv) m_EncConv->Convert(temp);
- c = new wxHtmlWordCell(temp, *(GetDC()));
- if (m_UseLink) c->SetLink(m_Link);
+ if (m_EncConv)
+ m_EncConv->Convert(temp);
+ c = new wxHtmlWordCell(GetEntitiesParser()->Parse(temp), *(GetDC()));
+ if (m_UseLink)
+ c->SetLink(m_Link);
m_Container->InsertCell(c);
m_tmpLastWasSpace = FALSE;
}
*faceptr = face;
*encptr = m_OutputEnc;
*fontptr = new wxFont(
- m_FontsSizes[fs] * m_PixelScale,
+ (int) (m_FontsSizes[fs] * m_PixelScale),
ff ? wxMODERN : wxSWISS,
fi ? wxITALIC : wxNORMAL,
fb ? wxBOLD : wxNORMAL,
void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc)
{
m_InputEnc = m_OutputEnc = wxFONTENCODING_DEFAULT;
- if (m_EncConv) {delete m_EncConv; m_EncConv = NULL;}
+ if (m_EncConv)
+ {
+ delete m_EncConv;
+ m_EncConv = NULL;
+ }
if (enc == wxFONTENCODING_DEFAULT) return;
m_OutputEnc = wxFONTENCODING_DEFAULT;
m_InputEnc = enc;
+ if (m_OutputEnc == wxFONTENCODING_DEFAULT)
+ GetEntitiesParser()->SetEncoding(wxFONTENCODING_SYSTEM);
+ else
+ GetEntitiesParser()->SetEncoding(m_OutputEnc);
if (m_InputEnc == m_OutputEnc) return;