summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:50:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 11:48:22 +0200
commit51d1ec7883444e6216f1020122084d3a996c9ecb (patch)
tree8b24c91daecfa2ccb922b6e1c91e29c3bf89e7dc /filter
parentcd6dd8c6f3562cbccbc971b916c6a8933840ffeb (diff)
clang-tidy performance-unnecessary-copy-init in editeng..i18npool
Change-Id: I2ee2c8d15d8700cfaa1697363da4557c741a5f36 Reviewed-on: https://gerrit.libreoffice.org/62216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/flash/swfwriter1.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx6
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx2
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx12
8 files changed, 13 insertions, 19 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index f32eb9538f53..436c2783d63a 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -1250,7 +1250,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf
{
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
- const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
+ const basegfx::B2DPolygon& aCandidate(aLinePolyPolygon.getB2DPolygon(a));
Impl_writePolygon( tools::Polygon(aCandidate), false );
}
}
@@ -1500,7 +1500,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case MetaActionType::EPS:
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
- const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
+ const GDIMetaFile& aGDIMetaFile( pA->GetSubstitute() );
bool bFound = false;
for( size_t j = 0, nC = aGDIMetaFile.GetActionSize(); ( j < nC ) && !bFound; j++ )
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 28e0f59b40b2..e131091b9ba1 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -898,7 +898,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
{
const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
tools::Rectangle aRect = pA->GetRect();
- Wallpaper aWallpaper = pA->GetWallpaper();
+ const Wallpaper& aWallpaper = pA->GetWallpaper();
if ( aWallpaper.IsBitmap() )
{
@@ -946,7 +946,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::CLIPREGION:
{
const MetaClipRegionAction* pA = static_cast<const MetaClipRegionAction*>(pMA);
- vcl::Region aRegion( pA->GetRegion() );
+ const vcl::Region& aRegion( pA->GetRegion() );
ImplSetClipRegion( aRegion );
}
break;
@@ -954,7 +954,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
case MetaActionType::ISECTREGIONCLIPREGION:
{
const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pMA);
- vcl::Region aRegion( pA->GetRegion() );
+ const vcl::Region& aRegion( pA->GetRegion() );
ImplSetClipRegion( aRegion );
}
break;
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index dc3349f82791..2c95f2c5712d 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -189,7 +189,7 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem const * pF
if ( ImplWriteHeader( aAnimation.Count() > 0 ) )
{
Size aDestMapSize( 300, 300 );
- const MapMode aMapMode( aBmp.GetPrefMapMode() );
+ const MapMode& aMapMode( aBmp.GetPrefMapMode() );
if ( aMapMode.GetMapUnit() != MapUnit::MapPixel )
{
const Size aPrefSize( rGraphic.GetPrefSize() );
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index daa20e40d57f..4d09031925ef 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -684,7 +684,7 @@ void CGMImpressOutAct::DrawPolyPolygon( tools::PolyPolygon const & rPolyPolygon
for( sal_uInt32 a = 0; a < nNumPolys; a++ )
{
- tools::Polygon aPolygon( rPolyPolygon.GetObject( a ) );
+ const tools::Polygon& aPolygon( rPolyPolygon.GetObject( a ) );
sal_uInt32 nNumPoints = aPolygon.GetSize();
// make room in arrays
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 309975c92c16..953d4c423f9c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -587,7 +587,7 @@ void EscherPropertyContainer::CreateFillProperties(
SdrObject* pObj = GetSdrObjectFromXShape( rXShape );
if ( pObj )
{
- SfxItemSet aAttr( pObj->GetMergedItemSet() );
+ const SfxItemSet& aAttr( pObj->GetMergedItemSet() );
// tranparency with gradient. Means the third setting in transparency page is set
bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) &&
aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ).IsEnabled();
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 33ec4e3ce63a..90c23a0797b3 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -315,7 +315,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
if( bSearchGlobalTemplates )
{
SvtPathOptions aPathOpt;
- OUString aAddinPath = aPathOpt.GetAddinPath();
+ const OUString& aAddinPath = aPathOpt.GetAddinPath();
if( sDocUrlOrPath.startsWith( aAddinPath ) )
pFoundShell = pShell;
}
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index eff3d607fa77..9565383dbb5d 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -3025,7 +3025,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
- const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
+ const GDIMetaFile& aGDIMetaFile( pA->GetSubstitute() );
bool bFound = false;
for( sal_uInt32 k = 0, nCount2 = aGDIMetaFile.GetActionSize(); ( k < nCount2 ) && !bFound; ++k )
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index b27546e1343f..acc81d4e1196 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -421,10 +421,8 @@ namespace XSLT
void
LibXSLTTransformer::start()
{
- ListenerList* l = &m_listeners;
- for (auto const& elem : *l)
+ for (const css::uno::Reference<XStreamListener>& xl : m_listeners)
{
- css::uno::Reference<XStreamListener> xl = elem;
xl.get()->started();
}
OSL_ENSURE(!m_Reader.is(), "Somebody forgot to call terminate *and* holds a reference to this LibXSLTTransformer instance");
@@ -435,12 +433,10 @@ namespace XSLT
void
LibXSLTTransformer::error(const OUString& msg)
{
- ListenerList* l = &m_listeners;
Any arg;
arg <<= Exception(msg, *this);
- for (auto const& elem : *l)
+ for (const css::uno::Reference<XStreamListener>& xl : m_listeners)
{
- css::uno::Reference<XStreamListener> xl = elem;
if (xl.is())
{
xl.get()->error(arg);
@@ -451,10 +447,8 @@ namespace XSLT
void
LibXSLTTransformer::done()
{
- ListenerList* l = &m_listeners;
- for (auto const& elem : *l)
+ for (const css::uno::Reference<XStreamListener>& xl : m_listeners)
{
- css::uno::Reference<XStreamListener> xl = elem;
if (xl.is())
{
xl.get()->closed();