Kaydet (Commit) 2eeabd08 authored tarafından Jim Raykowski's avatar Jim Raykowski

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: 's avatarJim Raykowski <raykowj@gmail.com>
üst 279a1247
...@@ -600,7 +600,7 @@ bool SwTable::InsertRow_( SwDoc* pDoc, const SwSelBoxes& rBoxes, ...@@ -600,7 +600,7 @@ bool SwTable::InsertRow_( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind ); pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind );
pDoc->UpdateCharts( GetFrameFormat()->GetName() ); pDoc->UpdateCharts( GetFrameFormat()->GetName() );
pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting( pTableNd ); pDoc->GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
return true; return true;
} }
......
...@@ -300,6 +300,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext) ...@@ -300,6 +300,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext)
const SwTable* pTable = rDoc.InsertTable( aInsTableOpts, aPos, nRows, nCols, const SwTable* pTable = rDoc.InsertTable( aInsTableOpts, aPos, nRows, nCols,
nAdjust, nAdjust,
pAutoFormat.get(), pColWidth.get() ); pAutoFormat.get(), pColWidth.get() );
rDoc.GetEditShell()->MoveTable( GotoPrevTable, fnTableStart );
static_cast<SwFrameFormat*>(pTable->GetFrameFormat())->SetName( sTableNm ); static_cast<SwFrameFormat*>(pTable->GetFrameFormat())->SetName( sTableNm );
SwTableNode* pTableNode = rDoc.GetNodes()[nSttNode]->GetTableNode(); SwTableNode* pTableNode = rDoc.GetNodes()[nSttNode]->GetTableNode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment