]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PAL11498: Patch to import tables with tabulation separated values. A fix by Erwan...
authorjfa <jfa@opencascade.com>
Fri, 3 Feb 2006 12:43:26 +0000 (12:43 +0000)
committerjfa <jfa@opencascade.com>
Fri, 3 Feb 2006 12:43:26 +0000 (12:43 +0000)
src/VISU_I/VISU_Table_i.cc

index 00e6a6f9512b296308a501ee889823cd491e980a..4f0151bfbee5231e66f4a202318d17491457ccb6 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <qfileinfo.h>
 #include <qstring.h>
+#include <qregexp.h>
 #include <qfile.h>
 
 using namespace std;
@@ -1160,7 +1161,8 @@ void ImportTables(const char* theFileName, TTableCont& theTableCont){
          aRow.myTitle = cmt.latin1();
          if(MYDEBUG) cout << "......ROW TITLE is: " << cmt.latin1() << endl;
        }
-       QStringList aValList = QStringList::split( " ", data );
+       QString datar1 = data.replace(QRegExp("\t"), " ");
+       QStringList aValList = QStringList::split( " ", datar1 );
        for ( int i = 0; i < aValList.count(); i++ ) {
          if ( aValList[i].stripWhiteSpace() != "" ) {
            TValue aVal = aValList[i].stripWhiteSpace().latin1();