]> git.saurik.com Git - wxWidgets.git/commitdiff
[1231183] 'cleanup: mismatched indentation' and other cleanings.
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 22 Jul 2005 17:08:42 +0000 (17:08 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 22 Jul 2005 17:08:42 +0000 (17:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

14 files changed:
src/common/datstrm.cpp
src/common/filefn.cpp
src/common/fldlgcmn.cpp
src/common/imagpnm.cpp
src/common/log.cpp
src/common/menucmn.cpp
src/common/string.cpp
src/common/txtstrm.cpp
src/common/valgen.cpp
src/generic/filedlgg.cpp
src/generic/grid.cpp
src/generic/gridctrl.cpp
src/generic/listctrl.cpp
src/html/htmltag.cpp

index b661775598c3c8297cd56b1e5f793730c247c473..420ac7984271c47a79b9d0c775afe0c0de8c7c52 100644 (file)
@@ -144,24 +144,24 @@ void wxDataInputStream::Read64(wxUint64 *buffer, size_t size)
 
 void wxDataInputStream::Read32(wxUint32 *buffer, size_t size)
 {
 
 void wxDataInputStream::Read32(wxUint32 *buffer, size_t size)
 {
-  m_input->Read(buffer, size * 4);
+    m_input->Read(buffer, size * 4);
 
 
-  if (m_be_order)
-  {
-    for (wxUint32 i=0; i<size; i++)
+    if (m_be_order)
     {
     {
-      wxUint32 v = wxUINT32_SWAP_ON_LE(*buffer);
-      *(buffer++) = v;
+        for (wxUint32 i=0; i<size; i++)
+        {
+            wxUint32 v = wxUINT32_SWAP_ON_LE(*buffer);
+            *(buffer++) = v;
+        }
     }
     }
-  }
-else
-  {
-    for (wxUint32 i=0; i<size; i++)
+    else
     {
     {
-      wxUint32 v = wxUINT32_SWAP_ON_BE(*buffer);
-      *(buffer++) = v;
+        for (wxUint32 i=0; i<size; i++)
+        {
+            wxUint32 v = wxUINT32_SWAP_ON_BE(*buffer);
+            *(buffer++) = v;
+        }
     }
     }
-  }
 }
 
 void wxDataInputStream::Read16(wxUint16 *buffer, size_t size)
 }
 
 void wxDataInputStream::Read16(wxUint16 *buffer, size_t size)
index fc1dc7dc9504f36d2443477d5108534e70b7ceca..f7161adc3fb292e8d0d7de4f99ab9c0bbd491561 100644 (file)
@@ -612,11 +612,14 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
             nnm = *s ? s + 1 : s;
             *s = 0;
         // FIXME: wxGetUserHome could return temporary storage in Unicode mode
             nnm = *s ? s + 1 : s;
             *s = 0;
         // FIXME: wxGetUserHome could return temporary storage in Unicode mode
-            if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
-               if (was_sep) /* replace only if it was there: */
-                   *s = SEP;
+            if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL)
+            {
+                if (was_sep) /* replace only if it was there: */
+                    *s = SEP;
                 s = NULL;
                 s = NULL;
-            } else {
+            }
+            else
+            {
                 nm = nnm;
                 s = home;
             }
                 nm = nnm;
                 s = home;
             }
