sw/qa/uitest/data/tdf146356.odt         |binary
 sw/qa/uitest/writer_tests8/tdf146356.py |   24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit bfb6904d8c0b054409faf8469752b033d7c2955a
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Wed Mar 6 16:29:33 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu Mar 7 21:44:35 2024 +0100

    test of tdf#146356
    
    Inserts a paragraph in front of a protected table of contents
    and inserts text into the new paragraph
    
    Change-Id: I951fa2bea63dc2b5721876268aa27a8df579b210
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164480
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sw/qa/uitest/data/tdf146356.odt b/sw/qa/uitest/data/tdf146356.odt
new file mode 100755
index 000000000000..a143986a1423
Binary files /dev/null and b/sw/qa/uitest/data/tdf146356.odt differ
diff --git a/sw/qa/uitest/writer_tests8/tdf146356.py 
b/sw/qa/uitest/writer_tests8/tdf146356.py
new file mode 100755
index 000000000000..9fd9631d4794
--- /dev/null
+++ b/sw/qa/uitest/writer_tests8/tdf146356.py
@@ -0,0 +1,24 @@
+# -*- 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
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.linguistic.linguservice import get_lingu_service_manager
+from com.sun.star.lang import Locale
+import time
+
+# insert paragraph in front of a protected table of contents
+# and insert text into this new paragraph
+class tdf146356(UITestCase):
+    def test_tdf146356_insert_para_before_TOX(self):
+        with self.ui_test.load_file(get_url_for_data_file("tdf146356.odt")) as 
writer_doc:
+            xWriterDoc = self.xUITest.getTopFocusWindow()
+            xWriterEdit = xWriterDoc.getChild("writer_edit")
+            xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"ALT+RETURN"}))
+            xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": "Some 
text"}))

Reply via email to