#TUNING by exept
authorClaus Gittinger <cg@exept.de>
Sun, 08 Sep 2019 15:19:44 +0200
changeset 4340 952b7c141f6e
parent 4339 f98b7fa24c7a
child 4341 f1e9c4428cd3
#TUNING by exept class: PrinterContext changed: #printPage:in:lines:headerLines:linesPerPage:
PrinterContext.st
--- a/PrinterContext.st	Sun Sep 08 14:57:54 2019 +0200
+++ b/PrinterContext.st	Sun Sep 08 15:19:44 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2006 by eXept Software AG
 	      All Rights Reserved
@@ -459,7 +461,7 @@
 
     linesPerPage > headerLines size
 	ifFalse:
-	  [Dialog information: 'Der Dokumentenkopf ist zu groß; wird ignoriert!!'.
+	  [Dialog information: 'Der Dokumentenkopf ist zu groß; wird ignoriert!!'.
 	   headerLines := #().
 	  ]
 	ifTrue: [linesPerPage := linesPerPage - headerLines size].
@@ -871,22 +873,22 @@
     rect := aRectangle deepCopy.
     hLines := headerLines deepCopy.
     headerLines size > 0 ifTrue:[
-	l := hLines first.
-	p := l indexOfSubCollection: "indexOfString:"'#P'.
-	p = 0 ifFalse:[
-	    indexString := pageIndex printString , ' '.
-	    l := (l copyFrom:1 to:p - 1) , indexString , (l copyFrom:p + 2 to:l size).
-	    hLines at:1 put:l.
-	].
-	cHeight := self getCharHeight.
-	rect top:rect top + (hLines size * cHeight).
+        l := hLines first.
+        p := l indexOfSubCollection: "indexOfString:"'#P'.
+        p == 0 ifFalse:[
+            indexString := pageIndex printString , ' '.
+            l := (l copyTo:p - 1) , indexString , (l copyFrom:p + 2).
+            hLines at:1 put:l.
+        ].
+        cHeight := self getCharHeight.
+        rect top:rect top + (hLines size * cHeight).
     ].
     self displayStringLines:hLines in:aRectangle.
     self
-	displayStringLines:lines
-	from:firstLine
-	to:lastLine
-	in:rect.
+        displayStringLines:lines
+        from:firstLine
+        to:lastLine
+        in:rect.
 
     "Created: / 27-07-2006 / 18:28:00 / fm"
     "Modified: / 03-08-2006 / 16:03:15 / fm"