sc/inc/tablestyle.hxx | 68 ++++++++++++++------------- sc/source/filter/oox/defaulttablestyles.inc | 2 sc/workben/generate_ooxml_tablestyle_info.py | 7 ++ 3 files changed, 44 insertions(+), 33 deletions(-)
New commits: commit ecef3c48eb04ef18ca9f70267f0bf86097c8d3d8 Author: Markus Mohrhard <[email protected]> AuthorDate: Mon Aug 11 01:35:32 2025 +0800 Commit: Andras Timar <[email protected]> CommitDate: Mon Nov 17 19:00:40 2025 +0100 fix TableStyleDark9 name as part of the generator This seems like a bug in the OOXML spec. The name in the presetTableStyles.xml file is "TableStyleDark9 2" but MSO and the rest of the spec reference a "TableStyleDark9" style. Change-Id: Ibd68e618c49ed5830cff9c535baa4a18974b03e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193672 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/sc/source/filter/oox/defaulttablestyles.inc b/sc/source/filter/oox/defaulttablestyles.inc index 84d84cf59d96..b6635f84e0ab 100644 --- a/sc/source/filter/oox/defaulttablestyles.inc +++ b/sc/source/filter/oox/defaulttablestyles.inc @@ -27,7 +27,7 @@ constexpr Dxf aDxfs[] = { { -1, 2, -1 }, { -1, 3, -1 }, { -1, 4, -1 }, { -1, 5, constexpr TableStyleElement aTableStyleElements[] = { { ScTableStyleElement::FirstColumnStripe, 0 }, { ScTableStyleElement::SecondColumnStripe, 0 }, { ScTableStyleElement::FirstColumnStripe, 1 }, { ScTableStyleElement::SecondColumnStripe, 1 }, { ScTableStyleElement::FirstColumnStripe, 2 }, { ScTableStyleElement::SecondColumnStripe, 2 }, { ScTableStyleElement::FirstColumnStripe, 3 }, { ScTableStyleElement::SecondColumnStripe, 3 }, { ScTableStyleElement::FirstColumnStripe, 4 }, { ScTableStyleElement::SecondColumnStripe, 4 }, { ScTableStyleElement::FirstColumnStripe, 5 }, { ScTableStyleElement::SecondColumnStripe, 5 }, { ScTableStyleElement::FirstColumnStripe, 6 }, { ScTableStyleElement::SecondColumnStripe, 6 }, { ScTableStyleElement::FirstRowStripe, 7 }, { ScTableStyleElement::SecondRowStripe, 7 }, { ScTableStyleElement::FirstRowStripe, 8 }, { ScTableStyleElement::SecondRowStripe, 8 }, { ScTableStyleElement::FirstRowStripe, 9 }, { ScTableStyleElement::SecondRowStripe, 9 }, { ScTableSt yleElement::FirstRowStripe, 10 }, { ScTableStyleElement::SecondRowStripe, 10 }, { ScTableStyleElement::FirstRowStripe, 11 }, { ScTableStyleElement::SecondRowStripe, 11 }, { ScTableStyleElement::FirstRowStripe, 12 }, { ScTableStyleElement::SecondRowStripe, 12 }, { ScTableStyleElement::FirstRowStripe, 13 }, { ScTableStyleElement::SecondRowStripe, 13 }, { ScTableStyleElement::TotalRow, 14 }, { ScTableStyleElement::FirstColumnStripe, 15 }, { ScTableStyleElement::FirstRowStripe, 15 }, { ScTableStyleElement::WholeTable, 16 }, { ScTableStyleElement::FirstColumnStripe, 16 }, { ScTableStyleElement::FirstRowStripe, 16 }, { ScTableStyleElement::FirstColumnStripe, 17 }, { ScTableStyleElement::FirstRowStripe, 17 }, { ScTableStyleElement::FirstColumnStripe, 18 }, { ScTableStyleElement::FirstRowStripe, 18 }, { ScTableStyleElement::FirstColumnStripe, 19 }, { ScTableStyleElement::FirstRowStripe, 19 }, { ScTableStyleElement::WholeTable, 20 }, { ScTableStyleElement::FirstColumnStripe, 20 }, { ScTableS tyleElement::FirstRowStripe, 20 }, { ScTableStyleElement::FirstColumnStripe, 21 }, { ScTableStyleElement::FirstRowStripe, 21 }, { ScTableStyleElement::FirstColumnStripe, 22 }, { ScTableStyleElement::FirstRowStripe, 22 }, { ScTableStyleElement::FirstColumnStripe, 23 }, { ScTableStyleElement::FirstRowStripe, 23 }, { ScTableStyleElement::FirstColumnStripe, 24 }, { ScTableStyleElement::FirstRowStripe, 24 }, { ScTableStyleElement::FirstColumnStripe, 25 }, { ScTableStyleElement::FirstRowStripe, 25 }, { ScTableStyleElement::WholeTable, 26 }, { ScTableStyleElement::FirstColumnStripe, 26 }, { ScTableStyleElement::FirstRowStripe, 26 }, { ScTableStyleElement::FirstColumnStripe, 27 }, { ScTableStyleElement::FirstRowStripe, 27 }, { ScTableStyleElement::FirstColumnStripe, 28 }, { ScTableStyleElement::FirstRowStripe, 28 }, { ScTableStyleElement::FirstColumnStripe, 29 }, { ScTableStyleElement::FirstRowStripe, 29 }, { ScTableStyleElement::FirstColumnStripe, 30 }, { ScTableStyleElement::FirstRowStrip e, 30 }, { ScTableStyleElement::FirstColumnStripe, 31 }, { ScTableStyleElement::FirstRowStripe, 31 }, { ScTableStyleElement::WholeTable, 32 }, { ScTableStyleElement::FirstColumnStripe, 32 }, { ScTableStyleElement::FirstRowStripe, 32 }, { ScTableStyleElement::FirstColumnStripe, 33 }, { ScTableStyleElement::FirstRowStripe, 33 }, { ScTableStyleElement::FirstColumnStripe, 34 }, { ScTableStyleElement::FirstRowStripe, 34 }, { ScTableStyleElement::FirstColumnStripe, 35 }, { ScTableStyleElement::FirstRowStripe, 35 }, { ScTableStyleElement::HeaderRow, 36 }, { ScTableStyleElement::WholeTable, 37 }, { ScTableStyleElement::WholeTable, 38 }, { ScTableStyleElement::WholeTable, 39 }, { ScTableStyleElement::HeaderRow, 39 }, { ScTableStyleElement::WholeTable, 40 }, { ScTableStyleElement::WholeTable, 41 }, { ScTableStyleElement::HeaderRow, 41 }, { ScTableStyleElement::WholeTable, 42 }, { ScTableStyleElement::WholeTable, 43 }, { ScTableStyleElement::HeaderRow, 43 }, { ScTableStyleElement::WholeTable, 44 }, { ScTableStyleElement::WholeTable, 45 }, { ScTableStyleElement::WholeTable, 46 }, { ScTableStyleElement::WholeTable, 47 }, { ScTableStyleElement::WholeTable, 48 }, { ScTableStyleElement::WholeTable, 49 }, { ScTableStyleElement::WholeTable, 50 }, { ScTableStyleElement::WholeTable, 51 }, { ScTableStyleElement::WholeTable, 52 }, { ScTableStyleElement::WholeTable, 53 }, { ScTableStyleElement::WholeTable, 54 }, { ScTableStyleElement::WholeTable, 55 }, { ScTableStyleElement::WholeTable, 56 }, { ScTableStyleElement::WholeTable, 57 }, { ScTableStyleElement::WholeTable, 58 }, { ScTableStyleElement::WholeTable, 59 }, { ScTableStyleElement::WholeTable, 60 }, { ScTableStyleElement::WholeTable, 61 }, { ScTableStyleElement::WholeTable, 62 }, { ScTableStyleElement::WholeTable, 63 }, { ScTableStyleElement::WholeTable, 64 }, { ScTableStyleElement::WholeTable, 65 }, { ScTableStyleElement::WholeTable, 66 }, { ScTableStyleElement::WholeTable, 67 }, { ScTableStyleElement::WholeTable, 68 }, { ScTab leStyleElement::WholeTable, 69 }, { ScTableStyleElement::WholeTable, 70 }, { ScTableStyleElement::WholeTable, 71 }, { ScTableStyleElement::WholeTable, 72 }, { ScTableStyleElement::WholeTable, 73 }, { ScTableStyleElement::WholeTable, 74 }, { ScTableStyleElement::WholeTable, 75 }, { ScTableStyleElement::WholeTable, 76 }, { ScTableStyleElement::WholeTable, 77 }, { ScTableStyleElement::WholeTable, 78 }, { ScTableStyleElement::WholeTable, 79 }, { ScTableStyleElement::WholeTable, 80 }, { ScTableStyleElement::WholeTable, 81 }, { ScTableStyleElement::WholeTable, 82 }, { ScTableStyleElement::WholeTable, 83 }, { ScTableStyleElement::WholeTable, 84 }, { ScTableStyleElement::WholeTable, 85 }, { ScTableStyleElement::WholeTable, 86 }, { ScTableStyleElement::WholeTable, 87 }, { ScTableStyleElement::LastColumn, 88 }, { ScTableStyleElement::FirstColumn, 88 }, { ScTableStyleElement::HeaderRow, 88 }, { ScTableStyleElement::HeaderRow, 89 }, { ScTableStyleElement::HeaderRow, 90 }, { ScTableStyleElement: :HeaderRow, 91 }, { ScTableStyleElement::TotalRow, 92 }, { ScTableStyleElement::TotalRow, 93 }, { ScTableStyleElement::FirstColumn, 94 }, { ScTableStyleElement::LastColumn, 95 }, { ScTableStyleElement::TotalRow, 96 }, { ScTableStyleElement::FirstColumn, 97 }, { ScTableStyleElement::LastColumn, 98 }, { ScTableStyleElement::LastColumn, 99 }, { ScTableStyleElement::FirstColumn, 99 }, { ScTableStyleElement::HeaderRow, 99 }, { ScTableStyleElement::HeaderRow, 100 }, { ScTableStyleElement::HeaderRow, 101 }, { ScTableStyleElement::TotalRow, 102 }, { ScTableStyleElement::TotalRow, 103 }, { ScTableStyleElement::FirstColumn, 104 }, { ScTableStyleElement::LastColumn, 105 }, { ScTableStyleElement::LastColumn, 106 }, { ScTableStyleElement::FirstColumn, 106 }, { ScTableStyleElement::HeaderRow, 106 }, { ScTableStyleElement::HeaderRow, 107 }, { ScTableStyleElement::HeaderRow, 108 }, { ScTableStyleElement::TotalRow, 109 }, { ScTableStyleElement::TotalRow, 110 }, { ScTableStyleElement::FirstColumn, 11 1 }, { ScTableStyleElement::LastColumn, 112 }, { ScTableStyleElement::LastColumn, 113 }, { ScTableStyleElement::FirstColumn, 113 }, { ScTableStyleElement::HeaderRow, 113 }, { ScTableStyleElement::HeaderRow, 114 }, { ScTableStyleElement::HeaderRow, 115 }, { ScTableStyleElement::TotalRow, 116 }, { ScTableStyleElement::TotalRow, 117 }, { ScTableStyleElement::FirstColumn, 118 }, { ScTableStyleElement::LastColumn, 119 }, { ScTableStyleElement::LastColumn, 120 }, { ScTableStyleElement::FirstColumn, 120 }, { ScTableStyleElement::HeaderRow, 120 }, { ScTableStyleElement::HeaderRow, 121 }, { ScTableStyleElement::HeaderRow, 122 }, { ScTableStyleElement::TotalRow, 123 }, { ScTableStyleElement::TotalRow, 124 }, { ScTableStyleElement::FirstColumn, 125 }, { ScTableStyleElement::LastColumn, 126 }, { ScTableStyleElement::LastColumn, 127 }, { ScTableStyleElement::FirstColumn, 127 }, { ScTableStyleElement::HeaderRow, 127 }, { ScTableStyleElement::HeaderRow, 128 }, { ScTableStyleElement::HeaderRow, 129 }, { ScTableStyleElement::TotalRow, 130 }, { ScTableStyleElement::TotalRow, 131 }, { ScTableStyleElement::FirstColumn, 132 }, { ScTableStyleElement::LastColumn, 133 }, { ScTableStyleElement::LastColumn, 134 }, { ScTableStyleElement::FirstColumn, 134 }, { ScTableStyleElement::HeaderRow, 134 }, { ScTableStyleElement::HeaderRow, 135 }, { ScTableStyleElement::HeaderRow, 136 }, { ScTableStyleElement::TotalRow, 137 }, { ScTableStyleElement::LastColumn, 138 }, { ScTableStyleElement::FirstColumn, 138 }, { ScTableStyleElement::HeaderRow, 138 }, { ScTableStyleElement::HeaderRow, 139 }, { ScTableStyleElement::HeaderRow, 140 }, { ScTableStyleElement::HeaderRow, 141 }, { ScTableStyleElement::HeaderRow, 142 }, { ScTableStyleElement::HeaderRow, 143 }, { ScTableStyleElement::HeaderRow, 144 }, { ScTableStyleElement::HeaderRow, 145 }, { ScTableStyleElement::HeaderRow, 146 }, { ScTableStyleElement::TotalRow, 147 }, { ScTableStyleElement::TotalRow, 148 }, { ScTableStyleElement::TotalRow, 149 }, { ScTa bleStyleElement::TotalRow, 150 }, { ScTableStyleElement::TotalRow, 151 }, { ScTableStyleElement::TotalRow, 152 }, { ScTableStyleElement::TotalRow, 153 }, { ScTableStyleElement::TotalRow, 154 }, { ScTableStyleElement::TotalRow, 155 }, { ScTableStyleElement::TotalRow, 156 }, { ScTableStyleElement::TotalRow, 157 }, { ScTableStyleElement::TotalRow, 158 }, { ScTableStyleElement::TotalRow, 159 }, { ScTableStyleElement::TotalRow, 160 }, { ScTableStyleElement::TotalRow, 161 }, { ScTableStyleElement::LastColumn, 162 }, { ScTableStyleElement::FirstColumn, 162 }, { ScTableStyleElement::HeaderRow, 163 }, { ScTableStyleElement::TotalRow, 164 }, { ScTableStyleElement::LastColumn, 165 }, { ScTableStyleElement::FirstColumn, 165 }, { ScTableStyleElement::HeaderRow, 166 }, { ScTableStyleElement::TotalRow, 167 }, { ScTableStyleElement::LastColumn, 168 }, { ScTableStyleElement::FirstColumn, 168 }, { ScTableStyleElement::HeaderRow, 169 }, { ScTableStyleElement::TotalRow, 170 }, { ScTableStyleElement::La stColumn, 171 }, { ScTableStyleElement::FirstColumn, 171 }, { ScTableStyleElement::HeaderRow, 172 }, { ScTableStyleElement::TotalRow, 173 }, { ScTableStyleElement::LastColumn, 174 }, { ScTableStyleElement::FirstColumn, 174 }, { ScTableStyleElement::HeaderRow, 175 }, { ScTableStyleElement::TotalRow, 176 }, { ScTableStyleElement::LastColumn, 177 }, { ScTableStyleElement::FirstColumn, 177 }, { ScTableStyleElement::HeaderRow, 178 }, { ScTableStyleElement::TotalRow, 179 } }; -constexpr TableStyle aTableStyles[] = { { "TableStyleDark1", 7, { 76, 133, 137, 138, 139, 35, 34 } }, { "TableStyleDark10", 7, { 53, 82, 213, 195, 194, 52, 51 } }, { "TableStyleDark11", 7, { 66, 85, 213, 195, 194, 65, 64 } }, { "TableStyleDark2", 7, { 77, 133, 140, 141, 142, 37, 36 } }, { "TableStyleDark3", 7, { 78, 133, 149, 150, 151, 44, 43 } }, { "TableStyleDark4", 7, { 80, 133, 158, 159, 160, 50, 49 } }, { "TableStyleDark5", 7, { 81, 133, 167, 168, 169, 57, 56 } }, { "TableStyleDark6", 7, { 83, 133, 176, 177, 178, 63, 62 } }, { "TableStyleDark7", 7, { 84, 133, 185, 186, 187, 70, 69 } }, { "TableStyleDark8", 7, { 31, 75, 213, 195, 194, 30, 29 } }, { "TableStyleDark9 2", 7, { 40, 79, 213, 195, 194, 39, 38 } }, { "TableStyleLight1", 7, { 86, 197, 205, 195, 194, 33, 32 } }, { "TableStyleLight10", 9, { 93, 154, 215, 195, 194, 18, 19, 4, 5 } }, { "TableStyleLight11", 9, { 96, 163, 216, 195, 194, 20, 21, 6, 7 } }, { "TableStyleLight12", 9, { 99, 172, 217, 195, 194, 22, 23, 8, 9 } }, { "TableStyleLight13", 9, { 102, 181, 218, 195, 194, 24, 25, 10, 11 } }, { "TableStyleLight14 ", 9, { 105, 190, 219, 195, 194, 26, 27, 12, 13 } }, { "TableStyleLight15", 7, { 89, 198, 213, 195, 194, 33, 32 } }, { "TableStyleLight16", 7, { 91, 199, 214, 195, 194, 42, 41 } }, { "TableStyleLight17", 7, { 94, 200, 215, 195, 194, 48, 47 } }, { "TableStyleLight18", 7, { 97, 201, 216, 195, 194, 55, 54 } }, { "TableStyleLight19", 7, { 100, 202, 217, 195, 194, 61, 60 } }, { "TableStyleLight2", 7, { 124, 222, 223, 221, 220, 42, 41 } }, { "TableStyleLight20", 7, { 103, 203, 218, 195, 194, 68, 67 } }, { "TableStyleLight21", 7, { 106, 204, 219, 195, 194, 74, 73 } }, { "TableStyleLight3", 7, { 125, 226, 227, 225, 224, 48, 47 } }, { "TableStyleLight4", 7, { 126, 230, 231, 229, 228, 55, 54 } }, { "TableStyleLight5", 7, { 127, 234, 235, 233, 232, 61, 60 } }, { "TableStyleLight6", 7, { 128, 238, 239, 237, 236, 68, 67 } }, { "TableStyleLight7", 7, { 129, 242, 243, 241, 240, 74, 73 } }, { "TableStyleLigh t8", 9, { 87, 132, 213, 195, 194, 14, 15, 0, 1 } }, { "TableStyleLight9", 9, { 90, 145, 214, 195, 194, 16, 17, 2, 3 } }, { "TableStyleMedium1", 7, { 88, 132, 213, 195, 194, 33, 32 } }, { "TableStyleMedium10", 7, { 114, 156, 157, 153, 152, 46, 45 } }, { "TableStyleMedium11", 7, { 116, 165, 166, 162, 161, 52, 51 } }, { "TableStyleMedium12", 7, { 118, 174, 175, 171, 170, 59, 58 } }, { "TableStyleMedium13", 7, { 120, 183, 184, 180, 179, 65, 64 } }, { "TableStyleMedium14", 7, { 122, 192, 193, 189, 188, 72, 71 } }, { "TableStyleMedium15", 7, { 109, 134, 28, 131, 130, 33, 32 } }, { "TableStyleMedium16", 7, { 108, 146, 28, 144, 143, 33, 32 } }, { "TableStyleMedium17", 7, { 108, 155, 28, 153, 152, 33, 32 } }, { "TableStyleMedium18", 7, { 108, 164, 28, 162, 161, 33, 32 } }, { "TableStyleMedium19", 7, { 108, 173, 28, 171, 170, 33, 32 } }, { "TableStyleMedium2", 7, { 92, 145, 214, 195, 194, 42, 41 } }, { "TableStyleMedium20", 7, { 108, 182, 28, 180, 179, 33, 32 } }, { "TableStyleMedium21", 7, { 108, 191, 28, 189, 188, 33, 32 } }, { "TableStyleMedium22", 7, { 111, 196, 206, 195, 194, 30, 29 } }, { "TableStyleMedium23", 7, { 113, 196, 207, 195, 194, 39, 38 } }, { "TableStyleMedium24", 7, { 115, 196, 208, 195, 194, 46, 45 } }, { "TableStyleMedium25", 7, { 117, 196, 209, 195, 194, 52, 51 } }, { "TableStyleMedium26", 7, { 119, 196, 210, 195, 194, 59, 58 } }, { "TableStyleMedium27", 7, { 121, 196, 211, 195, 194, 65, 64 } }, { "TableStyleMedium28", 7, { 123, 196, 212, 195, 194, 72, 71 } }, { "TableStyleMedium3", 7, { 95, 154, 215, 195, 194, 48, 47 } }, { "TableStyleMedium4", 7, { 98, 163, 216, 195, 194, 55, 54 } }, { "TableStyleMedium5", 7, { 101, 172, 217, 195, 194, 61, 60 } }, { "TableStyleMedium6", 7, { 104, 181, 218, 195, 194, 68, 67 } }, { "TableStyleMedium7", 7, { 107, 190, 219, 195, 194, 74, 73 } }, { "TableStyleMedium8", 7, { 110, 135, 136, 131, 130, 30, 29 } }, { "TableStyleMedium9", 7, { 112, 147, 148, 144, 143, 39, 38 } } }; +constexpr TableStyle aTableStyles[] = { { "TableStyleDark1", 7, { 76, 133, 137, 138, 139, 35, 34 } }, { "TableStyleDark10", 7, { 53, 82, 213, 195, 194, 52, 51 } }, { "TableStyleDark11", 7, { 66, 85, 213, 195, 194, 65, 64 } }, { "TableStyleDark2", 7, { 77, 133, 140, 141, 142, 37, 36 } }, { "TableStyleDark3", 7, { 78, 133, 149, 150, 151, 44, 43 } }, { "TableStyleDark4", 7, { 80, 133, 158, 159, 160, 50, 49 } }, { "TableStyleDark5", 7, { 81, 133, 167, 168, 169, 57, 56 } }, { "TableStyleDark6", 7, { 83, 133, 176, 177, 178, 63, 62 } }, { "TableStyleDark7", 7, { 84, 133, 185, 186, 187, 70, 69 } }, { "TableStyleDark8", 7, { 31, 75, 213, 195, 194, 30, 29 } }, { "TableStyleDark9", 7, { 40, 79, 213, 195, 194, 39, 38 } }, { "TableStyleLight1", 7, { 86, 197, 205, 195, 194, 33, 32 } }, { "TableStyleLight10", 9, { 93, 154, 215, 195, 194, 18, 19, 4, 5 } }, { "TableStyleLight11", 9, { 96, 163, 216, 195, 194, 20, 21, 6, 7 } }, { "TableStyleLight12", 9, { 99, 172, 217, 195, 194, 22, 23, 8, 9 } }, { "T ableStyleLight13", 9, { 102, 181, 218, 195, 194, 24, 25, 10, 11 } }, { "TableStyleLight14 ", 9, { 105, 190, 219, 195, 194, 26, 27, 12, 13 } }, { "TableStyleLight15", 7, { 89, 198, 213, 195, 194, 33, 32 } }, { "TableStyleLight16", 7, { 91, 199, 214, 195, 194, 42, 41 } }, { "TableStyleLight17", 7, { 94, 200, 215, 195, 194, 48, 47 } }, { "TableStyleLight18", 7, { 97, 201, 216, 195, 194, 55, 54 } }, { "TableStyleLight19", 7, { 100, 202, 217, 195, 194, 61, 60 } }, { "TableStyleLight2", 7, { 124, 222, 223, 221, 220, 42, 41 } }, { "TableStyleLight20", 7, { 103, 203, 218, 195, 194, 68, 67 } }, { "TableStyleLight21", 7, { 106, 204, 219, 195, 194, 74, 73 } }, { "TableStyleLight3", 7, { 125, 226, 227, 225, 224, 48, 47 } }, { "TableStyleLight4", 7, { 126, 230, 231, 229, 228, 55, 54 } }, { "TableStyleLight5", 7, { 127, 234, 235, 233, 232, 61, 60 } }, { "TableStyleLight6", 7, { 128, 238, 239, 237, 236, 68, 67 } }, { "TableStyleLight7", 7, { 129, 242, 243, 241, 240, 74, 73 } }, { "TableStyleLight8 ", 9, { 87, 132, 213, 195, 194, 14, 15, 0, 1 } }, { "TableStyleLight9", 9, { 90, 145, 214, 195, 194, 16, 17, 2, 3 } }, { "TableStyleMedium1", 7, { 88, 132, 213, 195, 194, 33, 32 } }, { "TableStyleMedium10", 7, { 114, 156, 157, 153, 152, 46, 45 } }, { "TableStyleMedium11", 7, { 116, 165, 166, 162, 161, 52, 51 } }, { "TableStyleMedium12", 7, { 118, 174, 175, 171, 170, 59, 58 } }, { "TableStyleMedium13", 7, { 120, 183, 184, 180, 179, 65, 64 } }, { "TableStyleMedium14", 7, { 122, 192, 193, 189, 188, 72, 71 } }, { "TableStyleMedium15", 7, { 109, 134, 28, 131, 130, 33, 32 } }, { "TableStyleMedium16", 7, { 108, 146, 28, 144, 143, 33, 32 } }, { "TableStyleMedium17", 7, { 108, 155, 28, 153, 152, 33, 32 } }, { "TableStyleMedium18", 7, { 108, 164, 28, 162, 161, 33, 32 } }, { "TableStyleMedium19", 7, { 108, 173, 28, 171, 170, 33, 32 } }, { "TableStyleMedium2", 7, { 92, 145, 214, 195, 194, 42, 41 } }, { "TableStyleMedium20", 7, { 108, 182, 28, 180, 179, 33, 32 } }, { "TableStyleMedium21", 7, { 1 08, 191, 28, 189, 188, 33, 32 } }, { "TableStyleMedium22", 7, { 111, 196, 206, 195, 194, 30, 29 } }, { "TableStyleMedium23", 7, { 113, 196, 207, 195, 194, 39, 38 } }, { "TableStyleMedium24", 7, { 115, 196, 208, 195, 194, 46, 45 } }, { "TableStyleMedium25", 7, { 117, 196, 209, 195, 194, 52, 51 } }, { "TableStyleMedium26", 7, { 119, 196, 210, 195, 194, 59, 58 } }, { "TableStyleMedium27", 7, { 121, 196, 211, 195, 194, 65, 64 } }, { "TableStyleMedium28", 7, { 123, 196, 212, 195, 194, 72, 71 } }, { "TableStyleMedium3", 7, { 95, 154, 215, 195, 194, 48, 47 } }, { "TableStyleMedium4", 7, { 98, 163, 216, 195, 194, 55, 54 } }, { "TableStyleMedium5", 7, { 101, 172, 217, 195, 194, 61, 60 } }, { "TableStyleMedium6", 7, { 104, 181, 218, 195, 194, 68, 67 } }, { "TableStyleMedium7", 7, { 107, 190, 219, 195, 194, 74, 73 } }, { "TableStyleMedium8", 7, { 110, 135, 136, 131, 130, 30, 29 } }, { "TableStyleMedium9", 7, { 112, 147, 148, 144, 143, 39, 38 } } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ \ No newline at end of file diff --git a/sc/workben/generate_ooxml_tablestyle_info.py b/sc/workben/generate_ooxml_tablestyle_info.py index 3217825c33ab..e276dc7b5ab9 100644 --- a/sc/workben/generate_ooxml_tablestyle_info.py +++ b/sc/workben/generate_ooxml_tablestyle_info.py @@ -299,7 +299,12 @@ def parse_table_style(style) -> TableStyle: tableStyle = tableStyles.find("tableStyle") assert tableStyle is not None - return TableStyle(tableStyle.get("name"), [parse_table_style_element(element, style_defs) for element in list(tableStyle)]) + table_style_name = tableStyle.get("name") + if table_style_name == "TableStyleDark9 2": + # this looks like a bug in the OOXML spec documents + table_style_name = "TableStyleDark9" + + return TableStyle(table_style_name, [parse_table_style_element(element, style_defs) for element in list(tableStyle)]) def parse_pivot_style(style): print("Skipping pivot style definition") commit 1e4a8165e43f2c2349d396d555fa8c9965c863bf Author: Markus Mohrhard <[email protected]> AuthorDate: Mon Aug 11 01:21:08 2025 +0800 Commit: Andras Timar <[email protected]> CommitDate: Mon Nov 17 19:00:25 2025 +0100 don't apply banded row/col formatting to subtotal row Change-Id: Id82036246e808e9e556c5f2d04ff6611716dc9c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193671 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/sc/inc/tablestyle.hxx b/sc/inc/tablestyle.hxx index 9c1fb387d81f..01a06c6f9fa6 100644 --- a/sc/inc/tablestyle.hxx +++ b/sc/inc/tablestyle.hxx @@ -118,42 +118,48 @@ public: return pPoolItem; } - if (pParam->mbRowStripes && nRowIndex >= 0) + if (!bHasTotal || aRange.aEnd.Row() != nRow) { - sal_Int32 nTotalRowStripPattern = mnFirstRowStripeSize + mnSecondRowStripeSize; - bool bFirstRowStripe = (nRowIndex % nTotalRowStripPattern) < mnFirstRowStripeSize; - if (mpSecondRowStripePattern && !bFirstRowStripe) + if (pParam->mbRowStripes && nRowIndex >= 0) { - const T* pPoolItem = GetItemFromPattern(mpSecondRowStripePattern.get(), nWhich); - if (pPoolItem) - return pPoolItem; + sal_Int32 nTotalRowStripPattern = mnFirstRowStripeSize + mnSecondRowStripeSize; + bool bFirstRowStripe = (nRowIndex % nTotalRowStripPattern) < mnFirstRowStripeSize; + if (mpSecondRowStripePattern && !bFirstRowStripe) + { + const T* pPoolItem = GetItemFromPattern(mpSecondRowStripePattern.get(), nWhich); + if (pPoolItem) + return pPoolItem; + } + + if (mpFirstRowStripePattern && bFirstRowStripe) + { + const T* pPoolItem = GetItemFromPattern(mpFirstRowStripePattern.get(), nWhich); + if (pPoolItem) + return pPoolItem; + } } - if (mpFirstRowStripePattern && bFirstRowStripe) + if (pParam->mbColumnStripes) { - const T* pPoolItem = GetItemFromPattern(mpFirstRowStripePattern.get(), nWhich); - if (pPoolItem) - return pPoolItem; - } - } - - if (pParam->mbColumnStripes) - { - SCCOL nRelativeCol = nCol - aRange.aStart.Col(); - sal_Int32 nTotalColStripePattern = mnFirstColStripeSize + mnSecondColStripeSize; - bool bFirstColStripe = (nRelativeCol % nTotalColStripePattern) < mnFirstColStripeSize; - if (mpSecondColumnStripePattern && !bFirstColStripe) - { - const T* pPoolItem = GetItemFromPattern(mpSecondColumnStripePattern.get(), nWhich); - if (pPoolItem) - return pPoolItem; - } - - if (mpFirstColumnStripePattern && bFirstColStripe) - { - const T* pPoolItem = GetItemFromPattern(mpFirstColumnStripePattern.get(), nWhich); - if (pPoolItem) - return pPoolItem; + SCCOL nRelativeCol = nCol - aRange.aStart.Col(); + sal_Int32 nTotalColStripePattern = mnFirstColStripeSize + mnSecondColStripeSize; + bool bFirstColStripe + = (nRelativeCol % nTotalColStripePattern) < mnFirstColStripeSize; + if (mpSecondColumnStripePattern && !bFirstColStripe) + { + const T* pPoolItem + = GetItemFromPattern(mpSecondColumnStripePattern.get(), nWhich); + if (pPoolItem) + return pPoolItem; + } + + if (mpFirstColumnStripePattern && bFirstColStripe) + { + const T* pPoolItem + = GetItemFromPattern(mpFirstColumnStripePattern.get(), nWhich); + if (pPoolItem) + return pPoolItem; + } } }
