wx/wxprec.h already includes wx/defs.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-18 08:11:26 +00:00
parent 8898456df4
commit 93763ad5ba
40 changed files with 429 additions and 497 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: helpdata.cpp
// Name: src/html/helpdata.cpp
// Purpose: wxHtmlHelpData
// Notes: Based on htmlhelp.cpp, implementing a monolithic
// HTML Help controller class, by Vaclav Slavik
@@ -13,11 +13,9 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#include "wx/defs.h"
#if wxUSE_HTML && wxUSE_STREAMS
#ifndef WXPRECOMP
@@ -294,7 +292,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
HP_TagHandler *handler = new HP_TagHandler(book);
parser.AddTagHandler(handler);
f = ( contentsfile.IsEmpty() ? (wxFSFile*) NULL : fsys.OpenFile(contentsfile) );
f = ( contentsfile.empty() ? (wxFSFile*) NULL : fsys.OpenFile(contentsfile) );
if (f)
{
buf.clear();
@@ -308,7 +306,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
wxLogError(_("Cannot open contents file: %s"), contentsfile.c_str());
}
f = ( indexfile.IsEmpty() ? (wxFSFile*) NULL : fsys.OpenFile(indexfile) );
f = ( indexfile.empty() ? (wxFSFile*) NULL : fsys.OpenFile(indexfile) );
if (f)
{
buf.clear();
@@ -317,7 +315,7 @@ bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
handler->Reset(m_index);
parser.Parse(buf);
}
else if (!indexfile.IsEmpty())
else if (!indexfile.empty())
{
wxLogError(_("Cannot open index file: %s"), indexfile.c_str());
}
@@ -488,7 +486,7 @@ void wxHtmlHelpData::SetTempDir(const wxString& path)
if (wxIsAbsolutePath(path)) m_tempPath = path;
else m_tempPath = wxGetCwd() + _T("/") + path;
if (m_tempPath[m_tempPath.Length() - 1] != _T('/'))
if (m_tempPath[m_tempPath.length() - 1] != _T('/'))
m_tempPath << _T('/');
}
}
@@ -518,7 +516,7 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
int IndexOld = m_index.size(),
ContentsOld = m_contents.size();
if (!path.IsEmpty())
if (!path.empty())
fsys.ChangePathTo(path, true);
size_t booksCnt = m_bookRecords.GetCount();
@@ -643,7 +641,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
#endif
s = fsys.FindFirst(book + wxT("#zip:*.hhp"), wxFILE);
while (!s.IsEmpty())
while (!s.empty())
{
if (AddBook(s)) rt = true;
s = fsys.FindNext();
@@ -989,7 +987,7 @@ bool wxHtmlSearchEngine::Scan(const wxFSFile& file)
wxASSERT_MSG(!m_Keyword.empty(), wxT("wxHtmlSearchEngine::LookFor must be called before scanning!"));
int i, j;
int wrd = m_Keyword.Length();
int wrd = m_Keyword.length();
bool found = false;
wxHtmlFilterHTML filter;
wxString tmp = filter.ReadFile(file);