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/workflow/inc/fpdf/fpdf.php

    r795 r7655  
    431431        $w=0; 
    432432        $l=strlen($s); 
    433         for($i=0;$i<$l;$i++) 
     433        for($i=0;$i<$l;++$i) 
    434434                $w+=$cw[$s{$i}]; 
    435435        return $w*$this->FontSize/1000; 
     
    486486                $d=0; 
    487487                $nb=count($this->diffs); 
    488                 for($i=1;$i<=$nb;$i++) 
     488                for($i=1;$i<=$nb;++$i) 
    489489                { 
    490490                        if($this->diffs[$i]==$diff) 
     
    750750                        } 
    751751                        $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); 
    752                         $i++; 
     752                        ++$i; 
    753753                        $sep=-1; 
    754754                        $j=$i; 
    755755                        $l=0; 
    756756                        $ns=0; 
    757                         $nl++; 
     757                        ++$nl; 
    758758                        if($border && $nl==2) 
    759759                                $b=$b2; 
     
    764764                        $sep=$i; 
    765765                        $ls=$l; 
    766                         $ns++; 
     766                        ++$ns; 
    767767                } 
    768768                $l+=$cw[$c]; 
     
    773773                        { 
    774774                                if($i==$j) 
    775                                         $i++; 
     775                                        ++$i; 
    776776                                if($this->ws>0) 
    777777                                { 
     
    795795                        $l=0; 
    796796                        $ns=0; 
    797                         $nl++; 
     797                        ++$nl; 
    798798                        if($border && $nl==2) 
    799799                                $b=$b2; 
    800800                } 
    801801                else 
    802                         $i++; 
     802                        ++$i; 
    803803        } 
    804804        //Last chunk 
     
    835835                        //Explicit line break 
    836836                        $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    837                         $i++; 
     837                        ++$i; 
    838838                        $sep=-1; 
    839839                        $j=$i; 
     
    845845                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    846846                        } 
    847                         $nl++; 
     847                        ++$nl; 
    848848                        continue; 
    849849                } 
     
    863863                                        $w=$this->w-$this->rMargin-$this->x; 
    864864                                        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    865                                         $i++; 
    866                                         $nl++; 
     865                                        ++$i; 
     866                                        ++$nl; 
    867867                                        continue; 
    868868                                } 
    869869                                if($i==$j) 
    870                                         $i++; 
     870                                        ++$i; 
    871871                                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    872872                        } 
     
    885885                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    886886                        } 
    887                         $nl++; 
     887                        ++$nl; 
    888888                } 
    889889                else 
    890                         $i++; 
     890                        ++$i; 
    891891        } 
    892892        //Last chunk 
     
    10891089        { 
    10901090                //Replace number of pages 
    1091                 for($n=1;$n<=$nb;$n++) 
     1091                for($n=1;$n<=$nb;++$n) 
    10921092                        $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); 
    10931093        } 
     
    11031103        } 
    11041104        $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; 
    1105         for($n=1;$n<=$nb;$n++) 
     1105        for($n=1;$n<=$nb;++$n) 
    11061106        { 
    11071107                //Page 
     
    11451145        $this->_out('<</Type /Pages'); 
    11461146        $kids='/Kids ['; 
    1147         for($i=0;$i<$nb;$i++) 
     1147        for($i=0;$i<$nb;++$i) 
    11481148                $kids.=(3+2*$i).' 0 R '; 
    11491149        $this->_out($kids.']'); 
     
    12451245                        $cw=&$font['cw']; 
    12461246                        $s='['; 
    1247                         for($i=32;$i<=255;$i++) 
     1247                        for($i=32;$i<=255;++$i) 
    12481248                                $s.=$cw[chr($i)].' '; 
    12491249                        $this->_out($s.']'); 
     
    12991299                { 
    13001300                        $trns=''; 
    1301                         for($i=0;$i<count($info['trns']);$i++) 
     1301            $info_count = count($info['trns']); 
     1302                        for($i=0;$i<$info_count;++$i) 
    13021303                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    13031304                        $this->_out('/Mask ['.$trns.']'); 
     
    14201421        $this->_out('0 '.($this->n+1)); 
    14211422        $this->_out('0000000000 65535 f '); 
    1422         for($i=1;$i<=$this->n;$i++) 
     1423        for($i=1;$i<=$this->n;++$i) 
    14231424                $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); 
    14241425        //Trailer 
Note: See TracChangeset for help on using the changeset viewer.