@@ -7998,6 +7998,9 @@ private function readCFRule(array $cellRangeAddresses): void
7998
7998
// offset: 6; size: 4; Options
7999
7999
$ options = self ::getInt4d ($ recordData , 6 );
8000
8000
8001
+ $ style = new Style ();
8002
+ $ this ->getCFStyleOptions ($ options , $ style );
8003
+
8001
8004
$ hasFontRecord = (bool ) ((0x04000000 & $ options ) >> 26 );
8002
8005
$ hasAlignmentRecord = (bool ) ((0x08000000 & $ options ) >> 27 );
8003
8006
$ hasBorderRecord = (bool ) ((0x10000000 & $ options ) >> 28 );
@@ -8007,22 +8010,32 @@ private function readCFRule(array $cellRangeAddresses): void
8007
8010
$ offset = 12 ;
8008
8011
8009
8012
if ($ hasFontRecord === true ) {
8013
+ $ fontStyle = substr ($ recordData , $ offset , 118 );
8014
+ $ this ->getCFFontStyle ($ fontStyle , $ style );
8010
8015
$ offset += 118 ;
8011
8016
}
8012
8017
8013
8018
if ($ hasAlignmentRecord === true ) {
8019
+ $ alignmentStyle = substr ($ recordData , $ offset , 8 );
8020
+ $ this ->getCFAlignmentStyle ($ alignmentStyle , $ style );
8014
8021
$ offset += 8 ;
8015
8022
}
8016
8023
8017
8024
if ($ hasBorderRecord === true ) {
8025
+ $ borderStyle = substr ($ recordData , $ offset , 8 );
8026
+ $ this ->getCFBorderStyle ($ borderStyle , $ style );
8018
8027
$ offset += 8 ;
8019
8028
}
8020
8029
8021
8030
if ($ hasFillRecord === true ) {
8031
+ $ fillStyle = substr ($ recordData , $ offset , 4 );
8032
+ $ this ->getCFFillStyle ($ fillStyle , $ style );
8022
8033
$ offset += 4 ;
8023
8034
}
8024
8035
8025
8036
if ($ hasProtectionRecord === true ) {
8037
+ $ protectionStyle = substr ($ recordData , $ offset , 4 );
8038
+ $ this ->getCFProtectionStyle ($ protectionStyle , $ style );
8026
8039
$ offset += 2 ;
8027
8040
}
8028
8041
@@ -8049,7 +8062,31 @@ private function readCFRule(array $cellRangeAddresses): void
8049
8062
$ offset += $ size2 ;
8050
8063
}
8051
8064
8052
- $ this ->setCFRules ($ cellRangeAddresses , $ type , $ operator , $ formula1 , $ formula2 );
8065
+ $ this ->setCFRules ($ cellRangeAddresses , $ type , $ operator , $ formula1 , $ formula2 , $ style );
8066
+ }
8067
+
8068
+ private function getCFStyleOptions (int $ options , Style $ style ): void
8069
+ {
8070
+ }
8071
+
8072
+ private function getCFFontStyle (string $ options , Style $ style ): void
8073
+ {
8074
+ }
8075
+
8076
+ private function getCFAlignmentStyle (string $ options , Style $ style ): void
8077
+ {
8078
+ }
8079
+
8080
+ private function getCFBorderStyle (string $ options , Style $ style ): void
8081
+ {
8082
+ }
8083
+
8084
+ private function getCFFillStyle (string $ options , Style $ style ): void
8085
+ {
8086
+ }
8087
+
8088
+ private function getCFProtectionStyle (string $ options , Style $ style ): void
8089
+ {
8053
8090
}
8054
8091
8055
8092
/**
@@ -8077,7 +8114,7 @@ private function readCFFormula(string $recordData, int $offset, int $size)
8077
8114
* @param null|float|int|string $formula1
8078
8115
* @param null|float|int|string $formula2
8079
8116
*/
8080
- private function setCFRules (array $ cellRanges , string $ type , string $ operator , $ formula1 , $ formula2 ): void
8117
+ private function setCFRules (array $ cellRanges , string $ type , string $ operator , $ formula1 , $ formula2, Style $ style ): void
8081
8118
{
8082
8119
foreach ($ cellRanges as $ cellRange ) {
8083
8120
$ conditional = new Conditional ();
@@ -8089,6 +8126,7 @@ private function setCFRules(array $cellRanges, string $type, string $operator, $
8089
8126
if ($ formula2 !== null ) {
8090
8127
$ conditional ->addCondition ($ formula2 );
8091
8128
}
8129
+ $ conditional ->setStyle ($ style );
8092
8130
8093
8131
$ conditionalStyles = $ this ->phpSheet ->getStyle ($ cellRange )->getConditionalStyles ();
8094
8132
$ conditionalStyles [] = $ conditional ;
0 commit comments