summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ndtxt.hxx2
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
3 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 42360271e808..c77e062d80cd 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -512,7 +512,7 @@ public:
@retval true This text node has a number.
@retval false else
*/
- bool HasNumber() const;
+ bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
/** Returns if this text node has a bullet.
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 33552038ba40..9d25550fab38 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -797,7 +797,7 @@ static std::pair<OUString, bool> MakeRefNumStr(
SwTextNode const& rTextNodeOfReferencedItem(pLayout
? *sw::GetParaPropsNode(*pLayout, i_rTextNodeOfReferencedItem)
: i_rTextNodeOfReferencedItem);
- if ( rTextNodeOfReferencedItem.HasNumber() &&
+ if ( rTextNodeOfReferencedItem.HasNumber(pLayout) &&
rTextNodeOfReferencedItem.IsCountedInList() )
{
OSL_ENSURE( rTextNodeOfReferencedItem.GetNum(pLayout),
@@ -821,7 +821,7 @@ static std::pair<OUString, bool> MakeRefNumStr(
== rTextNodeOfReferencedItem.FindFooterStartNode() )
{
const SwNodeNum* pNodeNumForTextNodeOfField( nullptr );
- if ( rTextNodeOfField.HasNumber() &&
+ if ( rTextNodeOfField.HasNumber(pLayout) &&
rTextNodeOfField.GetNumRule() == rTextNodeOfReferencedItem.GetNumRule() )
{
pNodeNumForTextNodeOfField = rTextNodeOfField.GetNum(pLayout);
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 5134d7672fa2..2fefd8b42f50 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3045,11 +3045,11 @@ sal_uInt16 lcl_BoundListLevel(const int nActualLevel)
}
// -> #i29560#
-bool SwTextNode::HasNumber() const
+bool SwTextNode::HasNumber(SwRootFrame const*const pLayout) const
{
bool bResult = false;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
+ const SwNumRule *const pRule = GetNum(pLayout) ? GetNum(pLayout)->GetNumRule() : nullptr;
if ( pRule )
{
const SwNumFormat& aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel())));