vcl: Drop unnecessary casts in VclMultiLineEdit

Neither the const_cast, nor the explicit cast to vcl::Window
is needed here in order to call vcl::Window::GetBorder.

Change-Id: Id234d21e6d9792e83487fc5503cd737fe3832b91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177377
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit is contained in:
Michael Weghorn 2024-11-26 22:16:13 +01:00
parent 3b6688fe11
commit 5259a08e95

View file

@ -1159,7 +1159,7 @@ Size VclMultiLineEdit::CalcMinimumSize() const
Size aSz = pImpVclMEdit->CalcMinimumSize();
sal_Int32 nLeft, nTop, nRight, nBottom;
static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
GetBorder(nLeft, nTop, nRight, nBottom);
aSz.AdjustWidth(nLeft+nRight );
aSz.AdjustHeight(nTop+nBottom );
@ -1170,7 +1170,7 @@ Size VclMultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const
{
Size aSz = rPrefSize;
sal_Int32 nLeft, nTop, nRight, nBottom;
static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
GetBorder(nLeft, nTop, nRight, nBottom);
// center vertically for whole lines
@ -1191,7 +1191,7 @@ Size VclMultiLineEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) c
Size aSz = pImpVclMEdit->CalcBlockSize( nColumns, nLines );
sal_Int32 nLeft, nTop, nRight, nBottom;
static_cast<vcl::Window*>(const_cast<VclMultiLineEdit *>(this))->GetBorder( nLeft, nTop, nRight, nBottom );
GetBorder(nLeft, nTop, nRight, nBottom);
aSz.AdjustWidth(nLeft+nRight );
aSz.AdjustHeight(nTop+nBottom );
return aSz;