[Libreoffice-commits] core.git: editeng/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 8 19:38:34 UTC 2021
editeng/source/editeng/impedit.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 7c8a828db184b65db66202ac319834c4e362e0ee
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 8 15:33:59 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 8 20:37:42 2021 +0100
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 at redhat.com>
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;
More information about the Libreoffice-commits
mailing list