desktop/qa/desktop_lib/test_desktop_lib.cxx     |   28 +++----
 desktop/source/lib/init.cxx                     |    6 -
 desktop/source/lib/lokclipboard.cxx             |    2 
 desktop/source/lib/lokinteractionhandler.cxx    |    2 
 sc/qa/unit/helper/sctestviewcallback.cxx        |    2 
 sc/qa/unit/helper/sctiledrenderingtest.cxx      |    2 
 sc/qa/unit/tiledrendering/tiledrendering.cxx    |   88 ++++++++++++------------
 sc/qa/unit/tiledrendering/tiledrendering2.cxx   |    2 
 sc/source/ui/view/viewfun6.cxx                  |    2 
 sd/qa/unit/sdtiledrenderingtest.cxx             |    8 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx    |   44 ++++++------
 sfx2/source/notify/hintpost.cxx                 |    4 -
 sfx2/source/view/lokhelper.cxx                  |    6 -
 sw/qa/core/txtnode/txtnode.cxx                  |    2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   72 +++++++++----------
 sw/qa/extras/tiledrendering/tiledrendering2.cxx |   30 ++++----
 sw/qa/unit/swtestviewcallback.cxx               |    2 
 sw/qa/unit/swtiledrenderingtest.cxx             |    2 
 18 files changed, 152 insertions(+), 152 deletions(-)

New commits:
commit 387eb011cb3b84ba419195f42501f66645a25ba2
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jul 23 16:55:29 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Jul 24 15:50:43 2025 +0200

    SfxLokHelper::getView(*) -> SfxLokHelper::getView(&)
    
    these ones are definitely passed a non-null ptr
    
    Change-Id: I74c11da76c2267a1ae6443240f5e978f0e57563f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188281
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sc/qa/unit/helper/sctiledrenderingtest.cxx 
b/sc/qa/unit/helper/sctiledrenderingtest.cxx
index 7d835209dd9b..b20122038889 100644
--- a/sc/qa/unit/helper/sctiledrenderingtest.cxx
+++ b/sc/qa/unit/helper/sctiledrenderingtest.cxx
@@ -65,7 +65,7 @@ ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)
 void ScTiledRenderingTest::setupLibreOfficeKitViewCallback(SfxViewShell* 
pViewShell)
 {
     pViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(pViewShell));
+    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(*pViewShell));
 }
 
 void ScTiledRenderingTest::callback(int nType, const char* pPayload, void* 
pData)
diff --git a/sd/qa/unit/sdtiledrenderingtest.cxx 
b/sd/qa/unit/sdtiledrenderingtest.cxx
index 30c62b69980f..d28895681a54 100644
--- a/sd/qa/unit/sdtiledrenderingtest.cxx
+++ b/sd/qa/unit/sdtiledrenderingtest.cxx
@@ -70,10 +70,10 @@ SdTiledRenderingTest::createDoc(const char* pName,
     return pImpressDocument;
 }
 
-void SdTiledRenderingTest::setupLibreOfficeKitViewCallback(SfxViewShell& 
pViewShell)
+void SdTiledRenderingTest::setupLibreOfficeKitViewCallback(SfxViewShell& 
rViewShell)
 {
-    pViewShell.setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(&pViewShell));
+    rViewShell.setLibreOfficeKitViewCallback(&m_callbackWrapper);
+    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(rViewShell));
 }
 
 void SdTiledRenderingTest::callback(int nType, const char* pPayload, void* 
pData)
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index 3d9eeab9afb4..dfb5a07ccd79 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, 
testTitleFieldInvalidate)
     ViewCallback aCallback;
     TestLokCallbackWrapper aCallbackWrapper(&ViewCallback::callback, 
&aCallback);
     
pWrtShell->GetSfxViewShell()->setLibreOfficeKitViewCallback(&aCallbackWrapper);
-    
aCallbackWrapper.setLOKViewId(SfxLokHelper::getView(pWrtShell->GetSfxViewShell()));
+    
aCallbackWrapper.setLOKViewId(SfxLokHelper::getView(*pWrtShell->GetSfxViewShell()));
     Scheduler::ProcessEventsToIdle();
     aCallback.m_nInvalidations = 0;
 
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 6495ae7d1a35..17530ce79f28 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2894,7 +2894,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testHyperlink)
     SwXTextDocument* pXTextDocument = createDoc("hyperlink.odt");
     SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
     setupLibreOfficeKitViewCallback(pWrtShell->GetSfxViewShell());
-    
m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(pWrtShell->GetSfxViewShell()));
+    
m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(*pWrtShell->GetSfxViewShell()));
     SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
 
     Point aStart = pShellCursor->GetSttPos();
diff --git a/sw/qa/unit/swtiledrenderingtest.cxx 
b/sw/qa/unit/swtiledrenderingtest.cxx
index 3ea1a08352b4..5efe20a6ed2c 100644
--- a/sw/qa/unit/swtiledrenderingtest.cxx
+++ b/sw/qa/unit/swtiledrenderingtest.cxx
@@ -81,7 +81,7 @@ SwXTextDocument* SwTiledRenderingTest::createDoc(const char* 
pName)
 void SwTiledRenderingTest::setupLibreOfficeKitViewCallback(SfxViewShell* 
pViewShell)
 {
     pViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(pViewShell));
+    m_callbackWrapper.setLOKViewId(SfxLokHelper::getView(*pViewShell));
 }
 
 void SwTiledRenderingTest::callback(int nType, const char* pPayload, void* 
pData)
commit b3f03d755385c78613460e696e3e212975884196
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jul 23 16:51:17 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Jul 24 15:50:36 2025 +0200

    SfxLokHelper::getView() -> SfxLokHelper::getCurrentView()
    
    these ones definitely work on SfxViewShell::Current();
    
    Change-Id: I47666922673d82bccfbe0b9af55b24e1f146507c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188280
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 975482466baa..4ce673195ab3 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1667,7 +1667,7 @@ void DesktopLOKTest::testNotificationCompression()
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     std::vector<std::tuple<int, std::string>> notifs;
     std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-    handler->setViewId(SfxLokHelper::getView());
+    handler->setViewId(SfxLokHelper::getCurrentView());
 
     handler->queue(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, ""_ostr); // 0
     handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"_ostr); // 
Superseded.
@@ -1763,7 +1763,7 @@ void DesktopLOKTest::testTileInvalidationCompression()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 
0"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 
0"_ostr);
@@ -1784,7 +1784,7 @@ void DesktopLOKTest::testTileInvalidationCompression()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 
0"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 
0"_ostr); // Different part
@@ -1808,7 +1808,7 @@ void DesktopLOKTest::testTileInvalidationCompression()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 
0"_ostr); // 0
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 
0"_ostr); // 1: Different part
@@ -1835,7 +1835,7 @@ void DesktopLOKTest::testTileInvalidationCompression()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 0, 
0"_ostr); // 0
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 100, 100, 1, 
0"_ostr); // 1: Different part
@@ -1871,7 +1871,7 @@ void DesktopLOKTest::testTileInvalidationCompression()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 
0"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "EMPTY, 0, 0"_ostr);
@@ -1896,7 +1896,7 @@ void DesktopLOKTest::testPartInInvalidation()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10"_ostr);
@@ -1912,7 +1912,7 @@ void DesktopLOKTest::testPartInInvalidation()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "40, 10, 20, 10"_ostr);
@@ -1932,7 +1932,7 @@ void DesktopLOKTest::testPartInInvalidation()
 
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 
0"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 0, 
0"_ostr);
@@ -1951,7 +1951,7 @@ void DesktopLOKTest::testPartInInvalidation()
 
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 
0"_ostr);
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 1, 
0"_ostr);
@@ -1980,7 +1980,7 @@ void DesktopLOKTest::testBinaryCallback()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackBinaryCallbackTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->queue(LOK_CALLBACK_INVALIDATE_TILES, OString(rect1String));
 
@@ -1993,7 +1993,7 @@ void DesktopLOKTest::testBinaryCallback()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackBinaryCallbackTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->tilePainted(/*nPart=*/INT_MIN, /*nMode=*/0, rect1);
         handler->libreOfficeKitViewInvalidateTilesCallback(&rect1, INT_MIN, 0);
@@ -2008,7 +2008,7 @@ void DesktopLOKTest::testBinaryCallback()
     {
         std::vector<std::tuple<int, std::string>> notifs;
         std::unique_ptr<CallbackFlushHandler> handler(new 
CallbackFlushHandler(pDocument, callbackBinaryCallbackTest, &notifs));
-        handler->setViewId(SfxLokHelper::getView());
+        handler->setViewId(SfxLokHelper::getCurrentView());
 
         handler->tilePainted(/*nPart=*/INT_MIN, /*nMode=*/0, rect1);
         handler->libreOfficeKitViewInvalidateTilesCallback(nullptr, INT_MIN, 
0);
@@ -2270,7 +2270,7 @@ public:
           m_bTilesInvalidated(false),
           m_bZeroCursor(false)
     {
-        mnView = SfxLokHelper::getView();
+        mnView = SfxLokHelper::getCurrentView();
         mpDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, this);
     }
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ad4bdd739d25..bbe6cc7476a7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4672,7 +4672,7 @@ static void doc_registerCallback(LibreOfficeKitDocument* 
pThis,
 
     LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
 
-    const int nView = SfxLokHelper::getView();
+    const int nView = SfxLokHelper::getCurrentView();
     if (nView < 0)
         return;
 
@@ -5417,7 +5417,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
         aPropertyValuesVector.push_back(aSynchronMode);
     }
 
-    int nView = SfxLokHelper::getView();
+    int nView = SfxLokHelper::getCurrentView();
     if (nView < 0)
         return;
 
@@ -7045,7 +7045,7 @@ static int doc_getView(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pThis*/)
     SolarMutexGuard aGuard;
     SetLastExceptionMsg();
 