@@ -1778,123 +1781,123 @@ bool wxIsWild( const wxString& pattern )
 
 bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 {
 
 bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
 {
-        if (text.empty())
+    if (text.empty())
+    {
+        /* Match if both are empty. */
+        return pat.empty();
+    }
+
+    const wxChar *m = pat.c_str(),
+    *n = text.c_str(),
+    *ma = NULL,
+    *na = NULL,
+    *mp = NULL,
+    *np = NULL;
+    int just = 0,
+    pcount = 0,
+    acount = 0,
+    count = 0;
+
+    if (dot_special && (*n == wxT('.')))
+    {
+        /* Never match so that hidden Unix files
+         * are never found. */
+        return false;
+    }
+
+    for (;;)
+    {
+        if (*m == wxT('*'))
         {
         {
-                /* Match if both are empty. */
-                return pat.empty();
+            ma = ++m;
+            na = n;
+            just = 1;
+            mp = NULL;
+            acount = count;
         }
         }
-
-        const wxChar *m = pat.c_str(),
-        *n = text.c_str(),
-        *ma = NULL,
-        *na = NULL,
-        *mp = NULL,
-        *np = NULL;
-        int just = 0,
-        pcount = 0,
-        acount = 0,
-        count = 0;
-
-        if (dot_special && (*n == wxT('.')))
+        else if (*m == wxT('?'))
         {
         {
-                /* Never match so that hidden Unix files
-                 * are never found. */
+            m++;
+            if (!*n++)
                 return false;
         }
                 return false;
         }
-
-        for (;;)
+        else
         {
         {
-                if (*m == wxT('*'))
+            if (*m == wxT('\\'))
+            {
+                m++;
+                /* Quoting "nothing" is a bad thing */
+                if (!*m)
+                    return false;
+            }
+            if (!*m)
+            {
+                /*
+                * If we are out of both strings or we just
+                * saw a wildcard, then we can say we have a
+                * match
+                */
+                if (!*n)
+                    return true;
+                if (just)
+                    return true;
+                just = 0;
+                goto not_matched;
+            }
+            /*
+            * We could check for *n == NULL at this point, but
+            * since it's more common to have a character there,
+            * check to see if they match first (m and n) and
+            * then if they don't match, THEN we can check for
+            * the NULL of n
+            */
+            just = 0;
+            if (*m == *n)
+            {
+                m++;
+                if (*n == wxT(' '))
+                    mp = NULL;
+                count++;
+                n++;
+            }
+            else
+            {
+
+                not_matched:
+
+                /*
+                * If there are no more characters in the
+                * string, but we still need to find another
+                * character (*m != NULL), then it will be
+                * impossible to match it
+                */
+                if (!*n)
+                    return false;
+                if (mp)
                 {
                 {
-                        ma = ++m;
-                        na = n;
-                        just = 1;
+                    m = mp;
+                    if (*np == wxT(' '))
+                    {
                         mp = NULL;
                         mp = NULL;
-                        acount = count;
-                }
-                else if (*m == wxT('?'))
-                {
-                        m++;
-                        if (!*n++)
-                        return false;
+                        goto check_percent;
+                    }
+                    n = ++np;
+                    count = pcount;
                 }
                 else
                 }
                 else
-                {
-                        if (*m == wxT('\\'))
-                        {
-                                m++;
-                                /* Quoting "nothing" is a bad thing */
-                                if (!*m)
-                                return false;
-                        }
-                        if (!*m)
-                        {
-                                /*
-                                * If we are out of both strings or we just
-                                * saw a wildcard, then we can say we have a
-                                * match
-                                */
-                                if (!*n)
-                                return true;
-                                if (just)
-                                return true;
-                                just = 0;
-                                goto not_matched;
-                        }
-                        /*
-                        * We could check for *n == NULL at this point, but
-                        * since it's more common to have a character there,
-                        * check to see if they match first (m and n) and
-                        * then if they don't match, THEN we can check for
-                        * the NULL of n
-                        */
-                        just = 0;
-                        if (*m == *n)
-                        {
-                                m++;
-                                if (*n == wxT(' '))
-                                mp = NULL;
-                                count++;
-                                n++;
-                        }
-                        else
-                        {
+                check_percent:
 
 
-                                not_matched:
-
-                                /*
-                                * If there are no more characters in the
-                                * string, but we still need to find another
-                                * character (*m != NULL), then it will be
-                                * impossible to match it
-                                */
-                                if (!*n)
-                                return false;
-                                if (mp)
-                                {
-                                        m = mp;
-                                        if (*np == wxT(' '))
-                                        {
-                                                mp = NULL;
-                                                goto check_percent;
-                                        }
-                                        n = ++np;
-                                        count = pcount;
-                                }
-                                else
-                                check_percent:
-
-                                if (ma)
-                                {
-                                        m = ma;
-                                        n = ++na;
-                                        count = acount;
-                                }
-                                else
-                                return false;
-                        }
+                if (ma)
+                {
+                    m = ma;
+                    n = ++na;
+                    count = acount;
                 }
                 }
+                else
+                    return false;
+            }
         }
         }
+    }
 }
 
 // Return the type of an open file
 }
 
 // Return the type of an open file
index 0dbf1be3a9955b35b8cce4a3ee213a1cc8ceb438..45091bda8f707dc5eec9df12b7f2a07ae4f817af 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      John Labenski
 // Modified by:
 // Created:     14.06.03 (extracted from src/*/filedlg.cpp)
 // Author:      John Labenski
 // Modified by:
 // Created:     14.06.03 (extracted from src/*/filedlg.cpp)
-// RCS-ID:
+// RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxFileDialogBase, wxDialog)
 
 void wxFileDialogBase::Init()
 IMPLEMENT_DYNAMIC_CLASS(wxFileDialogBase, wxDialog)
 
 void wxFileDialogBase::Init()
-{ 
+{
     m_filterIndex = m_dialogStyle = 0;
     m_parent = NULL;
 }
     m_filterIndex = m_dialogStyle = 0;
     m_parent = NULL;
 }
