summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-07 14:42:02 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:47:00 +0100
commita66c482a82629d05816fccf956804b51d9fd628c (patch)
treeeaa75359f5c09a76398c67efb28de565e74c4205
parentsw_redlinehide_3: fix comment of SwUndoRedlineDelete (diff)
downloadcore-a66c482a82629d05816fccf956804b51d9fd628c.tar.gz
core-a66c482a82629d05816fccf956804b51d9fd628c.zip
sw: parameter of SwChapterField::ChangeExpansion() is required
Change-Id: I2d992719c86ec7d0203173c6f9008cf4845b3855
-rw-r--r--sw/inc/chpfld.hxx2
-rw-r--r--sw/source/core/fields/chpfld.cxx7
-rw-r--r--sw/source/core/fields/reffld.cxx3
-rw-r--r--sw/source/core/text/txtfld.cxx2
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
5 files changed, 7 insertions, 9 deletions
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index 695a21c395c4..51c2ef040c09 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -61,7 +61,7 @@ public:
SwChapterField(SwChapterFieldType*, sal_uInt32 nFormat = 0);
// #i53420#
- void ChangeExpansion( const SwFrame*,
+ void ChangeExpansion( const SwFrame&,
const SwContentNode*,
bool bSrchNum = false);
void ChangeExpansion(const SwTextNode &rNd, bool bSrchNum);
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index 7093e940764a..b96f3e887687 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -98,18 +98,17 @@ std::unique_ptr<SwField> SwChapterField::Copy() const
}
// #i53420#
-void SwChapterField::ChangeExpansion(const SwFrame* pFrame,
+void SwChapterField::ChangeExpansion(const SwFrame & rFrame,
const SwContentNode* pContentNode,
bool bSrchNum )
{
- OSL_ENSURE( pFrame, "In which frame am I?" );
SwDoc* pDoc = const_cast<SwDoc*>(pContentNode->GetDoc());
const SwTextNode* pTextNode = dynamic_cast<const SwTextNode*>(pContentNode);
- if ( !pTextNode || !pFrame->IsInDocBody() )
+ if (!pTextNode || !rFrame.IsInDocBody())
{
SwPosition aDummyPos( pDoc->GetNodes().GetEndOfContent() );
- pTextNode = GetBodyTextNode( *pDoc, aDummyPos, *pFrame );
+ pTextNode = GetBodyTextNode( *pDoc, aDummyPos, rFrame );
}
if ( pTextNode )
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 627e41268c68..9dbc51f1d733 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -605,12 +605,11 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
SwChapterFieldType aFieldTyp;
SwChapterField aField( &aFieldTyp, 0 );
aField.SetLevel( MAXLEVEL - 1 );
- aField.ChangeExpansion( pFrame, pTextNd, true );
+ aField.ChangeExpansion( *pFrame, pTextNd, true );
m_sText = aField.GetNumber();
if (!m_sSetReferenceLanguage.isEmpty())
lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
-
}
}
break;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 52b6c57e6c10..ce9ede4c13f6 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -123,7 +123,7 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( SwTextFormatInfo &rInf,
case SwFieldIds::Chapter:
if( !bName && pSh && !pSh->Imp()->IsUpdateExpFields() )
{
- static_cast<SwChapterField*>(pField)->ChangeExpansion( pFrame,
+ static_cast<SwChapterField*>(pField)->ChangeExpansion(*pFrame,
&static_txtattr_cast<SwTextField const*>(pHint)->GetTextNode());
}
{
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index 43df06ad2e07..9ff14b6eedb6 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -368,7 +368,7 @@ ToxTextGenerator::ObtainChapterField(SwChapterFieldType* chapterFieldType,
SwChapterField retval(chapterFieldType, chapterToken->nChapterFormat);
retval.SetLevel(static_cast<sal_uInt8>(chapterToken->nOutlineLevel - 1));
// #i53420#
- retval.ChangeExpansion(contentFrame, contentNode, true);
+ retval.ChangeExpansion(*contentFrame, contentNode, true);
return retval;
}
} // end namespace sw