1
0
mirror of https://github.com/shuchkin/simplexlsxgen.git synced 2023-08-10 21:12:59 +03:00

Switched to style tags

This commit is contained in:
Andrew Robinson 2022-04-23 11:33:17 +10:00 committed by GitHub
parent 5309e6a002
commit d49f8996df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -484,14 +484,16 @@ class SimpleXLSXGen {
if ( strpos( $v, '<s>' ) !== false ) { if ( strpos( $v, '<s>' ) !== false ) {
$F += self::F_STRIKE; $F += self::F_STRIKE;
} }
if ( strpos( $v, '<color rgb' ) !== false ) { if ( strpos( $v, '<style' ) !== false ) {
preg_match('/(?<=<color rgb=").*?(?=")/', $v, $cValue); preg_match('/(?<= color=").*?(?=")/', $v, $cValue);
if(!empty($cValue)){
$C = $cValue[0]; $C = $cValue[0];
} }
if ( strpos( $v, '<fill rgb' ) !== false ) { preg_match('/(?<= bgcolor=").*?(?=")/', $v, $bValue);
preg_match('/(?<=<fill rgb=").*?(?=")/', $v, $bValue); if(!empty($bValue)){
$B = $bValue[0]; $B = $bValue[0];
} }
}
if ( strpos( $v, '<left>' ) !== false ) { if ( strpos( $v, '<left>' ) !== false ) {
$A += self::A_LEFT; $A += self::A_LEFT;
} }