Fixes the following scenario:
1. Create a paragraph style "S" bound to a list style.
2. Set the Heading 2 next style to "S".
3. Pressing ENTER at the end of a Heading 2 will create the new
paragraph, but its numbering level will be set to 2.
If this test is repeated for "Heading 3", the resulting paragraph
will end up with numbering level == 3.
---
sw/source/core/txtnode/ndtxt.cxx | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 62caad9..5fbea95 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -365,6 +365,8 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
{
+ bool parentIsOutline = IsOutline();
+
// lege den Node "vor" mir an
const xub_StrLen nSplitPos = rPos.nContent.GetIndex();
const xub_StrLen nTxtLen = m_Text.Len();
@@ -386,7 +388,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
ResetAttr( RES_PARATR_LIST_ISRESTART );
ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- if ( GetNumRule() == 0 )
+ if ( GetNumRule() == 0 || (parentIsOutline && !IsOutline()) )
{
ResetAttr( RES_PARATR_LIST_ID );
ResetAttr( RES_PARATR_LIST_LEVEL );
--
1.7.2.3
Context
- [Libreoffice] [PATCH] sw: reset num level on SplitNode if parent is outline. · Octavio Alvarez
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.