diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /basctl | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 5 | ||||
-rw-r--r-- | basctl/source/basicide/basobj3.cxx | 3 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 4 |
3 files changed, 3 insertions, 9 deletions
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++; |