diff options
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index ebcdced03c52..d5f76f7ce4bd 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -314,7 +314,23 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } } - const bool bForceNotify = (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 ); } |