[otrs-cvs] CVS: otrs/Kernel/System PDF.pm,1.12,1.13

cvs-log at otrs.org cvs-log at otrs.org
Tue Aug 22 21:44:44 CEST 2006


Update of /home/cvs/otrs/Kernel/System
In directory lancelot:/tmp/cvs-serv27713/Kernel/System

Modified Files:
	PDF.pm 
Log Message:
fix two bugs in table-row-height calculation

Index: PDF.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PDF.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** PDF.pm	22 Aug 2006 10:51:01 -0000	1.12
--- PDF.pm	22 Aug 2006 18:44:42 -0000	1.13
***************
*** 811,816 ****
                          # save old position
                          my %PositionOld = %Position;
! 
!                         if ($Param{RowData}->[$Row]->{TextHeight} <= $Position{Y} - $Dim{Bottom}) {
                              for ($Block{ReturnColumnStart}..$Block{ReturnColumnStop}) {
                                  my $Column = $_;
--- 811,815 ----
                          # save old position
                          my %PositionOld = %Position;
!                         if ($Param{RowData}->[$Row]->{OutputHeight} <= $Position{Y} - $Dim{Bottom}) {
                              for ($Block{ReturnColumnStart}..$Block{ReturnColumnStop}) {
                                  my $Column = $_;
***************
*** 895,901 ****
                                      $Param{CellData}->[$Row]->[$Column]->{TmpOff} = 1;
                                      # recalculate height
!                                     if ($Block{ReturnBlock} eq $LastBlock) {
                                          if ($Param{RowData}->[$Row]->{Height} > 0) {
                                              $Param{RowData}->[$Row]->{Height} -= $NewTextHeight;
                                          }
                                          $Self->_TableRowCalculate(
--- 894,911 ----
                                      $Param{CellData}->[$Row]->[$Column]->{TmpOff} = 1;
                                      # recalculate height
!                                     if ($Block{ReturnBlock} eq $LastBlock &&
!                                         $Column eq $Block{ReturnColumnStop}
!                                     ) {
!                                         # if Height was given
                                          if ($Param{RowData}->[$Row]->{Height} > 0) {
                                              $Param{RowData}->[$Row]->{Height} -= $NewTextHeight;
+                                             # if rest to small, deactivate all cells of this row
+                                             if ($Param{RowData}->[$Row]->{Height} < $Param{RowData}->[$Row]->{MinFontSize}) {
+                                                 foreach my $CellOff (@{$Param{CellData}->[$Row]}) {
+                                                     $CellOff->{Content} = ' ';
+                                                     $CellOff->{Off} = 1;
+                                                     $CellOff->{Tmp} = 0;
+                                                 }
+                                             }
                                          }
                                          $Self->_TableRowCalculate(
***************
*** 2052,2056 ****
          }
      }
!     $Param{RowData}->[$Param{Row}]->{OutputHeight} = $Param{RowData}->[$Param{Row}]->{TextHeight} + $Param{PaddingTop} + $Param{PaddingBottom} + (2 * $Param{Border});
  
      return %Param;
--- 2062,2067 ----
          }
      }
!     $Param{RowData}->[$Param{Row}]->{OutputHeight} =
!         $Param{RowData}->[$Param{Row}]->{TextHeight} + $Param{PaddingTop} + $Param{PaddingBottom} + (2 * $Param{Border});
  
      return %Param;



More information about the cvs-log mailing list