summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-15 14:59:15 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-04-27 10:14:41 +0200
commit66331ed8f549cd9fad331b7d2a1d7dcf3498a553 (patch)
tree68fcd54d421e4883142edee7b92a5c713d4d879b /sw
parent5e845e5230ed6982bfef761e86d552f1c96b67ad (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> (cherry picked from commit ff93e4977cb1e23f355d248a77e8d0e56bb0f4b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92766 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@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..a6102da05b77
--- /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 (.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: