]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_tables.cpp
use wxFileName::MakeAbsolute istead of Normalize
[wxWidgets.git] / src / html / m_tables.cpp
index adc0620081672c28043fdccd60dd102b6c70957b..aa2292aa2b0445d71dfa71972288d362dd260b5b 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "wx/defs.h"
 #if wxUSE_HTML && wxUSE_STREAMS
-#ifdef __BORDLANDC__
+#ifdef __BORLANDC__
 #pragma hdrstop
 #endif
 
@@ -125,6 +125,8 @@ private:
     // Computes minimal and maximal widths of columns. Needs to be called
     // only once, before first Layout(). 
     void ComputeMinMaxWidths();
+
+    DECLARE_NO_COPY_CLASS(wxHtmlTableCell)
 };
 
 
@@ -524,13 +526,11 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
     TAG_HANDLER_VARS
         wxHtmlTableCell* m_Table;
         wxString m_tAlign, m_rAlign;
-        int m_OldAlign;
 
     TAG_HANDLER_CONSTR(TABLE)
     {
         m_Table = NULL;
         m_tAlign = m_rAlign = wxEmptyString;
-        m_OldAlign = wxHTML_ALIGN_LEFT;
     }
 
 
@@ -548,14 +548,14 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
 
             c->SetWidthFloat(tag, m_WParser->GetPixelScale());
             m_Table = new wxHtmlTableCell(c, tag, m_WParser->GetPixelScale());
-            m_OldAlign = m_WParser->GetAlign();
+            int oldAlign = m_WParser->GetAlign();
             m_tAlign = wxEmptyString;
             if (tag.HasParam(wxT("ALIGN")))
                 m_tAlign = tag.GetParam(wxT("ALIGN"));
 
             ParseInner(tag);
 
-            m_WParser->SetAlign(m_OldAlign);
+            m_WParser->SetAlign(oldAlign);
             m_WParser->SetContainer(oldcont);
             m_WParser->CloseContainer();
             
@@ -578,29 +578,29 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
             // new cell
             else
             {
-                m_WParser->SetAlign(m_OldAlign);
                 c = m_WParser->SetContainer(new wxHtmlContainerCell(m_Table));
                 m_Table->AddCell(c, tag);
 
                 m_WParser->OpenContainer();
 
                 if (tag.GetName() == wxT("TH")) /*header style*/
-                {
                     m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
-                }
-
-                {
-                    wxString als;
-
-                    als = m_rAlign;
-                    if (tag.HasParam(wxT("ALIGN")))
-                        als = tag.GetParam(wxT("ALIGN"));
-                    als.MakeUpper();
-                    if (als == wxT("RIGHT"))
-                        m_WParser->SetAlign(wxHTML_ALIGN_RIGHT);
-                    else if (als == wxT("CENTER"))
-                        m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
-                }
+                else
+                    m_WParser->SetAlign(wxHTML_ALIGN_LEFT);
+
+                wxString als;
+
+                als = m_rAlign;
+                if (tag.HasParam(wxT("ALIGN")))
+                    als = tag.GetParam(wxT("ALIGN"));
+                als.MakeUpper();
+                if (als == wxT("RIGHT"))
+                    m_WParser->SetAlign(wxHTML_ALIGN_RIGHT);
+                else if (als == wxT("LEFT"))
+                    m_WParser->SetAlign(wxHTML_ALIGN_LEFT);
+                else if (als == wxT("CENTER"))
+                    m_WParser->SetAlign(wxHTML_ALIGN_CENTER);
+
                 m_WParser->OpenContainer();
             }
         }