summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei@libreoffice.org>2021-11-01 14:01:22 -0400
committerKohei Yoshida <kohei@libreoffice.org>2021-11-03 21:17:18 +0100
commiteb07a0e76fe240a184348d96a6cebf7c0a229ac0 (patch)
tree23ab960b7a163696e4a7c1d4c4c20c1340fa14b3 /cui/source
parent9b9f4a4487e9ada1885d45a8b1ba0234a4a9fc26 (diff)
Upgrade mdds and liborcus to 2.0.0 and 0.17.0, respectively.
Change-Id: I9e856fc2d61f1789a6f1702514837860539a0f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124573 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/AdditionsDialog.cxx62
1 files changed, 18 insertions, 44 deletions
diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx
index ac633177ef36..ec173740bc63 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -54,7 +54,6 @@
#include <orcus/json_document_tree.hpp>
#include <orcus/json_parser.hpp>
#include <orcus/config.hpp>
-#include <orcus/pstring.hpp>
#define PAGE_SIZE 30
@@ -158,62 +157,37 @@ void parseResponse(const std::string& rResponse, std::vector<AdditionInfo>& aAdd
try
{
AdditionInfo aNewAddition = {
- OStringToOUString(std::string_view(arrayElement.child("id").string_value().get()),
+ OStringToOUString(arrayElement.child("id").string_value(), RTL_TEXTENCODING_UTF8),
+ OStringToOUString(arrayElement.child("name").string_value(), RTL_TEXTENCODING_UTF8),
+ OStringToOUString(arrayElement.child("author").string_value(),
RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("name").string_value().get()),
+ OStringToOUString(arrayElement.child("url").string_value(), RTL_TEXTENCODING_UTF8),
+ OStringToOUString(arrayElement.child("screenshotURL").string_value(),
RTL_TEXTENCODING_UTF8),
- OStringToOUString(
- std::string_view(arrayElement.child("author").string_value().get()),
- RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("url").string_value().get()),
+ OStringToOUString(arrayElement.child("extensionIntroduction").string_value(),
+ RTL_TEXTENCODING_UTF8),
+ OStringToOUString(arrayElement.child("extensionDescription").string_value(),
RTL_TEXTENCODING_UTF8),
OStringToOUString(
- std::string_view(arrayElement.child("screenshotURL").string_value().get()),
+ arrayElement.child("releases").child(0).child("compatibility").string_value(),
RTL_TEXTENCODING_UTF8),
OStringToOUString(
- std::string_view(
- arrayElement.child("extensionIntroduction").string_value().get()),
+ arrayElement.child("releases").child(0).child("releaseName").string_value(),
RTL_TEXTENCODING_UTF8),
OStringToOUString(
- std::string_view(
- arrayElement.child("extensionDescription").string_value().get()),
+ arrayElement.child("releases").child(0).child("license").string_value(),
RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("releases")
- .child(0)
- .child("compatibility")
- .string_value()
- .get()),
+ OStringToOUString(arrayElement.child("commentNumber").string_value(),
RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("releases")
- .child(0)
- .child("releaseName")
- .string_value()
- .get()),
+ OStringToOUString(arrayElement.child("commentURL").string_value(),
RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("releases")
- .child(0)
- .child("license")
- .string_value()
- .get()),
+ OStringToOUString(arrayElement.child("rating").string_value(),
+ RTL_TEXTENCODING_UTF8),
+ OStringToOUString(arrayElement.child("downloadNumber").string_value(),
RTL_TEXTENCODING_UTF8),
OStringToOUString(
- std::string_view(arrayElement.child("commentNumber").string_value().get()),
- RTL_TEXTENCODING_UTF8),
- OStringToOUString(
- std::string_view(arrayElement.child("commentURL").string_value().get()),
- RTL_TEXTENCODING_UTF8),
- OStringToOUString(
- std::string_view(arrayElement.child("rating").string_value().get()),
- RTL_TEXTENCODING_UTF8),
- OStringToOUString(
- std::string_view(arrayElement.child("downloadNumber").string_value().get()),
- RTL_TEXTENCODING_UTF8),
- OStringToOUString(std::string_view(arrayElement.child("releases")
- .child(0)
- .child("downloadURL")
- .string_value()
- .get()),
- RTL_TEXTENCODING_UTF8)
+ arrayElement.child("releases").child(0).child("downloadURL").string_value(),
+ RTL_TEXTENCODING_UTF8)
};
aAdditions.push_back(aNewAddition);