xmlbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daver...@apache.org
Subject cvs commit: xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 Cur.java
Date Thu, 22 Apr 2004 03:39:21 GMT
daveremy    2004/04/21 20:39:21

  Modified:    v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 Cur.java
  Log:
  Change to fix losing text node when calling Public2.save(outputstream) in some circumstances.
  
  Revision  Changes    Path
  1.33      +12 -5     xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java
  
  Index: Cur.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Cur.java	16 Apr 2004 22:34:49 -0000	1.32
  +++ Cur.java	22 Apr 2004 03:39:21 -0000	1.33
  @@ -827,7 +827,8 @@
           _xobj.ensureOccupancy();
           return _xobj.hasText();
       }
  -    
  +
  +
       boolean hasAttrs ( )
       {
           assert isNode();
  @@ -1433,13 +1434,13 @@
               else
                   to.insertChars( _xobj._srcAfter, _xobj._offAfter + _pos - pa, cchMove );
           }
  -
  +
           notifyTextChange();
           
           for ( Cur e = _xobj.getEmbedded() ; e != null ; e = e._next )
               if (e != this && inChars( e, cchMove ))
                   e.moveTo( to._xobj, to._pos + e._pos - _pos );
  -
  +
           Object srcMoved;
           int    offMoved;
           
  @@ -2201,8 +2202,14 @@
           String getXmlnsPrefix ( ) { return Locale.xmlnsPrefix( _name ); }
           String getXmlnsUri    ( ) { return getString( 1, _cchValue );   }
   
  -        boolean hasText ( ) { return _cchValue > 0; }
  -        
  +        boolean hasText ( )
  +        {
  +            return
  +                _cchValue > 0 ||
  +                    (_lastChild != null && _lastChild.isAttr() && _lastChild._cchAfter
> 0);
  +        }
  +
  +
           boolean hasAttrs    ( ) { return _firstChild != null &&  _firstChild.isAttr();
}
           boolean hasChildren ( ) { return _lastChild  != null && !_lastChild .isAttr();
}
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org


Mime
View raw message