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

    r2 r7655  
    427427        $w=0; 
    428428        $l=strlen($s); 
    429         for($i=0;$i<$l;$i++) 
     429        for($i=0;$i<$l;++$i) 
    430430                $w+=$cw[$s{$i}]; 
    431431        return $w*$this->FontSize/1000; 
     
    483483                $d=0; 
    484484                $nb=count($this->diffs); 
    485                 for($i=1;$i<=$nb;$i++) 
     485                for($i=1;$i<=$nb;++$i) 
    486486                        if($this->diffs[$i]==$diff) 
    487487                        { 
     
    748748                        } 
    749749                        $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); 
    750                         $i++; 
     750                        ++$i; 
    751751                        $sep=-1; 
    752752                        $j=$i; 
    753753                        $l=0; 
    754754                        $ns=0; 
    755                         $nl++; 
     755                        ++$nl; 
    756756                        if($border and $nl==2) 
    757757                                $b=$b2; 
     
    762762                        $sep=$i; 
    763763                        $ls=$l; 
    764                         $ns++; 
     764                        ++$ns; 
    765765                } 
    766766                $l+=$cw[$c]; 
     
    771771                        { 
    772772                                if($i==$j) 
    773                                         $i++; 
     773                                        ++$i; 
    774774                                if($this->ws>0) 
    775775                                { 
     
    793793                        $l=0; 
    794794                        $ns=0; 
    795                         $nl++; 
     795                        ++$nl; 
    796796                        if($border and $nl==2) 
    797797                                $b=$b2; 
    798798                } 
    799799                else 
    800                         $i++; 
     800                        ++$i; 
    801801        } 
    802802        //Last chunk 
     
    837837                        //Explicit line break 
    838838                        $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    839                         $i++; 
     839                        ++$i; 
    840840                        $sep=-1; 
    841841                        $j=$i; 
     
    847847                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    848848                        } 
    849                         $nl++; 
     849                        ++$nl; 
    850850                        continue; 
    851851                } 
     
    865865                                        $w=$this->w-$this->rMargin-$this->x; 
    866866                                        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    867                                         $i++; 
    868                                         $nl++; 
     867                                        ++$i; 
     868                                        ++$nl; 
    869869                                        continue; 
    870870                                } 
    871871                                if($i==$j) 
    872                                         $i++; 
     872                                        ++$i; 
    873873                                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    874874                        } 
     
    887887                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    888888                        } 
    889                         $nl++; 
     889                        ++$nl; 
    890890                } 
    891891                else 
    892                         $i++; 
     892                        ++$i; 
    893893        } 
    894894        //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.']'); 
     
    12301230                        $cw=&$font['cw']; 
    12311231                        $s='['; 
    1232                         for($i=32;$i<=255;$i++) 
     1232                        for($i=32;$i<=255;++$i) 
    12331233                                $s.=$cw[chr($i)].' '; 
    12341234                        $this->_out($s.']'); 
     
    12831283                { 
    12841284                        $trns=''; 
    1285                         for($i=0;$i<count($info['trns']);$i++) 
     1285                        for($i=0;$i<count($info['trns']);++$i) 
    12861286                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    12871287                        $this->_out('/Mask ['.$trns.']'); 
     
    13901390        $this->_out('0 '.($this->n+1)); 
    13911391        $this->_out('0000000000 65535 f '); 
    1392         for($i=1;$i<=$this->n;$i++) 
     1392        for($i=1;$i<=$this->n;++$i) 
    13931393                $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); 
    13941394        //Trailer 
Note: See TracChangeset for help on using the changeset viewer.