diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /sw/source/core/txtnode | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/atrflyin.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index 28eb7b38e5..fbefb76fa8 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -197,7 +197,8 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) { if (SdrObject const*const pObj = pFormat->FindSdrObject()) { // tdf#123259 disconnect with *old* anchor position - static_cast<SwDrawContact*>(::GetUserCall(pObj))->DisconnectFromLayout(false); + if (SwDrawContact* pContact = static_cast<SwDrawContact*>(::GetUserCall( pObj ))) + pContact->DisconnectFromLayout(false); } } pFormat->SetFormatAttr( aAnchor ); // only set the anchor diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index cf5e1ff1cc..c499294f4f 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1700,7 +1700,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) // for all of its content. auto* pTextContentControl = static_txtattr_cast<SwTextContentControl*>( GetTextAttrAt(pAttr->GetStart(), RES_TXTATR_CONTENTCONTROL, ::sw::GetTextAttrMode::Parent)); - if (pTextContentControl) + // If the caller is SwTextNode::CopyText, we just copy an existing attribute, no need to + // correct it. + if (pTextContentControl && !(nMode & SetAttrMode::NOTXTATRCHR)) { auto& rFormatContentControl = static_cast<SwFormatContentControl&>(pTextContentControl->GetAttr()); |