summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-02 21:03:46 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-02 21:03:46 +0300
commita3ffec6a5607cceb3dc64d565c655d4040404b84 (patch)
tree322b595bcfa9aab5e025412c698f54ddb628879f
parent5017ccda02e755eb1986bf6f16b7e847199946ed (diff)
WaE: statement alignment [loplugin]
Change-Id: I8e6ca05f1d26760ed9c57f9d33f48413b94641d2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx104
1 files changed, 51 insertions, 53 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 6e21e56cabb0..e5fa946110ad 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -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;
- 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 )
- {
- bOnlyText = false;
- if( MAXLEVEL == nNoPgStt )
- nNoPgStt = static_cast< sal_uInt8 >(n+1);
- }
- else
- {
- if( MAXLEVEL != nNoPgStt &&
- MAXLEVEL == nNoPgEnd )
- 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;
- 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 )
+ bOnlyText = bOnlyText && 3 == nRet;
+ if( 3 == nRet || 4 == nRet )
{
- sStr.AppendAscii( "\\p \"" );
- sStr += aFillTxt;
- sStr.AppendAscii(sEntryEnd);
+ 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 \"" );
+ sStr += aFillTxt;
+ sStr.AppendAscii(sEntryEnd);
+ }
- if( sTOption.Len() )
- {
- sStr.AppendAscii( "\\t \"" );
- sStr += sTOption;
- sStr.AppendAscii(sEntryEnd);
- }
-
- if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
- sStr.AppendAscii("\\h");
+ if( sTOption.Len() )
+ {
+ sStr.AppendAscii( "\\t \"" );
+ sStr += sTOption;
+ sStr.AppendAscii(sEntryEnd);
}
+
+ if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
+ sStr.AppendAscii("\\h");
+ }
break;
}
}