]> source.dussan.org Git - poi.git/commitdiff
add get/set for _ixchFollow in listLevel
authorSergey Vladimirov <sergey@apache.org>
Sat, 16 Jul 2011 08:11:28 +0000 (08:11 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sat, 16 Jul 2011 08:11:28 +0000 (08:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1147377 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java

index 79c5f7e645e41f4513a0fdc881ce17bc7609507f..9a667ff916414e04fe8410a8260e2db3aaefd02b 100644 (file)
@@ -146,7 +146,7 @@ public class AbstractWordUtils
             }
         }
 
-        byte follow = getIxchFollow( listLevel );
+        byte follow = listLevel.getTypeOfCharFollowingTheNumber();
         switch ( follow )
         {
         case 0:
@@ -203,20 +203,6 @@ public class AbstractWordUtils
         }
     }
 
-    public static byte getIxchFollow( ListLevel listLevel )
-    {
-        try
-        {
-            Field field = ListLevel.class.getDeclaredField( "_ixchFollow" );
-            field.setAccessible( true );
-            return ( (Byte) field.get( listLevel ) ).byteValue();
-        }
-        catch ( Exception exc )
-        {
-            throw new Error( exc );
-        }
-    }
-
     public static String getJustification( int js )
     {
         switch ( js )
index b8939b381779a78ab7ba8587065e9f23d800551d..cb04af184d6381b472623cfd182eda93fb703e02 100644 (file)
@@ -147,6 +147,14 @@ public final class ListLevel
       return null;
   }
 
+  /**
+   * "The type of character following the number text for the paragraph: 0 == tab, 1 == space, 2 == nothing."
+   */
+  public byte getTypeOfCharFollowingTheNumber()
+  {
+      return this._ixchFollow;
+  }
+
   public void setStartAt(int startAt)
   {
     _iStartAt = startAt;
@@ -162,6 +170,11 @@ public final class ListLevel
     _jc.setValue(_info, alignment);
   }
 
+  public void setTypeOfCharFollowingTheNumber( byte value )
+  {
+      this._ixchFollow = value;
+  }
+
   public void setNumberProperties(byte[] grpprl)
   {
     _grpprlChpx = grpprl;