Kaydet (Commit) a3ffec6a authored tarafından Tor Lillqvist's avatar Tor Lillqvist

WaE: statement alignment [loplugin]

Change-Id: I8e6ca05f1d26760ed9c57f9d33f48413b94641d2
üst 5017ccda
...@@ -2234,66 +2234,64 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) ...@@ -2234,66 +2234,64 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
} }
} }
String aFillTxt;
sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
String aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{ {
String aFillTxt; bOnlyText = false;
sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL; if( MAXLEVEL == nNoPgStt )
bool bFirstFillTxt = true, bOnlyText = true; nNoPgStt = static_cast< sal_uInt8 >(n+1);
for( n = 0; n < nTOXLvl; ++n ) }
{ else
String aTxt; {
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(), if( MAXLEVEL != nNoPgStt &&
static_cast< sal_uInt8 >(n+1), aTxt ); MAXLEVEL == nNoPgEnd )
if( 1 == nRet ) nNoPgEnd = sal_uInt8(n);
{
bOnlyText = false;
if( MAXLEVEL == nNoPgStt )
nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
else
{
if( MAXLEVEL != nNoPgStt &&
MAXLEVEL == nNoPgEnd )
nNoPgEnd = sal_uInt8(n);
bOnlyText = bOnlyText && 3 == nRet; bOnlyText = bOnlyText && 3 == nRet;
if( 3 == nRet || 4 == nRet ) if( 3 == nRet || 4 == nRet )
{
if( bFirstFillTxt )
aFillTxt = aTxt;
else if( aFillTxt != aTxt )
aFillTxt.Erase();
bFirstFillTxt = false;
}
}
}
if( MAXLEVEL != nNoPgStt )
{
if (WW8ListManager::nMaxLevel < nNoPgEnd)
nNoPgEnd = WW8ListManager::nMaxLevel;
sStr.AppendAscii( "\\n " );
sStr += OUString::number( nNoPgStt );
sStr += '-';
sStr += OUString::number( nNoPgEnd );
sStr += ' ';
}
if( bOnlyText )
{ {
sStr.AppendAscii( "\\p \"" ); if( bFirstFillTxt )
sStr += aFillTxt; aFillTxt = aTxt;
sStr.AppendAscii(sEntryEnd); else if( aFillTxt != aTxt )
aFillTxt.Erase();
bFirstFillTxt = false;
} }
} }
}
if( MAXLEVEL != nNoPgStt )
{
if (WW8ListManager::nMaxLevel < nNoPgEnd)
nNoPgEnd = WW8ListManager::nMaxLevel;
sStr.AppendAscii( "\\n " );
sStr += OUString::number( nNoPgStt );
sStr += '-';
sStr += OUString::number( nNoPgEnd );
sStr += ' ';
}
if( bOnlyText )
{
sStr.AppendAscii( "\\p \"" );
sStr += aFillTxt;
sStr.AppendAscii(sEntryEnd);
}
if( sTOption.Len() ) if( sTOption.Len() )
{ {
sStr.AppendAscii( "\\t \"" ); sStr.AppendAscii( "\\t \"" );
sStr += sTOption; sStr += sTOption;
sStr.AppendAscii(sEntryEnd); sStr.AppendAscii(sEntryEnd);
}
if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
sStr.AppendAscii("\\h");
} }
if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
sStr.AppendAscii("\\h");
}
break; 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