-    return SfxLokHelper::getView();
+    return SfxLokHelper::getCurrentView();
 }
 
 static int doc_getViewsCount(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
pThis)
diff --git a/desktop/source/lib/lokclipboard.cxx 
b/desktop/source/lib/lokclipboard.cxx
index c64a9ecd9cb2..2d5d12d73f4f 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -29,7 +29,7 @@ static tools::DeleteOnDeinit<std::unordered_map<int, 
rtl::Reference<LOKClipboard
 
 rtl::Reference<LOKClipboard> LOKClipboardFactory::getClipboardForCurView()
 {
-    int nViewId = SfxLokHelper::getView(); // currently active.
+    int nViewId = SfxLokHelper::getCurrentView(); // currently active.
 
     osl::MutexGuard aGuard(gMutex);
 
diff --git a/desktop/source/lib/lokinteractionhandler.cxx 
b/desktop/source/lib/lokinteractionhandler.cxx
index 2d1e7cb74cbb..de1e26e8f163 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -120,7 +120,7 @@ void 
LOKInteractionHandler::postError(css::task::InteractionClassification class
     aJson.put("code", static_cast<sal_uInt32>(code));
     aJson.put("message", message.toUtf8());
 
-    std::size_t nView = SfxViewShell::Current() ? SfxLokHelper::getView() : 0;
+    std::size_t nView = SfxViewShell::Current() ? 
SfxLokHelper::getCurrentView() : 0;
     if (m_pLOKDocument && m_pLOKDocument->mpCallbackFlushHandlers.count(nView))
         
m_pLOKDocument->mpCallbackFlushHandlers[nView]->queue(LOK_CALLBACK_ERROR, 
aJson.finishAndGetAsOString());
     else if (m_pLOKit->mpCallback)
diff --git a/sc/qa/unit/helper/sctestviewcallback.cxx 
b/sc/qa/unit/helper/sctestviewcallback.cxx
index f590c79879cf..9006de61289f 100644
--- a/sc/qa/unit/helper/sctestviewcallback.cxx
+++ b/sc/qa/unit/helper/sctestviewcallback.cxx
@@ -153,7 +153,7 @@ ScTestViewCallback::ScTestViewCallback(bool 
bDeleteListenerOnDestruct)
 {
     mpViewShell = SfxViewShell::Current();
     mpViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    mnView = SfxLokHelper::getView();
+    mnView = SfxLokHelper::getCurrentView();
     m_callbackWrapper.setLOKViewId(mnView);
     if (!bDeleteListenerOnDestruct)
         mpViewShell = nullptr;
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 6e3f2c2f8deb..282bfeee1cf5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -226,7 +226,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testViewCursors)
     pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DOWN);
     pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DOWN);
     Scheduler::ProcessEventsToIdle();
-    SfxLokHelper::destroyView(SfxLokHelper::getView());
+    SfxLokHelper::destroyView(SfxLokHelper::getCurrentView());
     CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated);
 }
 
@@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testUndoShells)
     ScUndoManager* pUndoManager = rDoc.GetUndoManager();
     CPPUNIT_ASSERT(pUndoManager);
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), 
pUndoManager->GetUndoActionCount());
-    sal_Int32 nView1 = SfxLokHelper::getView();
+    sal_Int32 nView1 = SfxLokHelper::getCurrentView();
     // This was -1: ScSimpleUndo did not remember what view shell created it.
     CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), 
pUndoManager->GetUndoAction()->GetViewShellId());
 }
@@ -463,7 +463,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testTextEditViewInvalidations)
     CPPUNIT_ASSERT(pViewData);
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -533,7 +533,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testCreateViewGraphicSelection)
     CPPUNIT_ASSERT(aView1.m_bGraphicSelection);
 
     // Create a second view.
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
@@ -725,7 +725,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testCommentCallback)
     {
         ScModelObj* pModelObj = createDoc("small.ods");
         ScTestViewCallback aView1;
-        int nView1 = SfxLokHelper::getView();
+        int nView1 = SfxLokHelper::getCurrentView();
 
         // Create a 2nd view
         SfxLokHelper::createView();
@@ -833,12 +833,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoLimiting)
     CPPUNIT_ASSERT(pUndoManager);
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
 
@@ -891,12 +891,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoRepairDispatch)
     CPPUNIT_ASSERT(pUndoManager);
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
 
@@ -982,7 +982,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testDocumentSizeWithTwoViews)
     Scheduler::ProcessEventsToIdle();
 
     // Create a new view
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
 
     std::vector<unsigned char> aBuffer2(nCanvasWidth * nCanvasHeight * 4);
@@ -1006,12 +1006,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testDisableUndoRepair)
     CPPUNIT_ASSERT(pModelObj);
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxViewShell* pView1 = SfxViewShell::Current();
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SfxViewShell* pView2 = SfxViewShell::Current();
     CPPUNIT_ASSERT(pView1 != pView2);
 
@@ -1082,10 +1082,10 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testDocumentRepair)
     SfxViewShell* pView1 = SfxViewShell::Current();
 
     // view #2
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SfxViewShell* pView2 = SfxViewShell::Current();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     CPPUNIT_ASSERT(pView1 != pView2);
     {
         std::unique_ptr<SfxBoolItem> pItem1;
@@ -1133,7 +1133,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testLanguageStatus)
     SfxViewShell* pView1 = SfxViewShell::Current();
 
     // view #2
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SfxViewShell* pView2 = SfxViewShell::Current();
     CPPUNIT_ASSERT(pView1 != pView2);
@@ -1191,7 +1191,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testMultiViewCopyPaste)
     
pView1->GetViewData().GetActiveWin()->SetClipboard(css::datatransfer::clipboard::LokClipboard::create(comphelper::getProcessComponentContext()));
 
     // view #2
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     ScTabViewShell* pView2 = 
dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
     // emulate clipboard
@@ -1261,7 +1261,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testFilterDlg)
 
     // view #1
     SfxViewShell* pView1 = SfxViewShell::Current();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     // view #2
     SfxLokHelper::createView();
@@ -1297,7 +1297,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testFunctionDlg)
 
     // view #1
     SfxViewShell* pView1 = SfxViewShell::Current();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     {
         pView1->GetViewFrame().GetDispatcher()->Execute(SID_OPENDLG_FUNCTION,
             SfxCallMode::SLOT|SfxCallMode::RECORD);
@@ -1385,7 +1385,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testPageDownInvalidation)
     ScViewData* pViewData = ScDocShell::GetViewData();
     CPPUNIT_ASSERT(pViewData);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1431,7 +1431,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testSheetChangeNoInvalidation)
     ScTabViewShell* pView = 
dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
     CPPUNIT_ASSERT(pView);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1499,7 +1499,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testInsertDeletePageInvalidation)
     ScViewData* pViewData = ScDocShell::GetViewData();
     CPPUNIT_ASSERT(pViewData);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1540,7 +1540,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testGetRowColumnHeadersInvalidation)
     ScViewData* pViewData = ScDocShell::GetViewData();
     CPPUNIT_ASSERT(pViewData);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1584,7 +1584,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testJumpHorizontallyInvalidation)
     ScViewData* pViewData = ScDocShell::GetViewData();
     CPPUNIT_ASSERT(pViewData);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1608,7 +1608,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testJumpToLastRowInvalidation)
     ScViewData* pViewData = ScDocShell::GetViewData();
     CPPUNIT_ASSERT(pViewData);
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
@@ -1633,12 +1633,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testRowColumnHeaders)
 
     // view #1
     ScTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView2;
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
 
@@ -1874,11 +1874,11 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testSheetGeometryDataInvariance)
 
     // view #1
     ScTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView2;
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
 
@@ -2355,7 +2355,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testSheetViewDataCrash)
     ScModelObj* pModelObj = createDoc("empty.ods");
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::setView(nView1);
 
     // Imitate online while creating a new sheet on empty.ods.
@@ -2418,7 +2418,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testCommentCellCopyPaste)
     {
         ScModelObj* pModelObj = createDoc("empty.ods");
         ScTestViewCallback aView;
-        int nView = SfxLokHelper::getView();
+        int nView = SfxLokHelper::getCurrentView();
 
         SfxLokHelper::setView(nView);
 
@@ -2510,7 +2510,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testInvalidEntrySave)
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     const ScDocument* pDoc = pModelObj->GetDocument();
     ScTestViewCallback aView;
-    int nView = SfxLokHelper::getView();
+    int nView = SfxLokHelper::getCurrentView();
 
     SfxLokHelper::setView(nView);
 
@@ -2549,12 +2549,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoReordering)
     CPPUNIT_ASSERT(pUndoManager);
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
 
@@ -2609,13 +2609,13 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoReorderingRedo)
     CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxViewShell* pView1 = SfxViewShell::Current();
     ScTestViewCallback aView1;
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SfxViewShell* pView2 = SfxViewShell::Current();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
@@ -2699,12 +2699,12 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testUndoReorderingMulti)
     CPPUNIT_ASSERT_EQUAL(std::size_t(0), pUndoManager->GetUndoActionCount());
 
     // view #1
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
 
     // view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     ScTestViewCallback aView2;
 
@@ -2765,7 +2765,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testGetViewRenderState)
     aColorConfig.AddScheme(u"Light"_ustr);
 
     ScModelObj* pModelObj = createDoc("empty.ods");
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
 
     CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, pModelObj->getViewRenderState());
@@ -2881,7 +2881,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testOpenURL)
 {
     // Given a document that has 2 views:
     createDoc("empty.ods");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     SfxLokHelper::createView();
     ScTestViewCallback aView2;
@@ -3043,13 +3043,13 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testCellInvalidationDocWithExistingZo
 
     Scheduler::ProcessEventsToIdle();
 
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     // register to track View #1 invalidations
     ScTestViewCallback aView1;
 
     // Create a View #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     // register to track View #1 invalidations
     ScTestViewCallback aView2;
@@ -3179,7 +3179,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testStatusBarLocale)
 {
     // Given 2 views, the second's locale is set to German:
     createDoc("empty.ods");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     SfxLokHelper::createView();
     ScTestViewCallback aView2;
@@ -3278,7 +3278,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testLongFirstColumnMouseClick)
 
     // Setup view #2
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView2;
     // Set client rect to 2000 x 2000 pixels
     pModelObj->setClientVisibleArea(tools::Rectangle(0, 0, 2000 / nPPTX, 2000 
/ nPPTY));
@@ -3404,7 +3404,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testNumberFormatLocaleMultiUser)
         
pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
         ScDocument* pDoc = pModelObj->GetDocument();
 
-        int nViewFR = SfxLokHelper::getView();
+        int nViewFR = SfxLokHelper::getCurrentView();
         ScTestViewCallback aView1;
         SfxViewShell* pViewFR = SfxViewShell::Current();
         pViewFR->SetLOKLocale(u"fr-FR"_ustr);
diff --git a/sc/qa/unit/tiledrendering/tiledrendering2.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering2.cxx
index ff6ed1881542..b9df067e40dc 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering2.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering2.cxx
@@ -27,7 +27,7 @@ using namespace com::sun::star;
 CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, testSidebarLocale)
 {
     ScModelObj* pModelObj = createDoc("chart.ods");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     ScTestViewCallback aView1;
     SfxViewShell* pView1 = SfxViewShell::Current();
     pView1->SetLOKLocale(u"en-US"_ustr);
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index f5ee3e462700..8bdfe392e838 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -288,7 +288,7 @@ void ScViewFunc::InsertCurrentTime(SvNumFormatType nReqFmt, 
const OUString& rUnd
     const SvNumFormatType nCurNumFormatType = (pCurNumFormatEntry ?
             pCurNumFormatEntry->GetMaskedType() : SvNumFormatType::UNDEFINED);
 
-    const int nView(comphelper::LibreOfficeKit::isActive() ? 
SfxLokHelper::getView() : -1);
+    const int nView(comphelper::LibreOfficeKit::isActive() ? 
SfxLokHelper::getCurrentView() : -1);
     if (nView >= 0)
     {
         const auto [isTimezoneSet, aTimezone] = 
SfxLokHelper::getViewTimezone(nView);
diff --git a/sd/qa/unit/sdtiledrenderingtest.cxx 
b/sd/qa/unit/sdtiledrenderingtest.cxx
index 09607dfff428..30c62b69980f 100644
--- a/sd/qa/unit/sdtiledrenderingtest.cxx
+++ b/sd/qa/unit/sdtiledrenderingtest.cxx
@@ -213,7 +213,7 @@ SdTestViewCallback::SdTestViewCallback()
 {
     mpViewShell = SfxViewShell::Current();
     mpViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    mnView = SfxLokHelper::getView();
+    mnView = SfxLokHelper::getCurrentView();
     m_callbackWrapper.setLOKViewId(mnView);
 }
 
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7059c59391ca..3dbc9b672f6f 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -234,7 +234,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testSetGraphicSelection)
     pXImpressDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_END, 
o3tl::toTwips(pHdl->GetPos().getX(), o3tl::Length::mm100), 
o3tl::toTwips(pHdl->GetPos().getY() + 1000, o3tl::Length::mm100));
 
     // Assert that view shell ID tracking works.
-    sal_Int32 nView1 = SfxLokHelper::getView();
+    sal_Int32 nView1 = SfxLokHelper::getCurrentView();
     SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
     sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), 
pUndoManager->GetUndoActionCount());
@@ -265,7 +265,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testUndoShells)
     SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
     sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), 
pUndoManager->GetUndoActionCount());
-    sal_Int32 nView1 = SfxLokHelper::getView();
+    sal_Int32 nView1 = SfxLokHelper::getCurrentView();
     // This was -1, SdUndoGroup did not track what view shell created it.
     CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), 
pUndoManager->GetUndoAction()->GetViewShellId());
 }
@@ -623,7 +623,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testCursorViews)
 {
     // Create the first view.
     SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SdTestViewCallback aView1;
 
     // Begin text edit on the only object on the slide.
@@ -747,7 +747,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCursorVisibility_MultiView)
 {
     // Create the first view.
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
-    const int nView1 = SfxLokHelper::getView();
+    const int nView1 = SfxLokHelper::getCurrentView();
     SdTestViewCallback aView1;
 
     // Begin text edit on the only object on the slide.
@@ -761,7 +761,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCursorVisibility_MultiView)
     // Make sure that cursor state is not changed just because we create a 
second view.
     SfxLokHelper::createView();
     
pXImpressDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
-    const int nView2 = SfxLokHelper::getView();
+    const int nView2 = SfxLokHelper::getCurrentView();
     Scheduler::ProcessEventsToIdle();
     CPPUNIT_ASSERT_EQUAL(false, aView1.m_bCursorVisibleChanged);
     CPPUNIT_ASSERT_EQUAL(false, aView1.m_aViewCursorVisibilities[nView2]);
@@ -861,7 +861,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testUndoLimiting)
     // Create the first view.
     SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
     sd::ViewShell* pViewShell1 = 
pXImpressDocument->GetDocShell()->GetViewShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     sd::ViewShell* pViewShell2 = 
pXImpressDocument->GetDocShell()->GetViewShell();
     CPPUNIT_ASSERT(pViewShell1 != pViewShell2);
@@ -1353,7 +1353,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentCallbacks)
         {".uno:Author", uno::Any(u"LOK User1"_ustr)},
     }));
     SdTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     SfxLokHelper::createView();
     uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
@@ -1362,7 +1362,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testCommentCallbacks)
     }));
     pXImpressDocument->initializeForTiledRendering(aArgs);
     SdTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     SfxLokHelper::setView(nView1);
 
@@ -1544,7 +1544,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testMultiViewInsertDeletePage)
     // Load the document.
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     SdTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     uno::Sequence<beans::PropertyValue> aArgs;
     SdDrawDocument* pDoc = pXImpressDocument->GetDocShell()->GetDoc();
 
@@ -1552,7 +1552,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testMultiViewInsertDeletePage)
     SfxLokHelper::createView();
     pXImpressDocument->initializeForTiledRendering(aArgs);
     SdTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // the document has 8 slides
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), 
pDoc->GetSdPageCount(PageKind::Standard));
@@ -1582,7 +1582,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testMultiViewInsertDeletePage2)
     // Load the document.
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     SdTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     uno::Sequence<beans::PropertyValue> aArgs;
     SdDrawDocument* pDoc = pXImpressDocument->GetDocShell()->GetDoc();
 
@@ -1590,7 +1590,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testMultiViewInsertDeletePage2)
     SfxLokHelper::createView();
     pXImpressDocument->initializeForTiledRendering(aArgs);
     SdTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // the document has 8 slides
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), 
pDoc->GetSdPageCount(PageKind::Standard));
@@ -1649,13 +1649,13 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testDisableUndoRepair)
     // Create View 1
     SfxViewShell* pView1 = SfxViewShell::Current();
     sd::ViewShell* pViewShell1 = 
pXImpressDocument->GetDocShell()->GetViewShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     // Create View 2
     SfxLokHelper::createView();
     SfxViewShell* pView2 = SfxViewShell::Current();
     sd::ViewShell* pViewShell2 = 
pXImpressDocument->GetDocShell()->GetViewShell();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // Check UNDO is disabled
     {
@@ -1732,7 +1732,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testDocumentRepair)
     // view #2
     SfxLokHelper::createView();
     SfxViewShell* pView2 = SfxViewShell::Current();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     sd::ViewShell* pViewShell2 = 
pXImpressDocument->GetDocShell()->GetViewShell();
 
     CPPUNIT_ASSERT(pView1 != pView2);
@@ -2090,7 +2090,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testGetViewRenderState)
     aColorConfig.AddScheme(u"Light"_ustr);
 
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     SdTestViewCallback aView1;
     CPPUNIT_ASSERT_EQUAL("S;Default"_ostr, 
pXImpressDocument->getViewRenderState());
     // Create a second view
@@ -2153,7 +2153,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testThemeViewSeparation)
         aColorConfig.AddScheme(u"Light"_ustr);
     }
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     SdTestViewCallback aView1;
     // Switch first view to light scheme
     {
@@ -2168,7 +2168,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testThemeViewSeparation)
     assertTilePixelColor(pXImpressDocument, 255, 255, COL_WHITE);
     // Create second view
     SfxLokHelper::createView();
-    int nSecondViewId = SfxLokHelper::getView();
+    int nSecondViewId = SfxLokHelper::getCurrentView();
     SdTestViewCallback aView2;
     // Set second view to dark scheme
     {
@@ -2270,10 +2270,10 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testSlideDuplicateUndo)
 {
     // Create two views.
     SdXImpressDocument* pXImpressDocument = createDoc("duplicate-undo.odp");
-    int nView0 = SfxLokHelper::getView();
+    int nView0 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     pXImpressDocument->initializeForTiledRendering({});
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::setView(nView0);
 
     // Switch to the 3rd slide on view 0, and start text editing.
@@ -2408,14 +2408,14 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testShapeEditInMultipleViews)
     SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
 
     // Create view 1
-    const int nView1 = SfxLokHelper::getView();
+    const int nView1 = SfxLokHelper::getCurrentView();
     sd::ViewShell* pViewShell1 = 
pXImpressDocument->GetDocShell()->GetViewShell();
     SdrView* pView1 = pViewShell1->GetView();
     Scheduler::ProcessEventsToIdle();
 
     // Create view 2
     SfxLokHelper::createView();
-    const int nView2 = SfxLokHelper::getView();
+    const int nView2 = SfxLokHelper::getCurrentView();
     CPPUNIT_ASSERT(nView1 != nView2);
 
     sd::ViewShell* pViewShell2 = 
pXImpressDocument->GetDocShell()->GetViewShell();
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 25d650de8ef2..e17b77b0f6ef 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -44,7 +44,7 @@ void SfxHintPoster::Post(std::unique_ptr<SfxRequest> 
pHintToPost)
             SAL_WARN("sfx.notify", "SfxHintPoster::Post: posting new hint 
during setting a view");
         }
 
-        pHintToPost->SetLokViewId(SfxLokHelper::getView());
+        pHintToPost->SetLokViewId(SfxLokHelper::getCurrentView());
     }
 
     Application::PostUserEvent((LINK(this, SfxHintPoster, DoEvent_Impl)), 
pHintToPost.release());
@@ -61,7 +61,7 @@ IMPL_LINK(SfxHintPoster, DoEvent_Impl, void*, pPostedHint, 
void)
         if (comphelper::LibreOfficeKit::isActive())
         {
             int nNewId = pRequest->GetLokViewId();
-            nOldId = SfxLokHelper::getView();
+            nOldId = SfxLokHelper::getCurrentView();
             if (nNewId != -1 && nNewId != nOldId)
             {
                 // The current view ID is not the one that was active when 
posting the hint, switch
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 7de96cad8436..9a0b9b293488 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -1069,7 +1069,7 @@ void SfxLokHelper::registerViewCallbacks()
         SfxLokHelper::setView(nView);
     });
     comphelper::LibreOfficeKit::setViewGetter([]() -> int {
-        return SfxLokHelper::getView();
+        return SfxLokHelper::getCurrentView();
     });
 }
 
@@ -1091,7 +1091,7 @@ namespace
         if (pLOKEv->mpWindow->isDisposed())
             return;
 
-        int nView = SfxLokHelper::getView(nullptr);
+        int nView = SfxLokHelper::getCurrentView();
         if (nView != pLOKEv->mnView)
         {
             SAL_INFO("sfx.view", "LOK - view mismatch " << nView << " vs. " << 
pLOKEv->mnView);
@@ -1181,7 +1181,7 @@ namespace
             return;
         }
 
