summaryrefslogtreecommitdiff
path: root/desktop/qa
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@gmail.com>2024-02-16 08:43:14 +0300
committerMiklos Vajna <vmiklos@collabora.com>2024-03-07 15:44:29 +0100
commit97d32edf39e9d64866d8cee6ab8b5c947c6e18db (patch)
tree53b1c729a6e42e9afbcc1a2b3c0099bd7201695d /desktop/qa
parent5c3ac53ec31d2b33ad7197c2d20c38c5035b3ba6 (diff)
Collaborative editing with readonly and edit views.
We can have both readOnly and editor views at the same time while collaboratively editing a document. Our current solution is to disable any command if the user's view is readonly. We want to have a closer behaviour to desktop app with readonly views. For this purpose, we are allowing more interactions from online server to core side. We also need to filter out the events like the core side readonly view do (next commit). This commit initiates the readonly view infrastructure. The patches previous commit reverts were an example of how we disable things in readonly mode. We needed to open a window for getting hyperlink information. With this patch, we try to separate the edit and readonly view modes on core side. More notes: We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an endless loop with this patch. When we disable editing on a browser, almost all user actions are disabled. (cherry picked from commit 81dae2ca5187bd24aea0befb099a5b53535b5d03) Change-Id: Ia25368dd8065206ec6b4b83eb2f685531110cc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164527 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'desktop/qa')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 87afe69166a8..1239af480598 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3668,22 +3668,18 @@ void DesktopLOKTest::testABI()
CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct _LibreOfficeKitDocumentClass, sendFormFieldEvent));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct _LibreOfficeKitDocumentClass, setBlockedCommandList));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct _LibreOfficeKitDocumentClass, renderSearchResult));
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(64),
- offsetof(struct _LibreOfficeKitDocumentClass, sendContentControlEvent));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct _LibreOfficeKitDocumentClass, sendContentControlEvent));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct _LibreOfficeKitDocumentClass, getSelectionTypeAndText));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct _LibreOfficeKitDocumentClass, getDataArea));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode));
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(68),
- offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone));
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(69),
- offsetof(struct _LibreOfficeKitDocumentClass, setAccessibilityState));
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(70),
- offsetof(struct _LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
- offsetof(struct _LibreOfficeKitDocumentClass, getA11yCaretPosition));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, setAccessibilityState));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), offsetof(struct _LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct _LibreOfficeKitDocumentClass, getA11yCaretPosition));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct _LibreOfficeKitDocumentClass, setViewReadOnly));
// As above
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct _LibreOfficeKitDocumentClass));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct _LibreOfficeKitDocumentClass));
}
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);