001: /* ====================================================================
002: Licensed to the Apache Software Foundation (ASF) under one or more
003: contributor license agreements. See the NOTICE file distributed with
004: this work for additional information regarding copyright ownership.
005: The ASF licenses this file to You under the Apache License, Version 2.0
006: (the "License"); you may not use this file except in compliance with
007: the License. You may obtain a copy of the License at
008:
009: http://www.apache.org/licenses/LICENSE-2.0
010:
011: Unless required by applicable law or agreed to in writing, software
012: distributed under the License is distributed on an "AS IS" BASIS,
013: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: See the License for the specific language governing permissions and
015: limitations under the License.
016: ==================================================================== */
017:
018: package org.apache.poi.hdf.extractor;
019:
020: /**
021: * Comment me
022: *
023: * @author Ryan Ackley
024: */
025:
026: public class CHP implements Cloneable {
027: boolean _bold;
028: boolean _italic;
029: boolean _fRMarkDel;
030: boolean _fOutline;
031: boolean _fSmallCaps;
032: boolean _fCaps;
033: boolean _fVanish;
034: boolean _fRMark;
035: boolean _fSpec;
036: boolean _fStrike;
037: boolean _fObj;
038: boolean _fShadow;
039: boolean _fLowerCase;
040: boolean _fData;
041: boolean _fOle2;
042: boolean _fEmboss;
043: boolean _fImprint;
044: boolean _fDStrike;
045:
046: short _ftcAscii;
047: short _ftcFE;
048: short _ftcOther;
049: short _ftc;
050: int _hps;//font size in half points
051: int _dxaSpace;//space following each character in the run expressed in twip units
052: byte _iss;//superscript/subscript indices 0 means no super/subscripting 1 means text in run is superscripted 2 means text in run is subscripted
053: byte _kul;//underline code see spec
054: byte _ico;//color of text see spec
055: short _hpsPos;//super/subscript position in half points; positive means text is raised; negative means text is lowered
056: short _lidDefault;//language for non-Far East text
057: short _lidFE;//language for Far East text
058: byte _idctHint;
059: int _wCharScale;
060: short _chse;
061:
062: int _specialFC;//varies depending on whether this is a special char
063: short _ibstRMark;//index to author IDs stored in hsttbfRMark. used when text in run was newly typed when revision marking was enabled
064: short _ibstRMarkDel;//index to author IDs stored in hsttbfRMark. used when text in run was newly typed when revision marking was enabled
065: int[] _dttmRMark = new int[2];//Date/time at which this run of text was
066: int[] _dttmRMarkDel = new int[2];//entered/modified by the author. (Only
067: //recorded when revision marking is on.)Date/time at which this run of text was deleted by the author. (Only recorded when revision marking is on.)
068: int _istd;
069: int _baseIstd = -1;
070: int _fcPic;
071: short _ftcSym;// see spec
072: short _xchSym;//see spec
073: byte _ysr;//hyphenation rules
074: byte _chYsr;//used for hyphenation see spec
075: int _hpsKern;//kerning distance for characters in run recorded in half points
076: int _fcObj;
077: byte _icoHighlight;//highlight color
078: boolean _fChsDiff;
079: boolean _highlighted;//when true characters are highlighted with color specified by chp.icoHighlight
080: boolean _fPropMark;//when true, properties have been changed with revision marking on
081: short _ibstPropRMark;//index to author IDs stored in hsttbfRMark. used when properties have been changed when revision marking was enabled
082: int _dttmPropRMark;//Date/time at which properties of this were changed for this run of text by the author
083: byte _sfxtText;//text animation see spec
084: boolean _fDispFldRMark;//see spec
085: short _ibstDispFldRMark;//Index to author IDs stored in hsttbfRMark. used when ListNum field numbering has been changed when revision marking was enabled
086: int _dttmDispFldRMark;//The date for the ListNum field number change
087: byte[] _xstDispFldRMark = new byte[32];//The string value of the ListNum field when revision mark tracking began
088: short _shd;//shading
089: short[] _brc = new short[2];//border
090: short _paddingStart = 0;
091: short _paddingEnd = 0;
092:
093: public CHP() {
094: _istd = 10;
095: _hps = 20;
096: _lidDefault = 0x0400;
097: _lidFE = 0x0400;
098:
099: }
100:
101: public void copy(CHP toCopy) {
102: _bold = toCopy._bold;
103: _italic = toCopy._italic;
104: _fRMarkDel = toCopy._fRMarkDel;
105: _fOutline = toCopy._fOutline;
106: _fSmallCaps = toCopy._fSmallCaps;
107: _fCaps = toCopy._fCaps;
108: _fVanish = toCopy._fVanish;
109: _fRMark = toCopy._fRMark;
110: _fSpec = toCopy._fSpec;
111: _fStrike = toCopy._fStrike;
112: _fObj = toCopy._fObj;
113: _fShadow = toCopy._fShadow;
114: _fLowerCase = toCopy._fLowerCase;
115: _fData = toCopy._fData;
116: _fOle2 = toCopy._fOle2;
117: _fEmboss = toCopy._fEmboss;
118: _fImprint = toCopy._fImprint;
119: _fDStrike = toCopy._fDStrike;
120:
121: _ftcAscii = toCopy._ftcAscii;
122: _ftcFE = toCopy._ftcFE;
123: _ftcOther = toCopy._ftcOther;
124: _ftc = toCopy._ftc;
125: _hps = toCopy._hps;
126: _dxaSpace = toCopy._dxaSpace;
127: _iss = toCopy._iss;
128: _kul = toCopy._kul;
129: _ico = toCopy._ico;
130: _hpsPos = toCopy._hpsPos;
131: _lidDefault = toCopy._lidDefault;
132: _lidFE = toCopy._lidFE;
133: _idctHint = toCopy._idctHint;
134: _wCharScale = toCopy._wCharScale;
135: _chse = toCopy._chse;
136:
137: _specialFC = toCopy._specialFC;
138: _ibstRMark = toCopy._ibstRMark;
139: _ibstRMarkDel = toCopy._ibstRMarkDel;
140: _dttmRMark = toCopy._dttmRMark;
141: _dttmRMarkDel = toCopy._dttmRMarkDel;
142:
143: _istd = toCopy._istd;
144: _baseIstd = toCopy._baseIstd;
145: _fcPic = toCopy._fcPic;
146: _ftcSym = toCopy._ftcSym;
147: _xchSym = toCopy._xchSym;
148: _ysr = toCopy._ysr;
149: _chYsr = toCopy._chYsr;
150: _hpsKern = toCopy._hpsKern;
151: _fcObj = toCopy._fcObj;
152: _icoHighlight = toCopy._icoHighlight;
153: _fChsDiff = toCopy._fChsDiff;
154: _highlighted = toCopy._highlighted;
155: _fPropMark = toCopy._fPropMark;
156: _ibstPropRMark = toCopy._ibstPropRMark;
157: _dttmPropRMark = toCopy._dttmPropRMark;
158: _sfxtText = toCopy._sfxtText;
159: _fDispFldRMark = toCopy._fDispFldRMark;
160: _ibstDispFldRMark = toCopy._ibstDispFldRMark;
161: _dttmDispFldRMark = toCopy._dttmDispFldRMark;
162: _xstDispFldRMark = toCopy._xstDispFldRMark;
163: _shd = toCopy._shd;
164: _brc = toCopy._brc;
165:
166: }
167:
168: public Object clone() throws CloneNotSupportedException {
169: CHP clone = (CHP) super .clone();
170: clone._brc = new short[2];
171: System.arraycopy(_brc, 0, clone._brc, 0, 2);
172: return clone;
173: }
174: }
|