[Libreoffice-commits] core.git: sfx2/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 12 12:31:17 UTC 2021


 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 6ec3623275e5a064e2057f0f1d58b5bd995b5a85
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Feb 12 19:33:06 2021 +0900
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Feb 12 13:30:26 2021 +0100

    devtools: simplify getObjectFromAny method
    
    Change-Id: I43bba799604683a9d329f3734879d116b4d07102
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110806
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

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<uno::XInterface> getObjectFromAny()
     {
-        uno::Reference<uno::XInterface> xInterface;
-        if (maAny.hasValue() && maAny.getValueType().getTypeClass() == uno::TypeClass_INTERFACE)
-        {
-            xInterface = uno::Reference<uno::XInterface>(maAny, uno::UNO_QUERY);
-        }
-        return xInterface;
+        return uno::Reference<uno::XInterface>(maAny, uno::UNO_QUERY);
     }
 
     ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& rName, uno::Any& rAny);


More information about the Libreoffice-commits mailing list