diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-08 15:33:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-08 20:37:42 +0100 |
commit | 7c8a828db184b65db66202ac319834c4e362e0ee (patch) | |
tree | 4aae7346ada1bca45f447874572d6450a9b649d8 /editeng | |
parent | 0f0563ebd29f170f65cec749a19efdfcb4e44ba8 (diff) |
just call GetWindow once
Change-Id: If8f0c35901024687c9a8c57e6bcf6756f37007f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112172
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 216914946734..728ed10ae3e9 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -2613,8 +2613,8 @@ void ImpEditView::AddDragAndDropListeners() css::uno::Reference<css::datatransfer::dnd::XDropTarget> xDropTarget; if (EditViewCallbacks* pCallbacks = getEditViewCallbacks()) xDropTarget = pCallbacks->GetDropTarget(); - else if (GetWindow()) - xDropTarget = GetWindow()->GetDropTarget(); + else if (auto xWindow = GetWindow()) + xDropTarget = xWindow->GetDropTarget(); if (!xDropTarget.is()) return; @@ -2644,8 +2644,8 @@ void ImpEditView::RemoveDragAndDropListeners() css::uno::Reference<css::datatransfer::dnd::XDropTarget> xDropTarget; if (EditViewCallbacks* pCallbacks = getEditViewCallbacks()) xDropTarget = pCallbacks->GetDropTarget(); - else if (GetWindow()) - xDropTarget = GetWindow()->GetDropTarget(); + else if (auto xWindow = GetWindow()) + xDropTarget = xWindow->GetDropTarget(); if (!xDropTarget.is()) return; |