WB_BEVELBUTTON and PushButtonValue::mbBevelButton are unused

Change-Id: Ibc2605261de84337f4880f07a5ecb25e934c0251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141759
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-10-24 12:58:01 +01:00
parent dd1069d77a
commit b1e7f74fa9
5 changed files with 4 additions and 14 deletions

View file

@ -494,7 +494,6 @@ class VCL_DLLPUBLIC PushButtonValue final : public ImplControlValue
public:
PushButtonValue()
: ImplControlValue( ControlType::Pushbutton, 0 )
, mbBevelButton(false)
, mbSingleLine(true)
, mbIsAction(false)
, m_bFlatButton(false)
@ -508,7 +507,6 @@ public:
PushButtonValue & operator =(PushButtonValue const &) = delete; // due to ImplControlValue
PushButtonValue & operator =(PushButtonValue &&) = delete; // due to ImplControlValue
bool mbBevelButton:1; // only used on OSX
bool mbSingleLine:1; // only used on OSX
bool mbIsAction:1;
bool m_bFlatButton:1;

View file

@ -183,8 +183,7 @@ WinBits const WB_NOLIGHTBORDER = 0x20000000;
WinBits const WB_RECTSTYLE = 0x08000000;
WinBits const WB_SMALLSTYLE = 0x04000000;
WinBits const WB_TOGGLE = SAL_CONST_INT64(0x1000000000);
WinBits const WB_BEVELBUTTON = SAL_CONST_INT64(0x2000000000);
WinBits const WB_FLATBUTTON = SAL_CONST_INT64(0x4000000000);
WinBits const WB_FLATBUTTON = SAL_CONST_INT64(0x2000000000);
// Window-Bits for FixedText
WinBits const WB_PATHELLIPSIS = 0x00100000;

View file

@ -461,11 +461,7 @@ bool AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType,
PushButtonValue const *pPBVal = aValue.getType() == ControlType::Pushbutton ?
static_cast<PushButtonValue const *>(&aValue) : nullptr;
int nPaintHeight = static_cast<int>(rc.size.height);
if (pPBVal && pPBVal->mbBevelButton)
{
aPushInfo.kind = kThemeRoundedBevelButton;
}
else if (rc.size.height <= PUSH_BUTTON_NORMAL_HEIGHT)
if (rc.size.height <= PUSH_BUTTON_NORMAL_HEIGHT)
{
aPushInfo.kind = kThemePushButtonMini;
nPaintHeight = PUSH_BUTTON_SMALL_HEIGHT;

View file

@ -1105,8 +1105,6 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
if (GetStyle() & WB_FLATBUTTON)
aControlValue.m_bFlatButton = true;
if (GetStyle() & WB_BEVELBUTTON)
aControlValue.mbBevelButton = true;
// draw frame into invisible window to have aInRect modified correctly
// but do not shift the inner rect for pressed buttons (ie remove DrawButtonFlags::Pressed)

View file

@ -1033,9 +1033,8 @@ namespace
VclBuilder::stringmap::iterator aFind = rMap.find(OString("relief"));
if (aFind != rMap.end())
{
if (aFind->second == "half")
nBits = WB_FLATBUTTON | WB_BEVELBUTTON;
else if (aFind->second == "none")
assert(aFind->second != "half" && "relief of 'half' unsupported");
if (aFind->second == "none")
nBits = WB_FLATBUTTON;
rMap.erase(aFind);
}