From 8de04f459611df936c0b315b6d48cb3dbcc1d5fa Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Mon, 13 Sep 2021 23:05:40 +0530 Subject: LOK: introduce way to restrict uno commands With this new API we can define which uno commands to restrict their functionality Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx include/LibreOfficeKit/LibreOfficeKit.h include/LibreOfficeKit/LibreOfficeKit.hxx include/sfx2/viewsh.hxx Change-Id: I9f3fd659d373e56542c5323922a53564f1cfb27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124046 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- desktop/qa/desktop_lib/test_desktop_lib.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'desktop/qa') diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index d8ae56644263..19aa24684cb8 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3458,13 +3458,15 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct _LibreOfficeKitDocumentClass, completeFunction)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), offsetof(struct _LibreOfficeKitDocumentClass, setWindowTextSelection)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct _LibreOfficeKitDocumentClass, sendFormFieldEvent)); - CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct _LibreOfficeKitDocumentClass, renderSearchResult)); - CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct _LibreOfficeKitDocumentClass, setFreemiumDenyList)); - CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct _LibreOfficeKitDocumentClass, setFreemiumView)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct _LibreOfficeKitDocumentClass, setFreemiumDenyList)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct _LibreOfficeKitDocumentClass, setFreemiumView)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct _LibreOfficeKitDocumentClass, setRestrictedCommandList)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct _LibreOfficeKitDocumentClass, setRestrictedView)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct _LibreOfficeKitDocumentClass, renderSearchResult)); // Extending is fine, update this, and add new assert for the offsetof the // new method - CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), sizeof(struct _LibreOfficeKitDocumentClass)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); -- cgit