From 8314355f30911e9e3def30911d05c30491962828 Mon Sep 17 00:00:00 2001
From: Eric Marguin
Date: Wed, 26 Dec 2007 11:16:05 +0100
Subject: [PATCH] [svn r14071] picture can't be larger than max_width (defined
in admin).
---
.../openoffice_text_document.class.php | 74 ++++++++++---------
1 file changed, 39 insertions(+), 35 deletions(-)
diff --git a/main/newscorm/openoffice_text_document.class.php b/main/newscorm/openoffice_text_document.class.php
index f99c05eaf0..ee6dbb5878 100644
--- a/main/newscorm/openoffice_text_document.class.php
+++ b/main/newscorm/openoffice_text_document.class.php
@@ -70,25 +70,27 @@ class OpenOfficeTextDocument extends OpenofficeDocument {
function format_page_content($header, $content, $path_to_folder)
{
- // Tidy
- $tidy = new tidy;
- $config = array(
- 'indent' => true,
- 'output-xhtml' => true,
- 'wrap' => 200,
- 'clean' => true,
- 'bare' => true);
- $tidy->parseString($header.$content, $config, 'utf8');
- $tidy->cleanRepair();
- $content = $tidy;
// limit the width of the doc
- $max_width = '720px';
- $content = preg_replace("|]*>|","\\0\r\n",$content);
- $content = str_replace('','
]*>|i","\\0\r\n",$content, -1,$count);
+ if($count < 1)
+ {
+ $content = '
'.$content;
+ }
+
+ $content = preg_replace('||i','
\\0',$content, -1, $count);
+ if($count < 1)
+ {
+ $content = $content.'