diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-06-07 17:20:34 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-07 23:46:25 +0200 |
commit | 9870ff897f088563426bee9567dd9cb722c2b929 (patch) | |
tree | c866e06843abb25245d093cbee046521926a8d9e /sd | |
parent | 8aae7e4bc8dee27bc9dce3f1478777beeeb76e2f (diff) |
Related: tdf#111522 svx: fix crash with view1 doing textedit and resize/rotate
The two actually affected functions are SdrEditView::RotateMarkedObj()
and SdrDragObjOwn::EndSdrDrag(), but it looks like the other functions
in SdrEditView are safe to be changed the same way.
I expect IsUndoEnabled() can't be changed, though: that would mean there
would be no undo for the text edit itself, either.
If other actions still crash, the pattern is the same: put a breakpoint
on the SdrUndoAction constructor and see the backtrace to find the
function that calls IsUndoEnabled() without calling CanDoSdrUndo() at
the same time.
Change-Id: If9324e311ec6e9f68a951559e903e14bb72ea31c
Reviewed-on: https://gerrit.libreoffice.org/73669
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/uiimpress.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 910f4a9dd0c3..2d3710faa7ed 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -93,6 +93,13 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf111522) // Without the accompanying fix in place, this test would have failed with an assertion failure // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not nullptr. pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON); + + // Rotate the shape in window 2 & undo. + pView2->MarkObj(pShape2, pView2->GetSdrPageView()); + pView2->RotateMarkedObj(pShape2->GetLastBoundRect().Center(), /*nAngle=*/45); + // Without the accompanying fix in place, this test would have failed with an assertion failure + // in SdrObjEditView::SdrEndTextEdit() as mpOldTextEditUndoManager was not nullptr. + pViewShell2->GetViewFrame()->GetDispatcher()->Execute(SID_UNDO, SfxCallMode::SYNCHRON); } CPPUNIT_PLUGIN_IMPLEMENT(); |