summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-11 14:49:04 +0200
committerNoel Grandin <noel@peralex.com>2016-04-11 15:12:11 +0200
commitfb42d03b5a404ac73e24d90e094885c14c3b7584 (patch)
tree3eebcc8b525c2e67872eac3a761b18b37623c938 /unotools
parentb76c2ea81df92e1a863ce04e02005f58ab5ea5f9 (diff)
clang-tidy performance-unnecessary-value-param in unotools
Change-Id: Ife11111b0265da5d5a8a98766a94f3b640b357f5
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx4
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx20
-rw-r--r--unotools/source/ucbhelper/ucbstreamhelper.cxx12
3 files changed, 18 insertions, 18 deletions
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 427cad2ebef6..acbc63f41564 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -449,8 +449,8 @@ bool utl::UCBContentHelper::EqualURLs(
}
bool utl::UCBContentHelper::ensureFolder(
- css::uno::Reference< css::uno::XComponentContext > xCtx,
- css::uno::Reference< css::ucb::XCommandEnvironment > xEnv,
+ const css::uno::Reference< css::uno::XComponentContext >& xCtx,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
const OUString& rFolder, ucbhelper::Content & result) throw()
{
try
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 71ad3ca2fe54..a73b87cf0011 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -712,17 +712,17 @@ void SAL_CALL Moderator::onTerminated()
but with handled timeout;
*/
static bool UCBOpenContentSync_(
- UcbLockBytesRef xLockBytes,
- Reference < XContent > xContent,
+ const UcbLockBytesRef& xLockBytes,
+ const Reference < XContent >& xContent,
const Command& rArg,
- Reference < XInterface > xSink,
- Reference < XInteractionHandler > xInteract );
+ const Reference < XInterface >& xSink,
+ const Reference < XInteractionHandler >& xInteract );
static bool UCBOpenContentSync(
- UcbLockBytesRef xLockBytes,
+ const UcbLockBytesRef& xLockBytes,
Reference < XContent > xContent,
const Command& rArg,
- Reference < XInterface > xSink,
+ const Reference < XInterface >& xSink,
Reference < XInteractionHandler > xInteract )
{
// http protocol must be handled in a special way:
@@ -957,11 +957,11 @@ static bool UCBOpenContentSync(
Function for opening UCB contents synchronously
*/
static bool UCBOpenContentSync_(
- UcbLockBytesRef xLockBytes,
- Reference < XContent > xContent,
+ const UcbLockBytesRef& xLockBytes,
+ const Reference < XContent >& xContent,
const Command& rArg,
- Reference < XInterface > xSink,
- Reference < XInteractionHandler > xInteract )
+ const Reference < XInterface >& xSink,
+ const Reference < XInteractionHandler >& xInteract )
{
::ucbhelper::Content aContent(
xContent, new UcbTaskEnvironment( xInteract, nullptr ),
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 07421c56368b..ff11524ca8a8 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -41,7 +41,7 @@ namespace utl
{
static SvStream* lcl_CreateStream( const OUString& rFileName, StreamMode eOpenMode,
- Reference < XInteractionHandler > xInteractionHandler,
+ const Reference < XInteractionHandler >& xInteractionHandler,
UcbLockBytesHandler* pHandler, bool bEnsureFileExists )
{
SvStream* pStream = nullptr;
@@ -144,7 +144,7 @@ SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode e
}
SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode eOpenMode,
- Reference < XInteractionHandler > xInteractionHandler )
+ const Reference < XInteractionHandler >& xInteractionHandler )
{
return lcl_CreateStream( rFileName, eOpenMode, xInteractionHandler, nullptr, true /* bEnsureFileExists */ );
}
@@ -155,7 +155,7 @@ SvStream* UcbStreamHelper::CreateStream( const OUString& rFileName, StreamMode e
return lcl_CreateStream( rFileName, eOpenMode, Reference < XInteractionHandler >(), nullptr, !bFileExists );
}
-SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream )
+SvStream* UcbStreamHelper::CreateStream( const Reference < XInputStream >& xStream )
{
SvStream* pStream = nullptr;
UcbLockBytesRef xLockBytes = UcbLockBytes::CreateInputLockBytes( xStream );
@@ -169,7 +169,7 @@ SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream )
return pStream;
}
-SvStream* UcbStreamHelper::CreateStream( Reference < XStream > xStream )
+SvStream* UcbStreamHelper::CreateStream( const Reference < XStream >& xStream )
{
SvStream* pStream = nullptr;
if ( xStream->getOutputStream().is() )
@@ -188,7 +188,7 @@ SvStream* UcbStreamHelper::CreateStream( Reference < XStream > xStream )
return pStream;
}
-SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream, bool bCloseStream )
+SvStream* UcbStreamHelper::CreateStream( const Reference < XInputStream >& xStream, bool bCloseStream )
{
SvStream* pStream = nullptr;
UcbLockBytesRef xLockBytes = UcbLockBytes::CreateInputLockBytes( xStream );
@@ -205,7 +205,7 @@ SvStream* UcbStreamHelper::CreateStream( Reference < XInputStream > xStream, boo
return pStream;
};
-SvStream* UcbStreamHelper::CreateStream( Reference < XStream > xStream, bool bCloseStream )
+SvStream* UcbStreamHelper::CreateStream( const Reference < XStream >& xStream, bool bCloseStream )
{
SvStream* pStream = nullptr;
if ( xStream->getOutputStream().is() )