We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c710690 commit 23e19a2Copy full SHA for 23e19a2
src/PhpWord/Writer/ODText/Style/Paragraph.php
@@ -37,8 +37,8 @@ public function write()
37
}
38
$xmlWriter = $this->getXmlWriter();
39
40
- $marginTop = is_null($style->getSpaceBefore()) ? '0' : round(17.6 / $style->getSpaceBefore(), 2);
41
- $marginBottom = is_null($style->getSpaceAfter()) ? '0' : round(17.6 / $style->getSpaceAfter(), 2);
+ $marginTop = ($style->getSpaceBefore()==0) ? '0' : round(17.6 / $style->getSpaceBefore(), 2);
+ $marginBottom = ($style->getSpaceAfter()==0) ? '0' : round(17.6 / $style->getSpaceAfter(), 2);
42
43
$xmlWriter->startElement('style:style');
44
$xmlWriter->writeAttribute('style:name', $style->getStyleName());
0 commit comments