summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/unoidl/unowcntr.cxx2
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index 053604793e76..6043686a2d06 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -162,7 +162,7 @@ public:
std::shared_ptr<BitmapReplacement> PngCompression::Compress (const BitmapEx& rBitmap) const
{
- vcl::PNGWriter aWriter ((BitmapEx(rBitmap)));
+ vcl::PNGWriter aWriter(rBitmap);
SvMemoryStream aStream (32768, 32768);
aWriter.Write(aStream);
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index b301c8bf1775..6ffa9cd930f8 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1018,10 +1018,10 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getHeight() );
break;
case WID_PAGE_ORIENT:
- aAny <<= view::PaperOrientation(
+ aAny <<=
GetPage()->GetOrientation() == Orientation::Portrait
? view::PaperOrientation_PORTRAIT
- : view::PaperOrientation_LANDSCAPE);
+ : view::PaperOrientation_LANDSCAPE;
break;
case WID_PAGE_EFFECT:
aAny <<= GetPage()->GetFadeEffect();
diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx
index 7583b1f569d4..bff99b1b3530 100644
--- a/sd/source/ui/unoidl/unowcntr.cxx
+++ b/sd/source/ui/unoidl/unowcntr.cxx
@@ -49,7 +49,7 @@ void SvUnoWeakContainer::insert( const uno::WeakReference< uno::XInterface >& xR
++it;
}
}
- maVector.emplace_back( uno::WeakReference< uno::XInterface >( xRef ) );
+ maVector.emplace_back( xRef );
}
/** searches the container for a ref that returns true on the given
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index eb00b2d08ae6..898643cb79e3 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -487,7 +487,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
break;
case SID_ATTR_CHAR_CASEMAP:
{
- aNewAttr.Put( SvxCaseMapItem( aEditAttr.Get( EE_CHAR_CASEMAP ) ) );
+ aNewAttr.Put( aEditAttr.Get( EE_CHAR_CASEMAP ) );
}
break;
case SID_ATTR_CHAR_STRIKEOUT: