[Libreoffice-commits] core.git: svx/source
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 4 08:46:30 UTC 2019
svx/source/svdraw/svdedxv.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 1dbaff61609d7643311b968bef69be4276b109e7
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Oct 4 00:09:15 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Oct 4 10:45:52 2019 +0200
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 at collabora.com>
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 52b178b0a82b..bafc02dc27db 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1058,7 +1058,10 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
OutlinerView* pGivenOutlinerView, 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();
More information about the Libreoffice-commits
mailing list