From 8ca50d20c189dda2fcc4477303ef2947c72bb01e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 16 Mar 2016 13:17:24 +0200 Subject: loplugin:constantparam in tools Change-Id: I3774661799c074561c694515baba42a375d0a077 Reviewed-on: https://gerrit.libreoffice.org/23301 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/uno/namecont.cxx | 44 ++++++++++++++++++++--------------------- basic/source/uno/scriptcont.cxx | 8 ++++---- 2 files changed, 26 insertions(+), 26 deletions(-) (limited to 'basic') diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index c0cc7ed3dfc8..5945253be971 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -588,14 +588,14 @@ static void checkAndCopyFileImpl( const INetURLObject& rSourceFolderInetObj, { INetURLObject aTargetFolderInetObj( rTargetFolderInetObj ); aTargetFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aTargetFolderInetObj.setExtension( rCheckExtension ); OUString aTargetFile = aTargetFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->exists( aTargetFile ) ) { INetURLObject aSourceFolderInetObj( rSourceFolderInetObj ); aSourceFolderInetObj.insertName( rCheckFileName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aSourceFolderInetObj.setExtension( rCheckExtension ); OUString aSourceFile = aSourceFolderInetObj.GetMainURL( INetURLObject::NO_DECODE ); xSFI->copy( aSourceFile, aTargetFile ); @@ -792,7 +792,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, { pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, (sal_Unicode)';') )); } - pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); pLibInfoInetObj->setExtension( "xlc" ); aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::NO_DECODE ); } @@ -811,7 +811,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, if( !xInput.is() && nPass == 0 ) { INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibInfoInetObj.setExtension( "xli" ); aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -873,7 +873,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aInetObj( aLibraryPath ); aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aLibDirPath ) ) { @@ -885,7 +885,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check "share" path INetURLObject aShareInetObj( maLibraryPath.getToken(0, (sal_Unicode)';') ); aShareInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aShareLibDirPath = aShareInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aShareLibDirPath ) ) { @@ -1048,10 +1048,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, // Check if Standard folder exists and is complete INetURLObject aUserBasicStandardInetObj( aUserBasicInetObj ); aUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); INetURLObject aPrevUserBasicStandardInetObj( aPrevUserBasicInetObj ); aPrevUserBasicStandardInetObj.insertName( aStandardStr, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aPrevStandardFolder = aPrevUserBasicStandardInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( mxSFI->isFolder( aPrevStandardFolder ) ) { @@ -1123,7 +1123,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aPrevUserBasicLibInfoInetObj( aUserBasicInetObj ); aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); aPrevUserBasicLibInfoInetObj.setExtension( "xlc"); OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); Sequence aInitSeq( 1 ); @@ -1329,7 +1329,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL, { // URL to library folder aStorageURL = aExpandedSourceURL; - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aInetObj.setExtension( "xlb" ); aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -1382,7 +1382,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder( SfxLibrary* pLib, const OU if( aLibDirPath.isEmpty() ) { INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); checkStorageURL( aInetObj.GetMainURL( INetURLObject::NO_DECODE ), pLib->maLibInfoFileURL, pLib->maStorageURL, pLib->maUnexpandedStorageURL ); aLibDirPath = pLib->maStorageURL; @@ -1492,7 +1492,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) @@ -1513,7 +1513,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1626,13 +1626,13 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( rLib.aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !xSFI->isFolder( aLibDirPath ) ) { xSFI->createFolder( aLibDirPath ); } - aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aInetObj.setExtension( "xlb" ); aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } @@ -2139,7 +2139,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto { // Create Output stream INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibInfoInetObj.setExtension( "xlc" ); OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -2348,7 +2348,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name ) // Delete folder if empty INetURLObject aInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); aInetObj.insertName( Name, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); try @@ -2497,7 +2497,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name ) OUString aLibDirPath = pImplLib->maStorageURL; INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -2617,7 +2617,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU INetURLObject aDestInetObj( maLibraryPath.getToken(1, (sal_Unicode)';')); aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT, - true, INetURLObject::ENCODE_ALL ); + INetURLObject::ENCODE_ALL ); OUString aDestDirPath = aDestInetObj.GetMainURL( INetURLObject::NO_DECODE ); // Store new URL @@ -2655,13 +2655,13 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); INetURLObject aElementDestInetObj( aDestDirPath ); aElementDestInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementDestInetObj.setExtension( maLibElementFileExtension ); OUString aDestElementPath( aElementDestInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -3200,7 +3200,7 @@ void SfxLibrary::impl_removeWithoutChecks( const OUString& _rElementName ) { INetURLObject aElementInetObj( maStorageURL ); aElementInetObj.insertName( _rElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( maLibElementFileExtension ); OUString aFile = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 09388fcf0e87..87a106ead62d 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -523,7 +523,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); if( bKillUncryptedFiles ) { @@ -720,7 +720,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons if( bExport ) { INetURLObject aInetObj( aTargetURL ); - aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, true, + aInetObj.insertName( aName, true, INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aLibDirPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -740,7 +740,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); @@ -1038,7 +1038,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, - INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); + INetURLObject::LAST_SEGMENT, INetURLObject::ENCODE_ALL ); aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); -- cgit