Esempio n. 1
0
 protected function parseControlSymbol()
 {
     $this->getChar();
     $symbol = $this->char;
     if ($symbol == '\'') {
         $this->getChar();
         $parameter = $this->char;
         $this->getChar();
         $parameter = $parameter . $this->char;
         $rtfsymbol = new RtfHexaControlSymbol();
         $rtfsymbol->setValueFromHex($parameter);
         $this->group->children[] = $rtfsymbol;
     } else {
         $rtfsymbol = new RtfControlSymbol();
         $rtfsymbol->symbol = $symbol;
         $this->group->children[] = $rtfsymbol;
     }
 }
Esempio n. 2
0
 protected function parseControlSymbol()
 {
     // Read symbol (one character only).
     $this->getChar();
     $symbol = $this->char;
     if ($symbol === '\'') {
         // Symbols ordinarily have no parameter. However,
         // if this is \', then it is followed by a 2-digit hex-code:
         $this->getChar();
         $parameter = $this->char;
         $this->getChar();
         $parameter .= $this->char;
         $rtfsymbol = new RtfHexaControlSymbol();
         $rtfsymbol->setSymbol($symbol);
         $rtfsymbol->setValueFromHex($parameter);
         $this->group->children[] = $rtfsymbol;
     } else {
         $rtfsymbol = new RtfControlSymbol();
         $rtfsymbol->setSymbol($symbol);
         $this->group->children[] = $rtfsymbol;
     }
 }
 public function test_eacute__toRtf()
 {
     $this->_object->setValueFromDec('233');
     $this->assertSame('\\\'e9', $this->_object->__toRtf());
 }