-        pEvent->mnView = SfxLokHelper::getView(nullptr);
+        pEvent->mnView = SfxLokHelper::getCurrentView();
         if (vcl::lok::isUnipoll())
         {
             if (!Application::IsMainThread())
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 4ebc4be96149..6495ae7d1a35 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -513,10 +513,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testMissingInvalidation)
     // Create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // First view: put the cursor into the first word.
     SfxLokHelper::setView(nView1);
@@ -724,7 +724,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoInvalidations)
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwTestViewCallback aView2;
@@ -755,7 +755,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoLimiting)
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
 
@@ -781,7 +781,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoReordering)
     // Create two views and a document of 2 paragraphs.
     SwXTextDocument* pXTextDocument = createDoc();
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwWrtShell* pWrtShell2 = getSwDocShell()->GetWrtShell();
@@ -821,7 +821,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoReorderingRedo)
     // Create two views and a document of 2 paragraphs.
     SwXTextDocument* pXTextDocument = createDoc();
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwWrtShell* pWrtShell2 = getSwDocShell()->GetWrtShell();
@@ -867,7 +867,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoReorderingRedo2)
     // Create two views.
     SwXTextDocument* pXTextDocument = createDoc();
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwWrtShell* pWrtShell2 = getSwDocShell()->GetWrtShell();
@@ -909,7 +909,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoReorderingMulti)
     // Create two views and a document of 2 paragraphs.
     SwXTextDocument* pXTextDocument = createDoc();
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwWrtShell* pWrtShell2 = getSwDocShell()->GetWrtShell();
@@ -952,7 +952,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoShapeLimiting)
     // Load a document and create a view.
     SwXTextDocument* pXTextDocument = createDoc("shape.fodt");
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SwWrtShell* pWrtShell2 = getSwDocShell()->GetWrtShell();
@@ -986,10 +986,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoDispatch)
 {
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // Insert a character in the first view.
     SfxLokHelper::setView(nView1);
@@ -1023,10 +1023,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoRepairDispatch)
 {
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // Insert a character in the first view.
     SfxLokHelper::setView(nView1);
@@ -1063,7 +1063,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testShapeTextUndoShells)
 {
     // Load a document and create a view.
     createDoc("shape.fodt");
-    sal_Int32 nView1 = SfxLokHelper::getView();
+    sal_Int32 nView1 = SfxLokHelper::getCurrentView();
 
     // Begin text edit.
     SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
@@ -1089,7 +1089,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testShapeTextUndoGroupShells)
     // Load a document and create a view.
     SwXTextDocument* pXTextDocument = createDoc("shape.fodt");
     SwTestViewCallback aView1;
-    sal_Int32 nView1 = SfxLokHelper::getView();
+    sal_Int32 nView1 = SfxLokHelper::getCurrentView();
 
     // Begin text edit.
     SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
@@ -1264,7 +1264,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testGetViewRenderState)
 {
     addDarkLightThemes(COL_BLACK, COL_WHITE);
     SwXTextDocument* pXTextDocument = createDoc();
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView1;
     {
         SwViewOption aViewOptions;
@@ -1276,7 +1276,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testGetViewRenderState)
 
     // Create a second view
     SfxLokHelper::createView();
-    int nSecondViewId = SfxLokHelper::getView();
+    int nSecondViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView2;
     {
         // Give the second view different options
@@ -1335,7 +1335,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testThemeViewSeparation)
     Color aDarkColor(0x1c, 0x1c, 0x1c);
     addDarkLightThemes(aDarkColor, COL_WHITE);
     SwXTextDocument* pXTextDocument = createDoc();
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView1;
     // Set first view to light scheme
     {
@@ -1352,7 +1352,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testThemeViewSeparation)
     CPPUNIT_ASSERT_EQUAL(COL_WHITE, getTilePixelColor(pXTextDocument, 255, 
255));
     // Create second view
     SfxLokHelper::createView();
-    int nSecondViewId = SfxLokHelper::getView();
+    int nSecondViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView2;
     // Set second view to dark scheme
     {
@@ -1395,7 +1395,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testInvertBackgroundViewSeparation)
         aDarkColor = COL_WHITE;
     addDarkLightThemes(aDarkColor, COL_WHITE);
     SwXTextDocument* pXTextDocument = createDoc();
-    int nFirstViewId = SfxLokHelper::getView();
+    int nFirstViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView1;
     // Set view to dark scheme
     {
@@ -1412,7 +1412,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testInvertBackgroundViewSeparation)
     CPPUNIT_ASSERT_EQUAL(aDarkColor, getTilePixelColor(pXTextDocument, 255, 
255));
     // Create second view
     SfxLokHelper::createView();
-    int nSecondViewId = SfxLokHelper::getView();
+    int nSecondViewId = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView2;
     // Set second view to dark scheme
     {
@@ -1520,7 +1520,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testSetViewGraphicSelection)
 {
     // Load a document.
     SwXTextDocument* pXTextDocument = createDoc("frame.odt");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView1;
     // Create a second view, and switch back to the first view.
     SfxLokHelper::createView();
@@ -1749,11 +1749,11 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testUndoRepairResult)
 {
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     rtl::Reference<TestResultListener> pResult2 = new TestResultListener();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // Insert a character in the second view.
     SfxLokHelper::setView(nView2);
@@ -1779,11 +1779,11 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testRedoRepairResult)
 {
     // Load a document and create two views.
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     rtl::Reference<TestResultListener> pResult2 = new TestResultListener();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // Insert a character in the second view.
     SfxLokHelper::setView(nView2);
@@ -1836,12 +1836,12 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testDisableUndoRepair)
     SwTestViewCallback aView1;
     SwView* pView1 = dynamic_cast<SwView*>(SfxViewShell::Current());
     CPPUNIT_ASSERT(pView1);
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
     SwView* pView2 = dynamic_cast<SwView*>(SfxViewShell::Current());
     CPPUNIT_ASSERT(pView2);
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     {
         SfxItemSet aItemSet1(getSwDocShell()->GetDoc()->GetAttrPool(), 
svl::Items<SID_UNDO, SID_UNDO>);
@@ -1896,7 +1896,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testAllTrackedChanges)
     SwWrtShell* pWrtShell1 = pView1->GetWrtShellPtr();
 
     // view #2
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     int nView2 = SfxLokHelper::createView();
     SwView* pView2 = dynamic_cast<SwView*>(SfxViewShell::Current());
     CPPUNIT_ASSERT(pView2);
@@ -1964,10 +1964,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testDocumentRepair)
     SfxViewShell* pView1 = SfxViewShell::Current();
 
     // view #2
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SfxViewShell* pView2 = SfxViewShell::Current();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     CPPUNIT_ASSERT(pView1 != pView2);
     {
         std::unique_ptr<SfxBoolItem> pItem1;
@@ -2461,10 +2461,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testVisCursorInvalidation)
 {
     SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SwTestViewCallback aView2;
     Scheduler::ProcessEventsToIdle();
 
@@ -3787,10 +3787,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testRedlineTooltip)
 CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testToggleFormattingMarks)
 {
     SwXTextDocument* pXTextDocument = createDoc();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
 
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
 
     SfxLokHelper::setView(nView1);
diff --git a/sw/qa/extras/tiledrendering/tiledrendering2.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering2.cxx
index 7258a65b9912..a8bc37610fc4 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering2.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering2.cxx
@@ -46,7 +46,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testStatusBarPageNumber)
 {
     // Given a document with 2 pages, first view on page 1, second view on 
page 2:
     SwXTextDocument* pXTextDocument = createDoc();
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = getSwDocShell()->GetWrtShell();
     pWrtShell1->InsertPageBreak();
     SwRootFrame* pLayout = 
pWrtShell1->getIDocumentLayoutAccess().GetCurrentLayout();
@@ -55,7 +55,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testStatusBarPageNumber)
     SwFrame* pPage2 = pPage1->GetNext();
     CPPUNIT_ASSERT(pPage2);
     SfxLokHelper::createView();
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     
pXTextDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
     SfxLokHelper::setView(nView1);
     SwTestViewCallback aView1;
