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 PAP implements Cloneable {
027: int _istd;//index to style descriptor.
028: byte _jc;//justification code
029: byte _fKeep;//keep entire paragraph on one page if possible
030: byte _fKeepFollow;//keep paragraph on same page with next paragraph if possible
031: byte _fPageBreakBefore;//start this paragraph on new page
032: byte _positionByte;//multiple flags see spec;
033: byte _brcp;//rectangle border codes for Macword 3.0
034: byte _brcl;//border line styles for Macword 3.0
035: byte _ilvl;//when non-zero, list level for this paragraph
036: byte _fNoLnn;//no line numbering for this paragraph. (makes this an exception to the section property of line numbering)
037: int _ilfo;//when non-zero, (1-based) index into the pllfo identifying the list to which the paragraph belongs
038: byte _fSideBySide;//when 1, paragraph is a side by side paragraph
039: byte _fNoAutoHyph;//when 0, text in paragraph may be auto hyphenated.
040: byte _fWindowControl;//when 1, Word will prevent widowed lines in this paragraph from being placed at the beginning of a page
041: int _dxaRight;//indent from right margin (signed).
042: int _dxaLeft;//indent from left margin (signed)
043: int _dxaLeft1;//first line indent; signed number relative to dxaLeft
044: int[] _lspd = new int[2];//line spacing descriptor see spec
045: int _dyaBefore;// vertical spacing before paragraph (unsigned)
046: int _dyaAfter;//vertical spacing after paragraph (unsigned)
047: byte[] _phe = new byte[12];//height of current paragraph
048: byte _fCrLf;//undocumented
049: byte _fUsePgsuSettings;//undocumented
050: byte _fAdjustRight;//undocumented
051: byte _fKinsoku;// when 1, apply kinsoku rules when performing line wrapping
052: byte _fWordWrap;//when 1, perform word wrap
053: byte _fOverflowPunct;//when 1, apply overflow punctuation rules when performing line wrapping
054: byte _fTopLinePunct;//when 1, perform top line punctuation processing
055: byte _fAutoSpaceDE;//when 1, auto space FE and alphabetic characters
056: byte _fAutoSpaceDN;// when 1, auto space FE and numeric characters
057: int _wAlignFont;//font alignment 0 Hanging 1 Centered 2 Roman 3 Variable 4 Auto
058: short _fontAlign;//multiVal see Spec.
059: byte _fInTable;//when 1, paragraph is contained in a table row
060: byte _fTtp;//when 1, paragraph consists only of the row mark special character and marks the end of a table row
061: byte _wr;//Wrap Code for absolute objects
062: byte _fLocked;//when 1, paragraph may not be edited
063: int _dxaAbs;//see spec
064: int _dyaAbs;//see spec
065: int _dxaWidth;//when not == 0, paragraph is constrained to be dxaWidth wide, independent of current margin or column settings
066: short[] _brcTop = new short[2];//spec for border above paragraph
067: short[] _brcLeft = new short[2];//specification for border to the left of
068: short[] _brcBottom = new short[2];//paragraphspecification for border below
069: short[] _brcRight = new short[2];//paragraphspecification for border to the
070: short[] _brcBetween = new short[2];//right of paragraphsee spec
071: short[] _brcBar = new short[2];//specification of border to place on
072: short _brcTop1;//outside of text when facing pages are to be displayed.spec
073: short _brcLeft1;//for border above paragraphspecification for border to the
074: short _brcBottom1;//left ofparagraphspecification for border below
075: short _brcRight1;//paragraphspecification for border to the
076: short _brcBetween1;//right of paragraphsee spec
077: short _brcBar1;//specification of border to place on outside of text when facing pages are to be displayed.
078: int _dxaFromText;//horizontal distance to be maintained between an absolutely positioned paragraph and any non-absolute positioned text
079: int _dyaFromText;//vertical distance to be maintained between an absolutely positioned paragraph and any non-absolute positioned text
080: int _dyaHeight;//see spec
081: int _shd;//shading
082: int _dcs;//drop cap specifier
083: byte[] _anld = new byte[84];//autonumber list descriptor (see ANLD definition)
084: short _fPropRMark;//when 1, properties have been changed with revision marking on
085: short _ibstPropRMark;//index to author IDs stored in hsttbfRMark. used when properties have been changed when revision marking was enabled
086: byte[] _dttmPropRMark = new byte[4];//Date/time at which properties of this were changed for this run of text by the author. (Only recorded when revision marking is on.)
087: byte[] _numrm = new byte[8];//paragraph numbering revision mark data (see NUMRM)
088: short _itbdMac;//number of tabs stops defined for paragraph. Must be >= 0 and <= 64.
089:
090: public PAP() {
091: _fWindowControl = 1;
092: //lspd[0] = 240;
093: _lspd[1] = 1;
094: _ilvl = 9;
095: }
096:
097: public Object clone() throws CloneNotSupportedException {
098: PAP clone = (PAP) super .clone();
099:
100: clone._brcBar = new short[2];
101: clone._brcBottom = new short[2];
102: clone._brcLeft = new short[2];
103: clone._brcBetween = new short[2];
104: clone._brcRight = new short[2];
105: clone._brcTop = new short[2];
106: clone._lspd = new int[2];
107: clone._phe = new byte[12];
108: clone._anld = new byte[84];
109: clone._dttmPropRMark = new byte[4];
110: clone._numrm = new byte[8];
111:
112: System.arraycopy(_brcBar, 0, clone._brcBar, 0, 2);
113: System.arraycopy(_brcBottom, 0, clone._brcBottom, 0, 2);
114: System.arraycopy(_brcLeft, 0, clone._brcLeft, 0, 2);
115: System.arraycopy(_brcBetween, 0, clone._brcBetween, 0, 2);
116: System.arraycopy(_brcRight, 0, clone._brcRight, 0, 2);
117: System.arraycopy(_brcTop, 0, clone._brcTop, 0, 2);
118: System.arraycopy(_lspd, 0, clone._lspd, 0, 2);
119: System.arraycopy(_phe, 0, clone._phe, 0, 12);
120: System.arraycopy(_anld, 0, clone._anld, 0, 84);
121: System.arraycopy(_dttmPropRMark, 0, clone._dttmPropRMark, 0, 4);
122: System.arraycopy(_numrm, 0, clone._numrm, 0, 8);
123:
124: return clone;
125: }
126:
127: }
|