From 09d3cc2c1456e4f337877fe90da2b821f59ab05e Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Tue, 6 Oct 2026 17:56:09 +0200 Subject: [PATCH] sd: Drop always false TableDesignWidget::m_bModal The member is initialized to false in the ctor and that value is never changed afterwards. Drop it altogether and simplify code accordingly. Change-Id: I0213e9f74b353a214af3ad163a934bfa7e868412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211913 Reviewed-by: Michael Weghorn Tested-by: Jenkins --- sd/source/ui/inc/TableDesignPane.hxx | 1 - sd/source/ui/table/TableDesignPane.cxx | 21 +++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/sd/source/ui/inc/TableDesignPane.hxx b/sd/source/ui/inc/TableDesignPane.hxx index a1280563fddf..c067e78fe5e2 100644 --- a/sd/source/ui/inc/TableDesignPane.hxx +++ b/sd/source/ui/inc/TableDesignPane.hxx @@ -54,7 +54,6 @@ enum TableCheckBox : sal_uInt16 class TableValueSet final : public ValueSet { private: - bool m_bModal; Link maContextMenuHandler; public: TableValueSet(std::unique_ptr pScrolledWindow); diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index ee9711253d69..1f6f962c3e11 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -621,20 +621,16 @@ void TableValueSet::Resize() SetColCount (static_cast(nColumnCount)); SetLineCount (static_cast(nVisibleRowCount)); - if( !m_bModal ) + WinBits nStyle = GetStyle() & ~WB_VSCROLL; + if (nRowCount > nVisibleRowCount) { - WinBits nStyle = GetStyle() & ~WB_VSCROLL; - if( nRowCount > nVisibleRowCount ) - { - nStyle |= WB_VSCROLL; - } - SetStyle( nStyle ); + nStyle |= WB_VSCROLL; } + SetStyle(nStyle); } TableValueSet::TableValueSet(std::unique_ptr pScrolledWindow) : ValueSet(std::move(pScrolledWindow)) - , m_bModal(false) { } @@ -645,12 +641,9 @@ void TableValueSet::StyleUpdated() void TableValueSet::updateSettings() { - if( !m_bModal ) - { - Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); - SetColor(aColor); - SetExtraSpacing(8); - } + Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); + SetColor(aColor); + SetExtraSpacing(8); } void TableDesignWidget::updateControls()