summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-10-21 19:56:59 +0500
committerMiklos Vajna <vmiklos@collabora.com>2024-10-22 09:00:27 +0200
commite0856bc538fb938af372ea7cd250a05a30025556 (patch)
treee818957a78c12077e86f1b5f1187342ebcd79141 /include
parent94c0664d54d9979dac61cf6e78e0110282f8703e (diff)
Optimize JsonToPropertyValues a bit
1. Make it take string view: helps to avoid extra string allocation e.g. in desktop::jsonToPropertyValuesVector, and will help more, when C++26 stringstream ctor taking string view is available. 2. Factor out a function taking boost::property_tree::ptree, making implementation simpler for [][]com.sun.star.beans.PropertyValue and []com.sun.star.beans.PropertyValue, without writing a child node to a JSON string, and parsing it again. Change-Id: I16ac2641633ea67a7c9c054c9df09a790500e6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175361 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 7b2ea917cecbaa7deb67559fe09531bb2a3d98eb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175384 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/propertysequence.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/comphelper/propertysequence.hxx b/include/comphelper/propertysequence.hxx
index e788f56f428f..787f96f3e855 100644
--- a/include/comphelper/propertysequence.hxx
+++ b/include/comphelper/propertysequence.hxx
@@ -53,7 +53,7 @@ namespace comphelper
return vResult;
}
- COMPHELPER_DLLPUBLIC std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson);
+ COMPHELPER_DLLPUBLIC std::vector<css::beans::PropertyValue> JsonToPropertyValues(std::string_view rJson);
} // namespace comphelper