summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-10-29 19:23:42 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:47:00 +0100
commita497796a21a4013ea975b440e572ae9712447aa3 (patch)
treeb9dbc7cc393a11c84474eae354249410e46526e0
parent35c2e10277abaa10c925afdbc0a2546d6329775b (diff)
sw_redlinehide_3: adapt SwWrtShell::NumOrBulletOn/Off
Change-Id: I5cd89bc0595f96125d58a05e01d9e33b965621fe
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx15
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() )
{