summaryrefslogtreecommitdiff
path: root/basic/source/classes
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-19 16:02:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 07:50:06 +0200
commit6ee9f2c188290ba8a8bc6d435f645b31a05783ea (patch)
tree60a58e7c8995d64f3b22cf228480284172b6a17c /basic/source/classes
parent9c2b43e86fbb7612a58f6e55bc429f674977d6dd (diff)
loplugin:oncevar accessibility..basic
Change-Id: I8fb41b658ef0f6ad1774ea897eace3dc9bb12de6 Reviewed-on: https://gerrit.libreoffice.org/38969 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes')
-rw-r--r--basic/source/classes/sb.cxx6
-rw-r--r--basic/source/classes/sbunoobj.cxx7
-rw-r--r--basic/source/classes/sbxmod.cxx8
3 files changed, 7 insertions, 14 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 3f59b63118ff..9e6e32a0d02a 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -511,8 +511,7 @@ SbxObject* SbFormFactory::CreateObject( const OUString& rClassName )
if( bInitState )
{
// Not the first instantiate, reset
- bool bTriggerTerminateEvent = false;
- pFormModule->ResetApiObj( bTriggerTerminateEvent );
+ pFormModule->ResetApiObj( false/*bTriggerTerminateEvent*/ );
pFormModule->setInitState( false );
}
else
@@ -747,8 +746,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
}
else if( aObjClass.equalsIgnoreAsciiCase( "Collection" ) )
{
- OUString aCollectionName("Collection");
- BasicCollection* pNewCollection = new BasicCollection( aCollectionName );
+ BasicCollection* pNewCollection = new BasicCollection( "Collection" );
pNewCollection->SetName( pProp->GetName() );
pNewCollection->SetParent( pClassModule->pParent );
pNewProp->PutObject( pNewCollection );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index f102e4efa694..7b755de3ee16 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2221,8 +2221,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else if( bInvocation && pParams && mxInvocation.is() )
{
- bool bOLEAutomation = true;
- processAutomationParams( pParams, args, bOLEAutomation, nParamCount );
+ processAutomationParams( pParams, args, true/*bOLEAutomation*/, nParamCount );
}
// call the method
@@ -2529,9 +2528,7 @@ SbxInfo* SbUnoMethod::GetInfo()
const ParamInfo& rInfo = pParamInfos[i];
OUString aParamName = rInfo.aName;
- SbxDataType t = SbxVARIANT;
- SbxFlagBits nFlags_ = SbxFlagBits::Read;
- pInfo->AddParam( aParamName, t, nFlags_ );
+ pInfo->AddParam( aParamName, SbxVARIANT, SbxFlagBits::Read );
}
}
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index cea279f14b7a..d56894fffe3d 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1999,7 +1999,7 @@ bool SbMethod::LoadData( SvStream& rStrm, sal_uInt16 nVer )
if (nFlag & 0x8000)
{
sal_uInt16 nMult = nFlag & 0x7FFF;
- sal_Int16 nMax = std::numeric_limits<sal_Int16>::max();
+ sal_Int16 const nMax = std::numeric_limits<sal_Int16>::max();
nStart = nMult * nMax + nTempStart;
}
else
@@ -2559,12 +2559,11 @@ void SbUserFormModule::Unload()
SAL_INFO("basic", "** Unload() ");
sal_Int8 nCancel = 0;
- sal_Int8 nCloseMode = ::ooo::vba::VbQueryClose::vbFormCode;
Sequence< Any > aParams;
aParams.realloc(2);
aParams[0] <<= nCancel;
- aParams[1] <<= nCloseMode;
+ aParams[1] <<= sal_Int8(::ooo::vba::VbQueryClose::vbFormCode);
triggerMethod( "Userform_QueryClose", aParams);
@@ -2609,8 +2608,7 @@ void SbUserFormModule::InitObject()
{
try
{
- OUString aHook("VBAGlobals");
- SbUnoObject* pGlobs = static_cast<SbUnoObject*>(GetParent()->Find( aHook, SbxClassType::DontCare ));
+ SbUnoObject* pGlobs = static_cast<SbUnoObject*>(GetParent()->Find( "VBAGlobals", SbxClassType::DontCare ));
if ( m_xModel.is() && pGlobs )
{
// broadcast INITIALIZE_USERFORM script event before the dialog is created