poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17824] - about reading ms. doc file
Date Wed, 12 Mar 2003 05:43:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17824>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17824

about reading ms. doc file

tdyildirim@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From tdyildirim@yahoo.com  2003-03-12 05:43 -------
fixxed by Raghuram Velega
I fixed the bug which was in the WordDocument.java class, replace the
following segemnt of the code:

 public void writeAllText(Writer out) throws IOException
  {
    int textStart = Utils.convertBytesToInt(_header, 0x18);
    int textEnd = Utils.convertBytesToInt(_header, 0x1c);
    ArrayList textPieces = findProperties(textStart, textEnd, 
_text.root);
    int size = textPieces.size();


    for(int x = 0; x < size ; x++)
    {
      TextPiece nextPiece = (TextPiece)textPieces.get(x);
      int start = nextPiece.getStart();
       int end = nextPiece.getEnd();
       boolean unicode = nextPiece.usesUnicode();
       char ch;
       if(unicode){
           for(int y = start; y < end +(end-start); y += 2){
               ch = (char)Utils.convertBytesToShort(_header, y);
               out.write(ch);
            }

       }else{
            for(int y = start; y < end ; y += 1){
                ch = (char) Utils.convertUnsignedByteToInt(_header[y]);
                out.write(ch);
            }
       }
    }


  }

It should work then,

thanks,
raghu

Mime
View raw message