desktop/source/lib/init.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 1bf2ed44a18666843d6c1b4a92966fd78cda07bf
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Jan 19 17:44:52 2018 +0200

    Handle also []any in unoAnyToPropertyTree()
    
    We add it as a subtree where each element in the sequence has as its
    name its number.
    
    Change-Id: I9422777d887d899f76ad6d259631d15c2db53f03
    Reviewed-on: https://gerrit.libreoffice.org/51967
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 40709157357b..8193dd5d3446 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -274,6 +274,20 @@ static boost::property_tree::ptree 
unoAnyToPropertyTree(const uno::Any& anyItem)
         aTree.put("value", 
OString::number(anyItem.get<sal_uInt32>()).getStr());
     else if (aType == "long")
         aTree.put("value", OString::number(anyItem.get<sal_Int32>()).getStr());
+    else if (aType == "[]any")
+    {
+        uno::Sequence<uno::Any> aSeq;
+        if (anyItem >>= aSeq)
+        {
+            boost::property_tree::ptree aSubTree;
+
+            for (auto i = 0; i < aSeq.getLength(); ++i)
+            {
+                aSubTree.add_child(OString::number(i).getStr(), 
unoAnyToPropertyTree(aSeq[i]));
+            }
+            aTree.add_child("value", aSubTree);
+        }
+    }
 
     // TODO: Add more as required
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to