sw/source/core/undo/untbl.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit a22f83249699b41317f2d6923878c369e0344598 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Wed Mar 26 15:04:02 2025 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Fri Mar 28 00:41:49 2025 +0100 tdf#133352 Undo HasDirectFormatting flag of table box With 09fc6fef2d03ca8558dd6f0eec45d61ceb282cb5 a mbDirectFormatting flag has been added to table boxes. This is now also restored in undo. Change-Id: I3b8c22c0c452be3dd4b2f203a0ac5b9fdc7488d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183347 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 183fe517ff8c..16c4c069036c 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -176,6 +176,7 @@ class SaveBox SwNodeOffset m_nStartNode; sal_Int32 m_nRowSpan; sal_uInt16 m_nItemSet; + bool m_bHasDirectFormatting : 1; union { SfxItemSets* pContentAttrs; @@ -1221,6 +1222,8 @@ SaveBox::SaveBox(SaveBox* pPrev, const SwTableBox& rBox, SaveTable& rSTable) for( size_t n = 1; n < rBox.GetTabLines().size(); ++n ) pLn = new SaveLine( pLn, *rBox.GetTabLines()[ n ], rSTable ); } + m_bHasDirectFormatting = rBox.HasDirectFormatting(); + } SaveBox::~SaveBox() @@ -1286,6 +1289,7 @@ void SaveBox::RestoreAttr( SwTableBox& rBox, SaveTable& rSTable ) { OSL_ENSURE( false, "Box not anymore at the same node" ); } + rBox.SetDirectFormatting(m_bHasDirectFormatting); } void SaveBox::SaveContentAttrs( SwDoc* pDoc )