fix checkstyle issues
This commit is contained in:
parent
7f78322d04
commit
d731e9284f
|
|
@ -663,19 +663,15 @@ class Html
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (preg_match('/([a-z]+)/', $cValue, $matches)) {
|
if (preg_match('/([a-z]+)/', $cValue, $matches)) {
|
||||||
//$cvalue text and not number
|
//$cvalue text and not number
|
||||||
if($cValue == 'normal') {
|
if ($cValue == 'normal') {
|
||||||
$cValue = 1.12;
|
$cValue = 1.12;
|
||||||
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::AUTO;
|
} else {
|
||||||
//we are subtracting 1 line height because the Spacing writer is adding one line
|
|
||||||
$spacing = ($cValue * Paragraph::LINE_HEIGHT) - Paragraph::LINE_HEIGHT;
|
|
||||||
}else{
|
|
||||||
$cValue = 1.13;
|
$cValue = 1.13;
|
||||||
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::AUTO;
|
|
||||||
//we are subtracting 1 line height because the Spacing writer is adding one line
|
|
||||||
$spacing = ($cValue * Paragraph::LINE_HEIGHT) - Paragraph::LINE_HEIGHT;
|
|
||||||
}
|
}
|
||||||
}
|
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::AUTO;
|
||||||
elseif (preg_match('/([0-9]+\.?[0-9]*[a-z]+)/', $cValue, $matches)) {
|
//we are subtracting 1 line height because the Spacing writer is adding one line
|
||||||
|
$spacing = ($cValue * Paragraph::LINE_HEIGHT) - Paragraph::LINE_HEIGHT;
|
||||||
|
} elseif (preg_match('/([0-9]+\.?[0-9]*[a-z]+)/', $cValue, $matches)) {
|
||||||
//matches number with a unit, e.g. 12px, 15pt, 20mm, ...
|
//matches number with a unit, e.g. 12px, 15pt, 20mm, ...
|
||||||
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::EXACT;
|
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::EXACT;
|
||||||
$spacing = Converter::cssToTwip($matches[1]);
|
$spacing = Converter::cssToTwip($matches[1]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue