diff options
author | Troy Rollo <libreoffice@troy.rollo.name> | 2013-08-26 15:14:40 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-26 15:16:47 +0200 |
commit | 4760c79afe37eaa95a93f3e8ad0a2775c86359dd (patch) | |
tree | 257b6a32ab80fdaf378d58f73d99535f60bfa6cb /sw/source/core/doc | |
parent | 980cb9e125800dc29e0e37ccb6e5817881e640ae (diff) |
fdo#33960: sw: fix cross reference fields some more
Change-Id: I46f9cf4132835c10ad82c9b014e5e8647902ab5e
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/number.cxx | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 9e5be223699a..40dd9dceebc7 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -739,7 +739,6 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, if ( rNodeNum.GetLevelInListTree() >= 0 ) { bool bOldHadPrefix = true; - bool bFirstIteration = true; OUString sOldPrefix; const SwNodeNum* pWorkingNodeNum( &rNodeNum ); @@ -779,7 +778,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, aExtremities.nPrefixChars -= nStrip; } - if ((bFirstIteration || bOldHadPrefix) && + if ((bOldHadPrefix) && aExtremities.nSuffixChars && !aExtremities.nPrefixChars ) @@ -787,11 +786,6 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, int nStrip2 = aPrevStr.Len(); while (aPrevStr.Len() - nStrip2 < aExtremities.nSuffixChars) { - char const cur = aPrevStr.GetChar(nStrip2); - if (!bFirstIteration && '\t' != cur && ' ' != cur) - { - break; - } --nStrip2; } if (nStrip2 < aPrevStr.Len()) @@ -799,7 +793,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, aPrevStr.Erase(nStrip2, aPrevStr.Len() - nStrip2); } } - else if (sOldPrefix.getLength()) + else if (!aExtremities.nSuffixChars && !bOldHadPrefix) { aRefNumStr.Insert(sOldPrefix, 0); } @@ -809,11 +803,6 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, aRefNumStr.Insert( aPrevStr, 0 ); } - else if ( aRefNumStr.Len() > 0 ) - { - sOldPrefix += " "; - bOldHadPrefix = true; - } if ( bInclSuperiorNumLabels && pWorkingNodeNum->GetLevelInListTree() > 0 ) { @@ -830,7 +819,6 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, { break; } - bFirstIteration = false; } while ( pWorkingNodeNum && pWorkingNodeNum->GetLevelInListTree() >= 0 && static_cast<sal_uInt8>(pWorkingNodeNum->GetLevelInListTree()) >= nRestrictInclToThisLevel ); |