diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-30 23:01:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-30 23:20:24 +0200 |
commit | 7b042d2865c5bb2c2dde1dd47de124bc0df61ae8 (patch) | |
tree | b409bf7c5e0ffcc97667bbfd67f6012c6b4475f0 /sw/source/core/docnode | |
parent | ee8c883d8d65f77ec0dbd27948cbc49f30986cc6 (diff) |
tdf#98226: fix undo of table AutoFormat
The new call to SwTable::SetTableStyleName() was not recorded in
SwUndoTableAutoFormat and hence persisted even after Undo.
(regression from 73f4a06c0bce51c7c8b9ae9adfdc7ffac27d06b4)
Change-Id: Ia7f769dafa62f02ff8e4b0596b48266190c7a69b
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 2b92de276c45..01752deb6de6 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3742,7 +3742,7 @@ static bool lcl_SetAFormatBox(FndBox_ & rBox, SetAFormatTabPara *pSetPara, bool return true; } -bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat& rNew, bool bResetDirect) +bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat& rNew, bool bResetDirect, bool const isSetStyleName) { OSL_ENSURE( !rBoxes.empty(), "No valid Box list" ); SwTableNode* pTableNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode()); @@ -3781,6 +3781,11 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat GetIDocumentUndoRedo().DoUndo(false); } + if (isSetStyleName) + { // tdf#98226 do this here where undo can record it + pTableNd->GetTable().SetTableStyleName(rNew.GetName()); + } + rNew.RestoreTableProperties(table); SetAFormatTabPara aPara( rNew ); |