summaryrefslogtreecommitdiff
path: root/cui/source/options/optlingu.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-08 20:46:05 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-09 05:21:50 +0000
commit5f6af01f13460909e7c3819e14edb2eb04788156 (patch)
tree7254a5ded1b705b182893272c21273a472b9dd79 /cui/source/options/optlingu.cxx
parent28c251e3cc374314dc19fd772148707b0c711454 (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I19d0070c5dc54c605a7924b750eee1538bed16b3 Reviewed-on: https://gerrit.libreoffice.org/13384 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'cui/source/options/optlingu.cxx')
-rw-r--r--cui/source/options/optlingu.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 3ba056d17b17..af4e1fc0705d 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -671,10 +671,9 @@ static void lcl_MergeDisplayArray(
ServiceInfoArr &rSvcInfoArr = rData.GetDisplayServiceArray();
sal_uLong nEntries = rData.GetDisplayServiceCount();
- ServiceInfo_Impl* pEntry;
for (sal_uLong i = 0; i < nEntries; ++i)
{
- pEntry = &rSvcInfoArr[i];
+ ServiceInfo_Impl* pEntry = &rSvcInfoArr[i];
if (pEntry && pEntry->sDisplayName == rToAdd.sDisplayName)
{
if(rToAdd.xSpell.is())
@@ -887,10 +886,9 @@ void SvxLinguData_Impl::SetChecked(const Sequence<OUString>& rConfiguredServices
const OUString* pConfiguredServices = rConfiguredServices.getConstArray();
for(sal_Int32 n = 0; n < rConfiguredServices.getLength(); n++)
{
- ServiceInfo_Impl* pEntry;
for (sal_uLong i = 0; i < nDisplayServices; ++i)
{
- pEntry = &aDisplayServiceArr[i];
+ ServiceInfo_Impl* pEntry = &aDisplayServiceArr[i];
if (pEntry && !pEntry->bConfigured)
{
const OUString &rSrvcImplName = pConfiguredServices[n];
@@ -1940,11 +1938,11 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
{
if (m_pModulesCLB == pBox)
{
- bool bDisableUp = true;
- bool bDisableDown = true;
SvTreeListEntry *pEntry = pBox->GetCurEntry();
if (pEntry)
{
+ bool bDisableUp = true;
+ bool bDisableDown = true;
ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
if(!pData->IsParent() && pData->GetType() != TYPE_HYPH)
{