diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 15:33:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 20:21:49 +0000 |
commit | 1f22e2f954baeec825190ded03510cb6c8069d93 (patch) | |
tree | 4e3ae0d8ba4280c3273c1debbf668c2c322e6116 /extensions | |
parent | 3c1cc16bb7b03e087781ae83262b217a2d23a693 (diff) |
coverity#735424 Logically dead code
Change-Id: Ibd58c1660edca27141c27f7607f426f9df8d6b79
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index e42efd84e62a..e4a877135c92 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2765,7 +2765,6 @@ namespace pcr //------------------------------------------------------------------------ bool FormComponentPropertyHandler::impl_browseForImage_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const { - bool bIsLink = true;// reflect the legacy behavior OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL ); ::sfx2::FileDialogHelper aFileDlg( @@ -2776,7 +2775,6 @@ namespace pcr // non-linked images ( e.g. those located in the document // stream ) only if document is available Reference< XModel > xModel( impl_getContextDocument_nothrow() ); - bool bHandleNonLink = false; Reference< XFilePickerControlAccess > xController(aFileDlg.GetFilePicker(), UNO_QUERY); DBG_ASSERT(xController.is(), "FormComponentPropertyHandler::impl_browseForImage_nothrow: missing the controller interface on the file picker!"); @@ -2785,8 +2783,8 @@ namespace pcr // do a preview by default xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True)); - xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(bIsLink)); - xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, bHandleNonLink ); + xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any(sal_True)); + xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, false); } @@ -2802,24 +2800,7 @@ namespace pcr bool bSuccess = ( 0 == aFileDlg.Execute() ); if ( bSuccess ) { - if ( bHandleNonLink && xController.is() ) - { - xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink; - } - if ( !bIsLink ) - { - Graphic aGraphic; - aFileDlg.GetGraphic( aGraphic ); - - Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_xContext ); - xGrfObj->setGraphic( aGraphic.GetXGraphic() ); - - - _out_rNewValue <<= xGrfObj; - - } - else - _out_rNewValue <<= (OUString)aFileDlg.GetPath(); + _out_rNewValue <<= (OUString)aFileDlg.GetPath(); } return bSuccess; } |