diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-02-14 16:18:37 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-02-18 12:35:41 +0100 |
commit | 650b2d6a8c16db3ab2930177484e2f43b29a8dec (patch) | |
tree | a9f3a68d3a904f4b9fd8ab130d3cd9aad79ab2e1 /sw | |
parent | 00bf76a3f7cadefb1d9dd77fc511f7fdb8d37f73 (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)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129933
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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! |