summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-10-30 10:51:08 +0100
committerAndras Timar <andras.timar@collabora.com>2021-04-06 21:47:11 +0200
commited7ee1bc58ee86cdb765b27a256a7e0eadacf3a0 (patch)
tree2b73d00c7d27c7c29a19969c0f0ec96f8485d3c8 /desktop
parentb394d533958d8ecb0e60efae6e593c9048cbcde1 (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.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d46b780169fa..ad1edb322425 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;
@@ -3719,7 +3701,7 @@ static void lcl_sendDialogEvent(unsigned long long int nWindowId, const char* pA
{
SolarMutexGuard aGuard;
- StringMap aMap(jsonToStringMap(pArguments));
+ StringMap aMap(jsdialog::jsonToStringMap(pArguments));
VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nWindowId);
if (!pWindow && nWindowId >= 1000000000 /* why unsigned? */)
@@ -5706,7 +5688,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)
{