sc/source/filter/oox/worksheetfragment.cxx |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 6917a939cc656aaafb643627685b155d60f0399f
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Aug 31 13:11:46 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 1 10:07:17 2022 +0200

    cid#1509250 Logically dead code
    
    this looks like it went slightly wrong in
    
        commit 0f86f678ff98115d32a381134985a1bd0d8c931e
        Author: Noel Power <noel.po...@novell.com>
        Date:   Thu Jun 7 14:00:03 2012 +0100
        attempt to use mce::FallBack for control/oleObject import
    
    attempt to match the code to the comments
    
    Change-Id: I682b340c69ca6aa8a103fad87a3e7a1761adf43d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139104
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/filter/oox/worksheetfragment.cxx 
b/sc/source/filter/oox/worksheetfragment.cxx
index 218ab447545b..9d368b23f2a2 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -462,22 +462,20 @@ ContextHandlerRef WorksheetFragment::onCreateContext( 
sal_Int32 nElement, const
         // Only process an oleObject or control if outside a 
mc:AlternateContent
         // element OR if within a mc:Fallback. I suppose ideally we
         // should process the stuff within 'mc:Choice'
-    case XLS_TOKEN( controls ):
+        case XLS_TOKEN( controls ):
         case XLS_TOKEN( oleObjects ):
-            if ( getCurrentElement() == XLS_TOKEN( controls ) )
+            if( isMCEStateEmpty() || getMCEState() == MCE_STATE::Started )
             {
-                if( isMCEStateEmpty() || getMCEState() == MCE_STATE::Started )
-                {
-                    if ( getCurrentElement() == XLS_TOKEN( oleObjects ) ) 
importOleObject( rAttribs );
-                    else
-                        importControl( rAttribs );
-                }
-                else if ( !isMCEStateEmpty() && getMCEState() == 
MCE_STATE::FoundChoice )
-                {
-                    // reset the handling within 'Choice'
-                    // this will force attempted handling in Fallback
-                    setMCEState( MCE_STATE::Started );
-                }
+                if ( getCurrentElement() == XLS_TOKEN( oleObjects ) )
+                    importOleObject( rAttribs );
+                else
+                    importControl( rAttribs );
+            }
+            else if ( !isMCEStateEmpty() && getMCEState() == 
MCE_STATE::FoundChoice )
+            {
+                // reset the handling within 'Choice'
+                // this will force attempted handling in Fallback
+                setMCEState( MCE_STATE::Started );
             }
         break;
     }

Reply via email to