@@ -179,24 +179,24 @@ wxString wxFileSelector(const wxChar *title,
 
    // if filter is of form "All files (*)|*|..." set correct filter index
     if((wxStrlen(defaultExtension) != 0) && (filter2.Find(wxT('|')) != wxNOT_FOUND))
 
    // if filter is of form "All files (*)|*|..." set correct filter index
     if((wxStrlen(defaultExtension) != 0) && (filter2.Find(wxT('|')) != wxNOT_FOUND))
-            {
+    {
         int filterIndex = 0;
 
         wxArrayString descriptions, filters;
         // don't care about errors, handled already by wxFileDialog
         (void)wxParseCommonDialogsFilter(filter2, descriptions, filters);
         for (size_t n=0; n<filters.GetCount(); n++)
         int filterIndex = 0;
 
         wxArrayString descriptions, filters;
         // don't care about errors, handled already by wxFileDialog
         (void)wxParseCommonDialogsFilter(filter2, descriptions, filters);
         for (size_t n=0; n<filters.GetCount(); n++)
-                {
+        {
             if (filters[n].Contains(defaultExtension))
             if (filters[n].Contains(defaultExtension))
-                    {
+            {
                 filterIndex = n;
                         break;
                 filterIndex = n;
                         break;
-                    }
-                }
+            }
+        }
 
         if (filterIndex > 0)
             fileDialog.SetFilterIndex(filterIndex);
 
         if (filterIndex > 0)
             fileDialog.SetFilterIndex(filterIndex);
-        }
+    }
 
     wxString filename;
     if ( fileDialog.ShowModal() == wxID_OK )
 
     wxString filename;
     if ( fileDialog.ShowModal() == wxID_OK )
index ce31404d45c9721dcf6275eea4418a805fd398d8..a7775d2a29662d16404a5c2ad5ad4dcf7fc44915 100644 (file)
@@ -68,7 +68,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
 
     switch (c)
     {
 
     switch (c)
     {
-        case wxT('2'): // ASCII Grey 
+        case wxT('2'): // ASCII Grey
         case wxT('3'): // ASCII RGB
         case wxT('5'): // RAW Grey
         case wxT('6'): break;
         case wxT('3'): // ASCII RGB
         case wxT('5'): // RAW Grey
         case wxT('6'): break;
@@ -94,14 +94,14 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
     }
 
 
     }
 
 
-    if (c=='2') // Ascii GREY 
-    {    
+    if (c=='2') // Ascii GREY
+    {
         wxUint32 value, size=width*height;
         for (wxUint32 i=0; i<size; ++i)
         {
             value=text_stream.Read32();
             *ptr++=(unsigned char)value; // R
         wxUint32 value, size=width*height;
         for (wxUint32 i=0; i<size; ++i)
         {
             value=text_stream.Read32();
             *ptr++=(unsigned char)value; // R
-            *ptr++=(unsigned char)value; // G 
+            *ptr++=(unsigned char)value; // G
             *ptr++=(unsigned char)value; // B
             if ( !buf_stream )
             {
             *ptr++=(unsigned char)value; // B
             if ( !buf_stream )
             {
@@ -110,8 +110,8 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
             }
         }
     }
             }
         }
     }
-   if (c=='3') // Ascii RBG
-      {
+    if (c=='3') // Ascii RBG
+    {
         wxUint32 value, size=3*width*height;
         for (wxUint32 i=0; i<size; ++i)
           {
         wxUint32 value, size=3*width*height;
         for (wxUint32 i=0; i<size; ++i)
           {
@@ -126,9 +126,9 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
                 return false;
               }
           }
                 return false;
               }
           }
-      }
-   if (c=='5') // Raw GREY
-    {    
+    }
+    if (c=='5') // Raw GREY
+    {
         wxUint32 size=width*height;
         unsigned char value;
         for (wxUint32 i=0; i<size; ++i)
         wxUint32 size=width*height;
         unsigned char value;
         for (wxUint32 i=0; i<size; ++i)
@@ -136,7 +136,7 @@ bool wxPNMHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose
             buf_stream.Read(&value,1);
             *ptr++=value; // R
             *ptr++=value; // G
             buf_stream.Read(&value,1);
             *ptr++=value; // R
             *ptr++=value; // G
-            *ptr++=value; // B 
+            *ptr++=value; // B
             if ( !buf_stream )
             {
                 if (verbose) wxLogError(_("PNM: File seems truncated."));
             if ( !buf_stream )
             {
                 if (verbose) wxLogError(_("PNM: File seems truncated."));
index fe4aff00ae63d45d4b1df8a45a8f62e44ca13c11..9729a99fd494cf341b5b97a8d040629fefbc5d98 100644 (file)
@@ -802,7 +802,8 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
     // copy it to our buffer and free memory
     // Crashes on SmartPhone (FIXME)
 #if !defined(__SMARTPHONE__) /* of WinCE */
     // copy it to our buffer and free memory
     // Crashes on SmartPhone (FIXME)
 #if !defined(__SMARTPHONE__) /* of WinCE */
-     if( lpMsgBuf != 0 ) {
+    if( lpMsgBuf != 0 )
+    {
         wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
         s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');
 
         wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
         s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');
 
index 7897bf2f6bc992b75870f237504bdbd1f2da3ebc..e2b21ee6b6f10554003d0aaafe921f405324ee3a 100644 (file)
@@ -289,14 +289,14 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
                         keyCode = WXK_WINDOWS_LEFT;
                     else if ( current == wxT("WINDOWS_RIGHT") )
                         keyCode = WXK_WINDOWS_RIGHT;
                         keyCode = WXK_WINDOWS_LEFT;
                     else if ( current == wxT("WINDOWS_RIGHT") )
                         keyCode = WXK_WINDOWS_RIGHT;
-                     else if ( current == wxT("WINDOWS_MENU") )
+                    else if ( current == wxT("WINDOWS_MENU") )
                         keyCode = WXK_WINDOWS_MENU;
                     else if ( current == wxT("COMMAND") )
                         keyCode = WXK_COMMAND;
                         keyCode = WXK_WINDOWS_MENU;
                     else if ( current == wxT("COMMAND") )
                         keyCode = WXK_COMMAND;
-                    else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) ) {
-                    keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3);  }
-                    else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) ) {
-                    keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1;  }
+                    else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) )
+                        keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3);
+                    else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) )
+                        keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1;
                     else
                     {
                         wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
                     else
                     {
                         wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
index cded294536c5f1222b30fad00b24022e6a628e19..9e72b8aa59bad2fc791ba288391aa226f2eaf420 100644 (file)
@@ -435,35 +435,35 @@ wxStringBase::iterator wxStringBase::erase(iterator it)
 
 wxStringBase& wxStringBase::erase(size_t nStart, size_t nLen)
 {
 
 wxStringBase& wxStringBase::erase(size_t nStart, size_t nLen)
 {
-  wxASSERT(nStart <= length());
-  size_t strLen = length() - nStart;
-  // delete nLen or up to the end of the string characters
-  nLen = strLen < nLen ? strLen : nLen;
-  wxString strTmp(c_str(), nStart);
-  strTmp.append(c_str() + nStart + nLen, length() - nStart - nLen);
+    wxASSERT(nStart <= length());
+    size_t strLen = length() - nStart;
+    // delete nLen or up to the end of the string characters
+    nLen = strLen < nLen ? strLen : nLen;
+    wxString strTmp(c_str(), nStart);
+    strTmp.append(c_str() + nStart + nLen, length() - nStart - nLen);
 
 
-  swap(strTmp);
-  return *this;
+    swap(strTmp);
+    return *this;
 }
 
 wxStringBase& wxStringBase::insert(size_t nPos, const wxChar *sz, size_t n)
 {
 }
 
 wxStringBase& wxStringBase::insert(size_t nPos, const wxChar *sz, size_t n)
 {
-  wxASSERT( nPos <= length() );
+    wxASSERT( nPos <= length() );
 
 
-  if ( n == npos ) n = wxStrlen(sz);
-  if ( n == 0 ) return *this;
+    if ( n == npos ) n = wxStrlen(sz);
+    if ( n == 0 ) return *this;
 
 
-  if ( !Alloc(length() + n) || !CopyBeforeWrite() ) {
-    wxFAIL_MSG( _T("out of memory in wxStringBase::insert") );
-  }
+    if ( !Alloc(length() + n) || !CopyBeforeWrite() ) {
+        wxFAIL_MSG( _T("out of memory in wxStringBase::insert") );
+    }
 
 
-  memmove(m_pchData + nPos + n, m_pchData + nPos,
-          (length() - nPos) * sizeof(wxChar));
-  memcpy(m_pchData + nPos, sz, n * sizeof(wxChar));
-  GetStringData()->nDataLength = length() + n;
-  m_pchData[length()] = '\0';
+    memmove(m_pchData + nPos + n, m_pchData + nPos,
+            (length() - nPos) * sizeof(wxChar));
+    memcpy(m_pchData + nPos, sz, n * sizeof(wxChar));
+    GetStringData()->nDataLength = length() + n;
+    m_pchData[length()] = '\0';
 
 
-  return *this;
+    return *this;
 }
 
 void wxStringBase::swap(wxStringBase& str)
 }
 
 void wxStringBase::swap(wxStringBase& str)
@@ -475,50 +475,50 @@ void wxStringBase::swap(wxStringBase& str)
 
 size_t wxStringBase::find(const wxStringBase& str, size_t nStart) const
 {
 
 size_t wxStringBase::find(const wxStringBase& str, size_t nStart) const
 {
-  wxASSERT( str.GetStringData()->IsValid() );
-  wxASSERT( nStart <= length() );
+    wxASSERT( str.GetStringData()->IsValid() );
+    wxASSERT( nStart <= length() );
 
 
-  //anchor
-  const wxChar* p = (const wxChar*)wxTmemchr(c_str() + nStart,
-                                            str.c_str()[0],
-                                            length() - nStart);
+    //anchor
+    const wxChar* p = (const wxChar*)wxTmemchr(c_str() + nStart,
+                                               str.c_str()[0],
+                                               length() - nStart);
 
 
-  if(!p)
-      return npos;
+    if(!p)
+        return npos;
 
 
-  while(p - c_str() + str.length() <= length() &&
-        wxTmemcmp(p, str.c_str(), str.length()) )
-  {
-      //Previosly passed as the first argument to wxTmemchr,
-      //but C/C++ standard does not specify evaluation order
-      //of arguments to functions -
-      //http://embedded.com/showArticle.jhtml?articleID=9900607
-      ++p;
-
-      //anchor again
-      p = (const wxChar*)wxTmemchr(p,
-                                  str.c_str()[0],
-                                  length() - (p - c_str()));
-
-      if(!p)
-          return npos;
-  }
+    while(p - c_str() + str.length() <= length() &&
+          wxTmemcmp(p, str.c_str(), str.length()) )
+    {
+        //Previosly passed as the first argument to wxTmemchr,
+        //but C/C++ standard does not specify evaluation order
+        //of arguments to functions -
+        //http://embedded.com/showArticle.jhtml?articleID=9900607
+        ++p;
+
+        //anchor again
+        p = (const wxChar*)wxTmemchr(p,
+                                     str.c_str()[0],
+                                     length() - (p - c_str()));
 
 
-   return (p - c_str() + str.length() <= length()) ? p - c_str() : npos;
+        if(!p)
+            return npos;
+    }
+
+    return (p - c_str() + str.length() <= length()) ? p - c_str() : npos;
 }
 
 size_t wxStringBase::find(const wxChar* sz, size_t nStart, size_t n) const
 {
 }
 
 size_t wxStringBase::find(const wxChar* sz, size_t nStart, size_t n) const
 {
-  return find(wxStringBase(sz, n), nStart);
+    return find(wxStringBase(sz, n), nStart);
 }
 
 size_t wxStringBase::find(wxChar ch, size_t nStart) const
 {
 }
 
 size_t wxStringBase::find(wxChar ch, size_t nStart) const
 {
-  wxASSERT( nStart <= length() );
+    wxASSERT( nStart <= length() );
 
 
-  const wxChar *p = (const wxChar*)wxTmemchr(c_str() + nStart, ch, length() - nStart);
+    const wxChar *p = (const wxChar*)wxTmemchr(c_str() + nStart, ch, length() - nStart);
 
 
-  return p == NULL ? npos : p - c_str();
+    return p == NULL ? npos : p - c_str();
 }
 
 size_t wxStringBase::rfind(const wxStringBase& str, size_t nStart) const
 }
 
 size_t wxStringBase::rfind(const wxStringBase& str, size_t nStart) const
index 93bc7ad912bffa5f6f9a810c06db73f89698dd23..ede8a1c5ea49f9b21d2835125962a3d30abe09f1 100644 (file)
@@ -132,7 +132,7 @@ wxUint32 wxTextInputStream::Read32(int base)
     if(!m_input) return 0;
 
     wxString word = ReadWord();
     if(!m_input) return 0;
 
     wxString word = ReadWord();
-    if(word.IsEmpty())
+    if(word.empty())
         return 0;
     return wxStrtoul(word.c_str(), 0, base);
 }
         return 0;
     return wxStrtoul(word.c_str(), 0, base);
 }
