summaryrefslogtreecommitdiffstats
path: root/sd/qa/uitest/impress_tests2
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/uitest/impress_tests2')
-rw-r--r--sd/qa/uitest/impress_tests2/tdf106612.py47
-rw-r--r--sd/qa/uitest/impress_tests2/tdf125449.py59
-rw-r--r--sd/qa/uitest/impress_tests2/tdf127900.py43
-rw-r--r--sd/qa/uitest/impress_tests2/tdf130440.py65
-rw-r--r--sd/qa/uitest/impress_tests2/tdf133713.py58
-rw-r--r--sd/qa/uitest/impress_tests2/tdf137637.py57
-rw-r--r--sd/qa/uitest/impress_tests2/tdf139511.py51
-rw-r--r--sd/qa/uitest/impress_tests2/tdf141297.py80
-rw-r--r--sd/qa/uitest/impress_tests2/tdf141708.py33
-rw-r--r--sd/qa/uitest/impress_tests2/tdf144943.py31
-rw-r--r--sd/qa/uitest/impress_tests2/tdf146019.py36
-rw-r--r--sd/qa/uitest/impress_tests2/tdf149787.py40
-rw-r--r--sd/qa/uitest/impress_tests2/tdf82616.py70
-rw-r--r--sd/qa/uitest/impress_tests2/tdf91762.py45
14 files changed, 715 insertions, 0 deletions
diff --git a/sd/qa/uitest/impress_tests2/tdf106612.py b/sd/qa/uitest/impress_tests2/tdf106612.py
new file mode 100644
index 0000000000..6ca8fbbaf5
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf106612.py
@@ -0,0 +1,47 @@
+# -*- 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.uihelper.common import get_state_as_dict
+
+class Tdf106612(UITestCase):
+
+ def test_tdf106612(self):
+ with self.ui_test.create_doc_in_start_center("impress"):
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+
+ self.xUITest.executeCommand(".uno:DuplicatePage")
+
+ self.assertEqual("2", get_state_as_dict(xEditWin)["CurrentSlide"])
+
+ xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SdNavigatorPanel"}))
+
+ xTree = xImpressDoc.getChild("tree")
+ self.assertEqual(2, len(xTree.getChildren()))
+
+ self.assertEqual("Slide 1", get_state_as_dict(xTree.getChild('0'))['Text'])
+ self.assertEqual(2, len(xTree.getChild('0').getChildren()))
+
+ self.assertEqual("Slide 2", get_state_as_dict(xTree.getChild('1'))['Text'])
+ self.assertEqual(2, len(xTree.getChild('1').getChildren()))
+
+ xTree.getChild('0').executeAction("DOUBLECLICK", tuple())
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '1' != '2'
+ self.assertEqual("1", get_state_as_dict(xEditWin)["CurrentSlide"])
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf125449.py b/sd/qa/uitest/impress_tests2/tdf125449.py
new file mode 100644
index 0000000000..242a79e657
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf125449.py
@@ -0,0 +1,59 @@
+# -*- 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 select_pos
+from com.sun.star.awt.GradientStyle import LINEAR
+
+class tdf125449(UITestCase):
+
+ def test_tdf125449(self):
+
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as xPageSetupDlg:
+
+ tabcontrol = xPageSetupDlg.getChild("tabcontrol")
+ select_pos(tabcontrol, "1")
+
+ xBtn = xPageSetupDlg.getChild('btngradient')
+ xBtn.executeAction("CLICK", tuple())
+
+ xAngle = xPageSetupDlg.getChild('anglemtr')
+ xAngle.executeAction("UP", tuple())
+
+
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.Style, LINEAR)
+ self.assertEqual(
+ hex(document.DrawPages.getByIndex(0).Background.FillGradient.StartColor), '0xdde8cb')
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.Angle, 450)
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.Border, 0)
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.XOffset, 0)
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.YOffset, 0)
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.StartIntensity, 100)
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradient.EndIntensity, 100)
+
+ # Without the patch in place, this test would have failed with
+ # AssertionError: '' != 'gradient'
+ self.assertEqual(
+ document.DrawPages.getByIndex(0).Background.FillGradientName, 'gradient')
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf127900.py b/sd/qa/uitest/impress_tests2/tdf127900.py
new file mode 100644
index 0000000000..e32b76591a
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf127900.py
@@ -0,0 +1,43 @@
+# -*- 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 select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
+
+
+class tdf127900(UITestCase):
+
+ def test_tdf127900(self):
+
+ with self.ui_test.load_file(get_url_for_data_file("tdf127900.fodp")) as doc:
+
+ xMasterLang = doc.MasterPages.getByIndex(0).getByIndex(1).CharLocale.Language
+ xSlideLang = doc.DrawPages.getByIndex(1).getByIndex(1).CharLocale.Language
+
+ self.assertEqual(xMasterLang, xSlideLang)
+
+ self.xUITest.executeCommand(".uno:SlideMasterPage")
+
+ xMaster = self.xUITest.getTopFocusWindow().getChild("impress_win")
+
+ xMaster.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
+ xMaster.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
+
+ with self.ui_test.execute_dialog_through_command(".uno:FontDialog") as xDlg:
+
+ select_pos(xDlg.getChild("cbWestLanguage"), "10")
+
+ xMasterLang = doc.MasterPages.getByIndex(0).getByIndex(1).CharLocale.Language
+ xSlideLang = doc.DrawPages.getByIndex(1).getByIndex(1).CharLocale.Language
+
+ self.assertEqual(xMasterLang, xSlideLang)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf130440.py b/sd/qa/uitest/impress_tests2/tdf130440.py
new file mode 100644
index 0000000000..73fe44b31b
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf130440.py
@@ -0,0 +1,65 @@
+# -*- 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
+
+class tdf129346(UITestCase):
+
+ def test_run(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+ self.xUITest.executeCommand(".uno:DuplicatePage")
+ xToolkit.processEventsToIdle()
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
+ xDoc = self.xUITest.getTopFocusWindow()
+ xEdit = xDoc.getChild("impress_win")
+ # Type "test" into the text box
+ xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
+ # Go to Page 1, which also forces to end edit box
+ xEdit.executeAction("GOTO", mkPropertyValues({"PAGE": "1"}))
+ xToolkit.processEventsToIdle()
+
+ # We should be at Page 1
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+
+ # Undo sends us to Page 2 and undo-es the text edit
+ self.xUITest.executeCommand(".uno:Undo")
+ xToolkit.processEventsToIdle()
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
+ # Undo sends us to page 1 and undo-es command ".uno:DuplicatePage"
+ self.xUITest.executeCommand(".uno:Undo")
+ xToolkit.processEventsToIdle()
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 1)
+
+ # Redo ".uno:DuplicatePage" - we go to Page 2
+ self.xUITest.executeCommand(".uno:Redo")
+ xToolkit.processEventsToIdle()
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
+ # Redo text edit
+ self.xUITest.executeCommand(".uno:Redo")
+
+ xDoc = self.xUITest.getTopFocusWindow()
+ xEdit = xDoc.getChild("impress_win")
+ xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
+
+ xToolkit.processEventsToIdle()
+ #Without the accompanying fix in place, it would fail with AssertionError: 2 != 1
+ self.assertEqual(document.CurrentController.getCurrentPage().Number, 2)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf133713.py b/sd/qa/uitest/impress_tests2/tdf133713.py
new file mode 100644
index 0000000000..a4195fd2b2
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf133713.py
@@ -0,0 +1,58 @@
+# -*- 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.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+
+class Tdf133713(UITestCase):
+
+ def test_Tdf133713(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ xDoc = self.xUITest.getTopFocusWindow()
+ xEditWin = xDoc.getChild("impress_win")
+
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"one"}))
+ xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+ xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"two"}))
+ xEditWin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+ xEditWin.executeAction("TYPE", mkPropertyValues({"TEXT":"three"}))
+
+ self.xUITest.executeCommand(".uno:SelectAll")
+
+ with self.ui_test.execute_dialog_through_command(".uno:OutlineBullet") as xDialog:
+ xNumFormat = xDialog.getChild("numfmtlb")
+ xSelection = xDialog.getChild("selectionrb")
+ xIndent = xDialog.getChild("indentmf")
+ xRelSize = xDialog.getChild("relsize")
+
+ # Check some default values
+ self.assertEqual("Bullet", get_state_as_dict(xNumFormat)["DisplayText"])
+ self.assertEqual("true", get_state_as_dict(xSelection)["Checked"])
+ self.assertEqual("0", get_state_as_dict(xIndent)["Value"])
+ self.assertEqual("45%", get_state_as_dict(xRelSize)["Text"])
+
+ drawPage = document.getDrawPages().getByIndex(0)
+ shape = drawPage.getByIndex(1)
+ xEnumeration = shape.Text.createEnumeration()
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 0 != None
+ for i in range(3):
+ self.assertEqual(0, xEnumeration.nextElement().NumberingLevel)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf137637.py b/sd/qa/uitest/impress_tests2/tdf137637.py
new file mode 100644
index 0000000000..fa2a164729
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf137637.py
@@ -0,0 +1,57 @@
+# -*- 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.uihelper.common import get_state_as_dict
+
+class Tdf137637(UITestCase):
+
+ def test_tdf137637(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ # Insert shape with Ctrl key
+ xArgs = mkPropertyValues({"KeyModifier": 8192})
+ self.xUITest.executeCommandWithParameters(".uno:BasicShapes.rectangle", xArgs)
+
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+
+ xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SdCustomAnimationPanel"}))
+
+ # Without the fix in place, this test would have failed with
+ # AttributeError: 'NoneType' object has no attribute 'getImplementationName'
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ xAnimationList = xImpressDoc.getChild("custom_animation_list")
+ self.assertEqual('0', get_state_as_dict(xAnimationList)['Children'])
+
+ xAddBtn = xImpressDoc.getChild("add_effect")
+ xAddBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual('1', get_state_as_dict(xAnimationList)['Children'])
+
+ self.xUITest.executeCommand(".uno:Undo")
+
+ # tdf#135033: Without the fix in place, this test would have failed with
+ # AssertionError: '0' != '1'
+ self.assertEqual('0', get_state_as_dict(xAnimationList)['Children'])
+
+ # tdf#145030: Without the fix in place, this test would have failed with
+ # AttributeError: 'NoneType' object has no attribute 'getImplementationName'
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
diff --git a/sd/qa/uitest/impress_tests2/tdf139511.py b/sd/qa/uitest/impress_tests2/tdf139511.py
new file mode 100644
index 0000000000..52e54d2915
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf139511.py
@@ -0,0 +1,51 @@
+# -*- 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.uihelper.common import change_measurement_unit
+
+class tdf139511(UITestCase):
+
+ def test_tdf139511(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ with change_measurement_unit(self, "Centimeter"):
+
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=4&Rows:short=4")
+
+ self.assertEqual(3885, document.DrawPages[0].getByIndex(2).BoundRect.Height)
+ self.assertEqual(14136, document.DrawPages[0].getByIndex(2).BoundRect.Width)
+
+ with self.ui_test.execute_dialog_through_command(".uno:TransformDialog") as xDialog:
+
+
+ xWidth = xDialog.getChild('MTR_FLD_WIDTH')
+ xHeight = xDialog.getChild('MTR_FLD_HEIGHT')
+
+ xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
+ xWidth.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
+ xWidth.executeAction("TYPE", mkPropertyValues({"TEXT": "10"}))
+
+ xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+A"}))
+ xHeight.executeAction("TYPE", mkPropertyValues({"KEYCODE": "BACKSPACE"}))
+ xHeight.executeAction("TYPE", mkPropertyValues({"TEXT": "5"}))
+
+
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: 5037 != 8036
+ self.assertEqual(5037, document.DrawPages[0].getByIndex(2).BoundRect.Height)
+ self.assertEqual(10037, document.DrawPages[0].getByIndex(2).BoundRect.Width)
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf141297.py b/sd/qa/uitest/impress_tests2/tdf141297.py
new file mode 100644
index 0000000000..bd776253e7
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf141297.py
@@ -0,0 +1,80 @@
+# -*- 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.uihelper.common import get_state_as_dict, get_url_for_data_file
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class tdf141297(UITestCase):
+
+ def test_tdf141297(self):
+ with TemporaryDirectory() as tempdir:
+ xFilePath = os.path.join(tempdir, "tdf141297-tmp.odp")
+
+ with self.ui_test.create_doc_in_start_center("impress"):
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ with self.ui_test.execute_dialog_through_command(".uno:InsertGraphic", close_button="") as xOpenDialog:
+
+ xFileName = xOpenDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("LibreOffice.jpg")}))
+
+ xLink = xOpenDialog.getChild("link")
+ self.assertEqual("false", get_state_as_dict(xLink)['Selected'])
+
+ xLink.executeAction("CLICK", tuple())
+
+ xOpen = xOpenDialog.getChild("open")
+ #Confirmation dialog is displayed
+ with self.ui_test.execute_dialog_through_action(xOpen, "CLICK"):
+ pass
+
+ with self.ui_test.execute_dialog_through_command(".uno:ManageLinks", close_button="close") as xDialog:
+
+ sLinks = "TB_LINKS"
+ xLinks = xDialog.getChild(sLinks)
+ self.assertEqual(1, len(xLinks.getChildren()))
+
+ sFileName = "FULL_FILE_NAME"
+ xFileName = xDialog.getChild(sFileName)
+ self.assertTrue(get_state_as_dict(xFileName)["Text"].endswith("/LibreOffice.jpg"))
+
+ sBreakLink = "BREAK_LINK"
+ xBreakLink = xDialog.getChild(sBreakLink)
+
+ with self.ui_test.execute_blocking_action(xBreakLink.executeAction,
+ args=("CLICK", tuple()), close_button="yes"):
+ pass
+
+ # Save Copy as
+ with self.ui_test.execute_dialog_through_command(".uno:SaveAs", close_button="open") as xDialog:
+
+ xFileName = xDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+
+ with self.ui_test.load_file(systemPathToFileUrl(xFilePath)):
+
+ self.xUITest.executeCommand(".uno:ManageLinks")
+
+ # Since the image is no longer linked, the link dialog is not open.
+ # Without the fix in place, this dialog would have been opened
+ xMainWin = self.xUITest.getTopFocusWindow()
+ self.assertTrue(sLinks not in xMainWin.getChildren())
+ self.assertTrue(sFileName not in xMainWin.getChildren())
+ self.assertTrue(sBreakLink not in xMainWin.getChildren())
+ self.assertTrue("impress_win" in xMainWin.getChildren())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf141708.py b/sd/qa/uitest/impress_tests2/tdf141708.py
new file mode 100644
index 0000000000..bb9298f686
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf141708.py
@@ -0,0 +1,33 @@
+# -*- 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
+
+class tdf141708(UITestCase):
+
+ def test_tdf141708(self):
+
+ with self.ui_test.create_doc_in_start_center("impress"):
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ self.xUITest.executeCommand(".uno:Navigator")
+
+ self.xUITest.executeCommand(".uno:CloseDoc")
+
+ with self.ui_test.create_doc_in_start_center("impress"):
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ # Without the fix in place, this test would have crashed here
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf144943.py b/sd/qa/uitest/impress_tests2/tdf144943.py
new file mode 100644
index 0000000000..9bf5a891fb
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf144943.py
@@ -0,0 +1,31 @@
+# -*- 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_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+#Bug 144943 - FILEOPEN PPTX Read-only passwords on PPTX files are not working
+
+class tdf144943(UITestCase):
+
+ def test_tdf144943(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf144943.pptx")):
+ document = self.ui_test.get_component()
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: False is not true
+ self.assertTrue(document.isReadonly())
+
+ with self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
+ xPassword = xDialog.getChild("newpassEntry")
+ xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"}))
+
+ self.assertFalse(document.isReadonly())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf146019.py b/sd/qa/uitest/impress_tests2/tdf146019.py
new file mode 100644
index 0000000000..16e0290ab1
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf146019.py
@@ -0,0 +1,36 @@
+# -*- 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.uihelper.common import get_url_for_data_file
+
+class tdf146019(UITestCase):
+
+ def test_tdf146019(self):
+
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ with self.ui_test.execute_dialog_through_command(".uno:InsertGraphic", close_button="open") as xOpenDialog:
+
+ xFileName = xOpenDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": get_url_for_data_file("tdf146019.jpg")}))
+
+ # Before the fix, a dialog was displayed at this point
+
+ # Check the shape is rotated, height > width
+ drawPage = document.getDrawPages().getByIndex(0)
+ shape = drawPage.getByIndex(2)
+ self.assertEqual(8996, shape.getSize().Width)
+ self.assertEqual(11745, shape.getSize().Height)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf149787.py b/sd/qa/uitest/impress_tests2/tdf149787.py
new file mode 100644
index 0000000000..3d65f1c0bb
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf149787.py
@@ -0,0 +1,40 @@
+#
+# 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 libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
+
+class TestTdf149787(UITestCase):
+
+ def testTdf149787(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ self.assertIsNone(document.CurrentSelection)
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ with self.ui_test.execute_dialog_through_command(".uno:FormatArea", close_button="cancel") as xDialog:
+ tabControl = xDialog.getChild("tabcontrol")
+ select_pos(tabControl, "0")
+ btnColor = xDialog.getChild("btncolor")
+ btnColor.executeAction("CLICK", tuple())
+ btnMoreColors = xDialog.getChild("btnMoreColors")
+
+ with self.ui_test.execute_blocking_action(btnMoreColors.executeAction, args=('CLICK', ()), close_button="buttonClose") as dialog:
+ xCloseBtn = dialog.getChild("buttonClose")
+ self.ui_test.wait_until_property_is_updated(xCloseBtn, "Enabled", "true")
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf82616.py b/sd/qa/uitest/impress_tests2/tdf82616.py
new file mode 100644
index 0000000000..134be9bb42
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf82616.py
@@ -0,0 +1,70 @@
+# -*- 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.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import change_measurement_unit
+from uitest.framework import UITestCase
+
+class Tdf82616(UITestCase):
+
+ def test_tdf82616(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ with change_measurement_unit(self, 'Centimeter'):
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+
+ self.assertIsNone(document.CurrentSelection)
+
+ xEditWin = xImpressDoc.getChild("impress_win")
+ xEditWin.executeAction("SELECT", mkPropertyValues({"OBJECT":"Unnamed Drawinglayer object 1"}))
+ self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName())
+
+ with self.ui_test.execute_dialog_through_command(".uno:Size") as xDialog:
+ self.assertEqual('25.2', get_state_as_dict(xDialog.getChild('MTR_FLD_WIDTH'))['Value'])
+ self.assertEqual('9.13', get_state_as_dict(xDialog.getChild('MTR_FLD_HEIGHT'))['Value'])
+ self.assertEqual('1.4', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_X'))['Value'])
+ self.assertEqual('3.69', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_Y'))['Value'])
+ self.assertEqual('0', get_state_as_dict(xDialog.getChild('NF_ANGLE'))['Value'])
+
+ xEditWin.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "PosSizePropertyPanel"}))
+
+ xHorizontalPos = xImpressDoc.getChild("horizontalpos")
+ self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "1.4")
+ self.assertEqual("1.4", get_state_as_dict(xHorizontalPos)['Value'])
+
+ xVerticalPos = xImpressDoc.getChild("verticalpos")
+ self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "3.69")
+ self.assertEqual("3.69", get_state_as_dict(xVerticalPos)['Value'])
+
+ xDrawinglayerObject = xEditWin.getChild("Unnamed Drawinglayer object 1")
+ xDrawinglayerObject.executeAction("MOVE", mkPropertyValues({"X": "-5000", "Y":"-10000"}))
+
+ with self.ui_test.execute_dialog_through_command(".uno:Size") as xDialog:
+ self.assertEqual('25.2', get_state_as_dict(xDialog.getChild('MTR_FLD_WIDTH'))['Value'])
+ self.assertEqual('9.13', get_state_as_dict(xDialog.getChild('MTR_FLD_HEIGHT'))['Value'])
+ self.assertEqual('-3.6', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_X'))['Value'])
+ self.assertEqual('-6.32', get_state_as_dict(xDialog.getChild('MTR_FLD_POS_Y'))['Value'])
+ self.assertEqual('0', get_state_as_dict(xDialog.getChild('NF_ANGLE'))['Value'])
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '-3.6' != '0'
+ self.ui_test.wait_until_property_is_updated(xHorizontalPos, "Value", "-3.6")
+ self.assertEqual("-3.6", get_state_as_dict(xHorizontalPos)['Value'])
+
+ self.ui_test.wait_until_property_is_updated(xVerticalPos, "Value", "-6.32")
+ self.assertEqual("-6.32", get_state_as_dict(xVerticalPos)['Value'])
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/uitest/impress_tests2/tdf91762.py b/sd/qa/uitest/impress_tests2/tdf91762.py
new file mode 100644
index 0000000000..e36baec620
--- /dev/null
+++ b/sd/qa/uitest/impress_tests2/tdf91762.py
@@ -0,0 +1,45 @@
+# -*- 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
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf91762(UITestCase):
+
+ def test_tdf91762(self):
+ with self.ui_test.create_doc_in_start_center("impress") as document:
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ self.xUITest.executeCommand(".uno:AssignLayout?WhatLayout:long=1")
+
+ with self.ui_test.execute_dialog_through_command(".uno:InsertTable") as xDialog:
+ self.assertEqual('5', get_state_as_dict(xDialog.getChild('columns'))['Text'])
+ self.assertEqual('2', get_state_as_dict(xDialog.getChild('rows'))['Text'])
+
+ self.assertEqual(1961, document.DrawPages[0].getByIndex(1).BoundRect.Height)
+ self.assertEqual(25198, document.DrawPages[0].getByIndex(1).Size.Width)
+ self.assertEqual(1923, document.DrawPages[0].getByIndex(1).Size.Height)
+
+ self.assertEqual(1400, document.DrawPages[0].getByIndex(1).Position.X)
+ self.assertEqual(3685, document.DrawPages[0].getByIndex(1).Position.Y)
+
+ xDoc = self.xUITest.getTopFocusWindow()
+ xEdit = xDoc.getChild("impress_win")
+ for i in range(5):
+ xEdit.executeAction("TYPE", mkPropertyValues({"TEXT":"test"}))
+ xEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+
+ # tdf#138011: Without the fix in place, it will be much lower
+ self.assertEqual(5466, document.DrawPages[0].getByIndex(1).BoundRect.Height)
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: