mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0020217: EDF SMESH: Dump file with mesh and group on geom is wrong
fix _pyCommand::GetWord() for case of names with white spaces inside
This commit is contained in:
parent
28cc36de11
commit
97cfab41f0
@ -1841,9 +1841,18 @@ TCollection_AsciiString _pyCommand::GetWord( const TCollection_AsciiString & the
|
|||||||
return theEmptyString; // no word found
|
return theEmptyString; // no word found
|
||||||
// end
|
// end
|
||||||
end = beg + 1;
|
end = beg + 1;
|
||||||
while ( end <= theString.Length() && isWord( theString.Value( end ), dotIsWord))
|
char begChar = theString.Value( beg );
|
||||||
++end;
|
if ( begChar == '"' || begChar == '\'' ) {
|
||||||
--end;
|
// end is at the corresponding quoting mark
|
||||||
|
while ( end < theString.Length() &&
|
||||||
|
( theString.Value( end ) != begChar || theString.Value( end-1 ) == '\\'))
|
||||||
|
++end;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while ( end <= theString.Length() && isWord( theString.Value( end ), dotIsWord))
|
||||||
|
++end;
|
||||||
|
--end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else { // search backward
|
else { // search backward
|
||||||
// end
|
// end
|
||||||
@ -1852,9 +1861,18 @@ TCollection_AsciiString _pyCommand::GetWord( const TCollection_AsciiString & the
|
|||||||
if ( end == 0 )
|
if ( end == 0 )
|
||||||
return theEmptyString; // no word found
|
return theEmptyString; // no word found
|
||||||
beg = end - 1;
|
beg = end - 1;
|
||||||
while ( beg > 0 && isWord( theString.Value( beg ), dotIsWord))
|
char endChar = theString.Value( end );
|
||||||
--beg;
|
if ( endChar == '"' || endChar == '\'' ) {
|
||||||
++beg;
|
// beg is at the corresponding quoting mark
|
||||||
|
while ( beg > 1 &&
|
||||||
|
( theString.Value( beg ) != endChar || theString.Value( beg-1 ) == '\\'))
|
||||||
|
--beg;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while ( beg > 0 && isWord( theString.Value( beg ), dotIsWord))
|
||||||
|
--beg;
|
||||||
|
++beg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
theStartPos = beg;
|
theStartPos = beg;
|
||||||
//cout << theString << " ---- " << beg << " - " << end << endl;
|
//cout << theString << " ---- " << beg << " - " << end << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user