sd/source/ui/animations/CustomAnimationList.cxx | 17 +++++++++-------- sd/source/ui/animations/CustomAnimationList.hxx | 1 - 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 969ebe1c5801fa194ee29ffc7abfad7363ebd08f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 8 08:48:39 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Apr 8 10:47:45 2020 +0200 cid#1461386 Unchecked return value and cid#1461388 Unchecked return value Change-Id: I77b8c6eb2dde566521ed8d3f577c4df894f91733 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91870 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 559ac92a6b5c..68ecf1362ce9 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -479,8 +479,8 @@ IMPL_LINK(CustomAnimationList, DragBeginHdl, bool&, rUnsetDragIcon, bool) // Note: pEntry is the effect with focus (if multiple effects are selected) mxDndEffectDragging = mxTreeView->make_iterator(); - mxTreeView->get_cursor(mxDndEffectDragging.get()); - mxDndEffectInsertBefore = mxTreeView->make_iterator(mxDndEffectDragging.get()); + if (!mxTreeView->get_cursor(mxDndEffectDragging.get())) + mxDndEffectDragging.reset(); // Allow normal processing. return false; @@ -500,17 +500,18 @@ sal_Int8 CustomAnimationList::AcceptDrop( const AcceptDropEvent& rEvt ) // D'n'D #5: Tell model to update effect order. sal_Int8 CustomAnimationList::ExecuteDrop(const ExecuteDropEvent& rEvt) { - if (!mxTreeView->get_dest_row_at_pos(rEvt.maPosPixel, mxDndEffectInsertBefore.get())) - mxDndEffectInsertBefore.reset(); + std::unique_ptr<weld::TreeIter> xDndEffectInsertBefore(mxTreeView->make_iterator()); + if (!mxTreeView->get_dest_row_at_pos(rEvt.maPosPixel, xDndEffectInsertBefore.get())) + xDndEffectInsertBefore.reset(); const bool bMovingEffect = ( mxDndEffectDragging != nullptr ); - const bool bMoveNotSelf = !mxDndEffectInsertBefore || (mxDndEffectDragging && mxTreeView->iter_compare(*mxDndEffectInsertBefore, *mxDndEffectDragging) != 0); + const bool bMoveNotSelf = !xDndEffectInsertBefore || (mxDndEffectDragging && mxTreeView->iter_compare(*xDndEffectInsertBefore, *mxDndEffectDragging) != 0); const bool bHaveSequence = ( mpMainSequence.get() != nullptr ); if( bMovingEffect && bMoveNotSelf && bHaveSequence ) { - CustomAnimationListEntryItem* pTarget = mxDndEffectInsertBefore ? - reinterpret_cast<CustomAnimationListEntryItem*>(mxTreeView->get_id(*mxDndEffectInsertBefore).toInt64()) : + CustomAnimationListEntryItem* pTarget = xDndEffectInsertBefore ? + reinterpret_cast<CustomAnimationListEntryItem*>(mxTreeView->get_id(*xDndEffectInsertBefore).toInt64()) : nullptr; // Build list of effects @@ -1100,7 +1101,7 @@ EffectSequence CustomAnimationList::getSelection() const if (!mxTreeView->get_row_expanded(rEntry) && mxTreeView->iter_has_child(rEntry)) { std::unique_ptr<weld::TreeIter> xChild = mxTreeView->make_iterator(&rEntry); - mxTreeView->iter_children(*xChild); + (void)mxTreeView->iter_children(*xChild); do { diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 398793840187..3da6b350dce6 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -154,7 +154,6 @@ private: // drag & drop std::unique_ptr<weld::TreeIter> mxDndEffectDragging; - std::unique_ptr<weld::TreeIter> mxDndEffectInsertBefore; std::vector<std::unique_ptr<weld::TreeIter>> mDndEffectsSelected; }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits