sd/source/ui/view/sdview.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 104cae64dfd9c881264ea03680ca01cff855c4fe
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Oct 17 22:26:47 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Oct 18 08:49:35 2024 +0200

    tdf#163486: PVS: recurring check
    
    V571: Recurring check. The 'xObj' condition was already verified in line 
809.
    Change-Id: I4b782c9601893ad91598382ea2f999cbd46df75b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175104
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 2159edb966d0..d8938428ca91 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -809,14 +809,11 @@ SdrEndTextEditKind View::SdrEndTextEdit(bool 
bDontDeleteReally)
             eKind = SdrEndTextEditKind::Unchanged;
         }
     }
-    else if( xObj && xObj->IsEmptyPresObj() )
+    else if( xObj && xObj->IsEmptyPresObj() && xObj->HasText() )
     {
-        if( xObj && xObj->HasText() )
-        {
-            SdrPage* pPage = xObj->getSdrPageFromSdrObject();
-            if( !pPage || !pPage->IsMasterPage() )
-                xObj->SetEmptyPresObj( false );
-        }
+        SdrPage* pPage = xObj->getSdrPageFromSdrObject();
+        if( !pPage || !pPage->IsMasterPage() )
+            xObj->SetEmptyPresObj( false );
     }
 
     GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(

Reply via email to