Fix indentation

Change-Id: I8471214bb2d65d46f2123feb8ff33bf46bbba1d7
This commit is contained in:
Tor Lillqvist
2013-10-23 19:05:28 +03:00
parent 8eb7d02999
commit 56a9582981

View File

@@ -2241,65 +2241,67 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
} }
} }
} }
{
OUString aFillTxt;
sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
OUString aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
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; // No 'else' branch; why the below snippet is a block I have no idea.
if( 3 == nRet || 4 == nRet ) {
{ OUString aFillTxt;
if( bFirstFillTxt ) sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
aFillTxt = aTxt; bool bFirstFillTxt = true, bOnlyText = true;
else if( aFillTxt != aTxt ) for( n = 0; n < nTOXLvl; ++n )
aFillTxt = ""; {
bFirstFillTxt = false; OUString aTxt;
} int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
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;
if( 3 == nRet || 4 == nRet )
{
if( bFirstFillTxt )
aFillTxt = aTxt;
else if( aFillTxt != aTxt )
aFillTxt = "";
bFirstFillTxt = false;
} }
} }
if( MAXLEVEL != nNoPgStt )
{
if (WW8ListManager::nMaxLevel < nNoPgEnd)
nNoPgEnd = WW8ListManager::nMaxLevel;
sStr += "\\n ";
sStr += OUString::number( nNoPgStt );
sStr += "-";
sStr += OUString::number( nNoPgEnd );
sStr += " ";
}
if( bOnlyText )
{
sStr += "\\p \"";
sStr += aFillTxt;
sStr += sEntryEnd;
}
} }
if( MAXLEVEL != nNoPgStt )
if( !sTOption.isEmpty() )
{ {
sStr += "\\t \""; if (WW8ListManager::nMaxLevel < nNoPgEnd)
sStr += sTOption; nNoPgEnd = WW8ListManager::nMaxLevel;
sStr += "\\n ";
sStr += OUString::number( nNoPgStt );
sStr += "-";
sStr += OUString::number( nNoPgEnd );
sStr += " ";
}
if( bOnlyText )
{
sStr += "\\p \"";
sStr += aFillTxt;
sStr += sEntryEnd; sStr += sEntryEnd;
} }
}
if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl)) if( !sTOption.isEmpty() )
sStr += "\\h"; {
sStr += "\\t \"";
sStr += sTOption;
sStr += sEntryEnd;
}
if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
sStr += "\\h";
} }
break; break;
} }