desktop/qa/desktop_lib/test_desktop_lib.cxx |   36 ----------------------------
 sw/source/uibase/docvw/AnnotationWin2.cxx   |    5 ---
 2 files changed, 41 deletions(-)

New commits:
commit 7a9b6456227c2a54b0b23cfc18679883b638e969
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Feb 2 11:57:23 2021 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Feb 2 20:02:23 2021 +0100

    lok: remove annotation viewshell notifier
    
    Unfortunately the Annotation window sends cursor position
    to client side and it causes horrible effects like
    scrolling document due to different coordinates with the
    document.
    
    This patch will disable any notification to client side,
    also it removes a unit test related to check annotation
    cursor position.
    
    Change-Id: Ib432ef020c48bb1a9c82acc43ffccdb4230589c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110328
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 4f708dfe76c5..af9b93620351 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -199,7 +199,6 @@ public:
     void testTrackChanges();
     void testRedlineCalc();
     void testPaintPartTile();
-    void testWriterCommentInsertCursor();
 #if HAVE_MORE_FONTS
     void testGetFontSubset();
 #endif
@@ -261,7 +260,6 @@ public:
     CPPUNIT_TEST(testTrackChanges);
     CPPUNIT_TEST(testRedlineCalc);
     CPPUNIT_TEST(testPaintPartTile);
-    CPPUNIT_TEST(testWriterCommentInsertCursor);
 #if HAVE_MORE_FONTS
     CPPUNIT_TEST(testGetFontSubset);
 #endif
@@ -2064,40 +2062,6 @@ void DesktopLOKTest::testPaintPartTile()
     //CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
 }
 
-void DesktopLOKTest::testWriterCommentInsertCursor()
-{
-    // Load a document and type a character into the body text of the second 
view.
-    LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-    pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
-    ViewCallback aView1(pDocument);
-    pDocument->m_pDocumentClass->createView(pDocument);
-    pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
-    ViewCallback aView2(pDocument);
-    pDocument->m_pDocumentClass->postKeyEvent(pDocument, 
LOK_KEYEVENT_KEYINPUT, 'x', 0);
-    pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 
'x', 0);
-    Scheduler::ProcessEventsToIdle();
-    tools::Rectangle aBodyCursor = aView2.m_aOwnCursor;
-
-    // Now insert a comment and make sure that the comment's cursor is shown,
-    // not the body text's one.
-    aView1.m_aOwnCursor.SetEmpty();
-    const int nCtrlAltC = KEY_MOD1 + KEY_MOD2 + 512 + 'c' - 'a';
-    pDocument->m_pDocumentClass->postKeyEvent(pDocument, 
LOK_KEYEVENT_KEYINPUT, 'c', nCtrlAltC);
-    pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 
'c', nCtrlAltC);
-    Scheduler::ProcessEventsToIdle();
-    // Wait for SfxBindings to actually update the state, which updated the
-    // cursor as well.
-    osl::Thread::wait(std::chrono::seconds(1));
-    Scheduler::ProcessEventsToIdle();
-    // This failed: the body cursor was shown right after inserting a comment.
-    CPPUNIT_ASSERT(aView2.m_aOwnCursor.getX() > aBodyCursor.getX());
-    // This failed, the first view's cursor also jumped when the second view
-    // inserted the comment.
-    CPPUNIT_ASSERT(aView1.m_aOwnCursor.IsEmpty());
-
-    Scheduler::ProcessEventsToIdle();
-}
-
 #if HAVE_MORE_FONTS
 void DesktopLOKTest::testGetFontSubset()
 {
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 63cab37214b2..b3d976ddf850 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -934,11 +934,6 @@ void SwAnnotationWin::DoResize()
 
     mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ;
 
-    if (comphelper::LibreOfficeKit::isActive() && 
!mpOutlinerView->GetViewShell())
-    {
-        mpOutlinerView->RegisterViewShell(&mrView);
-    }
-
     if (!mpVScrollbar->IsVisible())
     {   // if we do not have a scrollbar anymore, we want to see the complete 
text
         mpOutlinerView->SetVisArea( PixelToLogic( 
tools::Rectangle(0,0,aWidth,aHeight) ) );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to