diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-12-24 13:24:30 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-01-15 16:04:40 +0100 |
commit | 79bfb54665b1a8dc2b932318eb6915d300772cff (patch) | |
tree | 923af4d5b8bd0b9049e7f887f5c9a7f6727bcd42 /sw/qa/uitest | |
parent | b4f6a6c143567187c6d0f374b2b9f853ecc63af0 (diff) |
tdf#137459 editeng: Ctrl+Del must only delete right
If there was nothing else at the end of the paragraph,
Ctrl+Del was acting like Ctrl+Backspace - it turned
around and started deleting the earlier words.
Instead, we need to keep deleting to the right,
starting with the next paragraph.
That's what Ctrl-Backspace does in reverse anyway.
It looks like this was just a copy-paste mistake
already seen at original import and the few times
that people tried to fix up this area, they didn't
notice that apparently? But then again, the code
changes don't look that impressive either...
[if x == 1, set x=1?]
make UITest_writer_tests UITEST_TEST_NAME=\
tdf137459_editeng_ctrl-DEL.tdf137459.test_tdf137459
Change-Id: I0c2268f9f1a2102997b2e84b0b7a6d0e2da43b15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108265
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/uitest')
-rw-r--r-- | sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py b/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py new file mode 100644 index 000000000000..1c8c1e54fef0 --- /dev/null +++ b/sw/qa/uitest/writer_tests/tdf137459_editeng_ctrl-DEL.py @@ -0,0 +1,39 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.framework import UITestCase +import time +from uitest.uihelper.common import get_state_as_dict, type_text +from libreoffice.uno.propertyvalue import mkPropertyValues + +class tdf137459(UITestCase): + + def test_tdf137459(self): + + xMainDoc = self.ui_test.create_doc_in_start_center("writer") + + xMainWindow = self.xUITest.getTopFocusWindow() + + xwriter_edit = xMainWindow.getChild("writer_edit") + # adding new Comment + self.xUITest.executeCommand(".uno:InsertAnnotation") + # wait until the comment is available + self.ui_test.wait_until_child_is_available(xMainWindow, 'Comment1') + + xComment1 = xMainWindow.getChild("Comment1") + sText = "Ctrl+Del should not delete BACKWARDS" + xComment1.executeAction("TYPE", mkPropertyValues({"TEXT": sText})) + self.assertEqual(get_state_as_dict(xComment1)["Text"], sText ) + + xComment1.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+DELETE"})) + self.assertEqual(get_state_as_dict(xComment1)["Text"], sText ) + + self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: |