summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-09-05 11:53:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-10 17:11:00 +0100
commit242320d303d43a34ce2255a07783fbd51e253cd0 (patch)
tree14bd7757a57784a18d1aa2b731eb71999d14bf94 /sw
parent8523fb2b37a2cdd2c3743795bb33cf30a57c5385 (diff)
new loplugin:reducevarscope
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index a1430890f010..8f1aca1a64b4 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2613,7 +2613,6 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
std::optional<Color> pCol;
if (GetFont())
pCol = GetFont()->GetBackColor();
- Color aColor;
if( ! pCol || COL_TRANSPARENT == *pCol )
{
const SvxBrushItem* pItem;
@@ -2631,8 +2630,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
if (aFillAttributes && aFillAttributes->isUsed())
{
// First see if fill attributes provide a color.
- aColor = Color(aFillAttributes->getAverageColor(aGlobalRetoucheColor.getBColor()));
- pCol = aColor;
+ pCol = Color(aFillAttributes->getAverageColor(aGlobalRetoucheColor.getBColor()));
}
// If not, then fall back to the old brush item.