summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-10-04 00:09:15 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-03-29 16:46:57 +0200
commit31ebdacc9b46f782d6fa6fa2f995ebbe574cc587 (patch)
tree4dc84c23615299b40cfd3c4a89f15621de30e7f8
parent242e26f9762d25ee475c8870bec7f44008fca89d (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/80170 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 1dbaff61609d7643311b968bef69be4276b109e7)
-rw-r--r--svx/source/svdraw/svdedxv.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index fc0de4bdcf29..430986b5771f 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1018,7 +1018,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();