From: rahuel Date: Thu, 16 Jun 2005 12:05:14 +0000 (+0000) Subject: Void or Blank strings input value of a Port was not allowed X-Git-Tag: V2_2_4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e27ee83bb142a4eb0797a56dee6ae20bb9f42e4f;p=modules%2Fsuperv.git Void or Blank strings input value of a Port was not allowed --- diff --git a/src/GraphBase/DataFlowBase_XmlHandler.cxx b/src/GraphBase/DataFlowBase_XmlHandler.cxx index 7578329..db9277c 100644 --- a/src/GraphBase/DataFlowBase_XmlHandler.cxx +++ b/src/GraphBase/DataFlowBase_XmlHandler.cxx @@ -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() ) { diff --git a/src/GraphEditor/DataFlowEditor_OutNode.cxx b/src/GraphEditor/DataFlowEditor_OutNode.cxx index eede7c4..5af740e 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.cxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.cxx @@ -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 ; }