diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2021-09-17 19:13:15 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-10-22 17:49:20 +0200 |
commit | c4b934128965cbd461f1c61255fe0c5d25cc29d6 (patch) | |
tree | 04e4015769ed37bf876e3e7eec12bb863070cd97 /comphelper | |
parent | d05c69a892535b910943fe98fbce42f5cc860aa4 (diff) |
LOK: maintain blocked command list per view
Conflicts:
include/LibreOfficeKit/LibreOfficeKitEnums.h
include/sfx2/viewsh.hxx
libreofficekit/source/gtk/lokdocview.cxx
sfx2/source/view/viewsh.cxx
Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124049
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/lok.cxx | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 26c798eeaff4..45037f862bd7 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -35,10 +35,6 @@ static bool g_bLocalRendering(false); static Compat g_eCompatFlags(Compat::none); -static std::unordered_set<OUString> g_vFreemiumDenyList; - -static std::unordered_set<OUString> g_vRestrictedCommandList; - namespace { @@ -287,62 +283,6 @@ void statusIndicatorFinish() pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0, nullptr); } -void setBlockedCommandList(const char* bolckedCommandList) -{ - - OUString BolckedListString(bolckedCommandList, strlen(bolckedCommandList), RTL_TEXTENCODING_UTF8); - - OUString type = BolckedListString.getToken(0, '-'); - - if (type == "freemium") - { - if(!g_vFreemiumDenyList.empty()) - return; - OUString commands = BolckedListString.getToken(1, '-'); - - OUString command = commands.getToken(0, ' '); - for (size_t i = 1; !command.isEmpty(); i++) - { - g_vFreemiumDenyList.emplace(command); - command = commands.getToken(i, ' '); - } - } - else - { - if(!g_vRestrictedCommandList.empty()) - return; - - OUString commands = BolckedListString.getToken(1, '-'); - - OUString command = commands.getToken(0, ' '); - for (size_t i = 1; !command.isEmpty(); i++) - { - g_vRestrictedCommandList.emplace(command); - command = commands.getToken(i, ' '); - } - } -} - -const std::unordered_set<OUString>& getFreemiumDenyList() -{ - return g_vFreemiumDenyList; -} - -bool isCommandFreemiumDenied(const OUString& command) -{ - return g_vFreemiumDenyList.find(command) != g_vFreemiumDenyList.end(); -} - -const std::unordered_set<OUString>& getRestrictedCommandList() -{ - return g_vRestrictedCommandList; -} - -bool isRestrictedCommand(const OUString& command) -{ - return g_vRestrictedCommandList.find(command) != g_vRestrictedCommandList.end(); -} - } // namespace /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |