diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-10-22 18:07:37 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2021-10-29 16:30:43 +0200 |
commit | 570c31d1a1e2ac613fc077102eb9c23f0e2f57e2 (patch) | |
tree | 005c34c7a1de6396ce888b875ec634e83e7e8d3e /wsd | |
parent | jsdialog: limit treeview width to not show long dialog (diff) | |
download | online-570c31d1a1e2ac613fc077102eb9c23f0e2f57e2.tar.gz online-570c31d1a1e2ac613fc077102eb9c23f0e2f57e2.zip |
wsd: Allow to pass ui defaults for drawings
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: Ie311ca6b7578ead6f7c7d61fe993d4ecdc9a4386
Diffstat (limited to 'wsd')
-rw-r--r-- | wsd/FileServerUtil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wsd/FileServerUtil.cpp b/wsd/FileServerUtil.cpp index 8a14a953f5..ec4ba5868e 100644 --- a/wsd/FileServerUtil.cpp +++ b/wsd/FileServerUtil.cpp @@ -28,6 +28,7 @@ std::string FileServerRequestHandler::uiDefaultsToJSON(const std::string& uiDefa Poco::JSON::Object textDefs; Poco::JSON::Object spreadsheetDefs; Poco::JSON::Object presentationDefs; + Poco::JSON::Object drawingDefs; uiMode = ""; StringVector tokens(Util::tokenize(uiDefaults, ';')); @@ -65,6 +66,11 @@ std::string FileServerRequestHandler::uiDefaultsToJSON(const std::string& uiDefa currentDef = &presentationDefs; key = keyValue[0].substr(12); } + else if (Util::startsWith(keyValue[0], "Drawing")) + { + currentDef = &drawingDefs; + key = keyValue[0].substr(7); + } else { LOG_ERR("unknown UI default's component " << keyValue[0]); @@ -98,6 +104,9 @@ std::string FileServerRequestHandler::uiDefaultsToJSON(const std::string& uiDefa if (presentationDefs.size() > 0) json.set("presentation", presentationDefs); + if (drawingDefs.size() > 0) + json.set("drawing", drawingDefs); + std::ostringstream oss; Poco::JSON::Stringifier::stringify(json, oss); |