Skip to content

Commit 3788b44

Browse files
0.3 bugfixes mangesh (#127)
* More constructors. * Add constructor for ptgs Fixed #120
1 parent 6df9259 commit 3788b44

29 files changed

Lines changed: 141 additions & 37 deletions

zpoi/src/org/zkoss/poi/ss/formula/ptg/Area3DPtg.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public class Area3DPtg extends AreaPtgBase implements WorkbookDependentFormula,
3838

3939
private int field_1_index_extern_sheet;
4040

41+
public Area3DPtg(){
42+
/* For seralization */
43+
}
4144

4245
public Area3DPtg(String arearef, int externIdx) {
4346
super(new AreaReference(arearef));

zpoi/src/org/zkoss/poi/ss/formula/ptg/AreaNPtg.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2626
public final class AreaNPtg extends Area2DPtgBase {
2727
public final static short sid = 0x2D;
2828

29+
30+
public AreaNPtg(){
31+
/* For seralization */
32+
}
33+
2934
public AreaNPtg(LittleEndianInput in) {
3035
super(in);
3136
}

zpoi/src/org/zkoss/poi/ss/formula/ptg/ArrayPtg.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,19 @@ public final class ArrayPtg extends Ptg {
4949
public static final int PLAIN_TOKEN_SIZE = 1+RESERVED_FIELD_LEN;
5050

5151
// 7 bytes of data (stored as an int, short and byte here)
52-
private final int _reserved0Int;
53-
private final int _reserved1Short;
54-
private final int _reserved2Byte;
52+
private int _reserved0Int;
53+
private int _reserved1Short;
54+
private int _reserved2Byte;
5555

5656
// data from these fields comes after the Ptg data of all tokens in current formula
57-
private final int _nColumns;
58-
private final int _nRows;
59-
private final Object[] _arrayValues;
57+
private int _nColumns;
58+
private int _nRows;
59+
private Object[] _arrayValues;
60+
61+
62+
public ArrayPtg(){
63+
/* For seralization */
64+
}
6065

6166
ArrayPtg(int reserved0, int reserved1, int reserved2, int nColumns, int nRows, Object[] arrayValues) {
6267
_reserved0Int = reserved0;

zpoi/src/org/zkoss/poi/ss/formula/ptg/BoolPtg.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ public final class BoolPtg extends ScalarConstantPtg {
3636

3737
private boolean _value;
3838

39-
BoolPtg()
40-
{
41-
39+
BoolPtg() {
40+
/* For seralization */
4241
}
4342

4443
private BoolPtg(boolean b) {

zpoi/src/org/zkoss/poi/ss/formula/ptg/ControlPtg.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2929
*/
3030
public abstract class ControlPtg extends Ptg {
3131

32+
public ControlPtg(){
33+
/* For seralization */
34+
}
35+
3236
public boolean isBaseToken() {
3337
return true;
3438
}

zpoi/src/org/zkoss/poi/ss/formula/ptg/DeferredNamePtg.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public class DeferredNamePtg extends OperandPtg implements WorkbookDependentForm
2424

2525
private String namename;
2626

27+
public DeferredNamePtg(){
28+
/* For seralization */
29+
}
30+
2731
public DeferredNamePtg(String name) {
2832
this.namename = name;
2933
}

zpoi/src/org/zkoss/poi/ss/formula/ptg/DeletedArea3DPtg.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3333
*/
3434
public final class DeletedArea3DPtg extends OperandPtg implements WorkbookDependentFormula {
3535
public final static byte sid = 0x3d;
36-
private final int field_1_index_extern_sheet;
37-
private final int unused1;
38-
private final int unused2;
36+
private int field_1_index_extern_sheet;
37+
private int unused1;
38+
private int unused2;
3939

40-
private final Area3DPtg ptg; //ZSS-759 for render formula string
41-
private final String bookName; //ZSS-759 for render formula string
40+
private Area3DPtg ptg; //ZSS-759 for render formula string
41+
private String bookName; //ZSS-759 for render formula string
42+
43+
public DeletedArea3DPtg(){
44+
/* For seralization */
45+
}
4246

4347
public DeletedArea3DPtg(int externSheetIndex) {
4448
field_1_index_extern_sheet = externSheetIndex;

zpoi/src/org/zkoss/poi/ss/formula/ptg/DeletedRef3DPtg.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3434
*/
3535
public final class DeletedRef3DPtg extends OperandPtg implements WorkbookDependentFormula {
3636
public final static byte sid = 0x3c;
37-
private final int field_1_index_extern_sheet;
38-
private final int unused1;
39-
40-
private final Ref3DPtg ptg; //ZSS-759 for render formula string
41-
private final String bookName; //ZSS-759 for render formula string
37+
private int field_1_index_extern_sheet;
38+
private int unused1;
4239

40+
private Ref3DPtg ptg; //ZSS-759 for render formula string
41+
private String bookName; //ZSS-759 for render formula string
42+
43+
public DeletedRef3DPtg(){
44+
/* For seralization */
45+
}
46+
4347
/** Creates new DeletedRef3DPtg */
4448
public DeletedRef3DPtg(LittleEndianInput in) {
4549
field_1_index_extern_sheet = in.readUShort();

zpoi/src/org/zkoss/poi/ss/formula/ptg/ExpPtg.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2929
public final class ExpPtg extends ControlPtg {
3030
private final static int SIZE = 5;
3131
public final static short sid = 0x1;
32-
private final int field_1_first_row;
33-
private final int field_2_first_col;
32+
private int field_1_first_row;
33+
private int field_2_first_col;
34+
35+
public ExpPtg(){
36+
/* For seralization */
37+
}
3438

3539
public ExpPtg(LittleEndianInput in) {
3640
field_1_first_row = in.readShort();

zpoi/src/org/zkoss/poi/ss/formula/ptg/FuncPtg.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public final class FuncPtg extends AbstractFunctionPtg {
3232
public final static byte sid = 0x21;
3333
public final static int SIZE = 3;
3434

35+
public FuncPtg(){
36+
/* For seralization */
37+
}
38+
3539
public static FuncPtg create(LittleEndianInput in) {
3640
return create(in.readUShort());
3741
}

0 commit comments

Comments
 (0)