diff options
author | Jim Raykowski <raykowj@gmail.com> | 2018-09-07 00:41:54 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2018-12-03 21:56:58 +0100 |
commit | 2eeabd08acda37502e65730843641870fa2eed39 (patch) | |
tree | 4a0a9efd57cd5c5b24fef9ed9a319ae7a24c2fa8 /sw | |
parent | 279a1247671414413cd3a95963ab590e40dbde7d (diff) |
tdf#117189 Fix table insert row redo
When a table does not have the cursor the code that inserts rows/cols
ignores the table style. This fix approach moves the cursor into the
table when restored with redo.
Change-Id: Icbcdcd8fb931807267f24752c8af36da180735ca
Reviewed-on: https://gerrit.libreoffice.org/60132
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index bf9a838bdb47..0ed10597c2e7 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -600,7 +600,7 @@ bool SwTable::InsertRow_( SwDoc* pDoc, const SwSelBoxes& rBoxes, pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind ); pDoc->UpdateCharts( GetFrameFormat()->GetName() ); - pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting( pTableNd ); + pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting(); return true; } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index d7da17c38d1d..7375489253a5 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -300,6 +300,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext) const SwTable* pTable = rDoc.InsertTable( aInsTableOpts, aPos, nRows, nCols, nAdjust, pAutoFormat.get(), pColWidth.get() ); + rDoc.GetEditShell()->MoveTable( GotoPrevTable, fnTableStart ); static_cast<SwFrameFormat*>(pTable->GetFrameFormat())->SetName( sTableNm ); SwTableNode* pTableNode = rDoc.GetNodes()[nSttNode]->GetTableNode(); |