From ff8e463ab486ae863ab3a86ce957f01ed7f8af90 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 17 Jul 2017 09:53:41 +0200 Subject: loplugin:constparams in comphelper,unoidl Change-Id: I411d431bd6620c594c5dafd42af6c2a8ac285f3f Reviewed-on: https://gerrit.libreoffice.org/40042 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/accessibletexthelper.cxx | 2 +- comphelper/source/misc/backupfilehelper.cxx | 12 ++++++------ comphelper/source/misc/storagehelper.cxx | 8 ++++---- include/comphelper/accessibletexthelper.hxx | 2 +- include/comphelper/storagehelper.hxx | 6 +++--- unoidl/source/sourcetreeprovider.cxx | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index 279cb995e238..1dcf2f669eeb 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -78,7 +78,7 @@ namespace comphelper } - bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary& rBoundary, sal_Int32 nLength ) + bool OCommonAccessibleText::implIsValidBoundary( i18n::Boundary const & rBoundary, sal_Int32 nLength ) { return ( rBoundary.startPos >= 0 ) && ( rBoundary.startPos < nLength ) && ( rBoundary.endPos >= 0 ) && ( rBoundary.endPos <= nLength ); } diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 8d64ee3a3ca9..7f09fb4ef579 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -71,7 +71,7 @@ namespace return aRetval; } - sal_uInt32 createCrc32(FileSharedPtr& rCandidate, sal_uInt32 nOffset) + sal_uInt32 createCrc32(FileSharedPtr const & rCandidate, sal_uInt32 nOffset) { sal_uInt32 nCrc32(0); @@ -112,7 +112,7 @@ namespace return nCrc32; } - bool read_sal_uInt32(FileSharedPtr& rFile, sal_uInt32& rTarget) + bool read_sal_uInt32(FileSharedPtr const & rFile, sal_uInt32& rTarget) { sal_uInt8 aArray[4]; sal_uInt64 nBaseRead(0); @@ -141,7 +141,7 @@ namespace return osl_File_E_None == osl_writeFile(rHandle, static_cast(aArray), 4, &nBaseWritten) && 4 == nBaseWritten; } - bool read_OString(FileSharedPtr& rFile, OString& rTarget) + bool read_OString(FileSharedPtr const & rFile, OString& rTarget) { sal_uInt32 nLength(0); @@ -474,7 +474,7 @@ namespace } } - bool read_entry(FileSharedPtr& rFile) + bool read_entry(FileSharedPtr const & rFile) { // read maName if (!read_OString(rFile, maName)) @@ -892,7 +892,7 @@ namespace } } - bool read_entries(FileSharedPtr& rFile) + bool read_entries(FileSharedPtr const & rFile) { // read NumExtensionEntries sal_uInt32 nExtEntries(0); @@ -1249,7 +1249,7 @@ namespace return mnCrc32; } - bool read_header(FileSharedPtr& rFile) + bool read_header(FileSharedPtr const & rFile) { if (!rFile) { diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 7a1498891511..c4cc8178e298 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -495,7 +495,7 @@ static void splitPath( std::vector &rElems, static uno::Reference< embed::XStorage > LookupStorageAtPath( const uno::Reference< embed::XStorage > &xParentStorage, std::vector &rElems, sal_uInt32 nOpenMode, - LifecycleProxy &rNastiness ) + LifecycleProxy const &rNastiness ) { uno::Reference< embed::XStorage > xStorage( xParentStorage ); rNastiness.m_xBadness->push_back( xStorage ); @@ -510,7 +510,7 @@ static uno::Reference< embed::XStorage > LookupStorageAtPath( uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath( const uno::Reference< embed::XStorage > &xStorage, const OUString& rPath, sal_uInt32 nOpenMode, - LifecycleProxy &rNastiness ) + LifecycleProxy const &rNastiness ) { std::vector aElems; splitPath( aElems, rPath ); @@ -520,7 +520,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath( uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath( const uno::Reference< embed::XStorage > &xParentStorage, const OUString& rPath, sal_uInt32 nOpenMode, - LifecycleProxy &rNastiness ) + LifecycleProxy const &rNastiness ) { std::vector aElems; splitPath( aElems, rPath ); @@ -536,7 +536,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath( uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL( uno::Reference< embed::XStorage > const& xParentStorage, const OUString& rURL, sal_uInt32 const nOpenMode, - LifecycleProxy & rNastiness) + LifecycleProxy const & rNastiness) { OUString path; if (rURL.startsWithIgnoreAsciiCase("vnd.sun.star.Package:", &path)) diff --git a/include/comphelper/accessibletexthelper.hxx b/include/comphelper/accessibletexthelper.hxx index 3b633716c2b3..5a9b07e0d7d1 100644 --- a/include/comphelper/accessibletexthelper.hxx +++ b/include/comphelper/accessibletexthelper.hxx @@ -50,7 +50,7 @@ namespace comphelper css::uno::Reference < css::i18n::XBreakIterator > const & implGetBreakIterator(); css::uno::Reference < css::i18n::XCharacterClassification > const & implGetCharacterClassification(); - static bool implIsValidBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nLength ); + static bool implIsValidBoundary( css::i18n::Boundary const & rBoundary, sal_Int32 nLength ); static bool implIsValidIndex( sal_Int32 nIndex, sal_Int32 nLength ); static bool implIsValidRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex, sal_Int32 nLength ); virtual OUString implGetText() = 0; diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index 18b12178eb29..84c958fb1f23 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -181,14 +181,14 @@ public: static css::uno::Reference< css::embed::XStorage > GetStorageAtPath( const css::uno::Reference< css::embed::XStorage > &xStorage, - const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy &rNastiness ); + const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness ); static css::uno::Reference< css::io::XStream > GetStreamAtPath( const css::uno::Reference< css::embed::XStorage > &xStorage, - const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy &rNastiness ); + const OUString& aPath, sal_uInt32 nOpenMode, LifecycleProxy const &rNastiness ); static css::uno::Reference< css::io::XStream > GetStreamAtPackageURL( const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString& rURL, sal_uInt32 const nOpenMode, - LifecycleProxy & rNastiness ); + LifecycleProxy const & rNastiness ); }; } diff --git a/unoidl/source/sourcetreeprovider.cxx b/unoidl/source/sourcetreeprovider.cxx index 84a43e26284c..55dd2ac68d98 100644 --- a/unoidl/source/sourcetreeprovider.cxx +++ b/unoidl/source/sourcetreeprovider.cxx @@ -38,7 +38,7 @@ namespace { //TODO: Bad hack to work around osl::FileStatus::getFileName not determining the // original spelling of a file name (not even with // osl_FileStatus_Mask_Validate): -OUString getFileName(OUString const & uri, osl::FileStatus & status) { +OUString getFileName(OUString const & uri, osl::FileStatus const & status) { #if defined MACOSX sal_Int32 i = uri.lastIndexOf('/') + 1; OUString path; -- cgit