diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-10-26 17:22:48 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:03 +0100 |
commit | 6b3d7e1d10912c7ed5d12256e6d02cbe414b3e50 (patch) | |
tree | d7f6fc608a9f2c18e2ed39abcdd40921ba8d96b6 | |
parent | 4d472b9b80a5c62338b7f080d5654d741c75e532 (diff) |
sw_redlinehide_3: adapt even more SwEditShell Num
IsNoNum(), GetNumLevel(), IsNumRuleStart(), GetNodeNumStart()
Change-Id: I38e592835f3e6e3e7faa901e5b6533b2222fb35a
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 5d23d06109e7..dd32c7a49efb 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -667,7 +667,7 @@ bool SwEditShell::IsNoNum( bool bChkStart ) const && !HasSelection() && ( !bChkStart || IsSttPara() ) ) { - const SwTextNode* pTextNd = GetCursor()->GetNode().GetTextNode(); + const SwTextNode* pTextNd = sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode); if ( pTextNd != nullptr ) { bResult = !pTextNd->IsCountedInList(); @@ -683,7 +683,7 @@ sal_uInt8 SwEditShell::GetNumLevel() const sal_uInt8 nLevel = MAXLEVEL; SwPaM* pCursor = GetCursor(); - const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); + const SwTextNode *const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->nNode); OSL_ENSURE( pTextNd, "GetNumLevel() without text node" ); if ( pTextNd == nullptr ) @@ -839,7 +839,7 @@ void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM ) bool SwEditShell::IsNumRuleStart( SwPaM* pPaM ) const { SwPaM* pCursor = pPaM ? pPaM : GetCursor( ); - const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); + const SwTextNode *const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->nNode); return pTextNd && pTextNd->IsListRestart(); } @@ -872,7 +872,7 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt ) sal_uInt16 SwEditShell::GetNodeNumStart( SwPaM* pPaM ) const { SwPaM* pCursor = pPaM ? pPaM : GetCursor(); - const SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); + const SwTextNode *const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->nNode); // correction: check, if list restart value is set at text node and // use new method <SwTextNode::GetAttrListRestartValue()>. // return USHRT_MAX, if no list restart value is found. |