From 2395ae8d2ecb5b527d8856ddbce4831a6d2a7092 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 26 Aug 2013 14:59:45 +0200 Subject: fdo#33960: simplify SwNumRule::MakeRefNumString further Change-Id: Ib0e9ccb163d5132ca18142361f72376642915fcb --- sw/source/core/doc/number.cxx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 7b8d77399ace..ffd471b7a313 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -730,7 +730,6 @@ OUString SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, if ( rNodeNum.GetLevelInListTree() >= 0 ) { bool bOldHadPrefix = true; - OUString sOldPrefix; const SwNodeNum* pWorkingNodeNum( &rNodeNum ); do @@ -772,21 +771,9 @@ OUString SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, !aExtremities.nPrefixChars ) { - nStrip = 0; - while (nStrip < aExtremities.nSuffixChars) - { - ++nStrip; - } - if (nStrip) - { - aPrevStr = aPrevStr.copy(0, aPrevStr.getLength()-nStrip); - } - } - else if (!aExtremities.nSuffixChars && !bOldHadPrefix) - { - aRefNumStr = sOldPrefix + aRefNumStr; + aPrevStr = aPrevStr.copy(0, + aPrevStr.getLength() - aExtremities.nSuffixChars); } - sOldPrefix = OUString(); bOldHadPrefix = ( aExtremities.nPrefixChars > 0); -- cgit