From 6ec3623275e5a064e2057f0f1d58b5bd995b5a85 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 12 Feb 2021 19:33:06 +0900 Subject: devtools: simplify getObjectFromAny method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I43bba799604683a9d329f3734879d116b4d07102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110806 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sfx2/source/devtools/ObjectInspectorTreeHandler.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx index 4d6d1bdad7bc..cbf5640abd5a 100644 --- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx +++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx @@ -276,12 +276,7 @@ protected: uno::Reference getObjectFromAny() { - uno::Reference xInterface; - if (maAny.hasValue() && maAny.getValueType().getTypeClass() == uno::TypeClass_INTERFACE) - { - xInterface = uno::Reference(maAny, uno::UNO_QUERY); - } - return xInterface; + return uno::Reference(maAny, uno::UNO_QUERY); } ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& rName, uno::Any& rAny); -- cgit