[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/koffice/1.6/koffice
From:       Thomas Zander <zander () kde ! org>
Date:       2006-06-30 14:15:18
Message-ID: 1151676918.589324.31571.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 556517 by zander:

weekly forward port

 M  +1 -1      kspread/kspread_style_manager.cc  
 M  +9 -11     lib/kofficecore/KoDocument.cpp  


--- branches/koffice/1.6/koffice/kspread/kspread_style_manager.cc #556516:556517
@@ -328,7 +328,7 @@
 {
   QStringList list;
 
-  list.push_back( "Default" );
+  list.push_back( i18n("Default") );
 
   Styles::const_iterator iter = m_styles.begin();
   Styles::const_iterator end  = m_styles.end();
--- branches/koffice/1.6/koffice/lib/kofficecore/KoDocument.cpp #556516:556517
@@ -1674,18 +1674,16 @@
         }
 
         // Try to find out whether it is a mime multi part file
-        char buf[2];
-        do {
-            if ( in.readBlock( buf, 1 ) < 1 )
-            {
-                QApplication::restoreOverrideCursor();
-                in.close();
-                d->lastErrorMessage = i18n( "Could not read the beginning of the file." );
-                return false;
-            }
-        } while ( QChar( buf[0] ).isSpace() );
+        char buf[5];
+        if ( in.readBlock( buf, 4 ) < 4 )
+        {
+            QApplication::restoreOverrideCursor();
+            in.close();
+            d->lastErrorMessage = i18n( "Could not read the beginning of the file." );
+            return false;
+        }
         // ### TODO: allow UTF-16
-        isRawXML = ( buf[0] == '<' );
+        isRawXML = (strncasecmp( buf, "<?xm", 4 ) == 0);
         //kdDebug(30003) << "PATTERN=" << buf << endl;
     }
     // Is it plain XML?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic