diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-04-18 09:13:29 +0000 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-18 16:00:43 +0000 |
commit | 1b75b28ac5fd3b491e50c4a04148964c16a89df9 (patch) | |
tree | 319a5d041c2ae970d7313b7f8ded0d2d2bdf17e7 /reportdesign/source | |
parent | 385c265065d21170466bfcd001c9cb22cd93b53d (diff) |
cppcheck: silence known condition warning in reportdesign
Change-Id: I6debdd6fce7296e8a8827eab7a99fe96ef176d12
Reviewed-on: https://gerrit.libreoffice.org/24202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index b38ac8f70357..7e78e3335698 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -388,32 +388,28 @@ void DlgEdFunc::activateOle(SdrObject* _pObj) if (nSdrObjKind == OBJ_OLE2) { - bool bIsInplaceOle = false; - if (!bIsInplaceOle) + SdrOle2Obj* pOleObj = dynamic_cast<SdrOle2Obj*>(_pObj); + if (pOleObj && pOleObj->GetObjRef().is()) { - SdrOle2Obj* pOleObj = dynamic_cast<SdrOle2Obj*>(_pObj); - if (pOleObj && pOleObj->GetObjRef().is()) + if (m_rView.IsTextEdit()) { - if (m_rView.IsTextEdit()) - { - m_rView.SdrEndTextEdit(); - } + m_rView.SdrEndTextEdit(); + } - pOleObj->AddOwnLightClient(); - pOleObj->SetWindow(VCLUnoHelper::GetInterface(m_pParent)); - try - { - pOleObj->GetObjRef()->changeState( embed::EmbedStates::UI_ACTIVE ); - m_bUiActive = true; - OReportController& rController = m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController(); - m_bShowPropertyBrowser = rController.isCommandChecked(SID_SHOW_PROPERTYBROWSER); - if ( m_bShowPropertyBrowser ) - rController.executeChecked(SID_SHOW_PROPERTYBROWSER,uno::Sequence< beans::PropertyValue >()); - } - catch( uno::Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } + pOleObj->AddOwnLightClient(); + pOleObj->SetWindow(VCLUnoHelper::GetInterface(m_pParent)); + try + { + pOleObj->GetObjRef()->changeState( embed::EmbedStates::UI_ACTIVE ); + m_bUiActive = true; + OReportController& rController = m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController(); + m_bShowPropertyBrowser = rController.isCommandChecked(SID_SHOW_PROPERTYBROWSER); + if ( m_bShowPropertyBrowser ) + rController.executeChecked(SID_SHOW_PROPERTYBROWSER,uno::Sequence< beans::PropertyValue >()); + } + catch( uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); } } } |