noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 50/162: Create invoice : New version of libre


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 50/162: Create invoice : New version of libreoffice use the numeric in another way
Date: Sat, 11 Jul 2020 13:23:33 -0400 (EDT)

sparkyx pushed a commit to annotated tag E-4
in repository noalyss.

commit d4579aca324772132ebac8880faee3224f055701
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Apr 21 02:35:14 2018 +0200

    Create invoice : New version of libreoffice use the numeric in another way
---
 include/class/document.class.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/class/document.class.php b/include/class/document.class.php
index 22cdb9d..03258cf 100644
--- a/include/class/document.class.php
+++ b/include/class/document.class.php
@@ -272,9 +272,14 @@ class Document
                          */
                        if ( is_numeric($value) && $p_type=='OOo')
                          {
-                           
$searched='/office:value-type="string"><text:p>'.$pattern.'/';
+                            // For libreOffice <=4
+                           
$searched='/office:value-type="string"><text:p>'.$pattern.'/i';
                            $replaced='office:value-type="float" 
office:value="'.$value.'"><text:p>'.$pattern;
                            $buffer=preg_replace($searched, $replaced, 
$buffer,1);
+                            // For libreOffice >=4
+                           $searched='/office:value-type="string" 
calcext:value-type="string"><text:p>'.$pattern.'/i';
+                           $replaced='office:value-type="float" 
office:value="'.$value.'" calcext:value-type="float"><text:p>'.$pattern;
+                           $buffer=preg_replace($searched, $replaced, 
$buffer,1);
                          }
                        // replace into the $buffer
                        // take the position in the buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]