diff options
-rw-r--r-- | include/sot/stg.hxx | 2 | ||||
-rw-r--r-- | include/sot/storinfo.hxx | 5 | ||||
-rw-r--r-- | sot/source/sdstor/stg.cxx | 5 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 3 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.hxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 7 | ||||
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.cxx | 5 | ||||
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.hxx | 2 |
8 files changed, 18 insertions, 13 deletions
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx index 1cd16ac32e89..72003f08fd49 100644 --- a/include/sot/stg.hxx +++ b/include/sot/stg.hxx @@ -154,7 +154,7 @@ class UNLESS_MERGELIBS(SOT_DLLPUBLIC) Storage final : public BaseStorage, public Storage( StgIo*, StgDirEntry*, StreamMode ); virtual ~Storage() override; public: - Storage( const OUString &, StreamMode, bool bDirect ); + Storage( OUString, StreamMode, bool bDirect ); Storage( SvStream& rStrm, bool bDirect ); Storage( UCBStorageStream& rStrm, bool bDirect ); diff --git a/include/sot/storinfo.hxx b/include/sot/storinfo.hxx index 8b9866549c07..c1283cffe1a8 100644 --- a/include/sot/storinfo.hxx +++ b/include/sot/storinfo.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SOT_STORINFO_HXX #include <rtl/ustring.hxx> +#include <utility> #include <vector> #include <sot/sotdllapi.h> #include <sot/formats.hxx> @@ -38,8 +39,8 @@ class SvStorageInfo public: SvStorageInfo(const StgDirEntry&); - SvStorageInfo(const OUString& rName, sal_uInt64 nSz, bool bIsStorage) - : aName(rName) + SvStorageInfo(OUString _aName, sal_uInt64 nSz, bool bIsStorage) + : aName(std::move(_aName)) , nSize(nSz) , bStream(!bIsStorage) , bStorage(bIsStorage) diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index a874b199a856..08af343092fa 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -25,6 +25,7 @@ #include <tools/debug.hxx> #include <sot/stg.hxx> +#include <utility> #include "stgelem.hxx" #include "stgdir.hxx" #include "stgio.hxx" @@ -330,9 +331,9 @@ bool Storage::IsStorageFile( SvStream* pStream ) // a storage file, initialize it. -Storage::Storage( const OUString& rFile, StreamMode m, bool bDirect ) +Storage::Storage( OUString aFile, StreamMode m, bool bDirect ) : OLEStorageBase( new StgIo, nullptr, m_nMode ) - , aName( rFile ), bIsRoot( false ) + , aName(std::move( aFile )), bIsRoot( false ) { bool bTemp = false; if( aName.isEmpty() ) diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 892c4e705e1f..d4d629aedd11 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -28,6 +28,7 @@ #include <sal/log.hxx> #include <memory> +#include <utility> //////////////////////////// class StgDirEntry @@ -52,7 +53,7 @@ StgDirEntry::StgDirEntry( const void* pBuffer, sal_uInt32 nBufferLen, sal_uInt64 InitMembers(); } -StgDirEntry::StgDirEntry( const StgEntry& r ) : m_aEntry( r ) +StgDirEntry::StgDirEntry( StgEntry r ) : m_aEntry(std::move( r )) { InitMembers(); } diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx index 3605c27ac03d..5044dc48f313 100644 --- a/sot/source/sdstor/stgdir.hxx +++ b/sot/source/sdstor/stgdir.hxx @@ -59,7 +59,7 @@ public: bool m_bInvalid; // true: invalid entry StgDirEntry(const void* pBuffer, sal_uInt32 nBufferLen, sal_uInt64 nUnderlyingStreamSize, bool * pbOk); - explicit StgDirEntry( const StgEntry& ); + explicit StgDirEntry( StgEntry ); virtual ~StgDirEntry() override; void Invalidate( bool ); // invalidate all open entries diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index f94556edbafc..f478173d5dc5 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -64,6 +64,7 @@ #include <comphelper/classids.hxx> #include <mutex> +#include <utility> #include <vector> namespace com::sun::star::ucb { class XCommandEnvironment; } @@ -93,7 +94,7 @@ protected: std::unique_ptr<SvStream> m_pSvStream; public: - explicit FileStreamWrapper_Impl(const OUString& rName); + explicit FileStreamWrapper_Impl(OUString aName); virtual ~FileStreamWrapper_Impl() override; virtual void SAL_CALL seek( sal_Int64 _nLocation ) override; @@ -112,8 +113,8 @@ protected: } -FileStreamWrapper_Impl::FileStreamWrapper_Impl( const OUString& rName ) - : m_aURL( rName ) +FileStreamWrapper_Impl::FileStreamWrapper_Impl( OUString aName ) + : m_aURL(std::move( aName )) { // if no URL is provided the stream is empty } diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index 58bfe785fb25..49a785ed5ff9 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -35,6 +35,7 @@ #include <cppuhelper/supportsservice.hxx> #include <sot/stg.hxx> #include <sot/storinfo.hxx> +#include <utility> using namespace ::com::sun::star; @@ -42,11 +43,11 @@ const sal_Int32 nBytesCount = 32000; OLESimpleStorage::OLESimpleStorage( - css::uno::Reference<css::uno::XComponentContext> const & xContext, + css::uno::Reference<css::uno::XComponentContext> xContext, css::uno::Sequence<css::uno::Any> const &aArguments) : m_bDisposed( false ) , m_pListenersContainer( nullptr ) -, m_xContext( xContext ) +, m_xContext(std::move( xContext )) , m_bNoTemporaryCopy( false ) { sal_Int32 nArgNum = aArguments.getLength(); diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx index 765cd87caf12..eedfc81c29ac 100644 --- a/sot/source/unoolestorage/xolesimplestorage.hxx +++ b/sot/source/unoolestorage/xolesimplestorage.hxx @@ -66,7 +66,7 @@ class OLESimpleStorage : public cppu::WeakImplHelper<css::embed::XOLESimpleStora public: - OLESimpleStorage(css::uno::Reference<css::uno::XComponentContext> const & xContext, + OLESimpleStorage(css::uno::Reference<css::uno::XComponentContext> xContext, css::uno::Sequence<css::uno::Any> const &arguments); virtual ~OLESimpleStorage() override; |