diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-02-14 16:18:37 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-02-15 11:28:55 +0100 |
commit | 71e8a947753d359bd5b4d1174f4d6332eaf4a309 (patch) | |
tree | d119000324342e3485b6ce7fb72885973d2e5d90 /sw | |
parent | 224369b351884e8315368cfc99620c42eb97ee15 (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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index c9ced5ea7a1d..079c8a4b1226 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -299,7 +299,7 @@ void SwFormatField::UpdateTextNode(const SfxPoolItem* pOld, const SfxPoolItem* p return; } - if( !mpTextField ) + if (!IsFieldInDoc()) return; // don't do anything, especially not expand! |