From c4b934128965cbd461f1c61255fe0c5d25cc29d6 Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Fri, 17 Sep 2021 19:13:15 +0530 Subject: 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 --- sfx2/source/view/lokhelper.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sfx2/source/view/lokhelper.cxx') diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 80fd65e45f7f..8210fd7faf35 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -739,17 +739,13 @@ void SfxLokHelper::postKeyEventAsync(const VclPtr &xWindow, postEventAsync(pLOKEv); } -void SfxLokHelper::setBlockedCommandView(int nViewId, const OUString& type, bool isBlocked) +void SfxLokHelper::setBlockedCommandList(int nViewId, const char* bolckedCommandList) { - OUString aType = type; SfxViewShell* pViewShell = SfxLokHelper::getViewOfId(nViewId); if(pViewShell) { - if(aType == "freemium") - pViewShell->setFreemiumView(isBlocked); - else - pViewShell->setRestrictedView(isBlocked); + pViewShell->setBlockedCommandList(bolckedCommandList); } } -- cgit v1.2.3