File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/PhpSpreadsheet/Reader Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 7
7
use PhpOffice \PhpSpreadsheet \Cell \DataValidation ;
8
8
use PhpOffice \PhpSpreadsheet \Exception as PhpSpreadsheetException ;
9
9
use PhpOffice \PhpSpreadsheet \NamedRange ;
10
+ use PhpOffice \PhpSpreadsheet \Reader \Xls \Color ;
10
11
use PhpOffice \PhpSpreadsheet \Reader \Xls \ConditionalFormatting ;
11
12
use PhpOffice \PhpSpreadsheet \Reader \Xls \Style \CellFont ;
12
13
use PhpOffice \PhpSpreadsheet \RichText \RichText ;
@@ -8071,6 +8072,21 @@ private function getCFStyleOptions(int $options, Style $style): void
8071
8072
8072
8073
private function getCFFontStyle (string $ options , Style $ style ): void
8073
8074
{
8075
+ $ fontSize = self ::getInt4d ($ options , 64 );
8076
+ $ fontSize = ($ fontSize !== -1 ) ? $ fontSize / 20 : -1 ;
8077
+ $ bold = self ::getUInt2d ($ options , 72 ) === 700 ; // 400 = normal, 700 = bold
8078
+ $ color = self ::getInt4d ($ options , 80 );
8079
+
8080
+ if ($ fontSize !== -1 ) {
8081
+ $ style ->getFont ()->setSize ($ fontSize );
8082
+ }
8083
+ if ($ color !== -1 ) {
8084
+ $ style ->getFont ()->setColor (
8085
+ new \PhpOffice \PhpSpreadsheet \Style \Color (Color::map ($ color , $ this ->palette , $ this ->version )['rgb ' ])
8086
+ );
8087
+ }
8088
+ $ style ->getFont ()
8089
+ ->setBold ($ bold );
8074
8090
}
8075
8091
8076
8092
private function getCFAlignmentStyle (string $ options , Style $ style ): void
You can’t perform that action at this time.
0 commit comments