Kaydet (Commit) 7eb8df24 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

clean up and reduce indent levels

Change-Id: I35b66d310d411683c70687b762eadfeecb016275
üst 071148be
......@@ -352,35 +352,31 @@ sal_Int32 lcl_GetCountOrName2<SFX_STYLE_FAMILY_CHAR>(const SwDoc &rDoc, OUString
}
template<>
sal_Int32 lcl_GetCountOrName2<SFX_STYLE_FAMILY_PARA>(const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
sal_Int32 lcl_GetCountOrName2<SFX_STYLE_FAMILY_PARA>(const SwDoc &rDoc, OUString* pString, sal_Int32 nIndex)
{
sal_Int32 nCount = 0;
const sal_Int32 nBaseCount =
constexpr sal_Int32 nBaseCount =
RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN +
RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN +
RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN +
RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN +
RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN +
RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN;
nIndex = nIndex - nBaseCount;
const size_t nArrLen = rDoc.GetTextFormatColls()->size();
for ( size_t i = 0; i < nArrLen; ++i )
nIndex -= nBaseCount;
sal_Int32 nCount = 0;
for(auto pColl : *rDoc.GetTextFormatColls())
{
SwTextFormatColl * pColl = (*rDoc.GetTextFormatColls())[i];
if ( pColl->IsDefault() )
if(pColl->IsDefault())
continue;
if ( IsPoolUserFormat ( pColl->GetPoolFormatId() ) )
{
if ( nIndex == nCount )
if(!IsPoolUserFormat(pColl->GetPoolFormatId()))
continue;
if(nIndex == nCount)
{
*pString = pColl->GetName();
break;
}
nCount++;
}
++nCount;
}
nCount += nBaseCount;
return nCount;
return nCount + nBaseCount;
}
template<>
......
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