Kaydet (Commit) d8261df8 authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide_3: adapt SwWrtShell::NumOrBulletOn/Off

Change-Id: I5cd89bc0595f96125d58a05e01d9e33b965621fe
üst 3d59c463
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <fmtftn.hxx> #include <fmtftn.hxx>
#include <fmthdft.hxx> #include <fmthdft.hxx>
#include <fmtpdsc.hxx> #include <fmtpdsc.hxx>
#include <txtfrm.hxx>
#include <wdocsh.hxx> #include <wdocsh.hxx>
#include <basesh.hxx> #include <basesh.hxx>
#include <swmodule.hxx> #include <swmodule.hxx>
...@@ -1026,8 +1027,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) ...@@ -1026,8 +1027,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// check, if text node at current cursor positioned is counted. // check, if text node at current cursor positioned is counted.
// If not, let it been counted. Then it has to be checked, // If not, let it been counted. Then it has to be checked,
// of the outline numbering has to be activated or continued. // of the outline numbering has to be activated or continued.
SwTextNode* pTextNode = SwTextNode const*const pTextNode = sw::GetParaPropsNode(
GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); *GetLayout(), GetCursor()->GetPoint()->nNode);
if ( pTextNode && !pTextNode->IsCountedInList() ) if ( pTextNode && !pTextNode->IsCountedInList() )
{ {
// check, if numbering of the outline level of the paragraph // check, if numbering of the outline level of the paragraph
...@@ -1133,7 +1134,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) ...@@ -1133,7 +1134,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// do not change found numbering/bullet rule, if it should only be continued. // do not change found numbering/bullet rule, if it should only be continued.
if ( !bContinueFoundNumRule ) if ( !bContinueFoundNumRule )
{ {
SwTextNode * pTextNode = GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); SwTextNode const*const pTextNode = sw::GetParaPropsNode(
*GetLayout(), GetCursor()->GetPoint()->nNode);
if (pTextNode) if (pTextNode)
{ {
...@@ -1197,7 +1199,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum) ...@@ -1197,7 +1199,8 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
pChrFormat = GetCharFormatFromPool( RES_POOLCHR_BUL_LEVEL ); 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 const SwTwips nWidthOfTabs = pTextNode
? pTextNode->GetWidthOfLeadingTabs() ? pTextNode->GetWidthOfLeadingTabs()
: 0; : 0;
...@@ -1306,7 +1309,7 @@ void SwWrtShell::NumOrBulletOff() ...@@ -1306,7 +1309,7 @@ void SwWrtShell::NumOrBulletOff()
SwNumRule aNumRule(*pCurNumRule); SwNumRule aNumRule(*pCurNumRule);
SwTextNode * pTextNode = SwTextNode * pTextNode =
GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode);
if (pTextNode) if (pTextNode)
{ {
...@@ -1413,7 +1416,7 @@ SelectionType SwWrtShell::GetSelectionType() const ...@@ -1413,7 +1416,7 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( pNumRule ) if ( pNumRule )
{ {
const SwTextNode* pTextNd = const SwTextNode* pTextNd =
GetCursor()->GetPoint()->nNode.GetNode().GetTextNode(); sw::GetParaPropsNode(*GetLayout(), GetCursor()->GetPoint()->nNode);
if ( pTextNd && pTextNd->IsInList() ) if ( pTextNd && pTextNd->IsInList() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment