Store the LEFTMARGIN BIFF record.

@access private
184832
function _storeMarginLeft()
    {
        $record  = 0x0026;                   // Record identifier
        $length  = 0x0008;                   // Bytes to follow

        $margin  = $this->_margin_left;       // 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);
    }
97146
function _storeDatemode()
    {
        $record    = 0x0022;         // Record identifier
        $length    = 0x0002;         // Bytes to follow

        $f1904     = $this->_1904;   // Flag for 1904 date system

        $header    = pack("vv", $record, $length);
        $data      = pack("v", $f1904);
        $this->_append($header . $data);
    }
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);
    }
731568
function _storeCountry()
    {
        $record          = 0x008C;    // Record identifier
        $length          = 4;         // Number of bytes to follow

        $header = pack('vv',  $record, $length);
        /* using the same country code always for simplicity */
        $data = pack('vv', $this->_country_code, $this->_country_code);
        $this->_append($header . $data);
    }
441261
public function setMargin()
    {
        $margins = \func_get_args();

        if(count($margins) === 1 && is_string(current($margins)))
        {
            $margins = explode(' ', current($margins));
        }

        $marginLabels = array('margin-top', 'margin-right', 'margin-bottom', 'margin-left');
        $this->setComposeAttribute($marginLabels, $margins);

        return $this;
    }
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));
		}
	}
812940
public function save()
    {
        if ($this->widget && $this->widget->OwnerID && $this->widget->OwnerID != Member::currentUserID()) {
            // check ownership, not just write access
            return;
        }
        //Note : Gridster uses weird names... size_x? Why just not width, Argh...
        //			Admittedly, col and row makes sense since it's essentially
        //			using cells to align up objects.
        $obj = self::get()->byID($this->request->param('ID'));
        $obj->PosX = $this->request->postVar('col');
        $obj->PosY = $this->request->postVar('row');
        $obj->Width = $this->request->postVar('size_x');
        $obj->Height = $this->request->postVar('size_y');

        // only allow the owner access to write. 

        $obj->write();
    }
947395
private function setImageDimension()
    {
        $headerSize = $this->getHeaderSize();
        fseek($this->_stream, $headerSize);

        while (!feof($this->_stream)) {
            $recordInfo = unpack('Lsize/Sfunc', fread($this->_stream, 6));

            // size of record given in WORDs (= 2 bytes)
            $size = $recordInfo['size'];

            // func is number of GDI function
            $func = $recordInfo['func'];

            // parameters are read as one block and processed
            // as necessary by the case statement below.
            // the data are stored in little-endian format and are unpacked using:
            // s - signed 16-bit int
            // S - unsigned 16-bit int (or WORD)
            // L - unsigned 32-bit int (or DWORD)
            // NB. parameters to GDI functions are stored in reverse order
            // however structures are not reversed,
            // e.g. POINT { int x, int y } where x=3000 (0x0BB8) and y=-1200 (0xFB50)
            // is stored as B8 0B 50 FB

            switch ($func) {
                case 0x020c:  // SetWindowExt
                    if ($size > 3) {
                        $params = fread($this->_stream, 2 * ($size - 3));
                        $sizes = array_reverse(unpack('s2', $params));
                        $this->setImageWidth(PHPRtfLite_Unit::getPointsInTwips($sizes[0]));
                        $this->setImageHeight(PHPRtfLite_Unit::getPointsInTwips($sizes[1]));
                    }
                    return;
                case 0x0000:
                    return;
            }
        }
    }
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;
    }
750680
def store_lineformat(rgb, lns, we, grbit, index)  # :nodoc:
    record = 0x1007     # Record identifier.
    length = 0x000C     # Number of bytes to follow.
    # rgb               # Line RGB colour.
    # lns               # Line pattern.
    # we                # Line weight.
    # grbit             # Option flags.
    # index             # Index to colour of line.

    header = [record, length].pack('vv')
    data  = [rgb].pack('V')
    data += [lns].pack('v')
    data += [we].pack('v')
    data += [grbit].pack('v')
    data += [index].pack('v')

    append(header, data)
  end
