]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Void or Blank strings input value of a Port was not allowed V2_2_4
authorrahuel <rahuel@opencascade.com>
Thu, 16 Jun 2005 12:05:14 +0000 (12:05 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 16 Jun 2005 12:05:14 +0000 (12:05 +0000)
src/GraphBase/DataFlowBase_XmlHandler.cxx
src/GraphEditor/DataFlowEditor_OutNode.cxx

index 7578329fa25b547ee96ac882ecf538ebe6346756..db9277c1af763949de1a10fe7680b34552227861 100644 (file)
@@ -759,8 +759,7 @@ bool GraphBase::XmlHandler::endElement( const QString&,
             if ( fieldvalue[depth] == NULLSTRING )
               return returnfalse( this , "depth4-4" , qName ) ;
             if ( !strcmp( fieldvalue[depth].c_str() , "?" ) ) {
-//              aLink.aLinkValue.Value = fieldvalue[depth].c_str() ;
-              aLink.aLinkValue = CORBA::Any() ; // ???
+              aLink.aLinkValue <<= "" ;
            }
             else {
               switch ( aLink.aLinkValue.type()->kind() ) {
index eede7c41e4034562eb60de99de458654880d4acb..5af740efb7668bf1b434eea02ac27bb50162a16d 100644 (file)
@@ -1110,12 +1110,22 @@ bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & lin
         aLink.aLinkValue >>= retstr;
         QDomElement value = Graph.createElement( "value" ) ;
 //PAL9133 Debug JR : accept void strings
-        QDomCDATASection aCDATA = Graph.createCDATASection( retstr ) ;
+        QDomCDATASection aCDATA ;
+        int i ;
+        for ( i = 0 ; i < (int ) strlen( retstr ) ; i++ ) {
+          if ( retstr[ i ] != ' ' ) {
+            break ;
+         }
+        }
+        if ( i == (int ) strlen( retstr ) ) {
+          aCDATA = Graph.createCDATASection( "?" ) ;
+        }
+        else {
+          aCDATA = Graph.createCDATASection( retstr ) ;
+       }
 //        aField = Graph.createTextNode( retstr ) ;
-        aField = Graph.createCDATASection( retstr ) ;
-        datavalue.appendChild( aCDATA ) ;
-//        datavalue.appendChild( value ) ;
-        value.appendChild( aField ) ;
+        datavalue.appendChild( value ) ;
+        value.appendChild( aCDATA ) ;
 //        MESSAGE( "ToString( string ) " << retstr );
         break ;
       }