diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-28 13:07:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-28 15:26:48 +0100 |
commit | 6b85f012ff816533299fb35707825c9f9eb652bb (patch) | |
tree | e9dcd0b8d45aa254910bf6516524b85443a51c18 /sw/source | |
parent | ea24f2356211530e5ee3517d7e5c764e06d751f2 (diff) |
we can deindent this and make it conditional
given that we return early on the opposite condition
no logic change intended, git diff -w is your friend
Change-Id: I37b7db3a1d092ffbe0ef41561982555f6b6d3bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177482
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 10011c858a5d..146e6ada4c7c 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -706,24 +706,21 @@ OUString SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, if (bUseChkStr) return sChkStr; - if( !bUseChkStr ) + // All Numbers have been flagged accordingly, so get the right Number + nNum = mpSectionFormatTable->size(); + for( SwSectionFormats::size_type n = 0; n < nFlagSize; ++n ) { - // All Numbers have been flagged accordingly, so get the right Number - nNum = mpSectionFormatTable->size(); - for( SwSectionFormats::size_type n = 0; n < nFlagSize; ++n ) + sal_uInt8 nTmp = pSetFlags[ n ]; + if( nTmp != 0xff ) { - sal_uInt8 nTmp = pSetFlags[ n ]; - if( nTmp != 0xff ) + // so get the Number + nNum = n * 8; + while( nTmp & 1 ) { - // so get the Number - nNum = n * 8; - while( nTmp & 1 ) - { - ++nNum; - nTmp >>= 1; - } - break; + ++nNum; + nTmp >>= 1; } + break; } } return aName + OUString::number( ++nNum ); |