diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 558874ad1784..089f35c188d6 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -377,7 +377,24 @@ void SwFormatField::UpdateTextNode(const SfxPoolItem* pOld, const SfxPoolItem* p pTextNd->TriggerNodeUpdate(sw::LegacyModifyHint(pNodeOld, pNodeNew)); if(bExpand) { - mpTextField->ExpandTextField( pOld == nullptr && pNew == nullptr ); + bool bForceNotify = pOld == nullptr && pNew == nullptr; + if (bForceNotify) + { + // Force notify was added for conditional text fields, at least the title fields needs + // no forced notify. + const SwField* pField = mpTextField->GetFormatField().GetField(); + const SwFieldIds nWhich = pField->GetTyp()->Which(); + if (nWhich == SwFieldIds::DocInfo) + { + auto pDocInfoField = static_cast<const SwDocInfoField*>(pField); + if (pDocInfoField->GetSubType() == nsSwDocInfoSubType::DI_TITLE) + { + bForceNotify = false; + } + } + } + + mpTextField->ExpandTextField(bForceNotify); } } |