summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 10:41:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:44:55 +0100
commit2dbd02b576f28224204ac962f6ce20fde6687093 (patch)
tree28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3 /svtools
parent48314f25241e014a634dd5371543b90137ffd2bc (diff)
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx7
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/misc/embedhlp.cxx2
3 files changed, 5 insertions, 6 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 561d1dbe1a30..ce1918b82209 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -111,7 +111,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode )
:Control( pParent, nBits | WB_3DLOOK )
,DragSourceHelper( this )
,DropTargetHelper( this )
- ,aHScroll( VclPtr<ScrollBar>::Create(this, WinBits( WB_HSCROLL )) )
+ ,aHScroll( VclPtr<ScrollBar>::Create(this, WB_HSCROLL) )
{
ConstructImpl( nMode );
}
@@ -2146,10 +2146,9 @@ void BrowseBox::SetMode( BrowserMode nMode )
WinBits nVScrollWinBits =
WB_VSCROLL | ( ( nMode & BrowserMode::THUMBDRAGGING ) ? WB_DRAG : 0 );
- pVScroll = VclPtr<ScrollBar>(
- ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS
+ pVScroll = ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS
? VclPtr<BrowserScrollBar>::Create( this, nVScrollWinBits, pDataWin.get() )
- : VclPtr<ScrollBar>::Create( this, nVScrollWinBits ));
+ : VclPtr<ScrollBar>::Create( this, nVScrollWinBits );
pVScroll->SetLineSize( 1 );
pVScroll->SetPageSize(1);
pVScroll->SetScrollHdl( LINK( this, BrowseBox, ScrollHdl ) );
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 3e8ea365970b..d241e1b35913 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -174,7 +174,7 @@ void BrowserColumn::ZoomChanged(const Fraction& rNewZoom)
BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
- :Control( pParent, WinBits(WB_CLIPCHILDREN) )
+ :Control( pParent, WB_CLIPCHILDREN )
,DragSourceHelper( this )
,DropTargetHelper( this )
,pHeaderBar( nullptr )
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index fa7f7b791b1d..2a247d2b9dac 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -404,7 +404,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
if ( bUpdate )
{
if (mpImpl->pGraphic)
- aOldGraphic = Graphic(*mpImpl->pGraphic);
+ aOldGraphic = *mpImpl->pGraphic;
mpImpl->pGraphic.reset();
mpImpl->aMediaType.clear();