warnings
authorAlan <alan@roojs.com>
Tue, 21 Nov 2023 06:35:25 +0000 (14:35 +0800)
committerAlan <alan@roojs.com>
Tue, 21 Nov 2023 06:35:25 +0000 (14:35 +0800)
Document/Word/Writer/Writer/Word2007/Base.php

index 64e0070..cc87190 100644 (file)
@@ -148,7 +148,7 @@ class Document_Word_Writer_Writer_Word2007_Base extends Document_Word_Writer_Wri
                 // microsoft office default line spacing is 10pt, we need to set it to 0 if we have not set the spacing..\r
                $spaceBefore = is_null($style->getSpaceBefore()) ? 0 : $style->getSpaceBefore();\r
                $spaceAfter = is_null($style->getSpaceAfter()) ? 0 : $style->getSpaceAfter();\r
-               $spacing = is_nan($style->getSpacing()) ? 0 : $style->getSpacing();\r
+               $spacing = $style->getSpacing() ==- null || is_nan($style->getSpacing()) ? 0 : $style->getSpacing();\r
                $isList = is_null($style->getListStyle()) ? '' : $style->getListStyle();\r
         \r
                if(!is_null($align) || !is_null($spacing) || !is_null($spaceBefore) || !is_null($spaceAfter) || !empty($isList)) {\r