Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxDefaultCoord/wxNOT_FOUND, TRUE/true, FALSE/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-09-27 19:15:07 +00:00
parent 6953da0088
commit d1da887276
21 changed files with 271 additions and 271 deletions

View File

@ -122,7 +122,7 @@ wxChmTools::wxChmTools(const wxFileName &archive)
// strdup() [libmspack-20030726], which would cause crashes in
// Unicode build when mb_str() returns temporary buffer
m_chmFileNameANSI = strdup((const char*)m_chmFileName.mb_str(wxConvFile));
// Open the archive and store it in class:
if ( (chmh = chmd->open(chmd, (char*)m_chmFileNameANSI)) )
{
@ -204,7 +204,7 @@ bool wxChmTools::Contains(const wxString& pattern)
*
* Finds the next file descibed by a pattern in the archive, starting
* the file given by second parameter
*
*
* @param pattern The file-pattern to search for. May contain '*' and/or '?'
* @param startfrom The filename which the search should start after
* @returns The full pathname of the found file

View File

@ -38,7 +38,7 @@
#if wxUSE_HELP
#include "wx/tipwin.h"
#endif
#if wxUSE_LIBMSPACK
#include "wx/html/forcelnk.h"
@ -114,7 +114,7 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
#else
wxUnusedVar(show_wait_msg);
#endif
if (m_helpFrame)
if (m_helpFrame)
m_helpFrame->RefreshLists();
return retval;
}
@ -137,7 +137,7 @@ void wxHtmlHelpController::CreateHelpWindow()
if (m_Config == NULL)
{
m_Config = wxConfigBase::Get(FALSE);
m_Config = wxConfigBase::Get(false);
if (m_Config != NULL)
m_ConfigRoot = _T("wxWindows/wxHtmlHelpController");
}
@ -151,7 +151,7 @@ void wxHtmlHelpController::CreateHelpWindow()
m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle);
m_helpFrame->SetTitleFormat(m_titleFormat);
m_helpFrame->Show(TRUE);
m_helpFrame->Show(true);
}
void wxHtmlHelpController::ReadCustomization(wxConfigBase* cfg, const wxString& path)
@ -211,7 +211,7 @@ bool wxHtmlHelpController::Initialize(const wxString& file)
bool wxHtmlHelpController::LoadFile(const wxString& WXUNUSED(file))
{
// Don't reload the file or we'll have it appear again, presumably.
return TRUE;
return true;
}
bool wxHtmlHelpController::DisplaySection(int sectionNo)
@ -237,11 +237,11 @@ bool wxHtmlHelpController::DisplayTextPopup(const wxString& text, const wxPoint&
{
s_tipWindow = new wxTipWindow(wxTheApp->GetTopWindow(), text, 100, & s_tipWindow);
return TRUE;
return true;
}
#endif // wxUSE_TIPWINDOW
return FALSE;
return false;
}
void wxHtmlHelpController::SetFrameParameters(const wxString& title,
@ -261,7 +261,7 @@ wxFrame* wxHtmlHelpController::GetFrameParameters(wxSize *size,
bool *newFrameEachTime)
{
if (newFrameEachTime)
(* newFrameEachTime) = FALSE;
(* newFrameEachTime) = false;
if (size && m_helpFrame)
(* size) = m_helpFrame->GetSize();
if (pos && m_helpFrame)
@ -272,7 +272,7 @@ wxFrame* wxHtmlHelpController::GetFrameParameters(wxSize *size,
bool wxHtmlHelpController::Quit()
{
DestroyHelpWindow();
return TRUE;
return true;
}
// Make the help controller's frame 'modal' if
@ -281,8 +281,8 @@ void wxHtmlHelpController::AddGrabIfNeeded()
{
// So far, wxGTK only
#ifdef __WXGTK__
bool needGrab = FALSE;
bool needGrab = false;
// Check if there are any modal windows present,
// in which case we need to add a grab.
for ( wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
@ -293,7 +293,7 @@ void wxHtmlHelpController::AddGrabIfNeeded()
wxDialog *dialog = wxDynamicCast(win, wxDialog);
if (dialog && dialog->IsModal())
needGrab = TRUE;
needGrab = true;
}
if (needGrab && m_helpFrame)
@ -306,7 +306,7 @@ bool wxHtmlHelpController::Display(const wxString& x)
CreateHelpWindow();
bool success = m_helpFrame->Display(x);
AddGrabIfNeeded();
return success;
return success;
}
bool wxHtmlHelpController::Display(int id)

View File

@ -59,14 +59,14 @@ static const wxChar* ReadLine(const wxChar *line, wxChar *buf, size_t bufsize)
const wxChar *readptr = line;
while (*readptr != 0 && *readptr != _T('\r') && *readptr != _T('\n') &&
writeptr != endptr)
writeptr != endptr)
*(writeptr++) = *(readptr++);
*writeptr = 0;
while (*readptr == _T('\r') || *readptr == _T('\n'))
readptr++;
if (*readptr == 0)
return NULL;
else
else
return readptr;
}
@ -90,7 +90,7 @@ wxHtmlHelpIndexCompareFunc(wxHtmlHelpDataItem **a, wxHtmlHelpDataItem **b)
{
wxHtmlHelpDataItem *ia2 = ia;
wxHtmlHelpDataItem *ib2 = ib;
while (ia2->level > ib2->level)
{
ia2 = ia2->parent;
@ -99,7 +99,7 @@ wxHtmlHelpIndexCompareFunc(wxHtmlHelpDataItem **a, wxHtmlHelpDataItem **b)
{
ib2 = ib2->parent;
}
wxASSERT(ia2);
wxASSERT(ib2);
int res = wxHtmlHelpIndexCompareFunc(&ia2, &ib2);
@ -147,7 +147,7 @@ class HP_TagHandler : public wxHtmlTagHandler
int m_count;
wxHtmlHelpDataItem *m_parentItem;
wxHtmlBookRecord *m_book;
wxHtmlHelpDataItems *m_data;
public:
@ -157,7 +157,7 @@ class HP_TagHandler : public wxHtmlTagHandler
m_book = b;
m_name = m_page = wxEmptyString;
m_level = 0;
m_id = -1;
m_id = wxID_ANY;
m_count = 0;
m_parentItem = NULL;
}
@ -220,7 +220,7 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
item->id = m_id;
item->page = m_page;
item->name = m_name;
item->book = m_book;
m_data->Add(item);
m_count++;
@ -320,7 +320,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
{
wxLogError(_("Cannot open index file: %s"), indexfile.c_str());
}
return TRUE;
return true;
}
inline static void CacheWriteInt32(wxOutputStream *f, wxInt32 value)
@ -337,7 +337,7 @@ inline static wxInt32 CacheReadInt32(wxInputStream *f)
}
inline static void CacheWriteString(wxOutputStream *f, const wxString& str)
{
{
const wxWX2MBbuf mbstr = str.mb_str(wxConvUTF8);
size_t len = strlen((const char*)mbstr)+1;
CacheWriteInt32(f, len);
@ -366,12 +366,12 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
/* load header - version info : */
version = CacheReadInt32(f);
if (version != CURRENT_CACHED_BOOK_VERSION)
{
// NB: We can just silently return FALSE here and don't worry about
// NB: We can just silently return false here and don't worry about
// it anymore, because AddBookParam will load the MS project in
// absence of (properly versioned) .cached file and automatically
// absence of (properly versioned) .cached file and automatically
// create new .cached file immediately afterward.
return false;
}
@ -425,14 +425,14 @@ bool wxHtmlHelpData::SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f)
/* save contents : */
int len = m_contents.size();
for (cnt = 0, i = 0; i < len; i++)
for (cnt = 0, i = 0; i < len; i++)
if (m_contents[i].book == book && m_contents[i].level > 0)
cnt++;
CacheWriteInt32(f, cnt);
for (i = 0; i < len; i++)
{
if (m_contents[i].book != book || m_contents[i].level == 0)
if (m_contents[i].book != book || m_contents[i].level == 0)
continue;
CacheWriteInt32(f, m_contents[i].level);
CacheWriteInt32(f, m_contents[i].id);
@ -442,14 +442,14 @@ bool wxHtmlHelpData::SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f)
/* save index : */
len = m_index.size();
for (cnt = 0, i = 0; i < len; i++)
if (m_index[i].book == book && m_index[i].level > 0)
for (cnt = 0, i = 0; i < len; i++)
if (m_index[i].book == book && m_index[i].level > 0)
cnt++;
CacheWriteInt32(f, cnt);
for (i = 0; i < len; i++)
{
if (m_index[i].book != book || m_index[i].level == 0)
if (m_index[i].book != book || m_index[i].level == 0)
continue;
CacheWriteString(f, m_index[i].name);
CacheWriteString(f, m_index[i].page);
@ -518,7 +518,7 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
ContentsOld = m_contents.size();
if (!path.IsEmpty())
fsys.ChangePathTo(path, TRUE);
fsys.ChangePathTo(path, true);
size_t booksCnt = m_bookRecords.GetCount();
for (size_t i = 0; i < booksCnt; i++)
@ -528,7 +528,7 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
}
bookr = new wxHtmlBookRecord(bookfile.GetLocation(), fsys.GetPath(), title, deftopic);
wxHtmlHelpDataItem *bookitem = new wxHtmlHelpDataItem;
bookitem->level = 0;
bookitem->id = 0;
@ -633,7 +633,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
{
wxFileSystem fsys;
wxString s;
bool rt = FALSE;
bool rt = false;
#if wxUSE_LIBMSPACK
if (extension == wxT(".chm"))
@ -644,7 +644,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
while (!s.IsEmpty())
{
if (AddBook(s)) rt = TRUE;
if (AddBook(s)) rt = true;
s = fsys.FindNext();
}
@ -665,7 +665,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
if (fi == NULL)
{
wxLogError(_("Cannot open HTML help book: %s"), book.c_str());
return FALSE;
return false;
}
fsys.ChangePathTo(book);
@ -676,10 +676,10 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
tmp = filter.ReadFile(*fi);
lineptr = tmp.c_str();
do
do
{
lineptr = ReadLine(lineptr, linebuf, 300);
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
*ch = tolower(*ch);
@ -694,7 +694,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
if (wxStrstr(linebuf, _T("charset=")) == linebuf)
charset = linebuf + wxStrlen(_T("charset="));
} while (lineptr != NULL);
wxFontEncoding enc;
if (charset == wxEmptyString) enc = wxFONTENCODING_SYSTEM;
else enc = wxFontMapper::Get()->CharsetToEncoding(charset);
@ -778,7 +778,7 @@ wxString wxHtmlHelpData::FindPageById(int id)
#if WXWIN_COMPATIBILITY_2_4
wxHtmlContentsItem::wxHtmlContentsItem()
: m_Level(0), m_ID(-1), m_Name(NULL), m_Page(NULL), m_Book(NULL),
: m_Level(0), m_ID(wxID_ANY), m_Name(NULL), m_Page(NULL), m_Book(NULL),
m_autofree(false)
{
}
@ -987,7 +987,7 @@ bool wxHtmlSearchEngine::Scan(const wxFSFile& file)
int i, j;
int wrd = m_Keyword.Length();
bool found = FALSE;
bool found = false;
wxHtmlFilterHTML filter;
wxString tmp = filter.ReadFile(file);
int lng = tmp.length();
@ -997,7 +997,7 @@ bool wxHtmlSearchEngine::Scan(const wxFSFile& file)
tmp.LowerCase();
const wxChar *kwd = m_Keyword.c_str();
if (m_WholeWords)
{
for (i = 0; i < lng - wrd; i++)

View File

@ -159,12 +159,12 @@ void wxHtmlHelpFrame::UpdateMergedIndex()
size_t len = items.size();
wxHtmlHelpMergedIndexItem *history[128] = {NULL};
for (size_t i = 0; i < len; i++)
{
const wxHtmlHelpDataItem& item = items[i];
wxASSERT_MSG( item.level < 128, _T("nested index entries too deep") );
if (history[item.level] &&
history[item.level]->items[0]->name == item.name)
{
@ -180,10 +180,10 @@ void wxHtmlHelpFrame::UpdateMergedIndex()
mi->parent = (item.level == 0) ? NULL : history[item.level - 1];
history[item.level] = mi;
merged.Add(mi);
}
}
}
}
//---------------------------------------------------------------------------
// wxHtmlHelpFrame
@ -571,7 +571,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
wxHtmlHelpFrame::~wxHtmlHelpFrame()
{
delete m_mergedIndex;
// PopEventHandler(); // wxhtmlhelpcontroller (not any more!)
if (m_DataCreated)
delete m_Data;
@ -619,26 +619,26 @@ void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style)
toolBar->AddTool(wxID_HTML_PANEL, wpanelBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Show/hide navigation panel"));
toolBar->AddSeparator();
toolBar->AddTool(wxID_HTML_BACK, wbackBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Go back"));
toolBar->AddTool(wxID_HTML_FORWARD, wforwardBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Go forward"));
toolBar->AddSeparator();
toolBar->AddTool(wxID_HTML_UPNODE, wupnodeBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Go one level up in document hierarchy"));
toolBar->AddTool(wxID_HTML_UP, wupBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Previous page"));
toolBar->AddTool(wxID_HTML_DOWN, wdownBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Next page"));
if ((style & wxHF_PRINT) || (style & wxHF_OPEN_FILES))
@ -646,19 +646,19 @@ void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style)
if (style & wxHF_OPEN_FILES)
toolBar->AddTool(wxID_HTML_OPENFILE, wopenBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Open HTML document"));
#if wxUSE_PRINTING_ARCHITECTURE
if (style & wxHF_PRINT)
toolBar->AddTool(wxID_HTML_PRINT, wprintBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Print this page"));
#endif
toolBar->AddSeparator();
toolBar->AddTool(wxID_HTML_OPTIONS, woptionsBitmap, wxNullBitmap,
false, -1, -1, (wxObject *) NULL,
false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
_("Display options dialog"));
}
#endif //wxUSE_TOOLBAR
@ -909,7 +909,7 @@ bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword,
case wxHELP_SEARCH_INDEX:
{
wxHtmlHelpMergedIndexItem* it =
wxHtmlHelpMergedIndexItem* it =
(wxHtmlHelpMergedIndexItem*) m_IndexList->GetClientData(0);
if (it)
DisplayIndexItem(it);
@ -932,9 +932,9 @@ void wxHtmlHelpFrame::CreateContents()
WX_CLEAR_HASH_TABLE(*m_PagesHash);
delete m_PagesHash;
}
const wxHtmlHelpDataItems& contents = m_Data->GetContentsArray();
size_t cnt = contents.size();
m_PagesHash = new wxHashTable(wxKEY_STRING, 2 * cnt);
@ -1197,11 +1197,11 @@ public:
sizer->Add(new wxStaticText(this, wxID_ANY, _("Font size:")));
sizer->Add(NormalFont = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
wxSize(200, -1),
wxSize(200, wxDefaultCoord),
0, NULL, wxCB_DROPDOWN | wxCB_READONLY));
sizer->Add(FixedFont = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
wxSize(200, -1),
wxSize(200, wxDefaultCoord),
0, NULL, wxCB_DROPDOWN | wxCB_READONLY));
sizer->Add(FontSize = new wxSpinCtrl(this, wxID_ANY));
@ -1430,11 +1430,11 @@ void wxHtmlHelpFrame::OnToolbar(wxCommandEvent& event)
ha = (wxHtmlHelpHashData*) m_PagesHash->Get(m_HtmlWin->GetOpenedPage() + wxT("#") + an);
if (ha && ha->m_Index > 0)
{
int level =
int level =
m_Data->GetContentsArray()[ha->m_Index].level - 1;
int ind = ha->m_Index - 1;
const wxHtmlHelpDataItem *it =
const wxHtmlHelpDataItem *it =
&m_Data->GetContentsArray()[ind];
while (ind >= 0 && it->level != level)
{
@ -1612,7 +1612,7 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event)
void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event))
{
wxHtmlHelpMergedIndexItem *it = (wxHtmlHelpMergedIndexItem*)
wxHtmlHelpMergedIndexItem *it = (wxHtmlHelpMergedIndexItem*)
m_IndexList->GetClientData(m_IndexList->GetSelection());
if (it)
DisplayIndexItem(it);
@ -1660,7 +1660,7 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event)
wxHtmlHelpMergedIndexItem *parent = index[i].parent;
while (parent)
{
if (pos == 0 ||
if (pos == 0 ||
(index.Index(*(wxHtmlHelpMergedIndexItem*)m_IndexList->GetClientData(pos-1))) < index.Index(*parent))
{
m_IndexList->Insert(parent->name,

View File

@ -385,7 +385,7 @@ void wxHtmlWordCell::Draw(wxDC& dc, int x, int y,
#endif
bool drawSelectionAfterCell = false;
if ( info.GetState().GetSelectionState() == wxHTML_SEL_CHANGING )
{
// Selection changing, we must draw the word piecewise:
@ -716,7 +716,7 @@ void wxHtmlContainerCell::Layout(int w)
curLineWidth += cell->GetMaxTotalWidth();
cell = cell->GetNext();
// compute length of the next word that would be added:
nextWordWidth = 0;
if (cell)
@ -728,9 +728,9 @@ void wxHtmlContainerCell::Layout(int w)
nextCell = nextCell->GetNext();
} while (nextCell && !nextCell->IsLinebreakAllowed());
}
// force new line if occured:
if ((cell == NULL) ||
if ((cell == NULL) ||
(xpos + nextWordWidth > s_width && cell->IsLinebreakAllowed()))
{
if (xpos > MaxLineWidth) MaxLineWidth = xpos;
@ -799,7 +799,7 @@ void wxHtmlContainerCell::Layout(int w)
// first cell on line is not moved:
line->SetPos(line->GetPosX() + s_indent,
line->GetPosY() + ypos);
line = line->GetNext();
for ( int n = 0; line != cell; line = line->GetNext() )
{
@ -809,7 +809,7 @@ void wxHtmlContainerCell::Layout(int w)
// thus increasing our size
n++;
}
line->SetPos(line->GetPosX() + s_indent +
((n * step) / total),
line->GetPosY() + ypos);
@ -862,7 +862,7 @@ void wxHtmlContainerCell::Layout(int w)
if (curLineWidth > m_MaxTotalWidth)
m_MaxTotalWidth = curLineWidth;
m_MaxTotalWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight);
MaxLineWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight);
if (m_Width < MaxLineWidth) m_Width = MaxLineWidth;
@ -1086,10 +1086,10 @@ wxHtmlCell *wxHtmlContainerCell::FindCellByPos(wxCoord x, wxCoord y,
if ( cell->IsFormattingCell() )
continue;
int cellY = cell->GetPosY();
if (!( y < cellY || (y < cellY + cell->GetHeight() &&
if (!( y < cellY || (y < cellY + cell->GetHeight() &&
x < cell->GetPosX() + cell->GetWidth()) ))
continue;
c = cell->FindCellByPos(x - cell->GetPosX(), y - cellY, flags);
if (c) return c;
}
@ -1175,7 +1175,7 @@ static bool IsEmptyContainer(wxHtmlContainerCell *cell)
}
void wxHtmlContainerCell::RemoveExtraSpacing(bool top, bool bottom)
{
{
if ( top )
SetIndent(0, wxHTML_INDENT_TOP);
if ( bottom )
@ -1209,13 +1209,13 @@ void wxHtmlContainerCell::RemoveExtraSpacing(bool top, bool bottom)
}
}
}
if ( bottom )
{
wxArrayPtrVoid arr;
for ( c = m_Cells; c; c = c->GetNext() )
arr.Add((void*)c);
for ( int i = arr.GetCount() - 1; i >= 0; i--)
{
c = (wxHtmlCell*)arr[i];

View File

@ -77,7 +77,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterPlainText, wxHtmlFilter)
bool wxHtmlFilterPlainText::CanRead(const wxFSFile& WXUNUSED(file)) const
{
return TRUE;
return true;
}
@ -90,9 +90,9 @@ wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file) const
if (s == NULL) return wxEmptyString;
ReadString(doc, s, wxConvISO8859_1);
doc.Replace(wxT("&"), wxT("&amp;"), TRUE);
doc.Replace(wxT("<"), wxT("&lt;"), TRUE);
doc.Replace(wxT(">"), wxT("&gt;"), TRUE);
doc.Replace(wxT("&"), wxT("&amp;"), true);
doc.Replace(wxT("<"), wxT("&lt;"), true);
doc.Replace(wxT(">"), wxT("&gt;"), true);
doc2 = wxT("<HTML><BODY><PRE>\n") + doc + wxT("\n</PRE></BODY></HTML>");
return doc2;
}
@ -165,12 +165,12 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const
return wxEmptyString;
}
// NB: We convert input file to wchar_t here in Unicode mode, based on
// NB: We convert input file to wchar_t here in Unicode mode, based on
// either Content-Type header or <meta> tags. In ANSI mode, we don't
// do it as it is done by wxHtmlParser (for this reason, we add <meta>
// tag if we used Content-Type header).
#if wxUSE_UNICODE
int charsetPos;
int charsetPos;
if ((charsetPos = file.GetMimeType().Find(_T("; charset="))) != wxNOT_FOUND)
{
wxString charset = file.GetMimeType().Mid(charsetPos + 10);
@ -219,7 +219,7 @@ class wxHtmlFilterModule : public wxModule
{
wxHtmlWindow::AddFilter(new wxHtmlFilterHTML);
wxHtmlWindow::AddFilter(new wxHtmlFilterImage);
return TRUE;
return true;
}
virtual void OnExit() {}
};

View File

@ -119,7 +119,7 @@ wxObject* wxHtmlParser::Parse(const wxString& source)
void wxHtmlParser::InitParser(const wxString& source)
{
SetSource(source);
m_stopParsing = FALSE;
m_stopParsing = false;
}
void wxHtmlParser::DoneParser()
@ -204,7 +204,7 @@ void wxHtmlParser::CreateDOMSubTree(wxHtmlTag *cur,
// add another tag to the tree:
else if (i < end_pos-1 && m_Source.GetChar(i+1) != wxT('/'))
{
{
wxHtmlTag *chd;
if (cur)
chd = new wxHtmlTag(cur, m_Source,
@ -237,7 +237,7 @@ void wxHtmlParser::CreateDOMSubTree(wxHtmlTag *cur,
}
else
i = chd->GetBeginPos();
textBeginning = i;
}
@ -330,7 +330,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
void wxHtmlParser::AddTag(const wxHtmlTag& tag)
{
wxHtmlTagHandler *h;
bool inner = FALSE;
bool inner = false;
h = (wxHtmlTagHandler*) m_HandlersHash.Get(tag.GetName());
if (h)
@ -424,7 +424,7 @@ void wxHtmlParser::SetSourceAndSaveState(const wxString& src)
bool wxHtmlParser::RestoreState()
{
if (!m_SavedStates) return FALSE;
if (!m_SavedStates) return false;
DestroyDOMTree();
@ -438,7 +438,7 @@ bool wxHtmlParser::RestoreState()
m_Source = s->m_source;
delete s;
return TRUE;
return true;
}
//-----------------------------------------------------------------------------
@ -491,7 +491,7 @@ wxString wxHtmlEntitiesParser::Parse(const wxString& input)
const wxChar *c, *last;
const wxChar *in_str = input.c_str();
wxString output;
output.reserve(input.length());
for (c = in_str, last = in_str; *c != wxT('\0'); c++)
@ -501,11 +501,11 @@ wxString wxHtmlEntitiesParser::Parse(const wxString& input)
if (c - last > 0)
output.append(last, c - last);
if (++c == wxT('\0')) break;
wxString entity;
const wxChar *ent_s = c;
wxChar entity_char;
for (; (*c >= wxT('a') && *c <= wxT('z')) ||
(*c >= wxT('A') && *c <= wxT('Z')) ||
(*c >= wxT('0') && *c <= wxT('9')) ||
@ -857,11 +857,11 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity)
return GetCharForCode(code);
}
wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type),
wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type),
const wxString& url) const
{
return m_FS ? m_FS->OpenFile(url) : NULL;
}
@ -900,7 +900,7 @@ bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
if (tag.GetName() == _T("BODY"))
{
m_Parser->StopParsing();
return FALSE;
return false;
}
if (tag.HasParam(_T("HTTP-EQUIV")) &&
@ -914,7 +914,7 @@ bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
m_Parser->StopParsing();
}
}
return FALSE;
return false;
}

View File

@ -127,7 +127,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
++pos;
if (src[pos] == '<')
++pos;
// see if it matches
int match_pos = 0;
while (pos < lng && match_pos < tag_len && src[pos] != '>' && src[pos] != '<') {
@ -135,7 +135,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
// Unicode build
if ((wxChar)wxToupper(src[pos]) == tagBuffer[match_pos]) {
++match_pos;
}
}
else if (src[pos] == wxT(' ') || src[pos] == wxT('\n') ||
src[pos] == wxT('\r') || src[pos] == wxT('\t')) {
// need to skip over these

View File

@ -153,7 +153,7 @@ WX_DEFINE_LIST(wxHtmlProcessorList);
void wxHtmlWindow::Init()
{
m_tmpMouseMoved = FALSE;
m_tmpMouseMoved = false;
m_tmpLastLink = NULL;
m_tmpLastCell = NULL;
m_tmpCanDrawLocks = 0;
@ -168,7 +168,7 @@ void wxHtmlWindow::Init()
m_Parser = new wxHtmlWinParser(this);
m_Parser->SetFS(m_FS);
m_HistoryPos = -1;
m_HistoryOn = TRUE;
m_HistoryOn = true;
m_History = new wxHtmlHistoryArray;
m_Processors = NULL;
m_Style = 0;
@ -189,11 +189,11 @@ bool wxHtmlWindow::Create(wxWindow *parent, wxWindowID id,
if (!wxScrolledWindow::Create(parent, id, pos, size,
style | wxVSCROLL | wxHSCROLL,
name))
return FALSE;
return false;
m_Style = style;
SetPage(wxT("<html><body></body></html>"));
return TRUE;
return true;
}
@ -321,7 +321,7 @@ bool wxHtmlWindow::SetPage(const wxString& source)
CreateLayout();
if (m_tmpCanDrawLocks == 0)
Refresh();
return TRUE;
return true;
}
bool wxHtmlWindow::AppendToPage(const wxString& source)
@ -335,7 +335,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
wxFSFile *f;
bool rt_val;
bool needs_refresh = FALSE;
bool needs_refresh = false;
m_tmpCanDrawLocks++;
if (m_HistoryOn && (m_HistoryPos != -1))
@ -441,7 +441,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
delete f;
#if wxUSE_STATUSBAR
if (m_RelatedStatusBar != -1)
if (m_RelatedStatusBar != -1)
m_RelatedFrame->SetStatusText(_("Done"), m_RelatedStatusBar);
#endif // wxUSE_STATUSBAR
}
@ -490,7 +490,7 @@ bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
if (!c)
{
wxLogWarning(_("HTML anchor %s does not exist."), anchor.c_str());
return FALSE;
return false;
}
else
{
@ -499,7 +499,7 @@ bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
for (y = 0; c != NULL; c = c->GetParent()) y += c->GetPosY();
Scroll(-1, y / wxHTML_SCROLL_STEP);
m_OpenedAnchor = anchor;
return TRUE;
return true;
}
}
@ -613,7 +613,7 @@ bool wxHtmlWindow::HistoryBack()
{
wxString a, l;
if (m_HistoryPos < 1) return FALSE;
if (m_HistoryPos < 1) return false;
// store scroll position into history item:
int x, y;
@ -625,21 +625,21 @@ bool wxHtmlWindow::HistoryBack()
l = (*m_History)[m_HistoryPos].GetPage();
a = (*m_History)[m_HistoryPos].GetAnchor();
m_HistoryOn = FALSE;
m_HistoryOn = false;
m_tmpCanDrawLocks++;
if (a == wxEmptyString) LoadPage(l);
else LoadPage(l + wxT("#") + a);
m_HistoryOn = TRUE;
m_HistoryOn = true;
m_tmpCanDrawLocks--;
Scroll(0, (*m_History)[m_HistoryPos].GetPos());
Refresh();
return TRUE;
return true;
}
bool wxHtmlWindow::HistoryCanBack()
{
if (m_HistoryPos < 1) return FALSE;
return TRUE ;
if (m_HistoryPos < 1) return false;
return true ;
}
@ -647,30 +647,30 @@ bool wxHtmlWindow::HistoryForward()
{
wxString a, l;
if (m_HistoryPos == -1) return FALSE;
if (m_HistoryPos >= (int)m_History->GetCount() - 1)return FALSE;
if (m_HistoryPos == -1) return false;
if (m_HistoryPos >= (int)m_History->GetCount() - 1)return false;
m_OpenedPage = wxEmptyString; // this will disable adding new entry into history in LoadPage()
m_HistoryPos++;
l = (*m_History)[m_HistoryPos].GetPage();
a = (*m_History)[m_HistoryPos].GetAnchor();
m_HistoryOn = FALSE;
m_HistoryOn = false;
m_tmpCanDrawLocks++;
if (a == wxEmptyString) LoadPage(l);
else LoadPage(l + wxT("#") + a);
m_HistoryOn = TRUE;
m_HistoryOn = true;
m_tmpCanDrawLocks--;
Scroll(0, (*m_History)[m_HistoryPos].GetPos());
Refresh();
return TRUE;
return true;
}
bool wxHtmlWindow::HistoryCanForward()
{
if (m_HistoryPos == -1) return FALSE;
if (m_HistoryPos >= (int)m_History->GetCount() - 1)return FALSE;
return TRUE ;
if (m_HistoryPos == -1) return false;
if (m_HistoryPos >= (int)m_History->GetCount() - 1)return false;
return true ;
}
@ -881,8 +881,8 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
y * wxHTML_SCROLL_STEP + rect.GetTop(),
y * wxHTML_SCROLL_STEP + rect.GetBottom(),
rinfo);
//#define DEBUG_HTML_SELECTION
//#define DEBUG_HTML_SELECTION
#ifdef DEBUG_HTML_SELECTION
{
int xc, yc, x, y;
@ -890,11 +890,11 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
ScreenToClient(&xc, &yc);
CalcUnscrolledPosition(xc, yc, &x, &y);
wxHtmlCell *at = m_Cell->FindCellByPos(x, y);
wxHtmlCell *before =
wxHtmlCell *before =
m_Cell->FindCellByPos(x, y, wxHTML_FIND_NEAREST_BEFORE);
wxHtmlCell *after =
wxHtmlCell *after =
m_Cell->FindCellByPos(x, y, wxHTML_FIND_NEAREST_AFTER);
dcm.SetBrush(*wxTRANSPARENT_BRUSH);
dcm.SetPen(*wxBLACK_PEN);
if (at)
@ -910,7 +910,7 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
after->GetWidth()-4,after->GetHeight()-4);
}
#endif
dcm.SetDeviceOrigin(0,0);
dc.Blit(0, rect.GetTop(),
sz.x, rect.GetBottom() - rect.GetTop() + 1,
@ -1012,7 +1012,7 @@ void wxHtmlWindow::OnMouseUp(wxMouseEvent& event)
void wxHtmlWindow::OnInternalIdle()
{
wxWindow::OnInternalIdle();
if (m_tmpMouseMoved && (m_Cell != NULL))
{
#ifdef DEBUG_HTML_SELECTION
@ -1031,7 +1031,7 @@ void wxHtmlWindow::OnInternalIdle()
if ( !m_tmpSelFromCell )
m_tmpSelFromCell = m_Cell->FindCellByPos(
m_tmpSelFromPos.x,m_tmpSelFromPos.y);
// NB: a trick - we adjust selFromPos to be upper left or bottom
// right corner of the first cell of the selection depending
// on whether the mouse is moving to the right or to the left.
@ -1053,7 +1053,7 @@ void wxHtmlWindow::OnInternalIdle()
dirFromPos.y += m_tmpSelFromCell->GetHeight();
}
}
bool goingDown = dirFromPos.y < y ||
bool goingDown = dirFromPos.y < y ||
(dirFromPos.y == y && dirFromPos.x < x);
// determine selection span:
@ -1167,7 +1167,7 @@ void wxHtmlWindow::OnInternalIdle()
OnCellMouseHover(cell, x, y);
}
m_tmpMouseMoved = FALSE;
m_tmpMouseMoved = false;
}
}
@ -1374,18 +1374,18 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxHtmlWindow, wxScrolledWindow,"wx/html/htmlwin.h")
wxBEGIN_PROPERTIES_TABLE(wxHtmlWindow)
/*
TODO PROPERTIES
style , wxHW_SCROLLBAR_AUTO
borders , (dimension)
url , string
htmlcode , string
TODO PROPERTIES
style , wxHW_SCROLLBAR_AUTO
borders , (dimension)
url , string
htmlcode , string
*/
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxHtmlWindow)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_5( wxHtmlWindow , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
wxCONSTRUCTOR_5( wxHtmlWindow , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxHtmlWindow,wxScrolledWindow)
#endif
@ -1420,7 +1420,7 @@ class wxHtmlWinModule: public wxModule
DECLARE_DYNAMIC_CLASS(wxHtmlWinModule)
public:
wxHtmlWinModule() : wxModule() {}
bool OnInit() { return TRUE; }
bool OnInit() { return true; }
void OnExit() { wxHtmlWindow::CleanUpStatics(); }
};

View File

@ -163,7 +163,7 @@ wxHtmlPrintout::wxHtmlPrintout(const wxString& title) : wxPrintout(title)
m_Renderer = new wxHtmlDCRenderer;
m_RendererHdr = new wxHtmlDCRenderer;
m_NumPages = wxHTML_PRINT_MAX_PAGES;
m_Document = m_BasePath = wxEmptyString; m_BasePathIsDir = TRUE;
m_Document = m_BasePath = wxEmptyString; m_BasePathIsDir = true;
m_Headers[0] = m_Headers[1] = wxEmptyString;
m_Footers[0] = m_Footers[1] = wxEmptyString;
m_HeaderHeight = m_FooterHeight = 0;
@ -249,9 +249,9 @@ void wxHtmlPrintout::OnPreparePrinting()
bool wxHtmlPrintout::OnBeginDocument(int startPage, int endPage)
{
if (!wxPrintout::OnBeginDocument(startPage, endPage)) return FALSE;
if (!wxPrintout::OnBeginDocument(startPage, endPage)) return false;
return TRUE;
return true;
}
@ -262,9 +262,9 @@ bool wxHtmlPrintout::OnPrintPage(int page)
{
if (HasPage(page))
RenderPage(dc, page);
return TRUE;
return true;
}
else return FALSE;
else return false;
}
@ -296,7 +296,7 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
{
wxFileSystem fs;
wxFSFile *ff;
if (wxFileExists(htmlfile))
ff = fs.OpenFile(wxFileSystem::FileNameToURL(htmlfile));
else
@ -308,7 +308,7 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
return;
}
bool done = FALSE;
bool done = false;
wxHtmlFilterHTML defaultFilter;
wxString doc;
@ -319,7 +319,7 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
if (h->CanRead(*ff))
{
doc = h->ReadFile(*ff);
done = TRUE;
done = true;
break;
}
node = node->GetNext();
@ -327,8 +327,8 @@ void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile)
if (!done)
doc = defaultFilter.ReadFile(*ff);
SetHtmlText(doc, htmlfile, FALSE);
SetHtmlText(doc, htmlfile, false);
delete ff;
}
@ -374,7 +374,7 @@ void wxHtmlPrintout::CountPages()
{
pos = m_Renderer->Render((int)( ppmm_h * m_MarginLeft),
(int) (ppmm_v * (m_MarginTop + (m_HeaderHeight == 0 ? 0 : m_MarginSpace)) + m_HeaderHeight),
pos, TRUE, INT_MAX, m_PageBreaks, m_NumPages);
pos, true, INT_MAX, m_PageBreaks, m_NumPages);
m_PageBreaks[++m_NumPages] = pos;
} while (pos < m_Renderer->GetTotalHeight());
}
@ -410,7 +410,7 @@ void wxHtmlPrintout::RenderPage(wxDC *dc, int page)
m_Renderer->Render((int) (ppmm_h * m_MarginLeft),
(int) (ppmm_v * (m_MarginTop + (m_HeaderHeight == 0 ? 0 : m_MarginSpace)) + m_HeaderHeight),
m_PageBreaks[page-1], FALSE, m_PageBreaks[page]-m_PageBreaks[page-1]);
m_PageBreaks[page-1], false, m_PageBreaks[page]-m_PageBreaks[page-1]);
m_RendererHdr->SetDC(dc, (double)ppiPrinterY / (double)ppiScreenY);
if (m_Headers[page % 2] != wxEmptyString)
@ -485,7 +485,7 @@ wxHtmlEasyPrinting::wxHtmlEasyPrinting(const wxString& name, wxWindow *parentWin
m_PageSetupData = new wxPageSetupDialogData;
m_Headers[0] = m_Headers[1] = m_Footers[0] = m_Footers[1] = wxEmptyString;
m_PageSetupData->EnableMargins(TRUE);
m_PageSetupData->EnableMargins(true);
m_PageSetupData->SetMarginTopLeft(wxPoint(25, 25));
m_PageSetupData->SetMarginBottomRight(wxPoint(25, 25));
@ -523,9 +523,9 @@ bool wxHtmlEasyPrinting::PreviewFile(const wxString &htmlfile)
bool wxHtmlEasyPrinting::PreviewText(const wxString &htmltext, const wxString &basepath)
{
wxHtmlPrintout *p1 = CreatePrintout();
p1->SetHtmlText(htmltext, basepath, TRUE);
p1->SetHtmlText(htmltext, basepath, true);
wxHtmlPrintout *p2 = CreatePrintout();
p2->SetHtmlText(htmltext, basepath, TRUE);
p2->SetHtmlText(htmltext, basepath, true);
return DoPreview(p1, p2);
}
@ -545,7 +545,7 @@ bool wxHtmlEasyPrinting::PrintFile(const wxString &htmlfile)
bool wxHtmlEasyPrinting::PrintText(const wxString &htmltext, const wxString &basepath)
{
wxHtmlPrintout *p = CreatePrintout();
p->SetHtmlText(htmltext, basepath, TRUE);
p->SetHtmlText(htmltext, basepath, true);
bool ret = DoPrint(p);
delete p;
return ret;
@ -561,7 +561,7 @@ bool wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *pr
if (!preview->Ok())
{
delete preview;
return FALSE;
return false;
}
wxPreviewFrame *frame = new wxPreviewFrame(preview, m_ParentWindow,
@ -569,8 +569,8 @@ bool wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *pr
wxPoint(100, 100), wxSize(650, 500));
frame->Centre(wxBOTH);
frame->Initialize();
frame->Show(TRUE);
return TRUE;
frame->Show(true);
return true;
}
@ -580,13 +580,13 @@ bool wxHtmlEasyPrinting::DoPrint(wxHtmlPrintout *printout)
wxPrintDialogData printDialogData(*GetPrintData());
wxPrinter printer(&printDialogData);
if (!printer.Print(m_ParentWindow, printout, TRUE))
if (!printer.Print(m_ParentWindow, printout, true))
{
return FALSE;
return false;
}
(*GetPrintData()) = printer.GetPrintDialogData().GetPrintData();
return TRUE;
return true;
}
@ -596,7 +596,7 @@ void wxHtmlEasyPrinting::PrinterSetup()
wxPrintDialogData printDialogData(*GetPrintData());
wxPrintDialog printerDialog(m_ParentWindow, &printDialogData);
printerDialog.GetPrintDialogData().SetSetupDialog(TRUE);
printerDialog.GetPrintDialogData().SetSetupDialog(true);
if (printerDialog.ShowModal() == wxID_OK)
(*GetPrintData()) = printerDialog.GetPrintDialogData().GetPrintData();
@ -706,7 +706,7 @@ class wxHtmlPrintingModule: public wxModule
DECLARE_DYNAMIC_CLASS(wxHtmlPrintingModule)
public:
wxHtmlPrintingModule() : wxModule() {}
bool OnInit() { return TRUE; }
bool OnInit() { return true; }
void OnExit() { wxHtmlPrintout::CleanUpStatics(); }
};

