diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-08 07:23:55 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-08 07:23:55 +0000 |
commit | 94b980775a18d4d6c3b4224edff16f2af89ec102 (patch) | |
tree | 98e8aad9f67e53e880d0ba78079bff02c83aa214 /sw/source/core/edit/ednumber.cxx | |
parent | 6f3a2bbb9f4c14be764a7f849986ff02bcfc177a (diff) |
INTEGRATION: CWS sw30bf06 (1.26.88); FILE MERGED
2008/06/19 12:38:57 od 1.26.88.3: correction due to resynchronisation to DEV300m20
2008/06/19 10:51:36 od 1.26.88.2: RESYNC: (1.26-1.27); FILE MERGED
2008/06/16 13:41:24 od 1.26.88.1: #i90078# refactoring and consideration of new list level attribute of
methods changing the list level indent.
Diffstat (limited to 'sw/source/core/edit/ednumber.cxx')
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index dbe65b8eaa52..1e4d20855c72 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ednumber.cxx,v $ - * $Revision: 1.27 $ + * $Revision: 1.28 $ * * This file is part of OpenOffice.org. * @@ -303,7 +303,10 @@ BOOL SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const // <- #i23726# // -> #i23725# -void SwEditShell::NumIndent(short nIndent, int nLevel, BOOL bRelative) +// --> OD 2008-06-09 #i90078# +// Remove unused default parameter <nLevel> and <bRelative>. +// Adjust method name and parameter name +void SwEditShell::ChangeIndentOfAllListLevels( short nDiff ) { StartAllAction(); @@ -312,9 +315,8 @@ void SwEditShell::NumIndent(short nIndent, int nLevel, BOOL bRelative) if (pCurNumRule) { SwNumRule aRule(*pCurNumRule); - // --> OD 2005-02-18 #i42921# - correction: - // consider change of synopsis: 3rd parameter has to be -1 - aRule.Indent(nIndent, nLevel, -1, bRelative); + // --> OD 2008-06-09 #i90078# + aRule.ChangeIndent( nDiff ); // <-- // --> OD 2008-03-17 #refactorlists# @@ -326,7 +328,10 @@ void SwEditShell::NumIndent(short nIndent, int nLevel, BOOL bRelative) EndAllAction(); } -void SwEditShell::NumIndent(short nIndent, const SwPosition & rPos) +// --> OD 2008-06-09 #i90078# +// Adjust method name +void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) +// <-- { StartAllAction(); @@ -337,14 +342,24 @@ void SwEditShell::NumIndent(short nIndent, const SwPosition & rPos) SwPaM aPaM(rPos); SwTxtNode * pTxtNode = aPaM.GetNode()->GetTxtNode(); - int nLevel = -1; - int nReferenceLevel = pTxtNode->GetActualListLevel(); - - if (! IsFirstOfNumRule(aPaM)) - nLevel = nReferenceLevel; + // --> OD 2008-06-09 #i90078# +// int nLevel = -1; +// int nReferenceLevel = pTxtNode->GetActualListLevel(); +// if (! IsFirstOfNumRule(aPaM)) +// nLevel = nReferenceLevel; SwNumRule aRule(*pCurNumRule); - aRule.Indent(nIndent, nLevel, nReferenceLevel, FALSE); +// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, FALSE); + if ( IsFirstOfNumRule() ) + { + aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent ); + } + else if ( pTxtNode->GetActualListLevel() >= 0 ) + { + aRule.SetIndent( nIndent, + static_cast<USHORT>(pTxtNode->GetActualListLevel()) ); + } + // <-- // --> OD 2005-02-18 #i42921# - 3rd parameter = false in order to // suppress setting of num rule at <aPaM>. |