diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-16 13:49:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-18 09:49:14 +0100 |
commit | 0fc7daed227ea6fd4fb3de04c92ae6cb765122c3 (patch) | |
tree | 2de30ad2686820ddc336cf5b883720ef58723b83 /svx | |
parent | 227100ff4e5560c09c5a822052fc5ada541b8cc5 (diff) |
loplugin:singlevalfields
Change-Id: I0bb32ad7351f0e4cfbdc872ed0e81b8157ecc4cb
Reviewed-on: https://gerrit.libreoffice.org/83056
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 782dd2cc16cb..a8025d6a95dd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3914,7 +3914,6 @@ SvxColorListBox::SvxColorListBox(vcl::Window* pParent, WinBits nStyle) , m_aColorWrapper(this) , m_aAutoDisplayColor(Application::GetSettings().GetStyleSettings().GetDialogColor()) , m_nSlotId(0) - , m_bShowNoneButton(false) { m_aSelectedColor = GetAutoColor(m_nSlotId); LockWidthRequest(); @@ -3943,7 +3942,6 @@ void ColorListBox::EnsurePaletteManager() void SvxColorListBox::SetSlotId(sal_uInt16 nSlotId) { m_nSlotId = nSlotId; - m_bShowNoneButton = false; m_xColorWindow.disposeAndClear(); m_aSelectedColor = GetAutoColor(m_nSlotId); ShowPreview(m_aSelectedColor); @@ -3993,20 +3991,10 @@ void SvxColorListBox::ShowPreview(const NamedColor &rColor) ScopedVclPtrInstance<VirtualDevice> xDevice; xDevice->SetOutputSize(aImageSize); const tools::Rectangle aRect(Point(0, 0), aImageSize); - if (m_bShowNoneButton && rColor.first == COL_NONE_COLOR) - { - const Color aW(COL_WHITE); - const Color aG(0xef, 0xef, 0xef); - xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG); - xDevice->SetFillColor(); - } + if (rColor.first == COL_AUTO) + xDevice->SetFillColor(m_aAutoDisplayColor); else - { - if (rColor.first == COL_AUTO) - xDevice->SetFillColor(m_aAutoDisplayColor); - else - xDevice->SetFillColor(rColor.first); - } + xDevice->SetFillColor(rColor.first); xDevice->SetLineColor(rStyleSettings.GetDisableColor()); xDevice->DrawRect(aRect); @@ -4053,8 +4041,6 @@ void SvxColorListBox::createColorWindow() m_xColorWindow->AddEventListener(LINK(this, SvxColorListBox, WindowEventListener)); SetNoSelection(); - if (m_bShowNoneButton) - m_xColorWindow->ShowNoneButton(); m_xColorWindow->SelectEntry(m_aSelectedColor); SetPopover(m_xColorWindow); } |