summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-10-30 10:51:08 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2020-12-01 11:02:22 +0100
commitc191da8d670262db1631f98ad3c9885f8f05dc10 (patch)
tree566a517e6d173fb234b4bf4ef93f054116ecaf40 /desktop
parent754032d6c7c2037fee05e28cf581e06ad2ab9d5a (diff)
jsdialog: implement TreeView
Change-Id: I7c1cc683e8c5d5bdc00c1e3d3d0a2c85846bbda0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106903 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> 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 c9d5e7d1d489..4b043141e743 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -449,24 +449,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;
@@ -3714,7 +3696,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? */)
@@ -5704,7 +5686,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)
{