summaryrefslogtreecommitdiffstats
path: root/sw/qa/uitest/writer_tests4
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/uitest/writer_tests4')
-rw-r--r--sw/qa/uitest/writer_tests4/tdf108124.py49
-rw-r--r--sw/qa/uitest/writer_tests4/tdf113252.py49
-rw-r--r--sw/qa/uitest/writer_tests4/tdf113284.py48
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115088.py48
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115572.py80
-rw-r--r--sw/qa/uitest/writer_tests4/tdf115573.py138
-rw-r--r--sw/qa/uitest/writer_tests4/tdf122449.py57
-rw-r--r--sw/qa/uitest/writer_tests4/tdf49683.py38
-rw-r--r--sw/qa/uitest/writer_tests4/tdf51352.py53
9 files changed, 560 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests4/tdf108124.py b/sw/qa/uitest/writer_tests4/tdf108124.py
new file mode 100644
index 000000000..929a3d7b4
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf108124.py
@@ -0,0 +1,49 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+import org.libreoffice.unotest
+import pathlib
+import time
+from uitest.debug import sleep
+
+def get_url_for_data_file(file_name):
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+class tdf108124(UITestCase):
+
+ def test_tdf108124(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf108124.odt"))
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ document = self.ui_test.get_component()
+
+ self.assertEqual(document.GraphicObjects.getCount(), 2) #nr. of images
+
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+a"})) # select all
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+c"})) # copy
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+v"})) # paste
+ self.assertEqual(document.GraphicObjects.getCount(), 2)
+ xObj1Old = document.GraphicObjects[0]
+ xObj2Old = document.GraphicObjects[1]
+ self.xUITest.executeCommand(".uno:Undo") #Undo
+ self.assertEqual(document.GraphicObjects.getCount(), 2)
+ xObj1New = document.GraphicObjects[0]
+ xObj2New = document.GraphicObjects[1]
+ # there should be 2 different objects now but they have the same names,
+ # so rely on the object identity for testing...
+ self.assertNotEqual(xObj1Old, xObj1New)
+ self.assertNotEqual(xObj1Old, xObj2New)
+ self.assertNotEqual(xObj2Old, xObj1New)
+ self.assertNotEqual(xObj2Old, xObj2New)
+ self.xUITest.executeCommand(".uno:Redo") #Redo
+ self.assertEqual(document.GraphicObjects.getCount(), 2)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests4/tdf113252.py b/sw/qa/uitest/writer_tests4/tdf113252.py
new file mode 100644
index 000000000..a0b285354
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf113252.py
@@ -0,0 +1,49 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+#Bug 113252 - Basic Library Organizer is broken and closing dialogs crashes
+
+class tdf113252(UITestCase):
+
+ def test_tdf113252_macro_dialog(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ #Start LibreOffice. Go to Tools > Macros > Organize Macros > Basic
+ self.ui_test.execute_dialog_through_command(".uno:MacroDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ #Click Button Organizer
+ xorganize = xDialog.getChild("organize")
+ def handle_macro_dlg(dialog):
+
+ xTabs = dialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ select_pos(xTabs, "1")
+ select_pos(xTabs, "2")
+ #Click on its button Close
+ xCloseBtn = dialog.getChild("close")
+ xCloseBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.execute_blocking_action(xorganize.executeAction, args=('CLICK', ()),
+ dialog_handler=handle_macro_dlg)
+ #Click button Close in the next dialog -> crash.
+
+ xClose = xDialog.getChild("close")
+ self.ui_test.close_dialog_through_button(xClose)
+
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
diff --git a/sw/qa/uitest/writer_tests4/tdf113284.py b/sw/qa/uitest/writer_tests4/tdf113284.py
new file mode 100644
index 000000000..4a4750b00
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf113284.py
@@ -0,0 +1,48 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+class tdf113284(UITestCase):
+
+ def test_tdf113284(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf113284.odt"))
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.processEventsToIdle()
+
+ xPageCount = document.CurrentController.PageCount
+ self.ui_test.execute_dialog_through_command(".uno:GotoPage")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xPageText = xDialog.getChild("page")
+ xPageText.executeAction("TYPE", mkPropertyValues({"TEXT":str(xPageCount)})) # goto last page
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ xToolkit.processEventsToIdle()
+
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], str(xPageCount))
+ self.ui_test.execute_dialog_through_command(".uno:EditCurIndex") #open index dialog
+ xDiagIndex = self.xUITest.getTopFocusWindow()
+ xCancBtn = xDiagIndex.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCancBtn) # close dialog
+
+ #page count is not constant
+ #self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "66") #page 66 start of the Index
+ #pagecount unchanged
+ self.assertEqual(document.CurrentController.PageCount, xPageCount)
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests4/tdf115088.py b/sw/qa/uitest/writer_tests4/tdf115088.py
new file mode 100644
index 000000000..f10fe7490
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf115088.py
@@ -0,0 +1,48 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import time
+from uitest.debug import sleep
+
+class tdf115088(UITestCase):
+
+ def test_tdf115088(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ type_text(xWriterEdit, "1")
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+ type_text(xWriterEdit, "1")
+
+ selection = self.xUITest.executeCommand(".uno:SelectAll") #select whole text
+ self.xUITest.executeCommand(".uno:Cut") #cut text
+ type_text(xWriterEdit, "test")
+ self.xUITest.executeCommand(".uno:GoLeft")
+ self.xUITest.executeCommand(".uno:GoLeft")
+ self.xUITest.executeCommand(".uno:GoLeft")
+ self.xUITest.executeCommand(".uno:GoLeft")
+ self.xUITest.executeCommand(".uno:PasteUnformatted")
+ self.assertEqual(document.Text.String[0:2].replace('\r', '\n'), "1\n")
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sw/qa/uitest/writer_tests4/tdf115572.py b/sw/qa/uitest/writer_tests4/tdf115572.py
new file mode 100644
index 000000000..890d4b393
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf115572.py
@@ -0,0 +1,80 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+class tdf115572(UITestCase):
+
+ def insertTextIntoCell(self, table, cellName, text ):
+ tableText = table.getCellByName( cellName )
+ tableText.setString( text )
+
+ def test_tdf115572_table_format_gets_reset_deleting_row(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #go to second row - arrow down
+ self.xUITest.executeCommand(".uno:GoDown")
+ #delete row
+ self.xUITest.executeCommand(".uno:DeleteRows")
+ #now the cursor is in the second column - go left
+ self.xUITest.executeCommand(".uno:GoLeft")
+ self.xUITest.executeCommand(".uno:GoLeft")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+
+ def test_tdf115572_table_format_gets_reset_deleting_column(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #go to second column
+ self.xUITest.executeCommand(".uno:GoRight")
+ #delete column
+ self.xUITest.executeCommand(".uno:DeleteColumns")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests4/tdf115573.py b/sw/qa/uitest/writer_tests4/tdf115573.py
new file mode 100644
index 000000000..bfcb872a8
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf115573.py
@@ -0,0 +1,138 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+class tdf115573(UITestCase):
+
+ def insertTextIntoCell(self, table, cellName, text ):
+ tableText = table.getCellByName( cellName )
+ tableText.setString( text )
+
+ def test_tdf115573_Table_loses_formatting_inserting_row_before(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #go to second row - arrow down
+ self.xUITest.executeCommand(".uno:GoDown")
+ #insert row
+ self.xUITest.executeCommand(".uno:InsertRowsBefore")
+ #go up
+ self.xUITest.executeCommand(".uno:GoUp")
+ self.xUITest.executeCommand(".uno:GoUp")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+
+ def test_tdf115573_Table_loses_formatting_inserting_row_after(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #go to second row - arrow down
+ self.xUITest.executeCommand(".uno:GoDown")
+ #insert row
+ self.xUITest.executeCommand(".uno:InsertRowsAfter")
+ #go up
+ self.xUITest.executeCommand(".uno:GoUp")
+ self.xUITest.executeCommand(".uno:GoUp")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+
+ def test_tdf115573_Table_loses_formatting_inserting_column_left(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #insert column left
+ self.xUITest.executeCommand(".uno:InsertColumnsBefore")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+
+ def test_tdf115573_Table_loses_formatting_inserting_column_right(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ #insert table 2x2
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+ #select font format - Bold and write text "abc"
+ self.xUITest.executeCommand(".uno:Bold")
+ tables = document.getTextTables()
+ self.insertTextIntoCell(tables[0], "A1", "abc" )
+ #insert column left
+ self.xUITest.executeCommand(".uno:InsertColumnsAfter")
+ #check the format of the text (should be still bold) Format-Character-Font-Style-Bold
+ self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "0")
+ xweststylelbcjk = xDialog.getChild("weststylelb-cjk")
+ self.assertEqual(get_state_as_dict(xweststylelbcjk)["Text"], "Bold")
+ xCloseBtn = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCloseBtn)
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
+
diff --git a/sw/qa/uitest/writer_tests4/tdf122449.py b/sw/qa/uitest/writer_tests4/tdf122449.py
new file mode 100644
index 000000000..06a603c5c
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf122449.py
@@ -0,0 +1,57 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.debug import sleep
+from uitest.uihelper.common import get_state_as_dict, type_text
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Bug 122449 - Crash in: mergedlo.dll when closing "Edit Index Entry" dialog (gen/gtk)
+
+class tdf122449(UITestCase):
+
+ def test_tdf122449_crash_edit_index_entry(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf122449.odt"))
+ document = self.ui_test.get_component()
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ #search word Autocorrect (second find) .uno:SearchDialog
+ self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ searchterm = xDialog.getChild("searchterm")
+ searchterm.executeAction("TYPE", mkPropertyValues({"TEXT":"Autocorrection"}))
+ xsearch = xDialog.getChild("search")
+ xsearch.executeAction("CLICK", tuple()) #first search
+ xsearch.executeAction("CLICK", tuple()) #2nd search
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "6")
+ xcloseBtn = xDialog.getChild("close")
+ self.ui_test.close_dialog_through_button(xcloseBtn)
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "HOME"}))
+ # invoke Index dialog Index entry .uno:IndexEntryDialog
+ self.ui_test.execute_dialog_through_command(".uno:IndexEntryDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xcloseBtn = xDialog.getChild("close")
+ self.ui_test.close_dialog_through_button(xcloseBtn)
+ # close
+ # Go to page 2
+ self.ui_test.execute_dialog_through_command(".uno:GotoPage")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xPageText = xDialog.getChild("page")
+ xPageText.executeAction("TYPE", mkPropertyValues({"TEXT":"2"}))
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+ # verify
+ self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests4/tdf49683.py b/sw/qa/uitest/writer_tests4/tdf49683.py
new file mode 100644
index 000000000..3d5af6a71
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf49683.py
@@ -0,0 +1,38 @@
+# -*- 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.path import get_srcdir_url
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
+
+class tdf49683(UITestCase):
+
+#tdf 49683
+ def test_open_documentProperties_tdf49683(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf49683.rtf"))
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1") #tab description
+ xKeywordsText = xDialog.getChild("keywords")
+ self.assertEqual(get_state_as_dict(xKeywordsText)["Text"], "bhavb")
+
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
diff --git a/sw/qa/uitest/writer_tests4/tdf51352.py b/sw/qa/uitest/writer_tests4/tdf51352.py
new file mode 100644
index 000000000..d65800854
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf51352.py
@@ -0,0 +1,53 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.debug import sleep
+
+class tdf51352(UITestCase):
+
+ def test_convert_nested_table_to_text_tdf51352(self):
+
+ self.ui_test.create_doc_in_start_center("writer")
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+ document = self.ui_test.get_component()
+ #1. New a text document
+ #2. Insert a table and then in one cell create another table
+ #-insert a table (by default 2x2)
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+ #-put the cursor inside first cell top left for example
+ #-insert an inner table (by default 2x2) inside this cell
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+ #3. Select the first table
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"}))
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"}))
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"}))
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"}))
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"}))
+ self.assertEqual(document.TextTables.getCount(), 2)
+ #4. From menu "Table->Convert->Table to Text
+ self.ui_test.execute_dialog_through_command(".uno:ConvertTableToText")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+ self.assertEqual(document.TextTables.getCount(), 0)
+ #5. Undo/Redo
+ self.xUITest.executeCommand(".uno:Undo")
+ self.assertEqual(document.TextTables.getCount(), 2)
+ self.xUITest.executeCommand(".uno:Redo")
+ self.assertEqual(document.TextTables.getCount(), 0)
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
+