From 85582c40bca587017611bb332d1c9997c687cdfe Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 8 Jun 2021 11:49:05 +0200 Subject: [PATCH] -Werror,-Wunused-but-set-variable (Clang 13 trunk) The (only) use of lineColor at > //m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : _rDevice.SetLineColor(); had been commented out in 8578ba4dc736b53c3ca8461516e4024d276b3b05 "gridsort: consolidated and fixed table cell rendering" and then cleaned away completely with f4147a39374c7692728e8506961f23e59a069c45 "refactor TableControl to use RenderContext" Change-Id: I817800b26f4996a73a38fece22149ae87c2f9c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116824 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- svtools/source/table/gridtablerenderer.cxx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 8a68ccdbba2a..a0bcc2bb30c8 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -309,9 +309,6 @@ namespace svt::table Color backgroundColor = _rStyle.GetFieldColor(); - std::optional const aLineColor( m_pImpl->rModel.getLineColor() ); - Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor; - Color const activeSelectionBackColor = lcl_getEffectiveColor(m_pImpl->rModel.getActiveSelectionBackColor(), _rStyle, &StyleSettings::GetHighlightColor); if (_bSelected) @@ -320,8 +317,6 @@ namespace svt::table backgroundColor = i_hasControlFocus ? activeSelectionBackColor : lcl_getEffectiveColor(m_pImpl->rModel.getInactiveSelectionBackColor(), _rStyle, &StyleSettings::GetDeactiveColor); - if (!aLineColor) - lineColor = backgroundColor; } else {