diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-10-29 19:23:42 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:03 +0100 |
commit | d8261df866a3629d6dfdc539fa6dc649405df3fa (patch) | |
tree | 5a2ad5f39234bc8e306803542cbb39910959ef2a | |
parent | 3d59c4639ffb667e0f59cda56baef0ff29da852e (diff) |
sw_redlinehide_3: adapt SwWrtShell::NumOrBulletOn/Off
Change-Id: I5cd89bc0595f96125d58a05e01d9e33b965621fe
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 522bef90bef7..233947209bbe 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -56,6 +56,7 @@ #include <fmtftn.hxx> #include <fmthdft.hxx> #include <fmtpdsc.hxx> +#include <txtfrm.hxx> #include <wdocsh.hxx> #include <basesh.hxx> #include <swmodule.hxx> @@ -1026,8 +1027,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // check, if text node at current cursor positioned is counted. // If not, let it been counted. Then it has to be checked, // of the outline numbering has to be activated or continued. - SwTextNode* pTextNode = - GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode const*const pTextNode = sw::GetParaPropsNode( + *GetLayout(), GetCursor()->GetPoint()->nNode); if ( pTextNode && !pTextNode->IsCountedInList() ) { // check, if numbering of the outline level of the paragraph @@ -1133,7 +1134,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // do not change found numbering/bullet rule, if it should only be continued. if ( !bContinueFoundNumRule ) { - SwTextNode * pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode const*const pTextNode = sw::GetParaPropsNode( + *GetLayout(), GetCursor()->GetPoint()->nNode); if (pTextNode) { @@ -1197,7 +1199,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BUL_LEVEL ); } - const SwTextNode* pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); + const SwTextNode *const pTextNode = sw::GetParaPropsNode(*GetLayout(), + GetCursor()->GetPoint()->nNode); const SwTwips nWidthOfTabs = pTextNode ? pTextNode->GetWidthOfLeadingTabs() : 0; @@ -1306,7 +1309,7 @@ void SwWrtShell::NumOrBulletOff() SwNumRule aNumRule(*pCurNumRule); SwTextNode * pTextNode = - GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); + sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode); if (pTextNode) { @@ -1413,7 +1416,7 @@ SelectionType SwWrtShell::GetSelectionType() const if ( pNumRule ) { const SwTextNode* pTextNd = - GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); + sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode); if ( pTextNd && pTextNd->IsInList() ) { |