summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-06-07 17:20:34 +0200
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2019-06-10 15:46:11 +0200
commit507771e499cf3ea658781d4e044ea4400888e3a6 (patch)
treec287c6f0fa41ee97dcd73847e6ef75c43ccc2997 /sd
parent2980fa249a2680f32915de470a9cd8840780c2a0 (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 (cherry picked from commit 9870ff897f088563426bee9567dd9cb722c2b929) Reviewed-on: https://gerrit.libreoffice.org/73748 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> (cherry picked from commit 79cae65f4725d0a8abd5639dc298002d11b2626c) Reviewed-on: https://gerrit.libreoffice.org/73757
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/uiimpress.cxx7
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();