@@ -386,10 +386,10 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerViewEnableOne)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
 
     // When recording changes in view1:
     SfxLokHelper::setView(nView1);
@@ -429,11 +429,11 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerViewEnableBoth)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::setView(nView1);
     comphelper::dispatchCommand(".uno:TrackChangesInThisView", {});
@@ -457,7 +457,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerViewAllToOneTransi
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
@@ -483,12 +483,12 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerViewInsert)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     pWrtShell1->Insert(u"X"_ustr);
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::setView(nView1);
     comphelper::dispatchCommand(".uno:TrackChangesInThisView", {});
@@ -517,12 +517,12 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerViewDelete)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     pWrtShell1->Insert(u"test"_ustr);
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::setView(nView1);
     comphelper::dispatchCommand(".uno:TrackChangesInThisView", {});
@@ -553,12 +553,12 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesPerDocInsert)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     pWrtShell1->Insert(u"X"_ustr);
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
-    int nView2 = SfxLokHelper::getView();
+    int nView2 = SfxLokHelper::getCurrentView();
     SwWrtShell* pWrtShell2 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::setView(nView1);
     comphelper::dispatchCommand(".uno:TrackChanges", {});
@@ -586,7 +586,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesStates)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwView* pView1 = pXTextDocument->GetDocShell()->GetView();
     SfxLokHelper::createView();
     SwTestViewCallback aView2;
@@ -696,7 +696,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testTrackChangesInsertUndo)
     SwXTextDocument* pXTextDocument = createDoc();
     CPPUNIT_ASSERT(pXTextDocument);
     SwTestViewCallback aView1;
-    int nView1 = SfxLokHelper::getView();
+    int nView1 = SfxLokHelper::getCurrentView();
     SwView* pView1 = pXTextDocument->GetDocShell()->GetView();
     SwWrtShell* pWrtShell1 = pXTextDocument->GetDocShell()->GetWrtShell();
     SfxLokHelper::createView();
diff --git a/sw/qa/unit/swtestviewcallback.cxx 
b/sw/qa/unit/swtestviewcallback.cxx
index ec23e224c539..927f6dfbdfdf 100644
--- a/sw/qa/unit/swtestviewcallback.cxx
+++ b/sw/qa/unit/swtestviewcallback.cxx
@@ -41,7 +41,7 @@ SwTestViewCallback::SwTestViewCallback(
 
     mpViewShell = pViewShell ? pViewShell : SfxViewShell::Current();
     mpViewShell->setLibreOfficeKitViewCallback(&m_callbackWrapper);
-    mnView = SfxLokHelper::getView();
+    mnView = SfxLokHelper::getCurrentView();
     m_callbackWrapper.setLOKViewId(mnView);
 }
 

Reply via email to