editeng/source/outliner/outlvw.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 0aeabaf654428c1d84187ed8a40b37033ed01dcb
Author:     Gülşah Köse <gulsah.k...@collabora.com>
AuthorDate: Thu Mar 14 09:09:51 2024 +0300
Commit:     Gülşah Köse <gulsah.k...@collabora.com>
CommitDate: Fri Mar 15 13:54:56 2024 +0100

    tdf#160213 Don't let insert empty line with numbering, end numbering
    
    We applied the writer's empty bullet line policy to impres. Now We don't let
    insert empty bullet lines in impress too. Instead we end numbering and start
    to write normal paragraph at the same line.
    
    Signed-off-by: Gülşah Köse <gulsah.k...@collabora.com>
    Change-Id: I28042d9db59b5622434da0826f8b760f01ad64f9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164799
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit f3f3ea4cc9c3bec761d095fbfefd6ba8724fcdef)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164828
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 136ecd776c26..f3fd835ec1c9 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -189,6 +189,13 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, 
vcl::Window const * pFra
 
                     if( !aKeyCode.IsShift() )
                     {
+                        // Don't let insert empty paragraph with numbering. 
Instead end numbering.
+                        if (pPara->GetDepth() > -1 &&
+                            pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) 
== 0)
+                        {
+                            ToggleBullets();
+                            return true;
+                        }
                         // ImpGetCursor again???
                         if( !bSelection &&
                                 aSel.nEndPos == 
pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )

Reply via email to