diff options
Diffstat (limited to 'sw/source/core/doc/DocumentFieldsManager.cxx')
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 134d8cab9968..b696734c6899 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -1052,6 +1052,17 @@ void DocumentFieldsManager::UpdateExpFieldsImpl( } continue; } + ::sw::mark::IBookmark *const pBookmark( + const_cast<::sw::mark::IBookmark *>(it->GetBookmark())); + if (pBookmark) + { + SwSbxValue const aValue(aCalc.Calculate(pBookmark->GetHideCondition())); + if (!aValue.IsVoidValue()) + { + pBookmark->Hide(aValue.GetBool()); + } + continue; + } SwTextField* pTextField = const_cast<SwTextField*>(it->GetTextField()); if( !pTextField ) @@ -1743,7 +1754,7 @@ SwTextField * DocumentFieldsManager::GetTextFieldAtPos(const SwPosition & rPos) SwTextNode * const pNode = rPos.nNode.GetNode().GetTextNode(); return (pNode != nullptr) - ? pNode->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true ) + ? pNode->GetFieldTextAttrAt(rPos.nContent.GetIndex(), ::sw::GetTextAttrMode::Default) : nullptr; } |