Store the vertical centering VCENTER BIFF record.

@access private
345891
function _storeVcenter()
    {
        $record   = 0x0084;              // Record identifier
        $length   = 0x0002;              // Bytes to follow

        $fVCenter = $this->_vcenter;     // Horizontal centering

        $header    = pack("vv", $record, $length);
        $data      = pack("v",  $fVCenter);
        $this->_prepend($header . $data);
    }
645436
def store_chart(x_pos, y_pos, dx, dy)   # :nodoc:
    record   = 0x1002     # Record identifier.
    length   = 0x0010     # Number of bytes to follow.
    # x_pos               # X pos of top left corner.
    # y_pos               # Y pos of top left corner.
    # dx                  # X size.
    # dy                  # Y size.

    header = [record, length].pack('vv')
    data   = [x_pos].pack('V')
    data  += [y_pos].pack('V')
    data  += [dx].pack('V')
    data  += [dy].pack('V')

    append(header, data)
  end
945716
def place_visual(self):
        """"""
        index = 0
        bin_pos = string_to_array(self.bin2_body.get("pos"))
        bin_size = self.bin_size

        for _, obj_mjcf in self.visual_objects:

            bin_x_low = bin_pos[0]
            bin_y_low = bin_pos[1]
            if index == 0 or index == 2:
                bin_x_low -= bin_size[0] / 2
            if index < 2:
                bin_y_low -= bin_size[1] / 2

            bin_x_high = bin_x_low + bin_size[0] / 2
            bin_y_high = bin_y_low + bin_size[1] / 2
            bottom_offset = obj_mjcf.get_bottom_offset()

            bin_range = [bin_x_low + bin_x_high, bin_y_low + bin_y_high, 2 * bin_pos[2]]
            bin_center = np.array(bin_range) / 2.0

            pos = bin_center - bottom_offset
            self.visual_obj_mjcf[index].set("pos", array_to_string(pos))
            index += 1
212820
private function _readDefaultRowHeight()
	{
		$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;

		// offset: 0; size: 2; option flags
		// offset: 2; size: 2; default height for unused rows, (twips 1/20 point)
		$height = self::_GetInt2d($recordData, 2);
		$this->_phpSheet->getDefaultRowDimension()->setRowHeight($height / 20);
	}
833802
function _storeDefcol()
    {
        $record   = 0x0055;      // Record identifier
        $length   = 0x0002;      // Number of bytes to follow
        $colwidth = 0x0008;      // Default column width

        $header   = pack("vv", $record, $length);
        $data     = pack("v",  $colwidth);
        $this->_prepend($header . $data);
    }
1053904
def store_selection(first_row=0, first_col=0, last_row = nil, last_col =nil)   #:nodoc:
    record   = 0x001D                  # Record identifier
    length   = 0x000F                  # Number of bytes to follow

    pane_position = @active_pane       # Pane position
    row_active    = first_row          # Active row
    col_active    = first_col          # Active column
    irefAct  = 0                       # Active cell ref
    cref     = 1                       # Number of refs

    row_first = first_row              # First row in reference
    col_first = first_col              # First col in reference
    row_last  = last_row || row_first  # Last  row in reference
    col_last  = last_col || col_first  # Last  col in reference

    # Swap last row/col for first row/col as necessary
    row_first, row_last = row_last, row_first if row_first > row_last
    col_first, col_last = col_last, col_first if col_first > col_last

    header = [record, length].pack('vv')
    data = [pane_position, row_active, col_active, irefAct, cref,
      row_first, row_last, col_first, col_last].pack('CvvvvvvCC')

    append(header, data)
  end
1219439
def store_pos(mdTopLt, mdBotRt, x1, y1, x2, y2)  # :nodoc:
    record  = 0x104F     # Record identifier.
    length  = 0x0014     # Number of bytes to follow.
    # mdTopLt            # Top left.
    # mdBotRt            # Bottom right.
    # x1                 # X coordinate.
    # y1                 # Y coordinate.
    # x2                 # Width.
    # y2                 # Height.

    header = [record, length].pack('vv')
    data  = [mdTopLt].pack('v')
    data += [mdBotRt].pack('v')
    data += [x1].pack('V')
    data += [y1].pack('V')
    data += [x2].pack('V')
    data += [y2].pack('V')

    append(header, data)
  end
1226321
function storeFitInSession()
    {
        $search = $this->flexibleSearch();
        $mapping_id = $search->storeFitInSession();
        if ($this->shouldEnableVaftireModule()) {
            $tireSearch = new VF_Tire_FlexibleSearch($search);
            $tireSearch->storeTireSizeInSession();
        }
        if ($this->shouldEnableVafWheelModule()) {
            $wheelSearch = new VF_Wheel_FlexibleSearch($search);
            $wheelSearch->storeSizeInSession();
        }
        if ($this->shouldEnableVafwheeladapterModule()) {
            $wheeladapterSearch = new VF_Wheeladapter_FlexibleSearch($search);
            $wheeladapterSearch->storeAdapterSizeInSession();
        }
        return $mapping_id;
    }
1355807
function _storeZoom()
    {
        // If scale is 100 we don't need to write a record
        if ($this->_zoom == 100) {
            return;
        }

        $record      = 0x00A0;               // Record identifier
        $length      = 0x0004;               // Bytes to follow

        $header      = pack("vv", $record, $length);
        $data        = pack("vv", $this->_zoom, 100);
        $this->_append($header . $data);
    }
