summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-10-26 17:22:48 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:47:00 +0100
commitccf6c98b13a67edcc9e9edff482f3dc214730062 (patch)
treefd6cb653d4c9124e910434cc6cca87817ecd8e98
parent01f162b7192c169c5b48029311bac766dd085168 (diff)
sw_redlinehide_3: adapt even more SwEditShell Num
IsNoNum(), GetNumLevel(), IsNumRuleStart(), GetNodeNumStart() Change-Id: I38e592835f3e6e3e7faa901e5b6533b2222fb35a
-rw-r--r--sw/source/core/edit/ednumber.cxx8
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.