summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-07 15:57:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-07 18:59:55 +0200
commit607ef95608592f2db88a8b4cf65dfc2e488b07a9 (patch)
treef5466dfe4d01cd84e2a40ac221283c367f402bcb /oox
parenta2b2b7b07e0ddffdd836bd1b6009c0c8523fa1ae (diff)
loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I19eaebdb25db8881d84625a4b9d0df0a588aab4f
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/recordparser.cxx4
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx2
-rw-r--r--oox/source/crypto/DocumentEncryption.cxx2
-rw-r--r--oox/source/drawingml/fillproperties.cxx12
-rw-r--r--oox/source/ole/vbaexport.cxx2
-rw-r--r--oox/source/shape/WpsContext.cxx2
-rw-r--r--oox/source/shape/WpsContext.hxx2
7 files changed, 13 insertions, 13 deletions
diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx
index 1ced83c47fa6..b7f376743f44 100644
--- a/oox/source/core/recordparser.cxx
+++ b/oox/source/core/recordparser.cxx
@@ -91,7 +91,7 @@ OUString SAL_CALL Locator::getSystemId() throw( RuntimeException, std::exception
class ContextStack
{
public:
- explicit ContextStack( FragmentHandlerRef xHandler );
+ explicit ContextStack( FragmentHandlerRef const & xHandler );
inline bool empty() const { return maStack.empty(); }
@@ -110,7 +110,7 @@ private:
ContextInfoVec maStack;
};
-ContextStack::ContextStack( FragmentHandlerRef xHandler ) :
+ContextStack::ContextStack( FragmentHandlerRef const & xHandler ) :
mxHandler( xHandler )
{
}
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index eea0c629d641..b07c74f89b5f 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -194,7 +194,7 @@ public:
} // namespace
-DocumentDecryption::DocumentDecryption(oox::ole::OleStorage& rOleStorage, Reference<XComponentContext> xContext) :
+DocumentDecryption::DocumentDecryption(oox::ole::OleStorage& rOleStorage, Reference<XComponentContext> const & xContext) :
mxContext(xContext),
mrOleStorage(rOleStorage),
mCryptoType(UNKNOWN)
diff --git a/oox/source/crypto/DocumentEncryption.cxx b/oox/source/crypto/DocumentEncryption.cxx
index 1c328fccd775..d9bb07bc9ea6 100644
--- a/oox/source/crypto/DocumentEncryption.cxx
+++ b/oox/source/crypto/DocumentEncryption.cxx
@@ -28,7 +28,7 @@ using namespace css::uno;
using namespace std;
-DocumentEncryption::DocumentEncryption(Reference< XStream > xDocumentStream, oox::ole::OleStorage& rOleStorage, const OUString& aPassword) :
+DocumentEncryption::DocumentEncryption(Reference< XStream > const & xDocumentStream, oox::ole::OleStorage& rOleStorage, const OUString& aPassword) :
mxDocumentStream(xDocumentStream),
mrOleStorage(rOleStorage),
maPassword(aPassword)
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 9044b5d12866..81a3726b8088 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -58,7 +58,7 @@ namespace drawingml {
namespace {
-Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const BlipFillProperties& aBlipProps, Reference< XGraphic > xGraphic,
+Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const BlipFillProperties& aBlipProps, Reference< XGraphic > const & xGraphic,
const GraphicHelper& rGraphicHelper, const sal_Int32 nPhClr )
{
if( aBlipProps.maDuotoneColors[0].isUsed() && aBlipProps.maDuotoneColors[1].isUsed() )
@@ -68,7 +68,7 @@ Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const BlipFillProperties
try
{
Reference< XGraphicTransformer > xTransformer( aBlipProps.mxGraphic, UNO_QUERY_THROW );
- xGraphic = xTransformer->applyDuotone( xGraphic, nColor1, nColor2 );
+ return xTransformer->applyDuotone( xGraphic, nColor1, nColor2 );
}
catch( Exception& )
{
@@ -77,7 +77,7 @@ Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const BlipFillProperties
return xGraphic;
}
-Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProperties &aBlipProps, Reference< XGraphic > xGraphic,
+Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProperties &aBlipProps, Reference< XGraphic > & xGraphic,
const GraphicHelper& rGraphicHelper, const sal_Int32 nPhClr )
{
if( aBlipProps.maColorChangeFrom.isUsed() && aBlipProps.maColorChangeTo.isUsed() )
@@ -89,7 +89,7 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper
sal_Int16 nToTransparence = aBlipProps.maColorChangeTo.getTransparency();
sal_Int8 nToAlpha = static_cast< sal_Int8 >( (100 - nToTransparence) * 2.55 );
Reference< XGraphicTransformer > xTransformer( aBlipProps.mxGraphic, UNO_QUERY_THROW );
- xGraphic = xTransformer->colorChange( xGraphic, nFromColor, 9, nToColor, nToAlpha );
+ return xTransformer->colorChange( xGraphic, nFromColor, 9, nToColor, nToAlpha );
}
catch( Exception& )
{
@@ -98,12 +98,12 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper
return xGraphic;
}
-Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > xGraphic, sal_Int32 brightness, sal_Int32 contrast )
+Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > const & xGraphic, sal_Int32 brightness, sal_Int32 contrast )
{
try
{
Reference< XGraphicTransformer > xTransformer( xGraphic, UNO_QUERY_THROW );
- xGraphic = xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true );
+ return xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true );
}
catch( Exception& )
{
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index d4e6a9f5716e..ca4eb48885b3 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -509,7 +509,7 @@ void VBAEncryption::write()
#endif
-VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> xModel):
+VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> const & xModel):
mxModel(xModel)
{
}
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index d3beeb846499..15c6b3743ef9 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -32,7 +32,7 @@ namespace oox
namespace shape
{
-WpsContext::WpsContext(ContextHandler2Helper& rParent, uno::Reference<drawing::XShape> xShape)
+WpsContext::WpsContext(ContextHandler2Helper& rParent, uno::Reference<drawing::XShape> const & xShape)
: ContextHandler2(rParent),
mxShape(xShape)
{
diff --git a/oox/source/shape/WpsContext.hxx b/oox/source/shape/WpsContext.hxx
index b7dfb1d95c35..909400176615 100644
--- a/oox/source/shape/WpsContext.hxx
+++ b/oox/source/shape/WpsContext.hxx
@@ -22,7 +22,7 @@ namespace shape
class WpsContext : public oox::core::ContextHandler2
{
public:
- WpsContext(oox::core::ContextHandler2Helper& rParent, css::uno::Reference<css::drawing::XShape> xShape);
+ WpsContext(oox::core::ContextHandler2Helper& rParent, css::uno::Reference<css::drawing::XShape> const & xShape);
virtual ~WpsContext();
virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElementToken, const oox::AttributeList& rAttribs) override;