1252815
private function _readHcenter()
	{
		$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; 0 = print sheet left aligned, 1 = print sheet centered horizontally
			$isHorizontalCentered = (bool) self::_GetInt2d($recordData, 0);

			$this->_phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered);
		}
	}
1130846
function () {
            var cfg = this.cfg,
                fc = cfg.getProperty("fixedcenter");

            if (cfg.getProperty("visible")) {
                if (fc && (fc !== _CONTAINED || this.fitsInViewport())) {
                    this.center();
                }
            }
        }
1133537
public function center()
    {
        /* Determine the real center */
        $TargetCenterX = ($this->X2 - $this->X1) / 2 + $this->X1;
        $TargetCenterY = ($this->Y2 - $this->Y1) / 2 + $this->Y1;

        /* Get current boundaries */
        $XMin = $this->X2;
        $XMax = $this->X1;
        $YMin = $this->Y2;
        $YMax = $this->Y1;
        foreach ($this->Data as $Key => $Settings) {
            $X = $Settings["X"];
            $Y = $Settings["Y"];

            if ($X < $XMin) {
                $XMin = $X;
            }
            if ($X > $XMax) {
                $XMax = $X;
            }
            if ($Y < $YMin) {
                $YMin = $Y;
            }
            if ($Y > $YMax) {
                $YMax = $Y;
            }
        }
        $CurrentCenterX = ($XMax - $XMin) / 2 + $XMin;
        $CurrentCenterY = ($YMax - $YMin) / 2 + $YMin;

        /* Compute the offset to apply */
        $XOffset = $TargetCenterX - $CurrentCenterX;
        $YOffset = $TargetCenterY - $CurrentCenterY;

        /* Correct the points position */
        foreach ($this->Data as $Key => $Settings) {
            $this->Data[$Key]["X"] = $Settings["X"] + $XOffset;
            $this->Data[$Key]["Y"] = $Settings["Y"] + $YOffset;
        }
    }
335253
function _storeMarginBottom()
    {
        $record  = 0x0029;                   // Record identifier
        $length  = 0x0008;                   // Bytes to follow

        $margin  = $this->_margin_bottom;     // Margin in inches

        $header    = pack("vv",  $record, $length);
        $data      = pack("d",   $margin);
        if ($this->_byte_order) { // if it's Big Endian
            $data = strrev($data);
        }

        $this->_prepend($header . $data);
    }
633726
function placeVertically(v, h) {
                        var top;
                        var left;
                        var translateX;
                        var translateY;
                        var tipY;

                        if (v == 'top') {
                            top = dims.target.margins.offset.top;
                            tipY = 'bottom';
                            translateY = '-100%';
                        } else {
                            top = dims.target.margins.offset.toBottom;
                            tipY = 'top';
                            translateY = '0';
                        }

                        if (h == 'right') {
                            left = dims.target.offset.toRight;
                            translateX = '-100%';
                        } else if (h == 'center') {
                            left = dims.target.offset.left + dims.target.width / 2;
                            translateX = '-50%';
                        } else {
                            left = dims.target.offset.left;
                            translateX = '0';
                        }

                        els.wrap.css({
                            left: left + 'px',
                            top: top + 'px',
                            transform: 'translate(' + translateX + ',' + translateY + ')'
                        });

                        els.tip.attr('class', 'vertical ' + tipY + ' ' + h);
                    }
678208
function _storeOLEFile()
    {
        if($this->_BIFF_version == 0x0600) {
            $OLE = new OLE_PPS_File(OLE::Asc2Ucs('Workbook'));
        } else {
            $OLE = new OLE_PPS_File(OLE::Asc2Ucs('Book'));
        }
        if ($this->_tmp_dir != '') {
            $OLE->setTempDir($this->_tmp_dir);
        }
        $res = $OLE->init();
        if ($this->isError($res)) {
            return $this->raiseError("OLE Error: ".$res->getMessage());
        }
        $OLE->append($this->_data);

        $total_worksheets = count($this->_worksheets);
        for ($i = 0; $i < $total_worksheets; $i++) {
            while ($tmp = $this->_worksheets[$i]->getData()) {
                $OLE->append($tmp);
            }
        }

        $root = new OLE_PPS_Root(time(), time(), array($OLE));
        if ($this->_tmp_dir != '') {
            $root->setTempDir($this->_tmp_dir);
        }

        $res = $root->save($this->_filename);
        if ($this->isError($res)) {
            return $this->raiseError("OLE Error: ".$res->getMessage());
        }
        return true;
    }
1190225
private function _writeDefaultRowHeight()
	{
		$defaultRowHeight = $this->_phpSheet->getDefaultRowDimension()->getRowHeight();

		if ($defaultRowHeight < 0) {
			return;
		}

		// convert to twips
		$defaultRowHeight = (int) 20 * $defaultRowHeight;

		$record   = 0x0225;	  // Record identifier
		$length   = 0x0004;	  // Number of bytes to follow

		$header   = pack("vv", $record, $length);
		$data	 = pack("vv",  1, $defaultRowHeight);
		$this->_append($header . $data);
	}
805768
function confineInContainer(position, width, height, api) {
    var viewWidth = api.getWidth();
    var viewHeight = api.getHeight();
    position[0] = Math.min(position[0] + width, viewWidth) - width;
    position[1] = Math.min(position[1] + height, viewHeight) - height;
    position[0] = Math.max(position[0], 0);
    position[1] = Math.max(position[1], 0);
}