projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added braces to remove initialisation error
[wxWidgets.git]
/
src
/
html
/
htmlpars.cpp
diff --git
a/src/html/htmlpars.cpp
b/src/html/htmlpars.cpp
index 8c9eca91d3603888d2462e826c3838ffb1990349..2d8a85df24518f5ddc94d68d4b7f2cd3ed75ec67 100644
(file)
--- a/
src/html/htmlpars.cpp
+++ b/
src/html/htmlpars.cpp
@@
-4,11
+4,11
@@
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 1999 Vaclav Slavik
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 1999 Vaclav Slavik
-// Licence: wxWindows
L
icence
+// Licence: wxWindows
l
icence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "htmlpars.h"
#endif
#pragma implementation "htmlpars.h"
#endif
@@
-35,6
+35,14
@@
#include "wx/dynarray.h"
#include "wx/arrimpl.cpp"
#include "wx/dynarray.h"
#include "wx/arrimpl.cpp"
+#ifdef __WXWINCE__
+ #include "wx/msw/wince/missing.h" // for bsearch()
+#endif
+
+// DLL options compatibility check:
+#include "wx/app.h"
+WX_CHECK_BUILD_OPTIONS("wxHTML")
+
//-----------------------------------------------------------------------------
// wxHtmlParser helpers
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// wxHtmlParser helpers
//-----------------------------------------------------------------------------
@@
-375,7
+383,12
@@
void wxHtmlParser::PopTagHandler()
wxList::compatibility_iterator first;
if ( !m_HandlersStack ||
wxList::compatibility_iterator first;
if ( !m_HandlersStack ||
- (first = m_HandlersStack->GetFirst()) == NULL )
+#if wxUSE_STL
+ !(first = m_HandlersStack->GetFirst())
+#else // !wxUSE_STL
+ ((first = m_HandlersStack->GetFirst()) == NULL)
+#endif // wxUSE_STL/!wxUSE_STL
+ )
{
wxLogWarning(_("Warning: attempt to remove HTML tag handler from empty stack."));
return;
{
wxLogWarning(_("Warning: attempt to remove HTML tag handler from empty stack."));
return;
@@
-843,7
+856,8
@@
wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity)
wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type),
const wxString& url) const
{
wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type),
const wxString& url) const
{
- return GetFS()->OpenFile(url);
+ return m_FS ? m_FS->OpenFile(url) : NULL;
+
}
}
@@
-854,9
+868,14
@@
wxFSFile *wxHtmlParser::OpenURL(wxHtmlURLType WXUNUSED(type),
class wxMetaTagParser : public wxHtmlParser
{
public:
class wxMetaTagParser : public wxHtmlParser
{
public:
+ wxMetaTagParser() { }
+
wxObject* GetProduct() { return NULL; }
wxObject* GetProduct() { return NULL; }
+
protected:
virtual void AddText(const wxChar* WXUNUSED(txt)) {}
protected:
virtual void AddText(const wxChar* WXUNUSED(txt)) {}
+
+ DECLARE_NO_COPY_CLASS(wxMetaTagParser)
};
class wxMetaTagHandler : public wxHtmlTagHandler
};
class wxMetaTagHandler : public wxHtmlTagHandler
@@
-868,6
+887,8
@@
public:
private:
wxString *m_retval;
private:
wxString *m_retval;
+
+ DECLARE_NO_COPY_CLASS(wxMetaTagHandler)
};
bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
};
bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
@@
-882,7
+903,7
@@
bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
tag.GetParam(_T("HTTP-EQUIV")).IsSameAs(_T("Content-Type"), false) &&
tag.HasParam(_T("CONTENT")))
{
tag.GetParam(_T("HTTP-EQUIV")).IsSameAs(_T("Content-Type"), false) &&
tag.HasParam(_T("CONTENT")))
{
- wxString content = tag.GetParam(_T("CONTENT"));
+ wxString content = tag.GetParam(_T("CONTENT"))
.Lower()
;
if (content.Left(19) == _T("text/html; charset="))
{
*m_retval = content.Mid(19);
if (content.Left(19) == _T("text/html; charset="))
{
*m_retval = content.Mid(19);
@@
-903,5
+924,4
@@
wxString wxHtmlParser::ExtractCharsetInformation(const wxString& markup)
return charset;
}
return charset;
}
-
#endif
#endif