diff options
Diffstat (limited to 'svx/source/table/svdotable.cxx')
-rw-r--r-- | svx/source/table/svdotable.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 4c51d4149465..ef58d32b4a5b 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1768,18 +1768,19 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) void SdrTableObj::EndTextEdit(SdrOutliner& rOutl) { - if(rOutl.IsModified()) + + if (GetModel() && GetModel()->IsUndoEnabled() && !mpImpl->maUndos.empty()) { - if( GetModel() && GetModel()->IsUndoEnabled() ) - { - // These actions should be on the undo stack after text edit. - for (std::unique_ptr<SdrUndoAction>& pAction : mpImpl->maUndos) - GetModel()->AddUndo(pAction.release()); - mpImpl->maUndos.clear(); + // These actions should be on the undo stack after text edit. + for (std::unique_ptr<SdrUndoAction>& pAction : mpImpl->maUndos) + GetModel()->AddUndo(pAction.release()); + mpImpl->maUndos.clear(); - GetModel()->AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*this) ); - } + GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*this)); + } + if(rOutl.IsModified()) + { OutlinerParaObject* pNewText = nullptr; Paragraph* p1stPara = rOutl.GetParagraph( 0 ); sal_Int32 nParaAnz = rOutl.GetParagraphCount(); |