diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-02-25 16:39:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-02-25 19:37:56 +0100 |
commit | d883aab37dc9b04ed1dccf139fca9d709d29317b (patch) | |
tree | 2cad7b7d49440ef6cf8610156789ea2a0ae0108e /svx | |
parent | d0a10d0a26343bc5c4dca188ffae6c1b5801116a (diff) |
loplugin:constantparam
Change-Id: Iba5ce1d44e52610e985e97d299571cf3387d938a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182180
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index eebdc429f244..fe45a36c4137 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -4274,8 +4274,7 @@ void ColorListBox::SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton) } ColorListBox::ColorListBox(std::unique_ptr<weld::MenuButton> pControl, - TopLevelParentFunction aTopLevelParentFunction, - const ColorListBox* pCache) + TopLevelParentFunction aTopLevelParentFunction) : m_xButton(std::move(pControl)) , m_aColorWrapper(this) , m_aAutoDisplayColor(Application::GetSettings().GetStyleSettings().GetDialogColor()) @@ -4285,14 +4284,7 @@ ColorListBox::ColorListBox(std::unique_ptr<weld::MenuButton> pControl, { m_xButton->connect_toggled(LINK(this, ColorListBox, ToggleHdl)); m_aSelectedColor = GetAutoColor(m_nSlotId); - if (!pCache) - LockWidthRequest(CalcBestWidthRequest()); - else - { - LockWidthRequest(pCache->m_xButton->get_size_request().Width()); - m_xPaletteManager.reset(pCache->m_xPaletteManager->Clone()); - m_xPaletteManager->SetColorSelectFunction(std::ref(m_aColorWrapper)); - } + LockWidthRequest(CalcBestWidthRequest()); ShowPreview(m_aSelectedColor); } |