This commit is contained in:
Andreas Österreicher
2009-07-17 08:28:11 +00:00
parent 81ae53bd4c
commit 2344fc8fe9
8 changed files with 60 additions and 42 deletions
+6
View File
@@ -218,8 +218,14 @@ class person extends basis_db
$this->errormsg = 'SVNR darf nicht laenger als 10 Zeichen sein';
return false;
}
if($this->svnr!='')
{
if(mb_strlen($this->svnr)!=10)
{
$this->errormsg = 'Sozialversicherungsnummer muss 10stellig sein';
return false;
}
//SVNR mit Pruefziffer pruefen
//Die 4. Stelle in der SVNR ist die Pruefziffer
//(Summe von (gewichtung[i]*svnr[i])) modulo 11 ergibt diese Pruefziffer
+35 -28
View File
@@ -108,40 +108,47 @@ class FO_LayoutObject extends FO_FlowContainer {
$anzahl_lines=0;
//sonderzeichen konvertieren
$line = $this->convert($block->nodeValue);
//Damit bei den Fussnoten am Zeugnis das Sonderzeichen nicht als 5 Zeichen gezaehlt wird
//wird hier einfach das erste Zeichen ersetzt
$line = '1'.substr($line, 1);
//Zeilenumbrueche loeschen
$line = str_replace("\n",'', trim($line));
//Lines nach Newlines splitten
$lines = explode('\n', $line);
foreach ($lines as $line)
{
do
{
/*$x = $this->getContext("x");
$x2 = $this->getContext("startx");
if (!$x2) {
$x2 = $x;
}*/
//echo "x2:$x2<br>";
$w = $content_width-1;
//Anzahl der zeichen holen die in dieser zeile noch platz haben
$noc = $pdf->GetNumberOfChars($w, $line, $font_size);
//wenn das wort nicht abgeteilt werden kann dann ueber den rand hinausschreiben
if($noc==-1)
$noc = strlen($line);
//Zeile abteilen
$showLine = substr($line, 0, $noc);
$output.= "w=$w noc=$noc fontsize=$font_size<br>$showLine ($line)";
$textWidth = $pdf->GetStringWidth($showLine);
//Rest der Line als neue Line
$line = trim(substr($line, $noc));
//Anzahl der verbleibenden zeichen ermitteln
$width = $pdf->GetNumberOfChars($w, $line, $font_size);
$anzahl_lines++;
} while($width>0);
if($line!='')
{
do
{
/*$x = $this->getContext("x");
$x2 = $this->getContext("startx");
if (!$x2) {
$x2 = $x;
}*/
//echo "x2:$x2<br>";
$w = $content_width-1;
//Anzahl der zeichen holen die in dieser zeile noch platz haben
$noc = $pdf->GetNumberOfChars($w, $line, $font_size);
//wenn das wort nicht abgeteilt werden kann dann ueber den rand hinausschreiben
if($noc==-1)
$noc = strlen($line);
//Zeile abteilen
$showLine = substr($line, 0, $noc);
$output.= "w=$w noc=$noc fontsize=$font_size<br>$showLine ($line)";
//$textWidth = $pdf->GetStringWidth($showLine);
//Rest der Line als neue Line
$line = trim(substr($line, $noc));
//Anzahl der verbleibenden zeichen ermitteln
$width = strlen($line); //$pdf->GetNumberOfChars($w, $line, $font_size);
$anzahl_lines++;
} while($width>0);
}
}
$output.= " Breaks $anzahl_lines <br><br>";
//Wenn die Anzahl der benoetigten Zeilen in dieser Zelle
+8 -8
View File
@@ -178,7 +178,7 @@ class MyPdf extends FPDF {
//oesi - add parameter width for set the content-width of fo:block
if($width!=NULL)
{
$pw = $x+$width;
$pw = $xNewLine+$width;
}
else
$pw = $this->GetPageWidth();
@@ -371,7 +371,7 @@ class MyPdf extends FPDF {
}
}
// Draws a cubic Bézier curve from last draw point
// Draws a cubic Bzier curve from last draw point
// Parameters:
// - x1, y1: Control point 1
// - x2, y2: Control point 2
@@ -397,7 +397,7 @@ class MyPdf extends FPDF {
// - style: Style of ellipse (draw and/or fill: D, F, DF, FD, C (D + close))
// - line_style: Line style for ellipse. Array like for SetLineStyle
// - fill_color: Fill color. Array with components (red, green, blue)
// - nSeg: Ellipse is made up of nSeg Bézier curves
// - nSeg: Ellipse is made up of nSeg Bzier curves
function Ellipse($x0, $y0, $rx, $ry = 0, $angle = 0, $astart = 0, $afinish = 360, $style = '', $fill_color = null, $nSeg = 8) {
if ($rx) {
if (!(false === strpos($style, 'F')) && $fill_color) {
@@ -507,7 +507,7 @@ class MyPdf extends FPDF {
// - style: Style of circle (draw and/or fill) (D, F, DF, FD, C (D + close))
// - line_style: Line style for circle. Array like for SetLineStyle
// - fill_color: Fill color. Array with components (red, green, blue)
// - nSeg: Ellipse is made up of nSeg Bézier curves
// - nSeg: Ellipse is made up of nSeg Bzier curves
function Circle($x0, $y0, $r, $astart = 0, $afinish = 360, $style = '', $fill_color = null, $nSeg = 8) {
$this->Ellipse($x0, $y0, $r, 0, 0, $astart, $afinish, $style, $line_style, $fill_color, $nSeg);
}
@@ -520,7 +520,7 @@ class MyPdf extends FPDF {
$this->_out(sprintf('%.2f %.2f m', $x * $this->k, ($this->h - $y) * $this->k));
}
// Draws a Bézier curve from last draw point
// Draws a Bzier curve from last draw point
// Parameters:
// - x1, y1: Control point 1
// - x2, y2: Control point 2
@@ -530,7 +530,7 @@ class MyPdf extends FPDF {
}
// Draws a cubic Bézier curve from last draw point
// Draws a cubic Bzier curve from last draw point
// Parameters:
// - x2, y2: Control point 2
// - x3, y3: End point
@@ -539,7 +539,7 @@ class MyPdf extends FPDF {
$this->_out(sprintf('%.2f %.2f %.2f %.2f v', $x2 * $this->k, ($this->h - $y2) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));
}
// Draws a cubic Bézier curve from last draw point
// Draws a cubic Bzier curve from last draw point
// Parameters:
// - x1, y1: Control point 1
// - x3, y3: End point
@@ -566,7 +566,7 @@ class MyPdf extends FPDF {
// - style: Style of ellipse (draw and/or fill: D, F, DF, FD, C (D + close))
// - line_style: Line style for ellipse. Array like for SetLineStyle
// - fill_color: Fill color. Array with components (red, green, blue)
// - nSeg: Ellipse is made up of nSeg Bézier curves
// - nSeg: Ellipse is made up of nSeg Bzier curves
function _Ellipse($x0, $y0, $rx, $ry = 0, $angle = 0, $astart = 0, $afinish = 360, $nSeg = 8) {
if ($rx) {
if (!$ry)