Read TOPMARGIN record
423396
private function _readTopMargin()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: 8
			$this->_phpSheet->getPageMargins()->setTop(self::_extractNumber($recordData));
		}
	}
614555
def readTEXTRECORD(self, glyphBits, advanceBits, previousRecord=None, level=1):
        
        if self.readUI8() == 0:
            return None
        else:
            self.seek(self.tell() - 1)
            return SWFTextRecord(self, glyphBits, advanceBits, previousRecord, level)
407468
def read(self, size=-1):
        ""
        buf = self.fin.read(size)
        if not buf:
            return ''
        lines = buf.splitlines()
        # Read the rest of the last line if necessary
        if not buf.endswith('\n'):
            last = lines.pop()
            partial = self.fin.readline()
            lines.append(last + partial)
        # Process the lines, concatenate them
        lines = [self.process_line(line.rstrip('\n')) for line in lines]
        return ''.join(lines)
843022
private function _readVcenter()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = substr($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered
			$isVerticalCentered = (bool) self::_GetInt2d($recordData, 0);

			$this->_phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered);
		}
	}
93126
private function readPane()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if (!$this->readDataOnly) {
            // offset: 0; size: 2; position of vertical split
            $px = self::getInt2d($recordData, 0);

            // offset: 2; size: 2; position of horizontal split
            $py = self::getInt2d($recordData, 2);

            if ($this->frozen) {
                // frozen panes
                $this->phpSheet->freezePane(PHPExcel_Cell::stringFromColumnIndex($px) . ($py + 1));
            } else {
                // unfrozen panes; split windows; not supported by PHPExcel core
            }
        }
    }
444487
private function readVerticalPageBreaks()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
            // offset: 0; size: 2; number of the following column index structures
            $nm = self::getInt2d($recordData, 0);

            // offset: 2; size: 6 * $nm; list of $nm row index structures
            for ($i = 0; $i < $nm; ++$i) {
                $c = self::getInt2d($recordData, 2 + 6 * $i);
                $rf = self::getInt2d($recordData, 2 + 6 * $i + 2);
                $rl = self::getInt2d($recordData, 2 + 6 * $i + 4);

                // not sure why two row indexes are necessary?
                $this->phpSheet->setBreakByColumnAndRow($c, $rf, PHPExcel_Worksheet::BREAK_COLUMN);
            }
        }
    }
38484
private function readLeftMargin()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if (!$this->readDataOnly) {
            // offset: 0; size: 8
            $this->phpSheet->getPageMargins()->setLeft(self::extractNumber($recordData));
        }
    }
42172
private function _readDefColWidth()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = substr($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		// offset: 0; size: 2; default column width
		$width = self::_GetInt2d($recordData, 0);
		if ($width != 8) {
			$this->_phpSheet->getDefaultColumnDimension()->setWidth($width);
		}
	}
275032
def _parse_record_line(record_line):
    
    # Dictionary for record fields
    record_fields = {}

    # Read string fields from record line
    (record_fields['record_name'], record_fields['n_seg'],
     record_fields['n_sig'], record_fields['fs'],
     record_fields['counter_freq'], record_fields['base_counter'],
     record_fields['sig_len'], record_fields['base_time'],
     record_fields['base_date']) = re.findall(_rx_record, record_line)[0]

    for field in RECORD_SPECS.index:
        # Replace empty strings with their read defaults (which are
        # mostly None)
        if record_fields[field] == '':
            record_fields[field] = RECORD_SPECS.loc[field, 'read_default']
        # Typecast non-empty strings for non-string (numerical/datetime)
        # fields
        else:
            if RECORD_SPECS.loc[field, 'allowed_types'] == int_types:
                record_fields[field] = int(record_fields[field])
            elif RECORD_SPECS.loc[field, 'allowed_types'] == float_types:
                record_fields[field] = float(record_fields[field])
                # cast fs to an int if it is close
                if field == 'fs':
                    fs = float(record_fields['fs'])
                    if round(fs, 8) == float(int(fs)):
                        fs = int(fs)
                    record_fields['fs'] = fs
            elif field == 'base_time':
                record_fields['base_time'] = wfdb_strptime(record_fields['base_time'])
            elif field == 'base_date':
                record_fields['base_date'] = datetime.datetime.strptime(
                    record_fields['base_date'], '%d/%m/%Y').date()

    # This is not a standard wfdb field, but is useful to set.
    if record_fields['base_date'] and record_fields['base_time']:
        record_fields['base_datetime'] = datetime.datetime.combine(
            record_fields['base_date'], record_fields['base_time'])

    return record_fields
831413
private function readSpgrContainer()
    {
        // context is either context DgContainer or SpgrContainer

        $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4);
        $recordData = substr($this->data, $this->pos + 8, $length);

        // move stream pointer to next record
        $this->pos += 8 + $length;

        // record is a container, read contents
        $spgrContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer();

        if ($this->object instanceof PHPExcel_Shared_Escher_DgContainer) {
            // DgContainer
            $this->object->setSpgrContainer($spgrContainer);
        } else {
            // SpgrContainer
            $this->object->addChild($spgrContainer);
        }

        $reader = new PHPExcel_Reader_Excel5_Escher($spgrContainer);
        $escher = $reader->load($recordData);
    }
