Related tdf#122788: avoid assert

See:
- https://bugs.documentfoundation.org/attachment.cgi?id=149853
- https://bugs.documentfoundation.org/attachment.cgi?id=149854
- https://bugs.documentfoundation.org/show_bug.cgi?id=122788#c5
- https://bugs.documentfoundation.org/show_bug.cgi?id=122788#c6

Change-Id: Icd1d4afcd05bf5398813505702bf244bd18fbfee
Reviewed-on: https://gerrit.libreoffice.org/69006
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index e86136b..df322f5 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1422,6 +1422,12 @@
    pViewShell->GetDispatcher()->ExecuteList(SID_TEXTEDIT,
            SfxCallMode::SYNCHRON | SfxCallMode::RECORD, { &aItem });

    if (mpView->IsTextEdit())
    {
        // end text edition before starting it again
        mpView->SdrEndTextEdit();
    }

    // To be consistent with the usual behaviour in the Office the text
    // object that is put into edit mode would have also to be selected.
    // Starting the text edit mode is not enough so we do it here by