Mais quel boulot impressionant : Cerdic est vraiment le spécialiste francais de l'Odt, quel honneur pour spip.
BoOz
cedric@yterium.com a écrit :
Author: cedric@yterium.com
Date: Wed Feb 7 20:06:43 2007
New Revision: 9518Log:
"nettoyer avec circonspection, et ne pas polluer avec des \n"Modified:
_plugins_/_dev_/export_odt/inc/odt_api.phpModified: _plugins_/_dev_/export_odt/inc/odt_api.php
--- _plugins_/_dev_/export_odt/inc/odt_api.php (original)
+++ _plugins_/_dev_/export_odt/inc/odt_api.php Wed Feb 7 20:06:43 2007
@@ -305,12 +305,12 @@
// Fermer les span (y compris sur "STOP P")
$texte = preg_replace(
',(<text:span\s.*)(</?(STOP SPAN|STOP P|text:h|text:list|text:list-item|table:table|table:table-column|table:table-row|table:table-cell)[>[:space:]]),UimsS',
- "\n\\1</text:span>\n\\2", $texte);
+ "\\1</text:span>\\2", $texte);// Fermer les paragraphes (y compris sur "STOP P")
$texte = preg_replace(
',(<text:p\s.*)(</?(STOP P|text:h|text:list|text:list-item|table:table|table:table-column|table:table-row|table:table-cell)[>[:space:]]),UimsS',
- "\n\\1</text:p>\n\\2", $texte);
+ "\\1</text:p>\\2", $texte);// Supprimer les marqueurs "STOP P"
@@ -324,14 +324,11 @@
$texte = preg_replace(
',(<text:p(>|\s[^<>]*)>)\s*|\s*(</text:p[>[:space:]]),'.$u.'i', '\1\3',
$texte);
- $texte = preg_replace(
- ',(<text:span(>|\s[^<>]*)>)\s*|\s*(</text:span[>[:space:]]),'.$u.'i', '\1\3',
- $texte);// Supprimer les <p xx></p> vides
$texte = preg_replace(',<text:p\s[^<>]*></text:p>\s*,iS', '',
$texte);
- $texte = preg_replace(',<text:span\s*>([^<]*)</text:span>\s*,iS', '\\1',
+ $texte = preg_replace(',<text:span\s*>([^<]*)</text:span>,iS', '\\1',
$texte);
return $texte;
}_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit