diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-10-04 00:09:15 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-10-04 15:14:51 +0200 |
commit | 3ca663cc5398b7c50c2476bd6372f1f766c7133e (patch) | |
tree | 3d68fd054e3139d3cee0e965b0d3b285390f2081 /svx | |
parent | 6eb45e25ef821fff45e1074d73384bbf10ccb058 (diff) |
tdf#127941: Don't be _that_ eager to assert(!IsTextEdit());
Turns out that this is still a condition that can happen regularly:
* open Impress
* click an object with a spelling mistake
* press F7 to activate the spelling dialog (don't choose it from the
menu)
=> assert()
It is unclear how to sort this out correctly without refactoring, and
also unclear how many other cases fail this condition, so let's change
to SAL_WARN_IF for the moment.
Change-Id: I97730cc93c86c279973702bbf4ddc922f1616c0b
Reviewed-on: https://gerrit.libreoffice.org/80171
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index b704e8d34780..c38ebfa75505 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1021,7 +1021,10 @@ bool SdrObjEditView::SdrBeginTextEdit( bool bDontDeleteOutliner, bool bOnlyOneView, bool bGrabFocus) { - assert(!IsTextEdit()); + // FIXME cannot be an assert() yet, the code is not ready for that; + // eg. press F7 in Impress when you are inside a text object with spelling + // mistakes => boom; and it is unclear how to avoid that + SAL_WARN_IF(IsTextEdit(), "svx", "SdrBeginTextEdit called when IsTextEdit() is already true."); // FIXME this encourages all sorts of bad habits and should be removed SdrEndTextEdit(); |