diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 11:47:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 15:00:42 +0200 |
commit | e75a01f4a00fdafad918099b90d1ca79224b4dca (patch) | |
tree | 741406612743fa78e5128e00a1b1e259198ad35e /sd | |
parent | 3fdbd214fbdc4f9d1c8b2b8b09d175538d3c68e6 (diff) |
these only get used if pOL is non-null
Change-Id: I70d38727027d15b0bf3ea2904655f15d9503b681
Reviewed-on: https://gerrit.libreoffice.org/59162
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 4ca098bde258..bbb5d417422f 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -713,11 +713,9 @@ bool View::SdrBeginTextEdit( } } - if (bReturn) + if (::Outliner* pOL = bReturn ? GetTextEditOutliner() : nullptr) { - ::Outliner* pOL = GetTextEditOutliner(); - - if( pObj && pObj->getSdrPageFromSdrObject() ) + if (pObj && pObj->getSdrPageFromSdrObject()) { Color aBackground; if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_TABLE ) @@ -728,15 +726,11 @@ bool View::SdrBeginTextEdit( { aBackground = pObj->getSdrPageFromSdrObject()->GetPageBackgroundColor(pPV); } - if (pOL != nullptr) - pOL->SetBackgroundColor( aBackground ); + pOL->SetBackgroundColor( aBackground ); } - if (pOL != nullptr) - { - pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl)); - pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl)); - } + pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl)); + pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl)); } if (bMasterPage && bReturn && pOutl) |