[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 18 18:50:21 UTC 2020
sfx2/source/control/recentdocsviewitem.cxx | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
New commits:
commit 6fc5ff12ad44334947f46c4dc52299f957e2d898
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 17 20:12:25 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 18 20:49:40 2020 +0200
we can use Desktop::queryDispatch and avoid using getActiveFrame
Change-Id: I5582b4d588e1e1b47cd8aef78e6e73b2dece9d82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104471
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 7fa4bfaeb508..fd6d06cf378a 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -180,16 +180,10 @@ void RecentDocsViewItem::OpenDocument()
mrParentView.SetPointer(PointerStyle::Wait);
Reference<frame::XDispatch> xDispatch;
- Reference<frame::XDispatchProvider> xDispatchProvider;
css::util::URL aTargetURL;
Sequence<beans::PropertyValue> aArgsList;
uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
- uno::Reference<frame::XFrame> xActiveFrame = xDesktop->getActiveFrame();
-
- //osl::ClearableMutexGuard aLock(m_aMutex);
- xDispatchProvider.set(xActiveFrame, UNO_QUERY);
- //aLock.clear();
aTargetURL.Complete = maURL;
Reference<util::XURLTransformer> xTrans(util::URLTransformer::create(::comphelper::getProcessComponentContext()));
@@ -203,7 +197,7 @@ void RecentDocsViewItem::OpenDocument()
aArgsList[1].Name = "AsTemplate";
aArgsList[1].Value <<= false;
- xDispatch = xDispatchProvider->queryDispatch(aTargetURL, "_default", 0);
+ xDispatch = xDesktop->queryDispatch(aTargetURL, "_default", 0);
if (!xDispatch.is())
return;
More information about the Libreoffice-commits
mailing list