You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to use strike font style with Word2007 writer because it uses strict comparison. Methods isStrikethrough and isDoubleStrikethrough can return true, false or null, false !== null.
You cannot use elements w:strike and w:dstrike in same time. When you set strike style to true eg. with setStrikethrough then it calls method setPairedVal that should disable double strike style.
/** * Set $property value and set $pairProperty = false when $value = true * * @param bool &$property * @param bool &$pairProperty * @param bool $value * @return self */protectedfunctionsetPairedVal(&$property, &$pairProperty, $value)
{
$property = $this->setBoolVal($value, $property);
if ($value === true) {
$pairProperty = false;
}
return$this;
}
In the writer the method $style->isDoubleStrikethrough() !== null evaluates as true even when this method returns false. Please note that method setPairedVal sets this value to false.
The text was updated successfully, but these errors were encountered:
As stated in PHPOffice#1722 and PHPOffice#1693 `setPairedVal` sets DoubleStrikethrough to
false which does not equal `null`
This change may somehow infer with 54e7c6d but as no tests could be
found it is hard to say what would possibly break
It's not possible to use strike font style with Word2007 writer because it uses strict comparison. Methods
isStrikethrough
andisDoubleStrikethrough
can returntrue
,false
ornull
,false !== null
.src/PhpWord/Writer/Word2007/Style/Font.php
You cannot use elements
w:strike
andw:dstrike
in same time. When you set strike style to true eg. withsetStrikethrough
then it calls methodsetPairedVal
that should disable double strike style.src/PhpWord/Style/Font.php
src/PhpWord/Style/AbstractStyle.php
In the writer the method
$style->isDoubleStrikethrough() !== null
evaluates astrue
even when this method returnsfalse
. Please note that methodsetPairedVal
sets this value tofalse
.The text was updated successfully, but these errors were encountered: