summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-08 14:59:17 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-15 15:10:08 +0100
commitf1db41715ad9cc9655cc7f9bba86b822d693bb83 (patch)
tree08bcf1a74d341ae097d5615acab520cfeaab0c1e /sw/source
parent17cf1b2695e20f5120c308fd59af35e6b83b2732 (diff)
sw_redlinehide_3: adapt SwSetExpFieldType::GetSeqFieldList()
Change-Id: Iea24b3823b648066e331dc5e9789c79662727a12
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/fields/expfld.cxx11
-rw-r--r--sw/source/ui/fldui/fldref.cxx5
2 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e7b9aebfdeb0..964d9d5d150f 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -617,20 +617,25 @@ void SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField )
rField.SetSeqNumber( n );
}
-size_t SwSetExpFieldType::GetSeqFieldList( SwSeqFieldList& rList )
+size_t SwSetExpFieldType::GetSeqFieldList(SwSeqFieldList& rList,
+ SwRootFrame const*const pLayout)
{
rList.Clear();
+ IDocumentRedlineAccess const& rIDRA(GetDoc()->getIDocumentRedlineAccess());
+
SwIterator<SwFormatField,SwFieldType> aIter( *this );
for( SwFormatField* pF = aIter.First(); pF; pF = aIter.Next() )
{
const SwTextNode* pNd;
if( pF->GetTextField() &&
nullptr != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
- pNd->GetNodes().IsDocNodes() )
+ pNd->GetNodes().IsDocNodes()
+ && (!pLayout || !pLayout->IsHideRedlines()
+ || !sw::IsFieldDeletedInModel(rIDRA, *pF->GetTextField())))
{
SeqFieldLstElem aNew(
- pNd->GetExpandText(nullptr/*TODO*/),
+ pNd->GetExpandText(pLayout),
static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
rList.InsertSort( aNew );
}
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index ba94bc890781..47f5cc9b1692 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -667,7 +667,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
if(IsFieldEdit())
sOldSel.clear();
- const size_t nCnt = pType->GetSeqFieldList( aArr );
+ const size_t nCnt = pType->GetSeqFieldList(aArr, pSh->GetLayout());
for( size_t n = 0; n < nCnt; ++n )
{
bool isSubstring = MatchSubstring(aArr[ n ].sDlgEntry, filterString);
@@ -1085,7 +1085,8 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
nSubType = REF_SEQUENCEFLD;
aName = pType->GetName();
- if (pType->GetSeqFieldList(aArr) && aArr.SeekEntry(aElem, &nPos))
+ if (pType->GetSeqFieldList(aArr, pSh->GetLayout())
+ && aArr.SeekEntry(aElem, &nPos))
{
aVal = OUString::number( aArr[nPos].nSeqNo );