Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/2976 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/76/2976/1 coverity#704300 Logically dead code Change-Id: I05bf1fc737896d99419597850b70a5ca156e1b8a --- M sfx2/source/appl/appuno.cxx 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 62b2dfe..39b2bf1 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1885,16 +1885,17 @@ if ( !pDoc->AdjustMacroMode( String() ) ) // check forbids execution return ERRCODE_IO_ACCESSDENIED; - } - else if ( pDoc && pDoc->GetMedium() ) - { - pDoc->AdjustMacroMode( String() ); - SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); - SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False); - if ( pUpdateDocItem && pMacroExecModeItem - && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE - && pMacroExecModeItem->GetValue() == document::MacroExecMode::NEVER_EXECUTE ) - return ERRCODE_IO_ACCESSDENIED; + + if ( pDoc->GetMedium() ) + { + pDoc->AdjustMacroMode( String() ); + SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False); + SFX_ITEMSET_ARG( pDoc->GetMedium()->GetItemSet(), pMacroExecModeItem, SfxUInt16Item, SID_MACROEXECMODE, sal_False); + if ( pUpdateDocItem && pMacroExecModeItem + && pUpdateDocItem->GetValue() == document::UpdateDocMode::NO_UPDATE + && pMacroExecModeItem->GetValue() == document::MacroExecMode::NEVER_EXECUTE ) + return ERRCODE_IO_ACCESSDENIED; + } } // find BASIC method -- To view, visit https://gerrit.libreoffice.org/2976 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05bf1fc737896d99419597850b70a5ca156e1b8a Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Julien Nabet <serval2...@yahoo.fr> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice