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 <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -54,7 +54,6 @@ enum TableCheckBox : sal_uInt16
|
|||||||
class TableValueSet final : public ValueSet
|
class TableValueSet final : public ValueSet
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool m_bModal;
|
|
||||||
Link<const Point*, void> maContextMenuHandler;
|
Link<const Point*, void> maContextMenuHandler;
|
||||||
public:
|
public:
|
||||||
TableValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
|
TableValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
|
||||||
|
|||||||
@@ -621,20 +621,16 @@ void TableValueSet::Resize()
|
|||||||
SetColCount (static_cast<sal_uInt16>(nColumnCount));
|
SetColCount (static_cast<sal_uInt16>(nColumnCount));
|
||||||
SetLineCount (static_cast<sal_uInt16>(nVisibleRowCount));
|
SetLineCount (static_cast<sal_uInt16>(nVisibleRowCount));
|
||||||
|
|
||||||
if( !m_bModal )
|
WinBits nStyle = GetStyle() & ~WB_VSCROLL;
|
||||||
|
if (nRowCount > nVisibleRowCount)
|
||||||
{
|
{
|
||||||
WinBits nStyle = GetStyle() & ~WB_VSCROLL;
|
nStyle |= WB_VSCROLL;
|
||||||
if( nRowCount > nVisibleRowCount )
|
|
||||||
{
|
|
||||||
nStyle |= WB_VSCROLL;
|
|
||||||
}
|
|
||||||
SetStyle( nStyle );
|
|
||||||
}
|
}
|
||||||
|
SetStyle(nStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
TableValueSet::TableValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow)
|
TableValueSet::TableValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow)
|
||||||
: ValueSet(std::move(pScrolledWindow))
|
: ValueSet(std::move(pScrolledWindow))
|
||||||
, m_bModal(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -645,12 +641,9 @@ void TableValueSet::StyleUpdated()
|
|||||||
|
|
||||||
void TableValueSet::updateSettings()
|
void TableValueSet::updateSettings()
|
||||||
{
|
{
|
||||||
if( !m_bModal )
|
Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
|
||||||
{
|
SetColor(aColor);
|
||||||
Color aColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
|
SetExtraSpacing(8);
|
||||||
SetColor(aColor);
|
|
||||||
SetExtraSpacing(8);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TableDesignWidget::updateControls()
|
void TableDesignWidget::updateControls()
|
||||||
|
|||||||
Reference in New Issue
Block a user