summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-02-02 11:57:23 -0400
committerHenry Castro <hcastro@collabora.com>2021-04-12 23:02:11 +0200
commitfa42f20dfa298370c6c4a01b6ee481e6c87d1fa9 (patch)
tree247395ef714ad7ce11ef667289fc123de008a715 /desktop
parent47eaa8cf7d0f64c0deb3b0fa2e9f81ce83bb8b86 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114021 Tested-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index ce99a9356d11..74d7668cd2e6 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -169,7 +169,6 @@ public:
void testTrackChanges();
void testRedlineCalc();
void testPaintPartTile();
- void testWriterCommentInsertCursor();
#if HAVE_MORE_FONTS
void testGetFontSubset();
#endif
@@ -231,7 +230,6 @@ public:
CPPUNIT_TEST(testTrackChanges);
CPPUNIT_TEST(testRedlineCalc);
CPPUNIT_TEST(testPaintPartTile);
- CPPUNIT_TEST(testWriterCommentInsertCursor);
#if HAVE_MORE_FONTS
CPPUNIT_TEST(testGetFontSubset);
#endif
@@ -2047,40 +2045,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()
{