desktop/qa/desktop_lib/test_desktop_lib.cxx | 5 ++--- desktop/source/lib/init.cxx | 17 ++++------------- include/LibreOfficeKit/LibreOfficeKit.h | 2 -- include/LibreOfficeKit/LibreOfficeKit.hxx | 5 ----- 4 files changed, 6 insertions(+), 23 deletions(-)
New commits: commit 1a0658db8e42cee59094c8291e589a279ec9ed69 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Feb 23 10:01:50 2024 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Feb 23 13:41:41 2024 +0100 use getCommandValues instead of adding a getViewRenderState Change-Id: Ib6db5dd8ef1db2745cb3c616bb81b1ac2baf6504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 2457771c384c..c9f276a67eeb 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3681,13 +3681,12 @@ void DesktopLOKTest::testABI() offsetof(struct _LibreOfficeKitDocumentClass, getA11yFocusedParagraph)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct _LibreOfficeKitDocumentClass, getA11yCaretPosition)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct _LibreOfficeKitDocumentClass, hyperlinkInfoAtPosition)); - CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), - offsetof(struct _LibreOfficeKitDocumentClass, getViewRenderState)); // As above - CPPUNIT_ASSERT_EQUAL(documentClassOffset(74), sizeof(struct _LibreOfficeKitDocumentClass)); + CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a6f35876f3ef..da46761b085c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1302,8 +1302,6 @@ static void doc_setAccessibilityState(LibreOfficeKitDocument* pThis, int nId, bo static char* doc_getA11yFocusedParagraph(LibreOfficeKitDocument* pThis); static int doc_getA11yCaretPosition(LibreOfficeKitDocument* pThis); - -static char* doc_getViewRenderState(LibreOfficeKitDocument* pThis); } // extern "C" namespace { @@ -1498,8 +1496,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference <css::lang::XComponent> xC m_pDocumentClass->getA11yFocusedParagraph = doc_getA11yFocusedParagraph; m_pDocumentClass->getA11yCaretPosition = doc_getA11yCaretPosition; - m_pDocumentClass->getViewRenderState = doc_getViewRenderState; - gDocumentClass = m_pDocumentClass; } pClass = m_pDocumentClass.get(); @@ -4890,15 +4886,6 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu return 0; } -static char* doc_getViewRenderState(LibreOfficeKitDocument* pThis) -{ - ITiledRenderable* pDoc = getTiledRenderable(pThis); - if (!pDoc) - return nullptr; - - return convertOString(pDoc->getViewRenderState()); -} - namespace { /** Class to react on finishing of a dispatched command. @@ -6355,6 +6342,10 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo { return getRulerState(pThis); } + else if (aCommand == ".uno:ViewRenderState") + { + return convertOString(pDoc->getViewRenderState()); + } else if (aCommand.starts_with(aViewRowColumnHeaders)) { tools::Rectangle aRectangle; diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index a1133e9b1035..d924c416eb0b 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -517,8 +517,6 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::hyperlinkInfoAtPosition(). char* (*hyperlinkInfoAtPosition) (LibreOfficeKitDocument* pThis, int x,int y); - char* (*getViewRenderState) (LibreOfficeKitDocument* pThis); - #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 772815800abe..797dd6bca73b 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -894,11 +894,6 @@ public: return mpDoc->pClass->getA11yCaretPosition(mpDoc); } - char* getViewRenderState() - { - return mpDoc->pClass->getViewRenderState(mpDoc); - } - #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY };