summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-23 19:05:28 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-23 19:05:28 +0300
commit56a9582981d3cae0b74fc0c75b2aa94ca3cae26c (patch)
tree8830bb1d22e550864c482201a1b6392cb4dbbdc8
parent8eb7d02999b7f40bc364ebcd61ebd454c04aef2b (diff)
Fix indentation
Change-Id: I8471214bb2d65d46f2123feb8ff33bf46bbba1d7
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx100
1 files changed, 51 insertions, 49 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 40214b91bce3..a068f77fb225 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -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;
- if( 3 == nRet || 4 == nRet )
- {
- if( bFirstFillTxt )
- aFillTxt = aTxt;
- else if( aFillTxt != aTxt )
- aFillTxt = "";
- bFirstFillTxt = false;
- }
- }
- }
- if( MAXLEVEL != nNoPgStt )
+ // No 'else' branch; why the below snippet is a block I have no idea.
+ {
+ 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 )
{
- if (WW8ListManager::nMaxLevel < nNoPgEnd)
- nNoPgEnd = WW8ListManager::nMaxLevel;
- sStr += "\\n ";
- sStr += OUString::number( nNoPgStt );
- sStr += "-";
- sStr += OUString::number( nNoPgEnd );
- sStr += " ";
+ bOnlyText = false;
+ if( MAXLEVEL == nNoPgStt )
+ nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
- if( bOnlyText )
+ else
{
- sStr += "\\p \"";
- sStr += aFillTxt;
- sStr += sEntryEnd;
+ 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( !sTOption.isEmpty() )
+ 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 += "\\t \"";
- sStr += sTOption;
+ sStr += "\\p \"";
+ sStr += aFillTxt;
sStr += sEntryEnd;
}
+ }
+
+ if( !sTOption.isEmpty() )
+ {
+ sStr += "\\t \"";
+ sStr += sTOption;
+ sStr += sEntryEnd;
+ }
- if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
- sStr += "\\h";
+ if (lcl_IsHyperlinked(pTOX->GetTOXForm(), nTOXLvl))
+ sStr += "\\h";
}
break;
}