sw/source/uibase/wrtsh/wrtsh1.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 30033deace805ce507c8532c51c42b9ede98db06 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 15 17:25:38 2015 +0000 Resolves: fdo#85666 when matching existing list indent use matching level Change-Id: I20bf0fa3a9b1562d46eba6321edca047cf02b128 diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 3865697..34e11b3 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1260,14 +1260,22 @@ void SwWrtShell::NumOrBulletOn(bool bNum) const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList(); if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 ) { - // #i111172# + // #i111172#/fdo#85666 // If text node is already inside a list, assure that the indents // are the same. Thus, adjust the indent change value by subtracting // indents of to be applied list style. SwTwips nIndentChange = nTxtNodeIndent + nWidthOfTabs; if ( pTxtNode->GetNumRule() ) { - const SwNumFmt aFmt( aNumRule.Get( 0 ) ); + int nLevel = pTxtNode->GetActualListLevel(); + + if (nLevel < 0) + nLevel = 0; + + if (nLevel >= MAXLEVEL) + nLevel = MAXLEVEL - 1; + + const SwNumFmt aFmt( aNumRule.Get( nLevel ) ); if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { nIndentChange -= aFmt.GetIndentAt() + aFmt.GetFirstLineIndent();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits