summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-14 09:33:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-17 16:49:38 +0200
commit988e2827319fa2fe04bb818880c1f381bd08a314 (patch)
treee69666af2902daa2fe46d946971e3bd48b547af1 /vcl
parent7852fdc1ae87434e06bbbfd05a349c4624fbfd50 (diff)
loplugin:constantparam
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/bitmap.cxx12
-rw-r--r--vcl/source/window/dockmgr.cxx11
-rw-r--r--vcl/source/window/impldockingwrapper.hxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx2
5 files changed, 11 insertions, 18 deletions
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index 7bf272225d6c..99b8d10e9ef7 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -991,7 +991,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
if( nBitCount < 8 )
bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP);
else if( nBitCount > 8 )
- bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP);
+ bRet = ImplConvertDown8BPP();
else
bRet = true;
}
@@ -1004,7 +1004,7 @@ bool Bitmap::Convert( BmpConversion eConversion )
if( nBitCount < 8 )
bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP, &aTrans );
else
- bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP, &aTrans );
+ bRet = ImplConvertDown8BPP(&aTrans );
}
break;
@@ -1240,9 +1240,9 @@ bool Bitmap::ImplConvertUp(vcl::PixelFormat ePixelFormat, Color const * pExtColo
return bRet;
}
-bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtColor)
+bool Bitmap::ImplConvertDown8BPP(Color const * pExtColor)
{
- SAL_WARN_IF(ePixelFormat > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!");
+ SAL_WARN_IF(vcl::PixelFormat::N8_BPP > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!");
Bitmap::ScopedReadAccess pReadAcc(*this);
bool bRet = false;
@@ -1250,12 +1250,12 @@ bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtCo
if (pReadAcc)
{
BitmapPalette aPalette;
- Bitmap aNewBmp(GetSizePixel(), ePixelFormat, &aPalette);
+ Bitmap aNewBmp(GetSizePixel(), vcl::PixelFormat::N8_BPP, &aPalette);
BitmapScopedWriteAccess pWriteAcc(aNewBmp);
if (pWriteAcc)
{
- sal_Int16 nNewBitCount = sal_Int16(ePixelFormat);
+ sal_Int16 nNewBitCount = sal_Int16(vcl::PixelFormat::N8_BPP);
const sal_uInt16 nCount = 1 << nNewBitCount;
const tools::Long nWidth = pWriteAcc->Width();
const tools::Long nWidth1 = nWidth - 1;
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 3f3efa84a6cc..a7abd42b168b 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -754,17 +754,10 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize )
pDockingWindow->Resizing( rSize );
}
-void ImplDockingWindowWrapper::ShowTitleButton( TitleButton nButton, bool bVisible )
+void ImplDockingWindowWrapper::ShowMenuTitleButton( bool bVisible )
{
if ( mpFloatWin )
- mpFloatWin->ShowTitleButton( nButton, bVisible );
- else
- {
- if ( nButton == TitleButton::Docking )
- mbDockBtn = bVisible;
- else // if ( nButton == TitleButton::Hide )
- mbHideBtn = bVisible;
- }
+ mpFloatWin->ShowTitleButton( TitleButton::Menu, bVisible );
}
void ImplDockingWindowWrapper::ImplPreparePopupMode()
diff --git a/vcl/source/window/impldockingwrapper.hxx b/vcl/source/window/impldockingwrapper.hxx
index fe307ee6e356..671510e3c586 100644
--- a/vcl/source/window/impldockingwrapper.hxx
+++ b/vcl/source/window/impldockingwrapper.hxx
@@ -105,7 +105,7 @@ public:
void Resizing( Size& rSize );
void Tracking( const TrackingEvent& rTEvt );
- void ShowTitleButton( TitleButton nButton, bool bVisible );
+ void ShowMenuTitleButton( bool bVisible );
void SetMinOutputSizePixel( const Size& rSize );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 14bf3883e146..5b9a956edb7a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -861,7 +861,7 @@ void ToolBox::ImplSetMinMaxFloatSize()
{
pWrapper->SetMinOutputSizePixel( aMinSize );
pWrapper->SetMaxOutputSizePixel( aMaxSize );
- pWrapper->ShowTitleButton( TitleButton::Menu, bool( GetMenuType() & ToolBoxMenuType::Customize) );
+ pWrapper->ShowMenuTitleButton( bool( GetMenuType() & ToolBoxMenuType::Customize) );
}
else
{
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 6acf30e92d65..a9dd9142f47a 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1470,7 +1470,7 @@ void ToolBox::SetMenuType( ToolBoxMenuType aType )
// the menu button may have to be moved into the decoration which changes the layout
ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
if( pWrapper )
- pWrapper->ShowTitleButton( TitleButton::Menu, bool( aType & ToolBoxMenuType::Customize) );
+ pWrapper->ShowMenuTitleButton( bool( aType & ToolBoxMenuType::Customize) );
mbFormat = true;
ImplFormat();