]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
Fixed problem where corner label was displayed when either row or col label size...
[wxWidgets.git] / src / common / fileconf.cpp
index 54bc21641a83d76157a032d94ba8e223c1e00699..1ee849986d80b72977611516eab6a9d80d032db0 100644 (file)
@@ -49,9 +49,6 @@
 #if defined(__WXPM__)
   #define INCL_DOS
   #include <os2.h>
-  #define LINKAGEMODE _Optlink
-#else
-  #define LINKAGEMODE
 #endif
 
 #include  <stdlib.h>
@@ -471,6 +468,7 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
       }
     }
     else {                        // a key
+      size_t count = 0;
       const wxChar *pEnd = pStart;
       while ( *pEnd != wxT('=') && !wxIsspace(*pEnd) ) {
         if ( *pEnd == wxT('\\') ) {
@@ -479,10 +477,11 @@ void wxFileConfig::Parse(wxTextFile& file, bool bLocal)
           pEnd++;
         }
 
+        count++;
         pEnd++;
       }
 
-      wxString strKey(FilterInEntryName(wxString(pStart, pEnd)));
+      wxString strKey(FilterInEntryName(wxString(pStart, count)));
 
       // skip whitespace
       while ( isspace(*pEnd) )
@@ -595,7 +594,7 @@ bool wxFileConfig::GetFirstGroup(wxString& str, long& lIndex) const
 bool wxFileConfig::GetNextGroup (wxString& str, long& lIndex) const
 {
   if ( size_t(lIndex) < m_pCurrentGroup->Groups().Count() ) {
-    str = m_pCurrentGroup->Groups()[lIndex++]->Name();
+    str = m_pCurrentGroup->Groups()[(size_t)lIndex++]->Name();
     return TRUE;
   }
   else
@@ -611,7 +610,7 @@ bool wxFileConfig::GetFirstEntry(wxString& str, long& lIndex) const
 bool wxFileConfig::GetNextEntry (wxString& str, long& lIndex) const
 {
   if ( size_t(lIndex) < m_pCurrentGroup->Entries().Count() ) {
-    str = m_pCurrentGroup->Entries()[lIndex++]->Name();
+    str = m_pCurrentGroup->Entries()[(size_t)lIndex++]->Name();
     return TRUE;
   }
   else
@@ -764,7 +763,7 @@ bool wxFileConfig::Write(const wxString& key, long lValue)
 
 bool wxFileConfig::Flush(bool /* bCurrentOnly */)
 {
-  if ( LineListIsEmpty() || !m_pRootGroup->IsDirty() )
+  if ( LineListIsEmpty() || !m_pRootGroup->IsDirty() || !m_strLocalFile )
     return TRUE;
 
   wxTempFile file(m_strLocalFile);