]> source.dussan.org Git - poi.git/commitdiff
Fix bug #51153 - Correct sizing of LbsDataSubRecord with unused padding fields
authorNick Burch <nick@apache.org>
Fri, 6 May 2011 01:28:28 +0000 (01:28 +0000)
committerNick Burch <nick@apache.org>
Fri, 6 May 2011 01:28:28 +0000 (01:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1100017 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java

index a87636e9f7860c09247de01cf7406f2afc170474..f2ae43deb7ae1fc9dd0f53ad5a4ae5136c5b58d0 100644 (file)
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.8-beta3" date="2011-??-??">
+           <action dev="poi-developers" type="fix">51153 - Correct sizing of LbsDataSubRecord with unused padding fields</action>
            <action dev="poi-developers" type="fix">51143 - NameCommentRecord correction for writing non ASCII strings</action>
            <action dev="poi-developers" type="fix">51112 - Correct XWPFTable tracking of new rows</action>
            <action dev="poi-developers" type="fix">51113 - Correct XWPFParagraph tracking of inserted runs</action>
index 62f119886998c5ab0532a00f10c7aeaf308174a2..c6255e7d3f6f3296008efd0c6cc36f3ef6abd96d 100644 (file)
@@ -381,7 +381,7 @@ public class LbsDataSubRecord extends SubRecord {
         public int getDataSize() {\r
             int size = 6;\r
             size += StringUtil.getEncodedSize(_str);\r
-            size += _unused;\r
+            if(_unused != null) size++;\r
             return size;\r
         }\r
 \r