Kaydet (Commit) 3228cb20 authored tarafından Matteo Casalin's avatar Matteo Casalin

Remove redundant checks and unnecessary variables

Change-Id: I8552102550898e63468d64f8c2b93577b4f420b4
üst 49cda4d7
......@@ -512,33 +512,22 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
if( HasHints() )
{
bool bUnder = false;
for ( MSHORT nTmp = 0; nTmp < pHints->GetStartCount(); ++nTmp )
{
SwTxtAttr* const pTxtAttr = pHints->GetStart( nTmp );
bool bUnderSelect = false;
const SvxUnderlineItem* pItem =
static_cast<const SvxUnderlineItem*>(CharFmt::GetItem( *pTxtAttr, RES_CHRATR_UNDERLINE ));
if ( pItem )
{
bUnder = true;
bUnderSelect = pFnt->GetUnderline() == pItem->GetLineStyle();
}
if( bUnder )
{
sal_Int32 nSt = *pTxtAttr->GetStart();
sal_Int32 nEnd = *pTxtAttr->GetEnd();
const sal_Int32 nSt = *pTxtAttr->GetStart();
const sal_Int32 nEnd = *pTxtAttr->GetEnd();
if( nEnd > nSt )
{
Range aTmp( nSt, nEnd - 1 );
if( bUnder )
aUnderMulti.Select( aTmp, bUnderSelect );
const bool bUnderSelect = pFnt->GetUnderline() == pItem->GetLineStyle();
aUnderMulti.Select( Range( nSt, nEnd - 1 ), bUnderSelect );
}
bUnder = false;
}
}
}
......
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