Establishes the number of column headers. If there are no <th> headers there will still be columns. Method is to check if there has been an edit (any additional tags) since the last report (of either row or column count). If not then the value held in m_NoCols is returned. Otherwise the columns are counted explicitly. In the absence of the row of table headers, the column count will be the row with the maximum number of columns. Arguments: None

Return TypeFunction nameArguments
uint32_thzHtmTbl::Colcount(void)

Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp

Function Logic:

0:START 1:unknown 2:pE 3:unknown 4:unknown 5:items 6:Return m_nCols

Function body:

uint32_t hzHtmTbl::Colcount (void)
{
   //  Establishes the number of column headers. If there are no <th> headers there will still be columns.
   //  
   //  Method is to check if there has been an edit (any additional tags) since the last report (of either row or column count). If not then the value held in
   //  m_NoCols is returned. Otherwise the columns are counted explicitly. In the absence of the row of table headers, the column count will be the row with
   //  the maximum number of columns.
   //  
   //  Arguments: None
   //  Returns: Number of columns
   hzHtmElem*  pE ;        //  Table row tags
   hzHtmElem*  pC ;        //  Columns
   if (!m_nCols)
   {
       pE = GetFirstChild() ;
       for (pC = pE->GetFirstChild() ; pC ; pC = pC->Sibling())
       {
           if (pC->Type() != HTAG_TH)
               continue ;
           m_nCols++ ;
       }
   }
   return m_nCols ;
}