cid#1509250 Logically dead code
this looks like it went slightly wrong in
commit 0f86f678ff98115d32a381134985a1bd0d8c931e
Author: Noel Power <noel.power@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.grandin@collabora.co.uk>
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 218ab44..9d368b2 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;
}