X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58bd6224acb5b8dce46abbc3f3df7eae346c9859..7dbe942aaaa9a8f32c9f901bdcf83d7941362b71:/src/html/m_image.cpp diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index b42f7780be..c4e902cb96 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -7,10 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation -#endif - #include "wx/wxprec.h" #include "wx/defs.h" @@ -36,8 +32,8 @@ #include "wx/dynarray.h" #include "wx/log.h" #include "wx/artprov.h" +#include "wx/math.h" -#include #include FORCE_LINK_ME(m_image) @@ -47,7 +43,7 @@ FORCE_LINK_ME(m_image) WX_DECLARE_OBJARRAY(int, CoordArray); #include "wx/arrimpl.cpp" // this is a magic incantation which must be done! -WX_DEFINE_OBJARRAY(CoordArray); +WX_DEFINE_OBJARRAY(CoordArray) // --------------------------------------------------------------------------- @@ -372,9 +368,8 @@ wxHtmlImageCell::wxHtmlImageCell(wxWindow *window, wxFSFile *input, if ( s ) { - bool readImg = true; - #if wxUSE_GIF && wxUSE_TIMER + bool readImg = true; if ( (input->GetLocation().Matches(wxT("*.gif")) || input->GetLocation().Matches(wxT("*.GIF"))) && m_window ) { @@ -539,11 +534,9 @@ wxHtmlImageCell::~wxHtmlImageCell() void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, - int WXUNUSED(view_y1), int view_y2, + int WXUNUSED(view_y1), int WXUNUSED(view_y2), wxHtmlRenderingInfo& WXUNUSED(info)) { - if (y+m_PosY+m_Height > view_y2) return; - if ( m_showFrame ) { dc.SetBrush(*wxTRANSPARENT_BRUSH); @@ -574,7 +567,7 @@ void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const { - if (m_mapName.IsEmpty()) + if (m_mapName.empty()) return wxHtmlCell::GetLink( x, y ); if (!m_imageMap) { @@ -699,12 +692,13 @@ TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA") } if (cel != NULL && tag.HasParam(wxT("HREF"))) { - wxString tmp = tag.GetParam(wxT("HREF")); - wxString target = wxEmptyString; - if (tag.HasParam(wxT("TARGET"))) target = tag.GetParam(wxT("TARGET")); - cel->SetLink( wxHtmlLinkInfo(tmp, target)); + wxString target; + if (tag.HasParam(wxT("TARGET"))) + target = tag.GetParam(wxT("TARGET")); + cel->SetLink(wxHtmlLinkInfo(tag.GetParam(wxT("HREF")), target)); } - if (cel != NULL) m_WParser->GetContainer()->InsertCell( cel ); + if (cel != NULL) + m_WParser->GetContainer()->InsertCell( cel ); } }