summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-02-14 16:18:37 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-02-15 11:30:19 +0100
commit249743955cff13fdbfd7e70a6688b02651cc3e65 (patch)
tree720b49fb3678e8553756572a8f5f9cf7388a34c1
parent2567f1eb9d929efec0a4aadfe498cb6a010cf086 (diff)
tdf#146848 sw: fix assert about input field in undo nodes
These should not be updated. soffice.bin: sw/source/core/txtnode/atrfld.cxx:713: void SwTextInputField::UpdateTextNodeContent(const rtl::OUString&): Assertion `IsFieldInDoc() && "<SwTextInputField::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content."' failed. 3 SwTextInputField::UpdateTextNodeContent(rtl::OUString const&) 4 SwTextInputField::NotifyContentChange(SwFormatField&) at sw/source/core/txtnode/atrfld.cxx:669 5 SwTextField::ExpandTextField(bool) const 6 SwFormatField::UpdateTextNode(SfxPoolItem const*, SfxPoolItem const*) at sw/source/core/txtnode/atrfld.cxx:407 7 SwFormatField::SwClientNotify(SwModify const&, SfxHint const&) 10 SwFieldType::UpdateFields() (this=0x7f7ff2d654b0) at sw/source/core/fields/fldbas.cxx:220 11 sw::DocumentFieldsManager::UpdateFields(bool) 12 SwFEShell::Paste(SwDoc&, bool) at sw/source/core/frmedt/fecopy.cxx:1117 Somehow this causes testTdf139843 to go from 7 to 6 pages, but opening the bugdoc shows it as 6 pages too, not sure what's going on there. Change-Id: Ie25b2b2c4d8fd262850da31cbade5e121e9ec361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129919 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 71e8a947753d359bd5b4d1174f4d6332eaf4a309)
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index ebcdced03c52..ebbf24138cb2 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -254,7 +254,7 @@ void SwFormatField::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
return;
}
- if( !mpTextField )
+ if (!IsFieldInDoc())
return;
// don't do anything, especially not expand!