Ejemplo n.º 1
0
 function __readPropertySets()
 {
     $offset = 0;
     while ($offset < strlen($this->entry)) {
         $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE);
         $nameSize = ord($d[SIZE_OF_NAME_POS]) | ord($d[SIZE_OF_NAME_POS + 1]) << 8;
         $type = ord($d[TYPE_POS]);
         $startBlock = GetInt4d($d, START_BLOCK_POS);
         $size = GetInt4d($d, SIZE_POS);
         $name = '';
         for ($i = 0; $i < $nameSize; $i++) {
             $name .= $d[$i];
         }
         $name = str_replace("", "", $name);
         $this->props[] = array('name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size);
         if (strtolower($name) == "workbook" || strtolower($name) == "book") {
             $this->wrkbook = count($this->props) - 1;
         }
         if ($name == "Root Entry") {
             $this->rootentry = count($this->props) - 1;
         }
         $offset += PROPERTY_STORAGE_BLOCK_SIZE;
     }
 }
Ejemplo n.º 2
0
 public function __readPropertySets()
 {
     $offset = 0;
     //var_dump($this->entry);
     while ($offset < strlen($this->entry)) {
         $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE);
         $nameSize = ord($d[SIZE_OF_NAME_POS]) | ord($d[SIZE_OF_NAME_POS + 1]) << 8;
         $type = ord($d[TYPE_POS]);
         //$maxBlock = strlen($d) / BIG_BLOCK_SIZE - 1;
         $startBlock = GetInt4d($d, START_BLOCK_POS);
         $size = GetInt4d($d, SIZE_POS);
         $name = '';
         for ($i = 0; $i < $nameSize; ++$i) {
             $name .= $d[$i];
         }
         $name = str_replace("", '', $name);
         $this->props[] = array('name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size);
         if ($name == 'Workbook' || $name == 'Book') {
             $this->wrkbook = count($this->props) - 1;
         }
         if ($name == 'Root Entry') {
             $this->rootentry = count($this->props) - 1;
         }
         //echo "name ==$name=\n";
         $offset += PROPERTY_STORAGE_BLOCK_SIZE;
     }
 }