poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1173034 - /poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java
Date Tue, 20 Sep 2011 08:52:31 GMT
Author: sergey
Date: Tue Sep 20 08:52:30 2011
New Revision: 1173034

URL: http://svn.apache.org/viewvc?rev=1173034&view=rev
Log:
second field in TC is width

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java?rev=1173034&r1=1173033&r2=1173034&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableCellDescriptor.java Tue
Sep 20 08:52:30 2011
@@ -25,21 +25,14 @@ public final class TableCellDescriptor e
 {
   public static final int SIZE = 20;
 
-  protected  short field_x_unused;
-
   public TableCellDescriptor()
   {
-    setBrcTop(new BorderCode());
-    setBrcLeft(new BorderCode());
-    setBrcBottom(new BorderCode());
-    setBrcRight(new BorderCode());
-
   }
 
   protected void fillFields(byte[] data, int offset)
   {
     field_1_rgf = LittleEndian.getShort(data, 0x0 + offset);
-    field_x_unused = LittleEndian.getShort(data, 0x2 + offset);
+    field_2_wWidth = LittleEndian.getShort(data, 0x2 + offset);
     setBrcTop(new BorderCode(data, 0x4 + offset));
     setBrcLeft(new BorderCode(data, 0x8 + offset));
     setBrcBottom(new BorderCode(data, 0xc + offset));
@@ -49,7 +42,7 @@ public final class TableCellDescriptor e
   public void serialize(byte[] data, int offset)
   {
       LittleEndian.putShort(data, 0x0 + offset, field_1_rgf);
-      LittleEndian.putShort(data, 0x2 + offset, field_x_unused);
+      LittleEndian.putShort(data, 0x2 + offset, field_2_wWidth);
       getBrcTop().serialize(data, 0x4 + offset);
       getBrcLeft().serialize(data, 0x8 + offset);
       getBrcBottom().serialize(data, 0xc + offset);
@@ -60,6 +53,7 @@ public final class TableCellDescriptor e
     throws CloneNotSupportedException
   {
     TableCellDescriptor tc = (TableCellDescriptor)super.clone();
+    tc.setShd( (ShadingDescriptor) getShd().clone() );
     tc.setBrcTop((BorderCode)getBrcTop().clone());
     tc.setBrcLeft((BorderCode)getBrcLeft().clone());
     tc.setBrcBottom((BorderCode)getBrcBottom().clone());



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


Mime
View raw message