diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-17 16:39:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-17 20:25:48 +0000 |
commit | 5d0da4db5a8c7a76f83c4db60e4577bf2202ed9f (patch) | |
tree | 8166d5b69f124e14b31287107c249d860733e830 /chart2/source | |
parent | b1bd96e70230e498ea1c76388a684e5a5c3cbff4 (diff) |
coverity#1242824 Unused value
Change-Id: I5f53e538f8f76c337cda8b90fcf4ed717ed2476e
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/controller/main/SelectionHelper.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 8389fe4e932c..ee54fc8b90a3 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -172,13 +172,12 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* //bAllowMultiClickSelectionChange==true -> a second click on the same object can lead to a changed selection (e.g. series -> single data point) //get object to select: - SdrObject* pNewObj = 0; { m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = ObjectIdentifier(); //the search for the object to select starts with the hit object deepest in the grouping hierarchy (a leaf in the tree) //further we travel along the grouping hierarchy from child to parent - pNewObj = pDrawViewWrapper->getHitObject(rMousePos); + SdrObject* pNewObj = pDrawViewWrapper->getHitObject(rMousePos); m_aSelectedOID = ObjectIdentifier( lcl_getObjectName( pNewObj ) );//name of pNewObj //ignore handle only objects for hit test @@ -207,7 +206,6 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* //if a sibling of the last selected object is clicked don't go up further break; } - SdrObject* pLastChild = pNewObj; ObjectIdentifier aLastChild = m_aSelectedOID; if ( !SelectionHelper::findNamedParent( pNewObj, m_aSelectedOID, false ) ) { @@ -220,17 +218,15 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* { if( bAllowMultiClickSelectionChange ) { - pNewObj = pLastChild; m_aSelectedOID = aLastChild; } else m_aSelectedOID_selectOnlyIfNoDoubleClickIsFollowing = aLastChild; - break; } } - OSL_ENSURE( pNewObj && m_aSelectedOID.isValid(), "somehow lost selected object" ); + OSL_ENSURE(m_aSelectedOID.isValid(), "somehow lost selected object"); } else { @@ -281,7 +277,6 @@ void Selection::adaptSelectionToNewPos( const Point& rMousePos, DrawViewWrapper* if( pDrawViewWrapper->IsObjectHit( pLegend, rMousePos ) ) { m_aSelectedOID = ObjectIdentifier( aLegendCID ); - pNewObj = pLegend; } } } |