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

index d588e45c279085e0ab0ec3e629e6c18b58fc14f9..27d7e46444066dbc5dac61ee137f533a11e84d27 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <qfileinfo.h>
 #include <qstring.h>
+#include <qregexp.h>
 #include <qfile.h>
 
 using namespace std;
@@ -1079,7 +1080,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();