summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-22 15:55:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-30 08:50:31 +0200
commit2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch)
tree82555c2aac7ca37c30e1084a7a8069c71fc11fbc /vcl/source
parent61ff1d919e317947c769e61eeda7f1bb8132f273 (diff)
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/gdi/dibtools.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/window/dockmgr.cxx4
-rw-r--r--vcl/source/window/dockwin.cxx4
-rw-r--r--vcl/source/window/floatwin.cxx4
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
10 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 406cf2d9faba..e31582511652 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2409,7 +2409,7 @@ void Edit::SetEchoChar( sal_Unicode c )
void Edit::SetReadOnly( bool bReadOnly )
{
- if ( mbReadOnly != bool(bReadOnly) )
+ if ( mbReadOnly != bReadOnly )
{
mbReadOnly = bReadOnly;
if ( mpSubEdit )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index f462a600b237..96b8ffce552d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -130,7 +130,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
ControlState::ENABLED, rSpinbuttonValue, OUString());
if (!pWin->SupportsDoubleBuffering())
- pBorder->SetClipRegion(vcl::Region(oldRgn));
+ pBorder->SetClipRegion(oldRgn);
}
}
return bNativeOK;
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index dc3666978fb7..a4792ca4b1a6 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -733,7 +733,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
aMask.GetColorAndAlphaFor32Bit( aColor, aAlpha, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixel(nY, nX, SanitizeColor(aColor, bForceToMonoWhileReading));
pAccAlpha->SetPixelIndex(nY, nX, sal_uInt8(0xff) - aAlpha);
- rAlphaUsed |= bool(0xff != aAlpha);
+ rAlphaUsed |= 0xff != aAlpha;
}
}
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 22628af4b90d..5384204e4dc5 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1398,7 +1398,7 @@ void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint,
appendDouble( fValue, rBuffer, nLog10Divisor );
rBuffer.append( ' ' );
- fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
+ fValue = getHeight() - pixelToPoint(rPoint.getY());
appendDouble( fValue, rBuffer, nLog10Divisor );
}
@@ -11958,7 +11958,7 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape
else
{
// push the bitmap
- const BitmapEmit& rEmit = createBitmapEmit( BitmapEx( aBitmap ), Graphic() );
+ const BitmapEmit& rEmit = createBitmapEmit( aBitmap, Graphic() );
// convert to page coordinates; this needs to be done here
// since the emit does not know the page anymore
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 0df373e02a10..12654bf6c0db 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -187,7 +187,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
!(aState.mnState & KEY_MOD1) && // i43499 CTRL disables docking now
bRealMove )
{
- maDockPos = Point( pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) ) );
+ maDockPos = pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) );
maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos in screen pixels
@@ -726,7 +726,7 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
- Point aDockPos = Point( pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) ) );
+ Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
StartDocking( aMousePos, aDockRect );
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index a6e828fe2d3c..4c2dda5b79e5 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void)
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) ) // i43499 CTRL disables docking now
{
- maDockPos = Point( mpDockWin->GetParent()->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) );
+ maDockPos = mpDockWin->GetParent()->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) );
maDockPos = mpDockWin->GetParent()->OutputToScreenPixel( maDockPos ); // sfx expects screen coordinates
if( ! mpDockWin->IsDocking() )
@@ -591,7 +591,7 @@ void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
if ( !IsDockingCanceled() )
{
bool bShow = false;
- if ( bool(bFloatMode) != IsFloatingMode() )
+ if ( bFloatMode != IsFloatingMode() )
{
Show( false, ShowFlags::NoFocusChange );
SetFloatingMode( bFloatMode );
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 71de988dfed7..ddca40f52d5c 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -453,8 +453,8 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
aAbsolute = aRect.TopLeft();
}
else
- aAbsolute = Point( pReference->OutputToAbsoluteScreenPixel(
- pReference->ScreenToOutputPixel(rPos) ) );
+ aAbsolute = pReference->OutputToAbsoluteScreenPixel(
+ pReference->ScreenToOutputPixel(rPos) );
return aAbsolute;
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9dea04a8e4ed..6aef0dbafd69 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -301,7 +301,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap()
SetMapMode( MapUnit::MapPixel );
maPageVDev->SetMapMode( MapUnit::MapPixel );
- maPreviewBitmap = Bitmap(maPageVDev->GetBitmap(Point(0, 0), aVDevSize));
+ maPreviewBitmap = maPageVDev->GetBitmap(Point(0, 0), aVDevSize);
maPageVDev->SetDrawMode( nOldDrawMode );
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index e4ee8a3dc648..c4643dabbad8 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -452,7 +452,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
- ImplControlValue aValue(nFullWidth * long(nPerc) / 10000);
+ ImplControlValue aValue(nFullWidth * nPerc / 10000);
tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
tools::Rectangle aControlRegion(aDrawRect);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b08cf4ca5261..7b0b4af23a65 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4347,7 +4347,7 @@ void ToolBox::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
if ( meAlign != meDockAlign )
SetAlign( meDockAlign );
}
- if ( bFloatMode || (bool(bFloatMode) != ImplIsFloatingMode()) )
+ if ( bFloatMode || (bFloatMode != ImplIsFloatingMode()) )
DockingWindow::EndDocking( rRect, bFloatMode );
}