diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-10-30 10:51:08 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-25 15:46:32 +0100 |
commit | 0de158b4eb6d48d2c1a7cfcd638a73d7b69d45a7 (patch) | |
tree | 73277f49af609d2e052992c484a6890297c7bb8e /desktop | |
parent | adb2e4e192392faef628f9c6b7e21e1cd63f2fcc (diff) |
jsdialog: implement TreeView
Change-Id: I7c1cc683e8c5d5bdc00c1e3d3d0a2c85846bbda0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106560
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 22 |
1 files changed, 2 insertions, 20 deletions
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<beans::PropertyValue> 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<std::string>(".").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<Window> 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) { |