wsd/DocumentBroker.cpp | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit b914aa422264ff68b69d75a397f1fd0836791dd7
Author: Pranav Kant <[email protected]>
Date: Tue Dec 13 18:01:50 2016 +0530
wsd: If Disabled, turn their corresponding Hide options on
loleaflet will then automatically hide these options from the UI
Change-Id: I65a320850a35b5af4291d896d5942dddfaaa0c98
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 4a5b1c8..0470cbb 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -266,6 +266,12 @@ bool DocumentBroker::load(std::shared_ptr<ClientSession>&
session, const std::st
wopiInfo->set("PostMessageOrigin",
wopifileinfo->_postMessageOrigin);
}
+ // If print, export are disabled, order client to hide these options
in the UI
+ if (wopifileinfo->_disablePrint)
+ wopifileinfo->_hidePrintOption = true;
+ if (wopifileinfo->_disableExport)
+ wopifileinfo->_hideExportOption = true;
+
wopiInfo->set("HidePrintOption", wopifileinfo->_hidePrintOption);
wopiInfo->set("HideSaveOption", wopifileinfo->_hideSaveOption);
wopiInfo->set("HideExportOption", wopifileinfo->_hideExportOption);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits