summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-15 14:59:15 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-23 12:00:28 +0200
commitff93e4977cb1e23f355d248a77e8d0e56bb0f4b9 (patch)
tree549a091f0aaf8acd6b61f38b0df0a604421a1ae9 /sw
parent5b7561e758d3552d41bd65149f1fcbb6650e0887 (diff)
tdf#131936 Correctly detect OOXML variant on import
Change-Id: I29a6b0454bf741ce8ad49078597b3412a83dedb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92278 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/uitest/writer_tests7/data/tdf131936.docxbin0 -> 4326 bytes
-rw-r--r--sw/qa/uitest/writer_tests7/tdf131936.py32
2 files changed, 32 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests7/data/tdf131936.docx b/sw/qa/uitest/writer_tests7/data/tdf131936.docx
new file mode 100644
index 000000000000..f993d6ee327f
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/data/tdf131936.docx
Binary files differ
diff --git a/sw/qa/uitest/writer_tests7/tdf131936.py b/sw/qa/uitest/writer_tests7/tdf131936.py
new file mode 100644
index 000000000000..5d2de2c3a697
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf131936.py
@@ -0,0 +1,32 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+# 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
+from uitest.path import get_srcdir_url
+from uitest.config import DEFAULT_SLEEP
+import time
+
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/sw/qa/uitest/writer_tests7/data/" + file_name
+
+class tdf131936(UITestCase):
+
+ def test_tdf131936_saveas_docx_version(self):
+ self.ui_test.load_file(get_url_for_data_file("tdf131936.docx"))
+
+ self.ui_test.execute_dialog_through_command(".uno:SaveAs")
+ time.sleep(DEFAULT_SLEEP)
+ xDialog = self.xUITest.getTopFocusWindow()
+ xFileTypeCombo = xDialog.getChild("file_type")
+ state = get_state_as_dict(xFileTypeCombo)
+ self.assertEqual(state["SelectEntryText"], "Office Open XML Text (Transitional) (.docx)")
+
+ xCancel = xDialog.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCancel)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: