diff options
Diffstat (limited to 'desktop/source/lib/init.cxx')
-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) { |