From 0de158b4eb6d48d2c1a7cfcd638a73d7b69d45a7 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 30 Oct 2020 10:51:08 +0100 Subject: jsdialog: implement TreeView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7c1cc683e8c5d5bdc00c1e3d3d0a2c85846bbda0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106560 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- desktop/source/lib/init.cxx | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 06d0a1de31d2..bc8b46a94c43 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -441,24 +441,6 @@ std::vector desktop::jsonToPropertyValuesVector(const char } -static StringMap jsonToStringMap(const char* pJSON) -{ - StringMap aArgs; - if (pJSON && pJSON[0] != '\0') - { - std::stringstream aStream(pJSON); - boost::property_tree::ptree aTree; - boost::property_tree::read_json(aStream, aTree); - - for (const auto& rPair : aTree) - { - aArgs[OUString::fromUtf8(rPair.first.c_str())] = OUString::fromUtf8(rPair.second.get_value(".").c_str()); - } - } - return aArgs; -} - - static boost::property_tree::ptree unoAnyToPropertyTree(const uno::Any& anyItem) { boost::property_tree::ptree aTree; @@ -3710,7 +3692,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long { SolarMutexGuard aGuard; - StringMap aMap(jsonToStringMap(pArguments)); + StringMap aMap(jsdialog::jsonToStringMap(pArguments)); VclPtr pWindow = vcl::Window::FindLOKWindow(nWindowId); if (!pWindow && nWindowId >= 1000000000 /* why unsigned? */) @@ -5686,7 +5668,7 @@ static void doc_sendFormFieldEvent(LibreOfficeKitDocument* pThis, const char* pA if (doc_getDocumentType(pThis) != LOK_DOCTYPE_TEXT) return; - StringMap aMap(jsonToStringMap(pArguments)); + StringMap aMap(jsdialog::jsonToStringMap(pArguments)); ITiledRenderable* pDoc = getTiledRenderable(pThis); if (!pDoc) { -- cgit