Bugfix: Work item 17166 - Indexed colors do not refer to Excel's indexed colors?

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@84644 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-01-02 00:12:09 +00:00
parent cb6839b24a
commit 438bc9da60
2 changed files with 148 additions and 154 deletions

View File

@ -368,71 +368,64 @@ class PHPExcel_Style_Color implements PHPExcel_IComparable
// Indexed colors
if (is_null(self::$_indexedColors)) {
self::$_indexedColors = array();
self::$_indexedColors[] = '00000000';
self::$_indexedColors[] = '00FFFFFF';
self::$_indexedColors[] = '00FF0000';
self::$_indexedColors[] = '0000FF00';
self::$_indexedColors[] = '000000FF';
self::$_indexedColors[] = '00FFFF00';
self::$_indexedColors[] = '00FF00FF';
self::$_indexedColors[] = '0000FFFF';
self::$_indexedColors[] = '00000000';
self::$_indexedColors[] = '00FFFFFF';
self::$_indexedColors[] = '00FF0000';
self::$_indexedColors[] = '0000FF00';
self::$_indexedColors[] = '000000FF';
self::$_indexedColors[] = '00FFFF00';
self::$_indexedColors[] = '00FF00FF';
self::$_indexedColors[] = '0000FFFF';
self::$_indexedColors[] = '00800000';
self::$_indexedColors[] = '00008000';
self::$_indexedColors[] = '00000080';
self::$_indexedColors[] = '00808000';
self::$_indexedColors[] = '00800080';
self::$_indexedColors[] = '00008080';
self::$_indexedColors[] = '00C0C0C0';
self::$_indexedColors[] = '00808080';
self::$_indexedColors[] = '009999FF';
self::$_indexedColors[] = '00993366';
self::$_indexedColors[] = '00FFFFCC';
self::$_indexedColors[] = '00CCFFFF';
self::$_indexedColors[] = '00660066';
self::$_indexedColors[] = '00FF8080';
self::$_indexedColors[] = '000066CC';
self::$_indexedColors[] = '00CCCCFF';
self::$_indexedColors[] = '00000080';
self::$_indexedColors[] = '00FF00FF';
self::$_indexedColors[] = '00FFFF00';
self::$_indexedColors[] = '0000FFFF';
self::$_indexedColors[] = '00800080';
self::$_indexedColors[] = '00800000';
self::$_indexedColors[] = '00008080';
self::$_indexedColors[] = '000000FF';
self::$_indexedColors[] = '0000CCFF';
self::$_indexedColors[] = '00CCFFFF';
self::$_indexedColors[] = '00CCFFCC';
self::$_indexedColors[] = '00FFFF99';
self::$_indexedColors[] = '0099CCFF';
self::$_indexedColors[] = '00FF99CC';
self::$_indexedColors[] = '00CC99FF';
self::$_indexedColors[] = '00FFCC99';
self::$_indexedColors[] = '003366FF';
self::$_indexedColors[] = '0033CCCC';
self::$_indexedColors[] = '0099CC00';
self::$_indexedColors[] = '00FFCC00';
self::$_indexedColors[] = '00FF9900';
self::$_indexedColors[] = '00FF6600';
self::$_indexedColors[] = '00666699';
self::$_indexedColors[] = '00969696';
self::$_indexedColors[] = '00003366';
self::$_indexedColors[] = '00339966';
self::$_indexedColors[] = '00003300';
self::$_indexedColors[] = '00333300';
self::$_indexedColors[] = '00993300';
self::$_indexedColors[] = '00993366';
self::$_indexedColors[] = '00333399';
self::$_indexedColors[] = '00333333';
self::$_indexedColors = array(
'00000000', // System Colour #1 - Black
'00FFFFFF', // System Colour #2 - White
'00FF0000', // System Colour #3 - Red
'0000FF00', // System Colour #4 - Green
'000000FF', // System Colour #5 - Blue
'00FFFF00', // System Colour #6 - Yellow
'00FF00FF', // System Colour #7- Magenta
'0000FFFF', // System Colour #8- Cyan
'00800000', // Standard Colour #9
'00008000', // Standard Colour #10
'00000080', // Standard Colour #11
'00808000', // Standard Colour #12
'00800080', // Standard Colour #13
'00008080', // Standard Colour #14
'00C0C0C0', // Standard Colour #15
'00808080', // Standard Colour #16
'009999FF', // Chart Fill Colour #17
'00993366', // Chart Fill Colour #18
'00FFFFCC', // Chart Fill Colour #19
'00CCFFFF', // Chart Fill Colour #20
'00660066', // Chart Fill Colour #21
'00FF8080', // Chart Fill Colour #22
'000066CC', // Chart Fill Colour #23
'00CCCCFF', // Chart Fill Colour #24
'00000080', // Chart Line Colour #25
'00FF00FF', // Chart Line Colour #26
'00FFFF00', // Chart Line Colour #27
'0000FFFF', // Chart Line Colour #28
'00800080', // Chart Line Colour #29
'00800000', // Chart Line Colour #30
'00008080', // Chart Line Colour #31
'000000FF', // Chart Line Colour #32
'0000CCFF', // Standard Colour #33
'00CCFFFF', // Standard Colour #34
'00CCFFCC', // Standard Colour #35
'00FFFF99', // Standard Colour #36
'0099CCFF', // Standard Colour #37
'00FF99CC', // Standard Colour #38
'00CC99FF', // Standard Colour #39
'00FFCC99', // Standard Colour #40
'003366FF', // Standard Colour #41
'0033CCCC', // Standard Colour #42
'0099CC00', // Standard Colour #43
'00FFCC00', // Standard Colour #44
'00FF9900', // Standard Colour #45
'00FF6600', // Standard Colour #46
'00666699', // Standard Colour #47
'00969696', // Standard Colour #48
'00003366', // Standard Colour #49
'00339966', // Standard Colour #50
'00003300', // Standard Colour #51
'00333300', // Standard Colour #52
'00993300', // Standard Colour #53
'00993366', // Standard Colour #54
'00333399', // Standard Colour #55
'00333333' // Standard Colour #56
);
}
if (array_key_exists($pIndex, self::$_indexedColors)) {

View File

@ -50,6 +50,7 @@ Fixed in SVN:
- Bugfix: (MBaker) Work item 16960 - Previous calculation engine error conditions trigger cyclic reference errors
- Bugfix: (mkopinsky) Work item 16266 - PHPExcel_Style::applyFromArray() returns null rather than style object in advanced mode
- Bugfix: (fauvel) Work item 16958 - Cell::getFormattedValue returns RichText object instead of string
- Bugfix: (MBaker) Work item 17166 - Indexed colors do not refer to Excel's indexed colors?
- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC)
- General: (MBaker) Work item 15461 - Locale file paths not fit for windows
- General: (MBaker) Work item 16643 - Add file directory as a cache option for cache_to_discISAM