From 1ac07d2c9d45cc5db3f689d287ad9be939ef1124 Mon Sep 17 00:00:00 2001 From: Gökay Şatır Date: Tue, 23 Apr 2024 14:40:14 +0300 Subject: Use a for loop for setting view properties. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since there may be no view with the given id, checking the list first is safer. Signed-off-by: Gökay Şatır Change-Id: I4c305e0a0f6ce7cccdfea9889c414a6054ed3a88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166531 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit 4d8c4a60105488be84ea80775dc04a24582752fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166720 Tested-by: Jenkins --- include/sfx2/lokhelper.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sfx2') diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index c4e88035fd96..3820558d6500 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -119,6 +119,10 @@ public: static void setDefaultLanguage(const OUString& rBcp47LanguageTag); /// Enable/Disable AT support for the given view. static void setAccessibilityState(int nId, bool nEnabled); + // Set the readonly state of the view. + static void setViewReadOnly(int nId, bool readOnly); + // In readonly view, can user add / modify comments or not. + static void setAllowChangeComments(int nId, bool allow); /// Get the language used by the loading view (used for all save operations). static const LanguageTag & getLoadLanguage(); /// Set the language used by the loading view (used for all save operations). -- cgit