diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-22 15:55:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 08:50:31 +0200 |
commit | 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch) | |
tree | 82555c2aac7ca37c30e1084a7a8069c71fc11fbc /sd | |
parent | 61ff1d919e317947c769e61eeda7f1bb8132f273 (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 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdpreslt.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlview.cxx | 3 |
7 files changed, 10 insertions, 11 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index c606e3873f62..bb819c1a2247 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -671,7 +671,7 @@ void SdOOXMLExportTest1::testParaMarginAndindentation() sal_Int32 nParaFirstLineIndent = 0; xPropSet->getPropertyValue( "ParaFirstLineIndent" ) >>= nParaFirstLineIndent; - CPPUNIT_ASSERT_EQUAL(sal_Int32(-1268), sal_Int32(nParaFirstLineIndent)); + CPPUNIT_ASSERT_EQUAL(sal_Int32(-1268), nParaFirstLineIndent); xDocShRef->DoClose(); } diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 0a2a2c9e7e2f..499b7f0a5641 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -441,7 +441,7 @@ void SdTiledRenderingTest::testGetTextSelection() CPPUNIT_ASSERT_EQUAL(OString("Shape"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat)); // Make sure returned RTF is not empty. - CPPUNIT_ASSERT(!OString(pXImpressDocument->getTextSelection("text/rtf", aUsedFormat)).isEmpty()); + CPPUNIT_ASSERT(!pXImpressDocument->getTextSelection("text/rtf", aUsedFormat).isEmpty()); } void SdTiledRenderingTest::testSetGraphicSelection() diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 9a0e7f0420f5..f51373cca0a4 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -200,7 +200,7 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio Date aDate( aDateTime.Day, aDateTime.Month, aDateTime.Year ); if (aDate==aSysDate) sRet = SdResId(STR_ANNOTATION_TODAY); - else if (aDate == Date(aSysDate-1)) + else if (aDate == (aSysDate-1)) sRet = SdResId(STR_ANNOTATION_YESTERDAY); else if (aDate.IsValidAndGregorian() ) sRet = rLocalData.getDate(aDate); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index b7f7d3642671..280856096549 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -158,7 +158,7 @@ void SdPresLayoutDlg::FillValueSet() aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); maLayoutNames.push_back(aLayoutName); - Image aBitmap(Bitmap(mpDocSh->GetPagePreviewBitmap(pMaster))); + Image aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster)); m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName); } } @@ -256,7 +256,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void) aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); maLayoutNames.push_back(aLayoutName); - Image aBitmap(Bitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster))); + Image aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster)); m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName); } } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index cf684596dbb6..098dab8c016e 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1741,7 +1741,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq) { XFillColorItem aColorItem( static_cast<const XFillColorItem&>(pArgs->Get( XATTR_FILLCOLOR )) ); rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) ); - rPageProperties.PutItem( XFillColorItem( aColorItem )); + rPageProperties.PutItem( aColorItem ); } break; @@ -1763,7 +1763,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq) { XFillHatchItem aHatchItem( static_cast<const XFillHatchItem&>(pArgs->Get( XATTR_FILLHATCH )) ); rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_HATCH ) ); - rPageProperties.PutItem( XFillHatchItem( aHatchItem )); + rPageProperties.PutItem( aHatchItem ); } break; @@ -1771,7 +1771,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq) { XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem&>(pArgs->Get( XATTR_FILLBITMAP )) ); rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_BITMAP ) ); - rPageProperties.PutItem( XFillBitmapItem( aBitmapItem )); + rPageProperties.PutItem( aBitmapItem ); } break; diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 39742f8b333b..b478e81354e0 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -276,7 +276,7 @@ void OutlineViewShell::ArrangeGUIElements () if (!aWin.IsEmpty()) // not when opening { - InitWindows(Point(0,0), aText.GetSize(), Point(aVis.TopLeft())); + InitWindows(Point(0,0), aText.GetSize(), aVis.TopLeft()); UpdateScrollBars(); } } diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index b76b852e7100..9627e99edc09 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -780,8 +780,7 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl, EditStatus&, void) if (aWin.GetHeight() > aText.Bottom()) aText.Bottom() = aWin.GetHeight(); - mrOutlineViewShell.InitWindows(Point(0,0), aText.GetSize(), - Point(aVis.TopLeft())); + mrOutlineViewShell.InitWindows(Point(0,0), aText.GetSize(), aVis.TopLeft()); mrOutlineViewShell.UpdateScrollBars(); } } |