From 77623a9c1b2a7a2c6f431581c0114c948272d3a2 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis@dolibarr.fr>
Date: Fri, 23 Mar 2012 09:03:36 +0100
Subject: [PATCH] Fix: compatibility with ckeditor

---
 htdocs/core/modules/commande/doc/pdf_einstein.modules.php     | 3 +--
 .../modules/expedition/doc/pdf_expedition_rouget.modules.php  | 2 +-
 htdocs/core/modules/facture/doc/pdf_crabe.modules.php         | 4 +---
 htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php      | 3 +--
 htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php      | 3 +--
 htdocs/core/modules/project/pdf/pdf_baleine.modules.php       | 3 +--
 htdocs/core/modules/propale/doc/pdf_azur.modules.php          | 3 +--
 htdocs/core/modules/propale/doc/pdf_jaune.modules.php         | 3 +--
 .../core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 3 +--
 .../core/modules/supplier_order/pdf/pdf_muscadet.modules.php  | 3 +--
 10 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index f14dc4199ab..7db414e044a 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -236,8 +236,7 @@ class pdf_einstein extends ModelePDFCommandes
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
index 07be573a5d6..00e6500c8ef 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
@@ -196,7 +196,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
 					{
 						$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
 						$pdf->SetXY($this->posxdesc-1, $tab_top);
-						$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+						$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					}
 
 					$nexY = $pdf->GetY();
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index ea9987acc97..4b22f27c319 100755
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -235,9 +235,7 @@ class pdf_crabe extends ModelePDFFactures
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-                    //$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'J', false, 1, '', '', true, 0, false, false, 0, 'T', true);
-                    $pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');    // FPDF
+                    $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 1309cc243b5..272460695c0 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -185,8 +185,7 @@ class pdf_soleil extends ModelePDFFicheinter
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
index 96fd21e87ee..999aef6b081 100644
--- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
@@ -213,8 +213,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
index db1adedfb2f..34498b77f57 100644
--- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
@@ -173,8 +173,7 @@ class pdf_baleine extends ModelePDFProjects
 				if (! empty($object->note_public))
 				{
 					$pdf->SetFont('','', $default_font_size - 1);
-					$pdf->SetXY($this->posxref-1, $tab_top-2);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-($tab_top-2);
 
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index a1d92902742..5aa3c76baea 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -222,8 +222,7 @@ class pdf_azur extends ModelePDFPropales
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 4, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php
index 0b61d647459..5755ab38f17 100644
--- a/htdocs/core/modules/propale/doc/pdf_jaune.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_jaune.modules.php
@@ -222,8 +222,7 @@ class pdf_jaune extends ModelePDFPropales
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 4, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index f1f66f6b386..8d32bc126f0 100755
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -229,8 +229,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);   // Dans boucle pour gerer multi-page
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index 0873468a3c5..8eba413a4d7 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -233,8 +233,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
 					$tab_top = 88;
 
 					$pdf->SetFont('','', $default_font_size - 1);
-					$pdf->SetXY($this->posxdesc-1, $tab_top);
-					$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
+					$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
 					$nexY = $pdf->GetY();
 					$height_note=$nexY-$tab_top;
 
-- 
GitLab