Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reports/inc/class.fpdf.inc.php

    r5291 r7655  
    421421        $w=0; 
    422422        $l=strlen($s); 
    423         for($i=0;$i<$l;$i++) 
     423        for($i=0;$i<$l;++$i) 
    424424                $w+=$cw[$s[$i]]; 
    425425        return $w*$this->FontSize/1000; 
     
    476476                $d=0; 
    477477                $nb=count($this->diffs); 
    478                 for($i=1;$i<=$nb;$i++) 
     478                for($i=1;$i<=$nb;++$i) 
    479479                { 
    480480                        if($this->diffs[$i]==$diff) 
     
    743743                        } 
    744744                        $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); 
    745                         $i++; 
     745                        ++$i; 
    746746                        $sep=-1; 
    747747                        $j=$i; 
    748748                        $l=0; 
    749749                        $ns=0; 
    750                         $nl++; 
     750                        ++$nl; 
    751751                        if($border && $nl==2) 
    752752                                $b=$b2; 
     
    757757                        $sep=$i; 
    758758                        $ls=$l; 
    759                         $ns++; 
     759                        ++$ns; 
    760760                } 
    761761                $l+=$cw[$c]; 
     
    766766                        { 
    767767                                if($i==$j) 
    768                                         $i++; 
     768                                        ++$i; 
    769769                                if($this->ws>0) 
    770770                                { 
     
    788788                        $l=0; 
    789789                        $ns=0; 
    790                         $nl++; 
     790                        ++$nl; 
    791791                        if($border && $nl==2) 
    792792                                $b=$b2; 
    793793                } 
    794794                else 
    795                         $i++; 
     795                        ++$i; 
    796796        } 
    797797        //Last chunk 
     
    828828                        //Explicit line break 
    829829                        $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    830                         $i++; 
     830                        ++$i; 
    831831                        $sep=-1; 
    832832                        $j=$i; 
     
    838838                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    839839                        } 
    840                         $nl++; 
     840                        ++$nl; 
    841841                        continue; 
    842842                } 
     
    856856                                        $w=$this->w-$this->rMargin-$this->x; 
    857857                                        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    858                                         $i++; 
    859                                         $nl++; 
     858                                        ++$i; 
     859                                        ++$nl; 
    860860                                        continue; 
    861861                                } 
    862862                                if($i==$j) 
    863                                         $i++; 
     863                                        ++$i; 
    864864                                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    865865                        } 
     
    878878                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    879879                        } 
    880                         $nl++; 
     880                        ++$nl; 
    881881                } 
    882882                else 
    883                         $i++; 
     883                        ++$i; 
    884884        } 
    885885        //Last chunk 
     
    13821382        { 
    13831383                //Replace number of pages 
    1384                 for($n=1;$n<=$nb;$n++) 
     1384                for($n=1;$n<=$nb;++$n) 
    13851385                        $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); 
    13861386        } 
     
    13961396        } 
    13971397        $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; 
    1398         for($n=1;$n<=$nb;$n++) 
     1398        for($n=1;$n<=$nb;++$n) 
    13991399        { 
    14001400                //Page 
     
    14381438        $this->_out('<</Type /Pages'); 
    14391439        $kids='/Kids ['; 
    1440         for($i=0;$i<$nb;$i++) 
     1440        for($i=0;$i<$nb;++$i) 
    14411441                $kids.=(3+2*$i).' 0 R '; 
    14421442        $this->_out($kids.']'); 
     
    15351535                        $cw=&$font['cw']; 
    15361536                        $s='['; 
    1537                         for($i=32;$i<=255;$i++) 
     1537                        for($i=32;$i<=255;++$i) 
    15381538                                $s.=$cw[chr($i)].' '; 
    15391539                        $this->_out($s.']'); 
     
    15891589                { 
    15901590                        $trns=''; 
    1591                         for($i=0;$i<count($info['trns']);$i++) 
     1591                        for($i=0;$i<count($info['trns']);++$i) 
    15921592                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    15931593                        $this->_out('/Mask ['.$trns.']'); 
     
    17101710        $this->_out('0 '.($this->n+1)); 
    17111711        $this->_out('0000000000 65535 f '); 
    1712         for($i=1;$i<=$this->n;$i++) 
     1712        for($i=1;$i<=$this->n;++$i) 
    17131713                $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); 
    17141714        //Trailer 
Note: See TracChangeset for help on using the changeset viewer.