247254
private function _writeMarginTop()
	{
		$record  = 0x0028;				   // Record identifier
		$length  = 0x0008;				   // Bytes to follow

		$margin  = $this->_phpSheet->getPageMargins()->getTop();	 // Margin in inches

		$header	= pack("vv",  $record, $length);
		$data	  = pack("d",   $margin);
		if (self::getByteOrder()) { // if it's Big Endian
			$data = strrev($data);
		}

		$this->_append($header . $data);
	}
627234
protected function _storeData() {
		if ($this->_currentCellIsDirty) {
			$this->_currentObject->detach();

			fseek($this->_fileHandle,0,SEEK_END);
			$offset = ftell($this->_fileHandle);
			fwrite($this->_fileHandle, serialize($this->_currentObject));
			$this->_cellCache[$this->_currentObjectID]	= array('ptr' => $offset,
																'sz'  => ftell($this->_fileHandle) - $offset
															   );
			$this->_currentCellIsDirty = false;
		}
		$this->_currentObjectID = $this->_currentObject = null;
	}
774386
def store(data, arr, start=0, stop=None, offset=0, blen=None):
    """"""

    # setup
    blen = _util.get_blen_array(data, blen)
    if stop is None:
        stop = len(data)
    else:
        stop = min(stop, len(data))
    length = stop - start
    if length < 0:
        raise ValueError('invalid stop/start')

    # copy block-wise
    for bi in range(start, stop, blen):
        bj = min(bi+blen, stop)
        bl = bj - bi
        arr[offset:offset+bl] = data[bi:bj]
        offset += bl
1242881
private function SaveRights()
    {
        $groupID = $this->Value('UserGroup');
        $userGroup = Usergroup::Schema()->ByID($groupID);
        $this->container->SetUserGroup($userGroup);
        if (!$userGroup)
        {
            $oldRights = $this->container->GetUserGroupRights();
            if ($oldRights)
            {
                $oldRights->GetContentRights()->Delete();
            }
            $this->container->SetUserGroupRights(null);
        }
        else
        {
            $this->container->SetUserGroup($userGroup);
            $this->containerRights->Save();
            $this->container->SetUserGroupRights($this->containerRights->Rights());
        }
        $this->container->Save();
    }
54302
function _saveBigData($iStBlk, &$raList)
    {
        $FILE = $this->_FILEH_;
   
        // cycle through PPS's
        for ($i = 0; $i < count($raList); $i++) {
            if ($raList[$i]->Type != OLE_PPS_TYPE_DIR) {
                $raList[$i]->Size = $raList[$i]->_DataLen();
                if (($raList[$i]->Size >= OLE_DATA_SIZE_SMALL) ||
                    (($raList[$i]->Type == OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data)))
                {
                    // Write Data
                    if (isset($raList[$i]->_PPS_FILE)) {
                        $iLen = 0;
                        fseek($raList[$i]->_PPS_FILE, 0); // To The Top
                        while($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) {
                            $iLen += strlen($sBuff);
                            fwrite($FILE, $sBuff);
                        }
                    } else {
                        fwrite($FILE, $raList[$i]->_data);
                    }
           
                    if ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE) {
                        for ($j = 0; $j < ($this->_BIG_BLOCK_SIZE - ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)); $j++) {
                            fwrite($FILE, "\x00");
                        }
                    }
                    // Set For PPS
                    $raList[$i]->_StartBlock = $iStBlk;
                    $iStBlk += 
                            (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) +
                                (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0));
                }
                // Close file for each PPS, and unlink it
                if (isset($raList[$i]->_PPS_FILE)) {
                    @fclose($raList[$i]->_PPS_FILE);
                    $raList[$i]->_PPS_FILE = null;
                    @unlink($raList[$i]->_tmp_filename);
                }
            }
        }
    }
443401
def store_margin_common(record, length, margin)  # :nodoc:
    header  = [record, length].pack('vv')
    data    = [margin].pack('d')

    data.reverse! if @byte_order

    prepend(header, data)
  end
118494
function Save()
    {
        $this->contentRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendPageRights();
        }
        $this->rights->SetCreateIn($this->Value('CreateIn'));
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetMove($this->Value('Move'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetContentRights($this->contentRights->Rights());
        $this->rights->Save();
    }