diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-15 09:03:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-15 11:38:27 +0200 |
commit | db7676137ad91a1e9e0449afffc639ce73b40f4a (patch) | |
tree | 09708d857d7e905ca22e78624ec36be4ff5c7e0f /oox | |
parent | 13fb1defcd8bd303d3f753a5dd0f0c2281a75539 (diff) |
Value stored to 'accent_val' during its initialization is never read
Change-Id: I780ffee680e52c240a1bd212f34c9c019c8b5e59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123625
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/table/predefined-table-styles.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx b/oox/source/drawingml/table/predefined-table-styles.cxx index ea68911112a0..75435eb40303 100644 --- a/oox/source/drawingml/table/predefined-table-styles.cxx +++ b/oox/source/drawingml/table/predefined-table-styles.cxx @@ -462,13 +462,12 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) OUString style_name = mStyleIdMap[styleId].first; OUString accent_name = mStyleIdMap[styleId].second; - sal_Int32 accent_val = tokens[mStyleIdMap[styleId].second]; if (style_name == "Themed-Style-1") { if (!accent_name.isEmpty()) { - accent_val = tokens[mStyleIdMap[styleId].second]; + sal_Int32 accent_val = tokens[mStyleIdMap[styleId].second]; wholeTblTextColor.setSchemeClr(XML_dk1); firstRowTextColor.setSchemeClr(XML_lt1); @@ -516,6 +515,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) } else if (style_name == "Themed-Style-2") { + sal_Int32 accent_val; + if (!accent_name.isEmpty()) { wholeTblTextColor.setSchemeClr(XML_lt1); @@ -555,6 +556,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) { wholeTblTextColor.setSchemeClr(XML_tx1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -578,6 +581,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) wholeTblTextColor.setSchemeClr(XML_tx1); firstRowTextColor.setSchemeClr(XML_bg1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -604,6 +609,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) { wholeTblTextColor.setSchemeClr(XML_tx1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -632,6 +639,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pWholeTblFillProperties->maFillColor.setSchemeClr(XML_lt1); pLastRowFillProperties->maFillColor.setSchemeClr(XML_lt1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -669,6 +678,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pWholeTblInsideHBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1); pWholeTblInsideVBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -702,6 +713,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1); pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -720,6 +733,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_dk1); pLastRowFillProperties->maFillColor.setSchemeClr(XML_dk1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else @@ -755,6 +770,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pFirstRowFillProperties->maFillColor.setSchemeClr(XML_dk1); pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(XML_lt1); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) { accent_val = tokens[mStyleIdMap[styleId].second]; @@ -795,6 +812,8 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) else if (accent_name == "Accent5") pFirstRowFillProperties->maFillColor.setSchemeClr(XML_accent6); + sal_Int32 accent_val; + if (!accent_name.isEmpty()) accent_val = tokens[mStyleIdMap[styleId].second]; else |