Kaydet (Commit) 90b086e4 authored tarafından Michael Weghorn's avatar Michael Weghorn Kaydeden (comit) Noel Grandin

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/17923Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst b712b1f6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment