[Koha-cvs] koha/barcodes label-print-pdf.pl [dev_week]

Mason James szrj1m at yahoo.com
Sat Oct 20 18:25:01 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Mason James <sushi>	07/10/20 16:25:01

Modified files:
	barcodes       : label-print-pdf.pl 

Log message:
	removing dupe CalcNextLabelPos() and drawbox() subs 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-pdf.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2.2.18&r2=1.1.2.2.2.19

Patches:
Index: label-print-pdf.pl
===================================================================
RCS file: /sources/koha/koha/barcodes/label-print-pdf.pl,v
retrieving revision 1.1.2.2.2.18
retrieving revision 1.1.2.2.2.19
diff -u -b -r1.1.2.2.2.18 -r1.1.2.2.2.19
--- label-print-pdf.pl	20 Oct 2007 16:22:41 -0000	1.1.2.2.2.18
+++ label-print-pdf.pl	20 Oct 2007 16:25:01 -0000	1.1.2.2.2.19
@@ -59,6 +59,8 @@
 my $label_cols = $template->{'cols'};
 my $label_rows = $template->{'rows'};
 
+# ## $template
+
 my $text_wrap_cols = GetTextWrapCols( $fontsize, $label_width );
 
 #warn $label_cols, $label_rows;
@@ -128,28 +130,27 @@
 
 }
 
-# warn "ROW COL $rowcount, $colcount";
+warn "ROW COL $rowcount, $colcount";
 
 #
+
 #    main foreach loop
 #
 
 foreach $item (@resultsloop) {
-
-  #    warn "$x_pos, $y_pos, $label_width, $label_height";
+  warn "=========================";
+  warn "$x_pos, $y_pos, $label_width, $label_height";
   my $barcode = $item->{'barcode'};
   $item->{'itemcallnumber'} = 'HE8700.7 .P6T44 1983';
 
   my @fields = get_sorted_text( \$conf_data, \$item );
 
-  if ( $printingtype eq 'BAR' ) {
     drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
+  if ( $printingtype eq 'BAR' ) {
     DrawBarcode( $x_pos, $y_pos, $label_height, $label_width, $barcode,
       $barcodetype );
-    CalcNextLabelPos();
   }
   elsif ( $printingtype eq 'BARBIB' ) {
-    drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
 
     # reposoitioning barcode up the top of label
     my $barcode_height = ( $label_height / 1.5 );             ## scaling voodoo
@@ -165,11 +166,8 @@
       @fields
     );
 
-    CalcNextLabelPos();
-
   }    # correct
   elsif ( $printingtype eq 'BIBBAR' ) {
-    drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
     my $barcode_height = $label_height / 2;
     DrawBarcode( $x_pos, $y_pos, $barcode_height, $label_width, $barcode,
       $barcodetype );
@@ -180,11 +178,9 @@
       @fields
     );
 
-    CalcNextLabelPos();
   }
 
   elsif ( $printingtype eq 'ALT' ) {
-    drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
     DrawBarcode( $x_pos, $y_pos, $label_height, $label_width, $barcode,
       $barcodetype );
     CalcNextLabelPos();
@@ -199,32 +195,21 @@
       @fields
     );
 
-    CalcNextLabelPos();
   }
 
   elsif ( $printingtype eq 'BIB' ) {
-    drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
 
     #        DrawSpineText( $y_pos, $label_height, $fontsize, $x_pos,
     #            $left_text_margin, $text_wrap_cols, \$item, \$conf_data );
 
-=c
-sub draw_text_block_manual {
-    my ( 
-        $x_pos,        $y_pos,    $label_width,
-        $label_height, $fontsize, $startrow,
-        $gutter,       $justify,  @fields,
-    ) = @_;
-=cut
-
     draw_text_block_manual(
       $x_pos,    $y_pos, $label_width,      $label_height,
       $fontsize, 0,      $left_text_margin, 'l',
       @fields
     );
 
-    CalcNextLabelPos();
   }
+  CalcNextLabelPos();
 
 }    # end for item loop
 prEnd();
@@ -237,9 +222,10 @@
 sub CalcNextLabelPos {
   if ( $colcount lt $label_cols ) {
 
-    #        warn "new col";
     $x_pos = ( $x_pos + $label_width + $colspace );
     $colcount++;
+### $x_pos
+### $colcount
   }
 
   else {





More information about the Koha-cvs mailing list