724881
function (toPrint, indent, indentEnd) {
      if (!indent) {
        indent = '&nbsp;&nbsp;'
      }
      if (!indentEnd) {
        indentEnd = ''
      }
      var s = ''
      var name
      if (toPrint instanceof Object) {
        s = 'Object (\n'
        for (name in toPrint) {
          if (toPrint.hasOwnProperty(name)) {
            s += indent + indent + '[' + name + '] => ' + this.printR(toPrint[name], indent + '&nbsp;&nbsp;', indent + indent)
          }
        }
        s += indentEnd + ')\n'
        return s
      } else if (toPrint instanceof Array) {
        s = 'Array (\n'
        for (name in toPrint) {
          if (toPrint.hasOwnProperty(name)) {
            s += indent + indent + '[' + name + '] => ' + this.printR(toPrint[name], indent + '&nbsp;&nbsp;', indent + indent)
          }
        }
        s += indentEnd + ')\n'
        return s
      } else if (toPrint instanceof Boolean) {
        var bool = 'false'
        if (bool === true) {
          bool = 'true'
        }
        return bool + '\n'
      } else {
        return (toPrint + '\n')
      }
    }
323216
private function _readLeftMargin()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: 8
			$this->_phpSheet->getPageMargins()->setLeft(self::_extractNumber($recordData));
		}
	}
210322
@Override
	public String toPDB(){

		 StringBuffer buf = new StringBuffer();
		 toPDB(buf);
		 return buf.toString();

	}
673645
def _get_bottomMargin(self):
        
        bounds = self.bounds
        if bounds is None:
            return None
        xMin, yMin, xMax, yMax = bounds
        return yMin
628415
private function _readFooter()
	{
		$length = self::_GetInt2d($this->_data, $this->_pos + 2);
		$recordData = substr($this->_data, $this->_pos + 4, $length);

		// move stream pointer to next record
		$this->_pos += 4 + $length;

		if (!$this->_readDataOnly) {
			// offset: 0; size: var
			// realized that $recordData can be empty even when record exists
			if ($recordData) {
				if ($this->_version == self::XLS_BIFF8) {
					$string = self::_readUnicodeStringLong($recordData);
				} else {
					$string = $this->_readByteStringShort($recordData);
				}
				$this->_phpSheet->getHeaderFooter()->setOddFooter($string['value']);
				$this->_phpSheet->getHeaderFooter()->setEvenFooter($string['value']);
			}
		}
	}
1004436
private function readRow()
    {
        $length = self::getInt2d($this->data, $this->pos + 2);
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);

        // move stream pointer to next record
        $this->pos += 4 + $length;

        if (!$this->readDataOnly) {
            // offset: 0; size: 2; index of this row
            $r = self::getInt2d($recordData, 0);

            // offset: 2; size: 2; index to column of the first cell which is described by a cell record

            // offset: 4; size: 2; index to column of the last cell which is described by a cell record, increased by 1

            // offset: 6; size: 2;

            // bit: 14-0; mask: 0x7FFF; height of the row, in twips = 1/20 of a point
            $height = (0x7FFF & self::getInt2d($recordData, 6)) >> 0;

            // bit: 15: mask: 0x8000; 0 = row has custom height; 1= row has default height
            $useDefaultHeight = (0x8000 & self::getInt2d($recordData, 6)) >> 15;

            if (!$useDefaultHeight) {
                $this->phpSheet->getRowDimension($r + 1)->setRowHeight($height / 20);
            }

            // offset: 8; size: 2; not used

            // offset: 10; size: 2; not used in BIFF5-BIFF8

            // offset: 12; size: 4; option flags and default row formatting

            // bit: 2-0: mask: 0x00000007; outline level of the row
            $level = (0x00000007 & self::getInt4d($recordData, 12)) >> 0;
            $this->phpSheet->getRowDimension($r + 1)->setOutlineLevel($level);

            // bit: 4; mask: 0x00000010; 1 = outline group start or ends here... and is collapsed
            $isCollapsed = (0x00000010 & self::getInt4d($recordData, 12)) >> 4;
            $this->phpSheet->getRowDimension($r + 1)->setCollapsed($isCollapsed);

            // bit: 5; mask: 0x00000020; 1 = row is hidden
            $isHidden = (0x00000020 & self::getInt4d($recordData, 12)) >> 5;
            $this->phpSheet->getRowDimension($r + 1)->setVisible(!$isHidden);

            // bit: 7; mask: 0x00000080; 1 = row has explicit format
            $hasExplicitFormat = (0x00000080 & self::getInt4d($recordData, 12)) >> 7;

            // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record
            $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16;

            if ($hasExplicitFormat) {
                $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]);
            }
        }
    }
853886
public E read() throws IOException {
		boolean status = false;
		try {

			// Read header if not already read
			readHeader();

			// Read the records
			E element;
			try {
				do {
					element = readRecord(this.nextExpectedRecordIndex);
					if (!postRecordReadingStage(element)) {
						element = null;
					}
					++this.nextExpectedRecordIndex;
				}
				while (element == null);
			} catch (EOFException e) {
				element = null;
				close();
				postReadingStage(true);
			}
			status = true;

			return element;
		} finally {
			if (this.taskProgression != null) {
				this.taskProgression.setValue(this.buffer.position() + HEADER_BYTES);
			}
			if (!status) {
				close();
				postReadingStage(status);
			}
		}
	}