summaryrefslogtreecommitdiff
path: root/package/source/xstor
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/xstor')
-rw-r--r--package/source/xstor/ocompinstream.cxx9
-rw-r--r--package/source/xstor/ocompinstream.hxx4
-rw-r--r--package/source/xstor/ohierarchyholder.hxx9
-rw-r--r--package/source/xstor/owriteablestream.cxx9
-rw-r--r--package/source/xstor/owriteablestream.hxx4
-rw-r--r--package/source/xstor/switchpersistencestream.cxx25
-rw-r--r--package/source/xstor/switchpersistencestream.hxx4
-rw-r--r--package/source/xstor/xstorage.cxx9
-rw-r--r--package/source/xstor/xstorage.hxx4
9 files changed, 41 insertions, 36 deletions
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index 14bfd3cab354..ef6bea3e8b06 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -25,18 +25,19 @@
#include <cppuhelper/queryinterface.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <utility>
#include "owriteablestream.hxx"
using namespace ::com::sun::star;
OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
- uno::Reference < io::XInputStream > const & xStream,
+ uno::Reference < io::XInputStream > xStream,
const uno::Sequence< beans::PropertyValue >& aProps,
sal_Int32 nStorageType )
: m_pImpl( &aImpl )
, m_xMutex( m_pImpl->m_xMutex )
-, m_xStream( xStream )
+, m_xStream(std::move( xStream ))
, m_aProperties( aProps )
, m_bDisposed( false )
, m_nStorageType( nStorageType )
@@ -48,12 +49,12 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
assert(m_xStream.is());
}
-OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > const & xStream,
+OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
const uno::Sequence< beans::PropertyValue >& aProps,
sal_Int32 nStorageType )
: m_pImpl( nullptr )
, m_xMutex( new comphelper::RefCountedMutex )
-, m_xStream( xStream )
+, m_xStream(std::move( xStream ))
, m_aProperties( aProps )
, m_bDisposed( false )
, m_nStorageType( nStorageType )
diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx
index 4001cf1187a1..effbc4be2fb8 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -50,11 +50,11 @@ protected:
public:
OInputCompStream( OWriteStream_Impl& pImpl,
- css::uno::Reference< css::io::XInputStream > const & xStream,
+ css::uno::Reference< css::io::XInputStream > xStream,
const css::uno::Sequence< css::beans::PropertyValue >& aProps,
sal_Int32 nStorageType );
- OInputCompStream( css::uno::Reference< css::io::XInputStream > const & xStream,
+ OInputCompStream( css::uno::Reference< css::io::XInputStream > xStream,
const css::uno::Sequence< css::beans::PropertyValue >& aProps,
sal_Int32 nStorageType );
diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx
index 6f32b3f404f2..e88632fdbb1d 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -31,6 +31,7 @@
#include <rtl/ref.hxx>
#include <unordered_map>
+#include <utility>
#include <vector>
class OHierarchyElement_Impl;
@@ -54,12 +55,12 @@ class OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransac
OWeakStorRefVector_Impl m_aOpenStreams;
public:
- explicit OHierarchyElement_Impl( const css::uno::Reference< css::embed::XStorage >& xStorage )
- : m_xOwnStorage( xStorage )
+ explicit OHierarchyElement_Impl( css::uno::Reference< css::embed::XStorage > xStorage )
+ : m_xOwnStorage(std::move( xStorage ))
{}
- explicit OHierarchyElement_Impl( const css::uno::WeakReference< css::embed::XStorage >& xWeakStorage )
- : m_xWeakOwnStorage( xWeakStorage )
+ explicit OHierarchyElement_Impl( css::uno::WeakReference< css::embed::XStorage > xWeakStorage )
+ : m_xWeakOwnStorage(std::move( xWeakStorage ))
{}
void Commit();
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index c9d012a61cff..001daa439c96 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -52,6 +52,7 @@
#include <tools/diagnose_ex.h>
#include <PackageConstants.hxx>
+#include <utility>
#include "selfterminatefilestream.hxx"
#include "owriteablestream.hxx"
@@ -259,17 +260,17 @@ const beans::StringPair* lcl_findPairByName(const uno::Sequence<beans::StringPai
OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
const uno::Reference< packages::XDataSinkEncrSupport >& xPackageStream,
const uno::Reference< lang::XSingleServiceFactory >& xPackage,
- const uno::Reference< uno::XComponentContext >& rContext,
+ uno::Reference< uno::XComponentContext > xContext,
bool bForceEncrypted,
sal_Int32 nStorageType,
bool bDefaultCompress,
- const uno::Reference< io::XInputStream >& xRelInfoStream )
+ uno::Reference< io::XInputStream > xRelInfoStream )
: m_xMutex( new comphelper::RefCountedMutex )
, m_pAntiImpl( nullptr )
, m_bHasDataToFlush( false )
, m_bFlushed( false )
, m_xPackageStream( xPackageStream )
-, m_xContext( rContext )
+, m_xContext(std::move( xContext ))
, m_pParent( pParent )
, m_bForceEncrypted( bForceEncrypted )
, m_bUseCommonEncryption( !bForceEncrypted && nStorageType == embed::StorageFormats::PACKAGE )
@@ -278,7 +279,7 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
, m_xPackage( xPackage )
, m_bHasInsertedStreamOptimization( false )
, m_nStorageType( nStorageType )
-, m_xOrigRelInfoStream( xRelInfoStream )
+, m_xOrigRelInfoStream(std::move( xRelInfoStream ))
, m_bOrigRelInfoBroken( false )
, m_nRelInfoStatus( RELINFO_NO_INIT )
, m_nRelId( 1 )
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 6c2b657e3160..1da7ff0a333f 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -137,11 +137,11 @@ public:
OStorage_Impl* pParent,
const css::uno::Reference< css::packages::XDataSinkEncrSupport >& xPackageStream,
const css::uno::Reference< css::lang::XSingleServiceFactory >& xPackage,
- const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
bool bForceEncrypted,
sal_Int32 nStorageType,
bool bDefaultCompress,
- const css::uno::Reference< css::io::XInputStream >& xRelInfoStream =
+ css::uno::Reference< css::io::XInputStream > xRelInfoStream =
css::uno::Reference< css::io::XInputStream >() );
~OWriteStream_Impl();
diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx
index ff9828a72b91..f4ccd452b8f9 100644
--- a/package/source/xstor/switchpersistencestream.cxx
+++ b/package/source/xstor/switchpersistencestream.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/TempFile.hpp>
#include <comphelper/storagehelper.hxx>
+#include <utility>
#include "switchpersistencestream.hxx"
using namespace ::com::sun::star;
@@ -43,17 +44,17 @@ struct SPStreamData_Impl
SPStreamData_Impl(
bool bInStreamBased,
- const uno::Reference< io::XTruncate >& xOrigTruncate,
- const uno::Reference< io::XSeekable >& xOrigSeekable,
- const uno::Reference< io::XInputStream >& xOrigInStream,
- const uno::Reference< io::XOutputStream >& xOrigOutStream,
+ uno::Reference< io::XTruncate > xOrigTruncate,
+ uno::Reference< io::XSeekable > xOrigSeekable,
+ uno::Reference< io::XInputStream > xOrigInStream,
+ uno::Reference< io::XOutputStream > xOrigOutStream,
bool bInOpen,
bool bOutOpen )
: m_bInStreamBased( bInStreamBased )
- , m_xOrigTruncate( xOrigTruncate )
- , m_xOrigSeekable( xOrigSeekable )
- , m_xOrigInStream( xOrigInStream )
- , m_xOrigOutStream( xOrigOutStream )
+ , m_xOrigTruncate(std::move( xOrigTruncate ))
+ , m_xOrigSeekable(std::move( xOrigSeekable ))
+ , m_xOrigInStream(std::move( xOrigInStream ))
+ , m_xOrigOutStream(std::move( xOrigOutStream ))
, m_bInOpen( bInOpen )
, m_bOutOpen( bOutOpen )
{
@@ -61,17 +62,17 @@ struct SPStreamData_Impl
};
SwitchablePersistenceStream::SwitchablePersistenceStream(
- const uno::Reference< uno::XComponentContext >& xContext,
+ uno::Reference< uno::XComponentContext > xContext,
const uno::Reference< io::XStream >& xStream )
-: m_xContext( xContext )
+: m_xContext(std::move( xContext ))
{
SwitchPersistenceTo( xStream );
}
SwitchablePersistenceStream::SwitchablePersistenceStream(
- const uno::Reference< uno::XComponentContext >& xContext,
+ uno::Reference< uno::XComponentContext > xContext,
const uno::Reference< io::XInputStream >& xInputStream )
-: m_xContext( xContext )
+: m_xContext(std::move( xContext ))
{
SwitchPersistenceTo( xInputStream );
}
diff --git a/package/source/xstor/switchpersistencestream.hxx b/package/source/xstor/switchpersistencestream.hxx
index f1e9ddceea96..ad0293be8110 100644
--- a/package/source/xstor/switchpersistencestream.hxx
+++ b/package/source/xstor/switchpersistencestream.hxx
@@ -58,11 +58,11 @@ class SwitchablePersistenceStream
public:
SwitchablePersistenceStream(
- const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
const css::uno::Reference< css::io::XStream >& xStream );
SwitchablePersistenceStream(
- const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ css::uno::Reference< css::uno::XComponentContext > xContext,
const css::uno::Reference< css::io::XInputStream >& xInStream );
virtual ~SwitchablePersistenceStream() override;
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index bdcd699a7eb7..bed733b10532 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -55,6 +55,7 @@
#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/ofopxmlhelper.hxx>
+#include <utility>
#include <tools/diagnose_ex.h>
#include "xstorage.hxx"
@@ -127,8 +128,8 @@ static uno::Reference< io::XInputStream > GetSeekableTempCopy( const uno::Refere
return xTempIn;
}
-SotElement_Impl::SotElement_Impl(const OUString& rName, bool bStor, bool bNew)
- : m_aOriginalName(rName)
+SotElement_Impl::SotElement_Impl(OUString aName, bool bStor, bool bNew)
+ : m_aOriginalName(std::move(aName))
, m_bIsRemoved(false)
, m_bIsInserted(bNew)
, m_bIsStorage(bStor)
@@ -220,7 +221,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > const & xStream,
OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
sal_Int32 nMode,
uno::Reference< container::XNameContainer > const & xPackageFolder,
- uno::Reference< lang::XSingleServiceFactory > const & xPackage,
+ uno::Reference< lang::XSingleServiceFactory > xPackage,
uno::Reference< uno::XComponentContext > const & xContext,
sal_Int32 nStorageType )
: m_xMutex( new comphelper::RefCountedMutex )
@@ -233,7 +234,7 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
, m_bListCreated( false )
, m_nModifiedListenerCount( 0 )
, m_xPackageFolder( xPackageFolder )
-, m_xPackage( xPackage )
+, m_xPackage(std::move( xPackage ))
, m_xContext( xContext )
, m_bHasCommonEncryptionData( false )
, m_pParent( pParent ) // can be empty in case of temporary readonly substorages and relation storage
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index 35a80e717704..1fefb8f4671a 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -88,7 +88,7 @@ struct SotElement_Impl
std::unique_ptr<OWriteStream_Impl, o3tl::default_delete<OWriteStream_Impl>> m_xStream;
public:
- SotElement_Impl(const OUString& rName, bool bStor, bool bNew);
+ SotElement_Impl(OUString aName, bool bStor, bool bNew);
};
// Main storage implementation
@@ -182,7 +182,7 @@ struct OStorage_Impl
OStorage_Impl( OStorage_Impl* pParent,
sal_Int32 nMode,
css::uno::Reference< css::container::XNameContainer > const & xPackageFolder,
- css::uno::Reference< css::lang::XSingleServiceFactory > const & xPackage,
+ css::uno::Reference< css::lang::XSingleServiceFactory > xPackage,
css::uno::Reference< css::uno::XComponentContext > const & xContext,
sal_Int32 nStorageType );