/** * @param fcStart The start of the text for this property, in _bytes_ * @param fcEnd The end of the text for this property, in _bytes_ */ public BytePropertyNode(int fcStart, int fcEnd, CharIndexTranslator translator, object buf) : base( translator.GetCharIndex(fcStart), translator.GetCharIndex(fcEnd, translator.GetCharIndex(fcStart)), buf) { if (fcStart > fcEnd) throw new ArgumentException("fcStart (" + fcStart + ") > fcEnd (" + fcEnd + ")"); this.startBytes = fcStart; this.endBytes = fcEnd; }
/** * @param fcStart The start of the text for this property, in _bytes_ * @param fcEnd The end of the text for this property, in _bytes_ */ public BytePropertyNode(int fcStart, int fcEnd, CharIndexTranslator translator, object buf) : base( translator.GetCharIndex(fcStart), translator.GetCharIndex(fcEnd, translator.GetCharIndex(fcStart)), buf) { if (fcStart > fcEnd) { throw new ArgumentException("fcStart (" + fcStart + ") > fcEnd (" + fcEnd + ")"); } this.startBytes = fcStart; this.endBytes = fcEnd; }
/** * This constructs a CHPFormattedDiskPage from a raw fkp (512 byte array * read from a Word file). */ public CHPFormattedDiskPage(byte[] documentStream, int offset, CharIndexTranslator translator) : base(documentStream, offset) { for (int x = 0; x < _crun; x++) { int bytesStartAt = GetStart(x); int bytesEndAt = GetEnd(x); int charStartAt = translator.GetCharIndex(bytesStartAt); int charEndAt = translator.GetCharIndex(bytesEndAt, charStartAt); CHPX chpx = new CHPX(charStartAt, charEndAt, new SprmBuffer( GetGrpprl(x), 0)); _chpxList.Add(chpx); } }
/** * Creates a PAPFormattedDiskPage from a 512 byte array */ public PAPFormattedDiskPage(byte[] documentStream, byte[] dataStream, int offset, CharIndexTranslator translator) : base(documentStream, offset) { for (int x = 0; x < _crun; x++) { int bytesStartAt = GetStart(x); int bytesEndAt = GetEnd(x); int charStartAt = translator.GetCharIndex(bytesStartAt); int charEndAt = translator.GetCharIndex(bytesEndAt, charStartAt); PAPX papx = new PAPX(charStartAt, charEndAt, GetGrpprl(x), GetParagraphHeight(x), dataStream); _papxList.Add(papx); } _fkp = null; }
/** * Creates a PAPFormattedDiskPage from a 512 byte array */ public PAPFormattedDiskPage(byte[] documentStream, byte[] dataStream, int offset, CharIndexTranslator translator) :base(documentStream, offset) { for (int x = 0; x < _crun; x++) { int bytesStartAt = GetStart(x); int bytesEndAt = GetEnd(x); int charStartAt = translator.GetCharIndex(bytesStartAt); int charEndAt = translator.GetCharIndex(bytesEndAt, charStartAt); PAPX papx = new PAPX(charStartAt, charEndAt, GetGrpprl(x), GetParagraphHeight(x), dataStream); _papxList.Add(papx); } _fkp = null; }