N°2677 - Add style definition for enums (fix CI)

This commit is contained in:
Eric
2020-12-31 12:02:43 +01:00
parent f1ad55c86c
commit 5128833a62

View File

@@ -1348,7 +1348,7 @@ EOF
$sMainColor = $this->GetMandatoryPropString($oStyleNode, 'main_color');
$sComplementaryColor = $this->GetMandatoryPropString($oStyleNode, 'complementary_color');
$sDecorationClasses = $this->GetPropString($oStyleNode, 'decoration_classes', '');
$aValues[] = $sCode;
$aValues[] = self::RemoveSurroundingQuotes($sCode);
$aStyledValues[] = "$sCode => new ormStyle($sMainColor, $sComplementaryColor, $sDecorationClasses)";
}
$sValues = '"'.implode(',', $aValues).'"';
@@ -3260,4 +3260,14 @@ XML;
EOF;
$this->WriteFile($sResultFile, $sFileHeader.$sCompiledCode);
}
private static function RemoveSurroundingQuotes($sValue)
{
if (utils::StartsWith($sValue, '\'') && utils::EndsWith($sValue, '\''))
{
$sValue = substr($sValue, 1, -1);
}
return $sValue;
}
}