@@ -153,7 +153,7 @@ wxInt32 wxTextInputStream::Read32S(int base)
     if(!m_input) return 0;
 
     wxString word = ReadWord();
     if(!m_input) return 0;
 
     wxString word = ReadWord();
-    if(word.IsEmpty())
+    if(word.empty())
         return 0;
     return wxStrtol(word.c_str(), 0, base);
 }
         return 0;
     return wxStrtol(word.c_str(), 0, base);
 }
@@ -172,7 +172,7 @@ double wxTextInputStream::ReadDouble()
 {
     if(!m_input) return 0;
     wxString word = ReadWord();
 {
     if(!m_input) return 0;
     wxString word = ReadWord();
-    if(word.IsEmpty())
+    if(word.empty())
         return 0;
     return wxStrtod(word.c_str(), 0);
 }
         return 0;
     return wxStrtod(word.c_str(), 0);
 }
@@ -406,7 +406,7 @@ void wxTextOutputStream::WriteString(const wxString& string)
         }
 
         out << c;
         }
 
         out << c;
-   }
+    }
 
     // We must not write the trailing NULL here
 #if wxUSE_UNICODE
 
     // We must not write the trailing NULL here
 #if wxUSE_UNICODE
index e9aaf19e38386f7a6057edb67a8c58d319e26cee..f1b5a10e455f06a5e2db842df21be9ba3d6e44cd 100644 (file)
@@ -4,9 +4,9 @@
 // Author:      Kevin Smith
 // Modified by:
 // Created:     Jan 22 1999
 // Author:      Kevin Smith
 // Modified by:
 // Created:     Jan 22 1999
-// RCS-ID:
+// RCS-ID:      $Id$
 // Copyright:   (c) 1999 Kevin Smith
 // Copyright:   (c) 1999 Kevin Smith
-// Licence:           wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
@@ -336,65 +336,66 @@ bool wxGenericValidator::TransferToWindow(void)
 // Called to transfer data from the window
 bool wxGenericValidator::TransferFromWindow(void)
 {
 // Called to transfer data from the window
 bool wxGenericValidator::TransferFromWindow(void)
 {
-  if ( !m_validatorWindow )
-    return false;
+    if ( !m_validatorWindow )
+        return false;
 
 
-  // bool controls
+    // BOOL CONTROLS **************************************
 #if wxUSE_CHECKBOX
 #if wxUSE_CHECKBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
-  {
-    wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
-        if (m_pBool)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
     {
     {
-      *m_pBool = pControl->GetValue() ;
-      return true;
-    }
-  } else
+        wxCheckBox* pControl = (wxCheckBox*) m_validatorWindow;
+        if (m_pBool)
+        {
+            *m_pBool = pControl->GetValue() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_RADIOBTN
 #endif
 #if wxUSE_RADIOBTN
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
-  {
-    wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
-        if (m_pBool)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioButton)) )
     {
     {
-      *m_pBool = pControl->GetValue() ;
-      return true;
-    }
-  } else
+        wxRadioButton* pControl = (wxRadioButton*) m_validatorWindow;
+        if (m_pBool)
+        {
+            *m_pBool = pControl->GetValue() ;
+            return true;
+        }
+    } else
 #endif
 #endif
-  // int controls
+
+    // INT CONTROLS ***************************************
 #if wxUSE_GAUGE
 #if wxUSE_GAUGE
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
-  {
-    wxGauge* pControl = (wxGauge*) m_validatorWindow;
-        if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
     {
     {
-      *m_pInt = pControl->GetValue() ;
-      return true;
-    }
-  } else
+        wxGauge* pControl = (wxGauge*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetValue() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_RADIOBOX
 #endif
 #if wxUSE_RADIOBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
-  {
-    wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
-        if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxRadioBox)) )
     {
     {
-      *m_pInt = pControl->GetSelection() ;
-      return true;
-    }
-  } else
+        wxRadioBox* pControl = (wxRadioBox*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetSelection() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_SCROLLBAR
 #endif
 #if wxUSE_SCROLLBAR
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
-  {
-    wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
-        if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxScrollBar)) )
     {
     {
-      *m_pInt = pControl->GetThumbPosition() ;
-      return true;
-    }
-  } else
+        wxScrollBar* pControl = (wxScrollBar*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetThumbPosition() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_SPINCTRL && !defined(__WXMOTIF__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
 #endif
 #if wxUSE_SPINCTRL && !defined(__WXMOTIF__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
@@ -408,153 +409,156 @@ bool wxGenericValidator::TransferFromWindow(void)
     } else
 #endif
 #if wxUSE_SPINBTN
     } else
 #endif
 #if wxUSE_SPINBTN
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
-  {
-    wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
-        if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
     {
     {
-      *m_pInt = pControl->GetValue() ;
-      return true;
-    }
-  } else
+        wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetValue() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_SLIDER
 #endif
 #if wxUSE_SLIDER
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
-  {
-    wxSlider* pControl = (wxSlider*) m_validatorWindow;
-    if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxSlider)) )
     {
     {
-      *m_pInt = pControl->GetValue() ;
-      return true;
-    }
-  } else
+        wxSlider* pControl = (wxSlider*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetValue() ;
+            return true;
+        }
+    } else
 #endif
 #endif
-  // string controls
+
+    // STRING CONTROLS ************************************
 #if wxUSE_BUTTON
 #if wxUSE_BUTTON
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
-  {
-    wxButton* pControl = (wxButton*) m_validatorWindow;
-        if (m_pString)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
     {
     {
-      *m_pString = pControl->GetLabel() ;
-      return true;
-    }
-  } else
+        wxButton* pControl = (wxButton*) m_validatorWindow;
+        if (m_pString)
+        {
+            *m_pString = pControl->GetLabel() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_COMBOBOX
 #endif
 #if wxUSE_COMBOBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
-  {
-    wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
-    if (m_pInt)
-    {
-      *m_pInt = pControl->GetSelection() ;
-      return true;
-    }
-    else if (m_pString)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxComboBox)) )
     {
     {
-        if (m_validatorWindow->GetWindowStyle() & wxCB_READONLY)
-            *m_pString = pControl->GetStringSelection();
-        else
-            *m_pString = pControl->GetValue();
-        return true;
-    }
-  } else
+        wxComboBox* pControl = (wxComboBox*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetSelection() ;
+            return true;
+        }
+        else if (m_pString)
+        {
+            if (m_validatorWindow->GetWindowStyle() & wxCB_READONLY)
+                *m_pString = pControl->GetStringSelection();
+            else
+                *m_pString = pControl->GetValue();
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_CHOICE
 #endif
 #if wxUSE_CHOICE
- if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
-  {
-    wxChoice* pControl = (wxChoice*) m_validatorWindow;
-        if (m_pInt)
-    {
-      *m_pInt = pControl->GetSelection() ;
-      return true;
-    }
-    else if (m_pString)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxChoice)) )
     {
     {
-        *m_pString = pControl->GetStringSelection();
-        return true;
-    }
-  } else
+        wxChoice* pControl = (wxChoice*) m_validatorWindow;
+        if (m_pInt)
+        {
+            *m_pInt = pControl->GetSelection() ;
+            return true;
+        }
+        else if (m_pString)
+        {
+            *m_pString = pControl->GetStringSelection();
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_STATTEXT
 #endif
 #if wxUSE_STATTEXT
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
-  {
-    wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
-        if (m_pString)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxStaticText)) )
     {
     {
-      *m_pString = pControl->GetLabel() ;
-      return true;
-    }
-  } else
+        wxStaticText* pControl = (wxStaticText*) m_validatorWindow;
+        if (m_pString)
+        {
+            *m_pString = pControl->GetLabel() ;
+            return true;
+        }
+    } else
 #endif
 #if wxUSE_TEXTCTRL
 #endif
 #if wxUSE_TEXTCTRL
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
-  {
-    wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
-        if (m_pString)
-    {
-      *m_pString = pControl->GetValue() ;
-      return true;
-    }
-    else if (m_pInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
     {
     {
-        *m_pInt = wxAtoi(pControl->GetValue());
-        return true;
-    }
-  } else
+        wxTextCtrl* pControl = (wxTextCtrl*) m_validatorWindow;
+        if (m_pString)
+        {
+            *m_pString = pControl->GetValue() ;
+            return true;
+        }
+        else if (m_pInt)
+        {
+            *m_pInt = wxAtoi(pControl->GetValue());
+            return true;
+        }
+    } else
 #endif
 #endif
-  // array controls
+
+    // ARRAY CONTROLS *************************************
 #if wxUSE_CHECKLISTBOX
 #if wxUSE_CHECKLISTBOX
-  // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
-  {
-    wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow;
-    if (m_pArrayInt)
+    // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
     {
     {
-      // clear our array
-      m_pArrayInt->Clear();
-
-      // add each selected item to our array
-      size_t i,
-             count = pControl->GetCount();
-      for ( i = 0; i < count; i++ )
-      {
-        if (pControl->IsChecked(i))
-          m_pArrayInt->Add(i);
-      }
-
-      return true;
-    }
-    else
-      return false;
-  } else
+        wxCheckListBox* pControl = (wxCheckListBox*) m_validatorWindow;
+        if (m_pArrayInt)
+        {
+            // clear our array
+            m_pArrayInt->Clear();
+
+            // add each selected item to our array
+            size_t i,
+                   count = pControl->GetCount();
+            for ( i = 0; i < count; i++ )
+            {
+                if (pControl->IsChecked(i))
+                    m_pArrayInt->Add(i);
+            }
+
+            return true;
+        }
+        else
+            return false;
+    } else
 #endif
 #if wxUSE_LISTBOX
 #endif
 #if wxUSE_LISTBOX
-  if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
-  {
-    wxListBox* pControl = (wxListBox*) m_validatorWindow;
-    if (m_pArrayInt)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
     {
     {
-      // clear our array
-      m_pArrayInt->Clear();
+        wxListBox* pControl = (wxListBox*) m_validatorWindow;
+        if (m_pArrayInt)
+        {
+            // clear our array
+            m_pArrayInt->Clear();
 
 
-      // add each selected item to our array
-      size_t i,
-             count = pControl->GetCount();
-      for ( i = 0; i < count; i++ )
-      {
-        if (pControl->Selected(i))
-          m_pArrayInt->Add(i);
-      }
+            // add each selected item to our array
+            size_t i,
+                   count = pControl->GetCount();
+            for ( i = 0; i < count; i++ )
+            {
+                if (pControl->Selected(i))
+                    m_pArrayInt->Add(i);
+            }
 
 
-      return true;
-    }
-  } else
+            return true;
+        }
+    } else
 #endif
 
 #endif
 
-  // unrecognized control, or bad pointer
+    // unrecognized control, or bad pointer
+        return false;
+
     return false;
     return false;
-  return false;
 }
 
 /*
 }
 
 /*
index 3b50efa3ea52b8f676924790d8d279f59bf073df..83a751a5bbe8dc291f6167e44a89a6080b380971 100644 (file)
@@ -261,7 +261,7 @@ wxString wxFileData::GetFileType() const
         return _("<LINK>");
     else if (IsDrive())
         return _("<DRIVE>");
         return _("<LINK>");
     else if (IsDrive())
         return _("<DRIVE>");
-   else if (m_fileName.Find(wxT('.'), true) != wxNOT_FOUND)
+    else if (m_fileName.Find(wxT('.'), true) != wxNOT_FOUND)
         return m_fileName.AfterLast(wxT('.'));
 
     return wxEmptyString;
         return m_fileName.AfterLast(wxT('.'));
 
     return wxEmptyString;
@@ -318,7 +318,7 @@ wxString wxFileData::GetEntry( fileListFieldType num ) const
             break;
 
         case FileList_Time:
             break;
 
         case FileList_Time:
-                if (!IsDrive())
+            if (!IsDrive())
                 s = GetModificationTime();
             break;
 
                 s = GetModificationTime();
             break;
 
@@ -534,7 +534,7 @@ void wxFileCtrl::UpdateFiles()
 #endif // __UNIX__
             wxFileData *fd = new wxFileData(p, wxT(".."), wxFileData::is_dir, wxFileIconsTable::folder);
             if (Add(fd, item) != -1)
 #endif // __UNIX__
             wxFileData *fd = new wxFileData(p, wxT(".."), wxFileData::is_dir, wxFileIconsTable::folder);
             if (Add(fd, item) != -1)
-            item.m_itemId++;
+                item.m_itemId++;
             else
                 delete fd;
         }
             else
                 delete fd;
         }
@@ -563,7 +563,7 @@ void wxFileCtrl::UpdateFiles()
             {
                 wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_dir, wxFileIconsTable::folder);
                 if (Add(fd, item) != -1)
             {
                 wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_dir, wxFileIconsTable::folder);
                 if (Add(fd, item) != -1)
-                item.m_itemId++;
+                    item.m_itemId++;
                 else
                     delete fd;
 
                 else
                     delete fd;
 
@@ -581,7 +581,7 @@ void wxFileCtrl::UpdateFiles()
                 {
                     wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_file, wxFileIconsTable::file);
                     if (Add(fd, item) != -1)
                 {
                     wxFileData *fd = new wxFileData(dirPrefix + f, f, wxFileData::is_file, wxFileIconsTable::file);
                     if (Add(fd, item) != -1)
-                    item.m_itemId++;
+                        item.m_itemId++;
                     else
                         delete fd;
 
                     else
                         delete fd;
 
index b8d878683975e7d6743267f3184932dbcc7384cb..eee62d49aba8bd88affed8a2eddcdcd4ebbb3550 100644 (file)
@@ -260,7 +260,7 @@ private:
     // Work around the fact that a focus kill event can be sent to
     // a combobox within a set focus event.
     bool                m_inSetFocus;
     // Work around the fact that a focus kill event can be sent to
     // a combobox within a set focus event.
     bool                m_inSetFocus;
-    
+
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxGridCellEditorEvtHandler)
     DECLARE_NO_COPY_CLASS(wxGridCellEditorEvtHandler)
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxGridCellEditorEvtHandler)
     DECLARE_NO_COPY_CLASS(wxGridCellEditorEvtHandler)
@@ -1972,21 +1972,19 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
             {
                 wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str());
             }
             {
                 wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str());
             }
-
         }
         }
-                tmp = params.AfterFirst(_T(','));
-                if ( !tmp.empty() )
-                {
-                    long precision;
+        tmp = params.AfterFirst(_T(','));
+        if ( !tmp.empty() )
+        {
+            long precision;
             if ( tmp.ToLong(&precision) )
             if ( tmp.ToLong(&precision) )
-                    {
+            {
                 SetPrecision((int)precision);
                 SetPrecision((int)precision);
-                    }
-                    else
-                    {
+            }
+            else
+            {
                 wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str());
                 wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str());
-        }
-
+            }
         }
     }
 }
         }
     }
 }
index 970370bdb5f4a6d337038078e3b7d6463146b197..05d11b19eff3ce3bf01e297568eb4bc0c3ec239c 100644 (file)
@@ -118,8 +118,9 @@ wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid,
     return DoGetBestSize(attr, dc, GetString(grid, row, col));
 }
 
     return DoGetBestSize(attr, dc, GetString(grid, row, col));
 }
 
-void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
-    if (!params.IsEmpty())
+void wxGridCellDateTimeRenderer::SetParameters(const wxString& params)
+{
+    if (!params.empty())
         m_oformat=params;
 }
 
         m_oformat=params;
 }
 
@@ -134,7 +135,7 @@ void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
 
 wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
 {
 
 wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
 {
-    if (!choices.IsEmpty())
+    if (!choices.empty())
         SetParameters(choices);
 }
 
         SetParameters(choices);
 }
 
@@ -222,11 +223,11 @@ void wxGridCellEnumRenderer::SetParameters(const wxString& params)
 // "John","Fred"..."Bob" in the combo choice box
 
 wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices)
 // "John","Fred"..."Bob" in the combo choice box
 
 wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices)
-                    wxGridCellChoiceEditor()
+                     :wxGridCellChoiceEditor()
 {
     m_startint = -1;
 
 {
     m_startint = -1;
 
-    if (!choices.IsEmpty())
+    if (!choices.empty())
         SetParameters(choices);
 }
 
         SetParameters(choices);
 }
 
@@ -251,7 +252,7 @@ void wxGridCellEnumEditor::BeginEdit(int row, int col, wxGrid* grid)
     else
     {
         wxString startValue = table->GetValue(row, col);
     else
     {
         wxString startValue = table->GetValue(row, col);
-        if (startValue.IsNumber() && !startValue.IsEmpty())
+        if (startValue.IsNumber() && !startValue.empty())
         {
             startValue.ToLong(&m_startint);
         }
         {
             startValue.ToLong(&m_startint);
         }
@@ -349,22 +350,24 @@ wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
     while ( tk.HasMoreTokens() )
     {
         wxString tok = tk.GetNextToken();
     while ( tk.HasMoreTokens() )
     {
         wxString tok = tk.GetNextToken();
-    //FIXME: this causes us to print an extra unnecesary
-    //       space at the end of the line. But it
-    //       is invisible , simplifies the size calculation
-    //       and ensures tokens are separated in the display
-    tok += _T(" ");
+        //FIXME: this causes us to print an extra unnecesary
+        //       space at the end of the line. But it
+        //       is invisible , simplifies the size calculation
+        //       and ensures tokens are separated in the display
+        tok += _T(" ");
 
         dc.GetTextExtent(tok, &x, &y);
 
         dc.GetTextExtent(tok, &x, &y);
-        if ( curr_x + x > max_x) {
+        if ( curr_x + x > max_x)
+        {
             lines.Add( wxString(thisline) );
             lines.Add( wxString(thisline) );
-        thisline = tok;
-        curr_x=x;
-    } else {
+            thisline = tok;
+            curr_x=x;
+        }
+        else
+        {
             thisline+= tok;
             thisline+= tok;
-        curr_x += x;
-    }
-
+            curr_x += x;
+        }
     }
     //Add last line
     lines.Add( wxString(thisline) );
     }
     //Add last line
     lines.Add( wxString(thisline) );
index 72bd336298228978f04bb13ce19e9da7a41b7261..d7677af92dbbc841ed12770c10309b9282a81f82 100644 (file)
@@ -3716,8 +3716,8 @@ void wxListMainWindow::SetItemState( long litem, long state, long stateMask )
         return;
     }
 
         return;
     }
 
-     wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
-                  _T("invalid list ctrl item index in SetItem") );
+    wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
+                 _T("invalid list ctrl item index in SetItem") );
 
     size_t oldCurrent = m_current;
     size_t item = (size_t)litem;    // safe because of the check above
 
     size_t oldCurrent = m_current;
     size_t item = (size_t)litem;    // safe because of the check above
index 014945054366c5fb6229d6dec1e34709b1ca8df5..1ac1e8d09e8b45dc7a0272b7e697914148409f82 100644 (file)
@@ -114,14 +114,14 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
             else
             {
                 m_Cache[tg].End1 = m_Cache[tg].End2 = -1;
             else
             {
                 m_Cache[tg].End1 = m_Cache[tg].End2 = -1;
-                
+
                 if (wxIsCDATAElement(tagBuffer))
                 {
                     // store the orig pos in case we are missing the closing
                     // tag (see below)
                 if (wxIsCDATAElement(tagBuffer))
                 {
                     // store the orig pos in case we are missing the closing
                     // tag (see below)
-                    wxInt32 old_pos = pos; 
+                    wxInt32 old_pos = pos;
                     bool foundCloseTag = false;
                     bool foundCloseTag = false;
-                    
+
                     // find next matching tag
                     int tag_len = wxStrlen(tagBuffer);
                     while (pos < lng)
                     // find next matching tag
                     int tag_len = wxStrlen(tagBuffer);
                     while (pos < lng)
@@ -152,7 +152,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
                         }
 
                         // found a match
                         }
 
                         // found a match
-                        if (match_pos == tag_len) 
+                        if (match_pos == tag_len)
                         {
                             pos = pos - tag_len - 3;
                             foundCloseTag = true;
                         {
                             pos = pos - tag_len - 3;
                             foundCloseTag = true;
@@ -365,12 +365,12 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent,
         }
 
         #undef IS_WHITE
         }
 
         #undef IS_WHITE
-   }
-   m_Begin = i;
+    }
+    m_Begin = i;
 
 
-   cache->QueryTag(pos, &m_End1, &m_End2);
-   if (m_End1 > end_pos) m_End1 = end_pos;
-   if (m_End2 > end_pos) m_End2 = end_pos;
+    cache->QueryTag(pos, &m_End1, &m_End2);
+    if (m_End1 > end_pos) m_End1 = end_pos;
+    if (m_End2 > end_pos) m_End2 = end_pos;
 }
 
 wxHtmlTag::~wxHtmlTag()
 }
 
 wxHtmlTag::~wxHtmlTag()