diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-04-24 12:09:37 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-14 17:00:39 +0200 |
commit | b3bdd5786d48da4b4073d05b9eddba9d242ac6bf (patch) | |
tree | ac02bf8d0f22ba0e4b1801b11d996f14b86ed441 /wsd/Storage.hpp | |
parent | d3d4812583a1feb9cb2fe4d1aafcd9c20f362cae (diff) |
wsd: support optional forcing tracking changes at load
Since changing the tracking state is done by toggling,
we need to wait to get the current state at load time
before we can tell whether we need to toggle it or not.
Change-Id: Ib5a2639b2acf3874c191971eedf9a3bebcefebad
Reviewed-on: https://gerrit.libreoffice.org/53415
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'wsd/Storage.hpp')
-rw-r--r-- | wsd/Storage.hpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp index 1d96afd36..d033a846b 100644 --- a/wsd/Storage.hpp +++ b/wsd/Storage.hpp @@ -259,6 +259,13 @@ public: class WOPIFileInfo { public: + enum class TriState + { + False, + True, + Unset + }; + WOPIFileInfo(const std::string& userid, const std::string& username, const std::string& userExtraInfo, @@ -268,13 +275,15 @@ public: const bool hidePrintOption, const bool hideSaveOption, const bool hideExportOption, - const bool hideChangeTrackingControls, const bool enableOwnerTermination, const bool disablePrint, const bool disableExport, const bool disableCopy, const bool disableInactiveMessages, const bool userCanNotWriteRelative, + const TriState disableChangeTrackingShow, + const TriState disableChangeTrackingRecord, + const TriState hideChangeTrackingControls, const std::chrono::duration<double> callDuration) : _userid(userid), _username(username), @@ -284,13 +293,15 @@ public: _hidePrintOption(hidePrintOption), _hideSaveOption(hideSaveOption), _hideExportOption(hideExportOption), - _hideChangeTrackingControls(hideChangeTrackingControls), _enableOwnerTermination(enableOwnerTermination), _disablePrint(disablePrint), _disableExport(disableExport), _disableCopy(disableCopy), _disableInactiveMessages(disableInactiveMessages), _userCanNotWriteRelative(userCanNotWriteRelative), + _disableChangeTrackingShow(disableChangeTrackingShow), + _disableChangeTrackingRecord(disableChangeTrackingRecord), + _hideChangeTrackingControls(hideChangeTrackingControls), _callDuration(callDuration) { _userExtraInfo = userExtraInfo; @@ -314,8 +325,6 @@ public: bool _hideSaveOption; /// Hide 'Download as' button/menubar item from UI bool _hideExportOption; - /// Hide change tacking menu from UI - bool _hideChangeTrackingControls; /// If WOPI host has enabled owner termination feature on bool _enableOwnerTermination; /// If WOPI host has allowed the user to print the document @@ -328,6 +337,13 @@ public: bool _disableInactiveMessages; /// If set to false, users can access the save-as functionality bool _userCanNotWriteRelative; + /// If we should disable change-tracking visibility by default (meaningful at loading). + TriState _disableChangeTrackingShow; + /// If we should disable change-tracking ability by default (meaningful at loading). + TriState _disableChangeTrackingRecord; + /// If we should hide change-tracking commands for this user. + TriState _hideChangeTrackingControls; + /// Time it took to call WOPI's CheckFileInfo std::chrono::duration<double> _callDuration; }; |