From 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 6 Nov 2015 09:23:33 +0200 Subject: new loplugin: oncevar Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/basicide/basobj2.cxx | 5 +---- basctl/source/basicide/basobj3.cxx | 3 +-- basctl/source/basicide/moduldl2.cxx | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index e2a9fb781c0b..68a87ea0172e 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -296,9 +296,6 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, aName += "."; aName += pMethod->GetName(); - // language - OUString aLanguage("Basic"); - // location OUString aLocation; ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); @@ -348,7 +345,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, aScriptURL = "vnd.sun.star.script:" ; aScriptURL += aName; aScriptURL += "?language=" ; - aScriptURL += aLanguage; + aScriptURL += "Basic"; aScriptURL += "&location=" ; aScriptURL += aLocation; } diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 9edd9958f334..dceb6be61d05 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -69,11 +69,10 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName ) else { bool bValid = false; - OUString aStdMacroText( "Macro" ); sal_Int32 nMacro = 1; while ( !bValid ) { - aMacroName = aStdMacroText; + aMacroName = "Macro"; aMacroName += OUString::number( nMacro ); // test whether existing... bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) == nullptr; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index ced2c307b423..9490bed33433 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1481,13 +1481,11 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, // create library name OUString aLibName; - OUString aLibStdName( "Library" ); - //String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) ); bool bValid = false; sal_Int32 i = 1; while ( !bValid ) { - aLibName = aLibStdName + OUString::number( i ); + aLibName = "Library" + OUString::number( i ); if ( !rDocument.hasLibrary( E_SCRIPTS, aLibName ) && !rDocument.hasLibrary( E_DIALOGS, aLibName ) ) bValid = true; i++; -- cgit