summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-08-22 14:31:09 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-08-23 06:03:38 +0000
commit90b086e480a83c62edafaf13bdf4a02079a7860c (patch)
tree0fbcb44446037f7f239b77585b5217ee8ca99681 /sc
parentb712b1f63492a311e4a51cffd516b3e202a140e6 (diff)
tdf#39440 reduce variable scope, adapt indentation
This addresses a cppcheck "variableScope" warning and adapts the indentation of some code lines according to the surrounding code. Change-Id: I76eca59a808740ab0366dd41c889a6ef19a2436d Reviewed-on: https://gerrit.libreoffice.org/17923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/navipi/content.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 5dd7d765b7db..204e312b75be 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -154,7 +154,6 @@ void ScContentTree::dispose()
// helper function for GetEntryAltText and GetEntryLongDescription
OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltText) const
{
- SdrObject* pFound = NULL;
sal_uInt16 nType;
sal_uLong nChild;
@@ -165,6 +164,7 @@ OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltT
case SC_CONTENT_GRAPHIC:
case SC_CONTENT_DRAWING:
{
+ SdrObject* pFound = NULL;
ScDocument* pDoc = ( const_cast< ScContentTree* >(this) )->GetSourceDocument();
SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
@@ -192,13 +192,13 @@ OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltT
}
}
}
- if( pFound )
- {
+ if( pFound )
+ {
if( isAltText )
return pFound->GetTitle();
else
return pFound->GetDescription();
- }
+ }
}
break;
}