1 | /* ====================================================================
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | ==================================================================== */
|
---|
17 |
|
---|
18 | package org.apache.poi.hssf.record.formula;
|
---|
19 |
|
---|
20 | import org.apache.poi.hssf.usermodel.HSSFErrorConstants;
|
---|
21 | import org.apache.poi.util.LittleEndianInput;
|
---|
22 | import org.apache.poi.util.LittleEndianOutput;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * RefError - handles deleted cell reference
|
---|
26 | * @author Jason Height (jheight at chariot dot net dot au)
|
---|
27 | */
|
---|
28 | public final class RefErrorPtg extends OperandPtg {
|
---|
29 |
|
---|
30 | private final static int SIZE = 5;
|
---|
31 | public final static byte sid = 0x2A;
|
---|
32 | private int field_1_reserved;
|
---|
33 |
|
---|
34 | public RefErrorPtg() {
|
---|
35 | field_1_reserved = 0;
|
---|
36 | }
|
---|
37 | public RefErrorPtg(LittleEndianInput in) {
|
---|
38 | field_1_reserved = in.readInt();
|
---|
39 | }
|
---|
40 |
|
---|
41 | public String toString() {
|
---|
42 | return getClass().getName();
|
---|
43 | }
|
---|
44 |
|
---|
45 | public void write(LittleEndianOutput out) {
|
---|
46 | out.writeByte(sid + getPtgClass());
|
---|
47 | out.writeInt(field_1_reserved);
|
---|
48 | }
|
---|
49 |
|
---|
50 | public int getSize()
|
---|
51 | {
|
---|
52 | return SIZE;
|
---|
53 | }
|
---|
54 |
|
---|
55 | public String toFormulaString() {
|
---|
56 | return HSSFErrorConstants.getText(HSSFErrorConstants.ERROR_REF);
|
---|
57 | }
|
---|
58 |
|
---|
59 | public byte getDefaultOperandClass() {
|
---|
60 | return Ptg.CLASS_REF;
|
---|
61 | }
|
---|
62 | }
|
---|