sw/source/filter/ww8/ww8atr.cxx | 104 +++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 53 deletions(-)
New commits: commit a3ffec6a5607cceb3dc64d565c655d4040404b84 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Oct 2 21:03:46 2013 +0300 WaE: statement alignment [loplugin] Change-Id: I8e6ca05f1d26760ed9c57f9d33f48413b94641d2 diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 6e21e56..e5fa946 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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits