poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1700648 - in /poi/trunk/src/java/org/apache/poi/hssf: dev/BiffDrawingToXml.java record/HyperlinkRecord.java record/WriteAccessRecord.java
Date Tue, 01 Sep 2015 19:19:56 GMT
Author: nick
Date: Tue Sep  1 19:19:55 2015
New Revision: 1700648

URL: http://svn.apache.org/r1700648
Log:
Fix some Forbidden APIs errors

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java
    poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java?rev=1700648&r1=1700647&r2=1700648&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java Tue Sep  1 19:19:55 2015
@@ -35,15 +35,12 @@ import org.apache.poi.hssf.record.Escher
 import org.apache.poi.hssf.usermodel.HSSFPatriarch;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
+import org.apache.poi.util.StringUtil;
 
 /**
  * Utility for representing drawings contained in a binary Excel file as a XML tree
- *
- * @author Evgeniy Berlog
- * date: 10.04.12
  */
 public class BiffDrawingToXml {
-
     private static final String SHEET_NAME_PARAM = "-sheet-name";
     private static final String SHEET_INDEXES_PARAM = "-sheet-indexes";
     private static final String EXCLUDE_WORKBOOK_RECORDS = "-exclude-workbook";
@@ -163,7 +160,7 @@ public class BiffDrawingToXml {
             }
         }
         builder.append("</workbook>\n");
-        fos.write(builder.toString().getBytes());
+        fos.write(builder.toString().getBytes(StringUtil.UTF8));
         fos.close();
     }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java?rev=1700648&r1=1700647&r2=1700648&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java Tue Sep  1 19:19:55
2015
@@ -35,9 +35,6 @@ import org.apache.poi.util.StringUtil;
  * The <code>HyperlinkRecord</code> (0x01B8) wraps an HLINK-record
  *  from the Excel-97 format.
  * Supports only external links for now (eg http://)
- *
- * @author      Mark Hissink Muller <a href="mailto:mark@hissinkmuller.nl >mark&064;hissinkmuller.nl</a>
- * @author      Yegor Kozlov (yegor at apache dot org)
  */
 public final class HyperlinkRecord extends StandardRecord {
     public final static short sid = 0x01B8;
@@ -521,7 +518,7 @@ public final class HyperlinkRecord exten
                 byte[] path_bytes = new byte[len];
                 in.readFully(path_bytes);
 
-                _address = new String(path_bytes);
+                _address = new String(path_bytes, StringUtil.UTF8);
             }
         }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java?rev=1700648&r1=1700647&r2=1700648&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/WriteAccessRecord.java Tue Sep  1 19:19:55
2015
@@ -31,8 +31,6 @@ import org.apache.poi.util.StringUtil;
  * <p/>
  * REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
  * <p/>
- * 
- * @author Andrew C. Oliver (acoliver at apache dot org)
  */
 public final class WriteAccessRecord extends StandardRecord {
 	public final static short sid = 0x005C;
@@ -68,7 +66,7 @@ public final class WriteAccessRecord ext
 			LittleEndian.putUShort(data, 0, nChars);
 			LittleEndian.putByte(data, 2, is16BitFlag);
 			in.readFully(data, 3, data.length-3);
-			String rawValue = new String(data);
+			String rawValue = new String(data, StringUtil.UTF8);
 			setUsername(rawValue.trim());
 			return;
 		}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message