View File

@ -61,7 +61,7 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD" )
}
m_WParser->GetContainer()->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
return TRUE;
return true;
}
else if (tag.GetName() == wxT("DT"))
{
@ -69,14 +69,14 @@ TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD" )
c = m_WParser->OpenContainer();
c->SetAlignHor(wxHTML_ALIGN_LEFT);
c->SetMinHeight(m_WParser->GetCharHeight());
return FALSE;
return false;
}
else // "DD"
{
m_WParser->CloseContainer();
c = m_WParser->OpenContainer();
c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
return FALSE;
return false;
}
}

View File

@ -84,7 +84,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
while (tk.HasMoreTokens())
{
if ((index = m_Faces.Index(tk.GetNextToken(), FALSE)) != wxNOT_FOUND)
if ((index = m_Faces.Index(tk.GetNextToken(), false)) != wxNOT_FOUND)
{
m_WParser->SetFontFace(m_Faces[index]);
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -110,7 +110,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
m_WParser->SetActualColor(oldclr);
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
}
return TRUE;
return true;
}
TAG_HANDLER_END(FONT)
@ -124,7 +124,7 @@ TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE")
{
int underlined = m_WParser->GetFontUnderlined();
m_WParser->SetFontUnderlined(TRUE);
m_WParser->SetFontUnderlined(true);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -133,7 +133,7 @@ TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE")
m_WParser->SetFontUnderlined(underlined);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(FACES_U)
@ -148,7 +148,7 @@ TAG_HANDLER_BEGIN(FACES_B, "B,STRONG")
{
int bold = m_WParser->GetFontBold();
m_WParser->SetFontBold(TRUE);
m_WParser->SetFontBold(true);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -157,7 +157,7 @@ TAG_HANDLER_BEGIN(FACES_B, "B,STRONG")
m_WParser->SetFontBold(bold);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(FACES_B)
@ -172,7 +172,7 @@ TAG_HANDLER_BEGIN(FACES_I, "I,EM,CITE,ADDRESS")
{
int italic = m_WParser->GetFontItalic();
m_WParser->SetFontItalic(TRUE);
m_WParser->SetFontItalic(true);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -181,7 +181,7 @@ TAG_HANDLER_BEGIN(FACES_I, "I,EM,CITE,ADDRESS")
m_WParser->SetFontItalic(italic);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(FACES_I)
@ -196,7 +196,7 @@ TAG_HANDLER_BEGIN(FACES_TT, "TT,CODE,KBD,SAMP")
{
int fixed = m_WParser->GetFontFixed();
m_WParser->SetFontFixed(TRUE);
m_WParser->SetFontFixed(true);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -205,7 +205,7 @@ TAG_HANDLER_BEGIN(FACES_TT, "TT,CODE,KBD,SAMP")
m_WParser->SetFontFixed(fixed);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(FACES_TT)
@ -229,10 +229,10 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
old_f = m_WParser->GetFontFixed();
old_al = m_WParser->GetAlign();
m_WParser->SetFontBold(TRUE);
m_WParser->SetFontItalic(FALSE);
m_WParser->SetFontUnderlined(FALSE);
m_WParser->SetFontFixed(FALSE);
m_WParser->SetFontBold(true);
m_WParser->SetFontItalic(false);
m_WParser->SetFontUnderlined(false);
m_WParser->SetFontFixed(false);
if (tag.GetName() == wxT("H1"))
m_WParser->SetFontSize(7);
@ -243,16 +243,16 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
else if (tag.GetName() == wxT("H4"))
{
m_WParser->SetFontSize(5);
m_WParser->SetFontItalic(TRUE);
m_WParser->SetFontBold(FALSE);
m_WParser->SetFontItalic(true);
m_WParser->SetFontBold(false);
}
else if (tag.GetName() == wxT("H5"))
m_WParser->SetFontSize(4);
else if (tag.GetName() == wxT("H6"))
{
m_WParser->SetFontSize(4);
m_WParser->SetFontItalic(TRUE);
m_WParser->SetFontBold(FALSE);
m_WParser->SetFontItalic(true);
m_WParser->SetFontBold(false);
}
c = m_WParser->GetContainer();
@ -285,7 +285,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
c = m_WParser->GetContainer();
c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
return TRUE;
return true;
}
TAG_HANDLER_END(Hx)
@ -308,7 +308,7 @@ TAG_HANDLER_BEGIN(BIGSMALL, "BIG,SMALL")
m_WParser->SetFontSize(oldsize);
m_WParser->GetContainer()->InsertCell(
new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(BIGSMALL)

View File

@ -98,7 +98,7 @@ TAG_HANDLER_BEGIN(HR, "HR")
m_WParser->CloseContainer();
m_WParser->OpenContainer();
return FALSE;
return false;
}
TAG_HANDLER_END(HR)

View File

@ -86,7 +86,7 @@ wxHtmlImageMapAreaCell::wxHtmlImageMapAreaCell( wxHtmlImageMapAreaCell::celltype
wxString x = incoords, y;
type = t;
while ((i = x.Find( ',' )) != -1)
while ((i = x.Find( ',' )) != wxNOT_FOUND)
{
coords.Add( (int)(pixel_scale * (double)wxAtoi( x.Left( i ).c_str())) );
x = x.Mid( i + 1 );
@ -291,7 +291,7 @@ class wxHtmlImageCell : public wxHtmlCell
{
public:
wxHtmlImageCell(wxWindow *window,
wxFSFile *input, int w = -1, int h = -1,
wxFSFile *input, int w = wxDefaultCoord, int h = wxDefaultCoord,
double scale = 1.0, int align = wxHTML_ALIGN_BOTTOM,
const wxString& mapname = wxEmptyString);
~wxHtmlImageCell();
@ -351,17 +351,17 @@ wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
{
m_window = window ? wxStaticCast(window, wxScrolledWindow) : NULL;
m_scale = scale;
m_showFrame = FALSE;
m_showFrame = false;
m_bitmap = NULL;
m_bmpW = w;
m_bmpH = h;
m_imageMap = NULL;
m_mapName = mapname;
SetCanLiveOnPagebreak(FALSE);
SetCanLiveOnPagebreak(false);
#if wxUSE_GIF && wxUSE_TIMER
m_gifDecoder = NULL;
m_gifTimer = NULL;
m_physX = m_physY = -1;
m_physX = m_physY = wxDefaultCoord;
#endif
if ( m_bmpW && m_bmpH )
@ -372,25 +372,25 @@ wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
if ( s )
{
bool readImg = TRUE;
bool readImg = true;
#if wxUSE_GIF && wxUSE_TIMER
if ( (input->GetLocation().Matches(wxT("*.gif")) ||
input->GetLocation().Matches(wxT("*.GIF"))) && m_window )
{
m_gifDecoder = new wxGIFDecoder(s, TRUE);
m_gifDecoder = new wxGIFDecoder(s, true);
if ( m_gifDecoder->ReadGIF() == wxGIF_OK )
{
wxImage img;
if ( m_gifDecoder->ConvertToImage(&img) )
SetImage(img);
readImg = FALSE;
readImg = false;
if ( m_gifDecoder->IsAnimation() )
{
m_gifTimer = new wxGIFTimer(this);
m_gifTimer->Start(m_gifDecoder->GetDelay(), TRUE);
m_gifTimer->Start(m_gifDecoder->GetDelay(), true);
}
else
{
@ -414,18 +414,18 @@ wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input,
}
else // input==NULL, use "broken image" bitmap
{
if ( m_bmpW == -1 && m_bmpH == -1 )
if ( m_bmpW == wxDefaultCoord && m_bmpH == wxDefaultCoord )
{
m_bmpW = 29;
m_bmpH = 31;
}
else
{
m_showFrame = TRUE;
if ( m_bmpW == -1 ) m_bmpW = 31;
if ( m_bmpH == -1 ) m_bmpH = 33;
m_showFrame = true;
if ( m_bmpW == wxDefaultCoord ) m_bmpW = 31;
if ( m_bmpH == wxDefaultCoord ) m_bmpH = 33;
}
m_bitmap =
m_bitmap =
new wxBitmap(wxArtProvider::GetBitmap(wxART_MISSING_IMAGE));
}
}
@ -459,9 +459,9 @@ void wxHtmlImageCell::SetImage(const wxImage& img)
ww = img.GetWidth();
hh = img.GetHeight();
if ( m_bmpW == -1 )
if ( m_bmpW == wxDefaultCoord )
m_bmpW = ww;
if ( m_bmpH == -1 )
if ( m_bmpH == wxDefaultCoord )
m_bmpH = hh;
// Only scale the bitmap at the rendering stage,
@ -483,9 +483,9 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
{
wxImage img;
m_gifDecoder->GoNextFrame(TRUE);
m_gifDecoder->GoNextFrame(true);
if ( m_physX == -1 )
if ( m_physX == wxDefaultCoord )
{
m_physX = m_physY = 0;
for (wxHtmlCell *cell = this; cell; cell = cell->GetParent())
@ -510,20 +510,20 @@ void wxHtmlImageCell::AdvanceAnimation(wxTimer *timer)
wxMemoryDC dc;
dc.SelectObject(*m_bitmap);
dc.DrawBitmap(bmp, m_gifDecoder->GetLeft(), m_gifDecoder->GetTop(),
TRUE /* use mask */);
true /* use mask */);
}
else
SetImage(img);
m_window->Refresh(img.HasMask(), &rect);
}
timer->Start(m_gifDecoder->GetDelay(), TRUE);
timer->Start(m_gifDecoder->GetDelay(), true);
}
void wxHtmlImageCell::Layout(int w)
{
wxHtmlCell::Layout(w);
m_physX = m_physY = -1;
m_physX = m_physY = wxDefaultCoord;
}
#endif
@ -559,13 +559,13 @@ void wxHtmlImageCell::Draw(wxDC& dc, int x, int y,
imageScaleX = (double) m_bmpW / (double) m_bitmap->GetWidth();
if (m_bmpH != m_bitmap->GetHeight())
imageScaleY = (double) m_bmpH / (double) m_bitmap->GetHeight();
double us_x, us_y;
dc.GetUserScale(&us_x, &us_y);
dc.SetUserScale(us_x * m_scale * imageScaleX, us_y * m_scale * imageScaleY);
dc.DrawBitmap(*m_bitmap, (int) ((x + m_PosX) / (m_scale*imageScaleX)),
(int) ((y + m_PosY) / (m_scale*imageScaleY)), TRUE);
(int) ((y + m_PosY) / (m_scale*imageScaleY)), true);
dc.SetUserScale(us_x, us_y);
}
}
@ -615,7 +615,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
{
if (tag.HasParam(wxT("SRC")))
{
int w = -1, h = -1;
int w = wxDefaultCoord, h = wxDefaultCoord;
int al;
wxFSFile *str;
wxString tmp = tag.GetParam(wxT("SRC"));
@ -706,7 +706,7 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA")
}
}
return FALSE;
return false;
}
TAG_HANDLER_END(IMG)

View File

@ -97,16 +97,16 @@ bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, int* known_pagebreaks,
// When we are counting pages, 'known_pagebreaks' is non-NULL.
// That's the only time we change 'pagebreak'. Otherwise, pages
// were already counted, 'known_pagebreaks' is NULL, and we don't
// do anything except return FALSE.
// do anything except return false.
//
// We also simply return FALSE if the 'pagebreak' argument is
// We also simply return false if the 'pagebreak' argument is
// less than (vertically above) or the same as the current
// vertical position. Otherwise we'd be setting a pagebreak above
// the current cell, which is incorrect, or duplicating a
// pagebreak that has already been set.
if(NULL == known_pagebreaks || *pagebreak <= m_PosY)
{
return FALSE;
return false;
}
// m_PosY is only the vertical offset from the parent. The pagebreak
@ -126,12 +126,12 @@ bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, int* known_pagebreaks,
// Add a pagebreak only if there isn't one already set here.
if(NULL != where)
{
return FALSE;
return false;
}
else
{
*pagebreak = m_PosY;
return TRUE;
return true;
}
}
@ -147,7 +147,7 @@ TAG_HANDLER_BEGIN(P, "P")
}
m_WParser->GetContainer()->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
m_WParser->GetContainer()->SetAlign(tag);
return FALSE;
return false;
}
TAG_HANDLER_END(P)
@ -167,7 +167,7 @@ TAG_HANDLER_BEGIN(BR, "BR")
c->SetAlignHor(al);
c->SetAlign(tag);
c->SetMinHeight(m_WParser->GetCharHeight());
return FALSE;
return false;
}
TAG_HANDLER_END(BR)
@ -204,9 +204,9 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
else
c->SetAlignHor(old);
return TRUE;
return true;
}
else return FALSE;
else return false;
}
TAG_HANDLER_END(CENTER)
@ -220,18 +220,18 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
{
if(tag.HasParam(wxT("STYLE")))
{
if(tag.GetParam(wxT("STYLE")).IsSameAs(wxT("PAGE-BREAK-BEFORE:ALWAYS"), FALSE))
if(tag.GetParam(wxT("STYLE")).IsSameAs(wxT("PAGE-BREAK-BEFORE:ALWAYS"), false))
{
m_WParser->CloseContainer();
m_WParser->OpenContainer()->InsertCell(new wxHtmlPageBreakCell);
m_WParser->CloseContainer();
m_WParser->OpenContainer();
return FALSE;
return false;
}
else
{
// Treat other STYLE parameters here when they're supported.
return FALSE;
return false;
}
}
else if(tag.HasParam(wxT("ALIGN")))
@ -296,7 +296,7 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
if (wfr)
{
wxString title = m_WParser->GetSource()->Mid(
tag.GetBeginPos(),
tag.GetBeginPos(),
tag.GetEndPos1()-tag.GetBeginPos());
#if !wxUSE_UNICODE
wxCSConv conv(m_WParser->GetInputEncoding());
@ -306,7 +306,7 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
wfr->OnSetTitle(title);
}
}
return TRUE;
return true;
}
TAG_HANDLER_END(TITLE)
@ -337,7 +337,7 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
if (m_WParser->GetWindow() != NULL)
m_WParser->GetWindow()->SetBackgroundColour(clr);
}
return FALSE;
return false;
}
TAG_HANDLER_END(BODY)
@ -366,7 +366,7 @@ TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE")
c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_BOTTOM);
m_WParser->CloseContainer();
m_WParser->OpenContainer();
return TRUE;
return true;
}
TAG_HANDLER_END(BLOCKQUOTE)

