summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-31 13:11:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-01 10:07:17 +0200
commit6917a939cc656aaafb643627685b155d60f0399f (patch)
tree54473f9b1b8411a6edb657cf7547fa9ab9c0ed59 /sc
parenta21d29e77af57758c2fb54e1592db3d7ed675f2a (diff)
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>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx26
1 files changed, 12 insertions, 14 deletions
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;
}