View File

@ -45,7 +45,7 @@ public:
virtual const wxHtmlCell* Find(int condition, const void* param) const
{
if ((condition == wxHTML_COND_ISANCHOR) &&
if ((condition == wxHTML_COND_ISANCHOR) &&
(m_AnchorName == (*((const wxString*)param))))
{
return this;
@ -81,7 +81,7 @@ TAG_HANDLER_BEGIN(A, "A")
if (tag.HasParam( wxT("TARGET") )) target = tag.GetParam( wxT("TARGET") );
m_WParser->SetActualColor(m_WParser->GetLinkColor());
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(m_WParser->GetLinkColor()));
m_WParser->SetFontUnderlined(TRUE);
m_WParser->SetFontUnderlined(true);
m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
m_WParser->SetLink(wxHtmlLinkInfo(name, target));
@ -93,9 +93,9 @@ TAG_HANDLER_BEGIN(A, "A")
m_WParser->SetActualColor(oldclr);
m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
return TRUE;
return true;
}
else return FALSE;
else return false;
}
TAG_HANDLER_END(A)

View File

@ -63,7 +63,7 @@ void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y,
wxHtmlRenderingInfo& WXUNUSED(info))
{
dc.SetBrush(m_Brush);
dc.DrawEllipse(x + m_PosX + m_Width / 3, y + m_PosY + m_Height / 3,
dc.DrawEllipse(x + m_PosX + m_Width / 3, y + m_PosY + m_Height / 3,
(m_Width / 3), (m_Width / 3));
}
@ -95,7 +95,7 @@ class wxHtmlListCell : public wxHtmlContainerCell
virtual ~wxHtmlListCell();
void AddRow(wxHtmlContainerCell *mark, wxHtmlContainerCell *cont);
virtual void Layout(int w);
DECLARE_NO_COPY_CLASS(wxHtmlListCell)
};
@ -153,7 +153,7 @@ void wxHtmlListCell::ReallocRows(int rows)
void wxHtmlListCell::ComputeMinMaxWidths()
{
if (m_NumRows == 0) return;
m_MaxTotalWidth = 0;
m_Width = 0;
@ -183,7 +183,7 @@ class wxHtmlListcontentCell : public wxHtmlContainerCell
{
public:
wxHtmlListcontentCell(wxHtmlContainerCell *p) : wxHtmlContainerCell(p) {}
virtual void Layout(int w) {
virtual void Layout(int w) {
// Reset top indentation, fixes <li><p>
SetIndent(0, wxHTML_INDENT_TOP);
wxHtmlContainerCell::Layout(w);
@ -240,7 +240,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
m_List->AddRow(mark, c);
c = m_WParser->OpenContainer();
m_WParser->SetContainer(new wxHtmlListcontentCell(c));
if (m_Numbering != 0) m_Numbering++;
}
@ -258,7 +258,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
wxHtmlListCell *oldList = m_List;
m_List = new wxHtmlListCell(c);
m_List->SetIndent(2 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
ParseInner(tag);
m_WParser->SetContainer(oldcont);
@ -266,7 +266,7 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
m_Numbering = oldnum;
m_List = oldList;
return TRUE;
return true;
}
return false;

View File

@ -94,10 +94,10 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
fsize = m_WParser->GetFontSize();
c = m_WParser->GetContainer();
m_WParser->SetFontUnderlined(FALSE);
m_WParser->SetFontBold(FALSE);
m_WParser->SetFontItalic(FALSE);
m_WParser->SetFontFixed(TRUE);
m_WParser->SetFontUnderlined(false);
m_WParser->SetFontBold(false);
m_WParser->SetFontItalic(false);
m_WParser->SetFontFixed(true);
m_WParser->SetFontSize(3);
c->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
@ -128,7 +128,7 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
m_WParser->SetFontSize(fsize);
c->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
return TRUE;
return true;
}
TAG_HANDLER_END(PRE)

View File

@ -37,7 +37,7 @@ TAG_HANDLER_BEGIN(STYLE, "STYLE")
{
// VS: Ignore styles for now. We must have this handler present,
// because CSS style text would be rendered verbatim otherwise
return TRUE;
return true;
}
TAG_HANDLER_END(STYLE)

View File

@ -350,7 +350,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
void wxHtmlTableCell::ComputeMinMaxWidths()
{
if (m_NumCols == 0 || m_ColsInfo[0].minWidth != -1) return;
if (m_NumCols == 0 || m_ColsInfo[0].minWidth != wxDefaultCoord) return;
m_MaxTotalWidth = 0;
int percentage = 0;
@ -700,7 +700,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
m_WParser->CloseContainer();
m_Table = oldt;
return TRUE;
return true;
}
@ -744,7 +744,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
m_WParser->OpenContainer();
}
}
return FALSE;
return false;
}
TAG_HANDLER_END(TABLE)

View File

@ -50,7 +50,7 @@ wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser()
m_Container = NULL;
m_DC = NULL;
m_CharHeight = m_CharWidth = 0;
m_UseLink = FALSE;
m_UseLink = false;
#if !wxUSE_UNICODE
m_EncConv = NULL;
m_InputEnc = wxFONTENCODING_ISO8859_1;
@ -121,14 +121,14 @@ void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face,
static int default_sizes[7] =
{
wxHTML_FONT_SIZE_1,
wxHTML_FONT_SIZE_2,
wxHTML_FONT_SIZE_3,
wxHTML_FONT_SIZE_4,
wxHTML_FONT_SIZE_5,
wxHTML_FONT_SIZE_6,
wxHTML_FONT_SIZE_7
wxHTML_FONT_SIZE_2,
wxHTML_FONT_SIZE_3,
wxHTML_FONT_SIZE_4,
wxHTML_FONT_SIZE_5,
wxHTML_FONT_SIZE_6,
wxHTML_FONT_SIZE_7
};
if (sizes == NULL) sizes = default_sizes;
int i, j, k, l, m;
@ -159,7 +159,7 @@ void wxHtmlWinParser::SetStandardFonts(int size,
const wxString& fixed_face)
{
wxFont defaultFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
int f_sizes[7];
if (size == -1)
size = defaultFont.GetPointSize();
@ -172,9 +172,9 @@ void wxHtmlWinParser::SetStandardFonts(int size,
f_sizes[5] = int(size * 1.6);
f_sizes[6] = int(size * 1.8);
wxString normal = normal_face.empty() ?
wxString normal = normal_face.empty() ?
defaultFont.GetFaceName() : normal_face;
SetFonts(normal, fixed_face, f_sizes);
}
@ -191,12 +191,12 @@ void wxHtmlWinParser::InitParser(const wxString& source)
of differences under X and win
*/
m_UseLink = FALSE;
m_UseLink = false;
m_Link = wxHtmlLinkInfo( wxT(""), wxT("") );
m_LinkColor.Set(0, 0, 0xFF);
m_ActualColor.Set(0, 0, 0);
m_Align = wxHTML_ALIGN_LEFT;
m_tmpLastWasSpace = FALSE;
m_tmpLastWasSpace = false;
m_lastWordCell = NULL;
OpenContainer();
@ -329,7 +329,7 @@ void wxHtmlWinParser::AddText(const wxChar* txt)
m_Container->InsertCell(c);
((wxHtmlWordCell*)c)->SetPreviousWord(m_lastWordCell);
m_lastWordCell = (wxHtmlWordCell*)c;
m_tmpLastWasSpace = TRUE;
m_tmpLastWasSpace = true;
}
}
@ -350,7 +350,7 @@ void wxHtmlWinParser::AddText(const wxChar* txt)
m_Container->InsertCell(c);
((wxHtmlWordCell*)c)->SetPreviousWord(m_lastWordCell);
m_lastWordCell = (wxHtmlWordCell*)c;
m_tmpLastWasSpace = FALSE;
m_tmpLastWasSpace = false;
}
}
@ -360,7 +360,7 @@ wxHtmlContainerCell* wxHtmlWinParser::OpenContainer()
{
m_Container = new wxHtmlContainerCell(m_Container);
m_Container->SetAlignHor(m_Align);
m_tmpLastWasSpace = TRUE;
m_tmpLastWasSpace = true;
/* to avoid space being first character in paragraph */
return m_Container;
}
@ -369,7 +369,7 @@ wxHtmlContainerCell* wxHtmlWinParser::OpenContainer()
wxHtmlContainerCell* wxHtmlWinParser::SetContainer(wxHtmlContainerCell *c)
{
m_tmpLastWasSpace = TRUE;
m_tmpLastWasSpace = true;
/* to avoid space being first character in paragraph */
return m_Container = c;
}
@ -425,7 +425,7 @@ wxFont* wxHtmlWinParser::CreateCurrentFont()
ff ? wxMODERN : wxSWISS,
fi ? wxITALIC : wxNORMAL,
fb ? wxBOLD : wxNORMAL,
fu ? TRUE : FALSE, face
fu ? true : false, face
#if wxUSE_UNICODE
);
#else
@ -481,15 +481,15 @@ void wxHtmlWinParser::SetInputEncoding(wxFontEncoding enc)
m_OutputEnc = enc;
// alternatives?
else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE) &&
wxFontMapper::Get()->GetAltForEncoding(enc, &altfix, m_FontFaceFixed, FALSE) &&
else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, false) &&
wxFontMapper::Get()->GetAltForEncoding(enc, &altfix, m_FontFaceFixed, false) &&
altnorm == altfix)
m_OutputEnc = altnorm;
// at least normal face?
else if (availnorm)
m_OutputEnc = enc;
else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, FALSE))
else if (wxFontMapper::Get()->GetAltForEncoding(enc, &altnorm, m_FontFaceNormal, false))
m_OutputEnc = altnorm;
else
@ -550,7 +550,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlTagsModule, wxModule)
bool wxHtmlTagsModule::OnInit()
{
wxHtmlWinParser::AddModule(this);
return TRUE;
return true;
}
void wxHtmlTagsModule::OnExit()